diff options
Diffstat (limited to 'Documentation')
402 files changed, 12986 insertions, 2274 deletions
diff --git a/Documentation/ABI/stable/sysfs-devices-system-cpu b/Documentation/ABI/stable/sysfs-devices-system-cpu new file mode 100644 index 000000000000..33c133e2a631 --- /dev/null +++ b/Documentation/ABI/stable/sysfs-devices-system-cpu | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | What: /sys/devices/system/cpu/dscr_default | ||
| 2 | Date: 13-May-2014 | ||
| 3 | KernelVersion: v3.15.0 | ||
| 4 | Contact: | ||
| 5 | Description: Writes are equivalent to writing to | ||
| 6 | /sys/devices/system/cpu/cpuN/dscr on all CPUs. | ||
| 7 | Reads return the last written value or 0. | ||
| 8 | This value is not a global default: it is a way to set | ||
| 9 | all per-CPU defaults at the same time. | ||
| 10 | Values: 64 bit unsigned integer (bit field) | ||
| 11 | |||
| 12 | What: /sys/devices/system/cpu/cpu[0-9]+/dscr | ||
| 13 | Date: 13-May-2014 | ||
| 14 | KernelVersion: v3.15.0 | ||
| 15 | Contact: | ||
| 16 | Description: Default value for the Data Stream Control Register (DSCR) on | ||
| 17 | a CPU. | ||
| 18 | This default value is used when the kernel is executing and | ||
| 19 | for any process that has not set the DSCR itself. | ||
| 20 | If a process ever sets the DSCR (via direct access to the | ||
| 21 | SPR) that value will be persisted for that process and used | ||
| 22 | on any CPU where it executes (overriding the value described | ||
| 23 | here). | ||
| 24 | If set by a process it will be inherited by child processes. | ||
| 25 | Values: 64 bit unsigned integer (bit field) | ||
diff --git a/Documentation/ABI/testing/configfs-usb-gadget b/Documentation/ABI/testing/configfs-usb-gadget index 37559a06393b..95a36589a66b 100644 --- a/Documentation/ABI/testing/configfs-usb-gadget +++ b/Documentation/ABI/testing/configfs-usb-gadget | |||
| @@ -62,6 +62,40 @@ KernelVersion: 3.11 | |||
| 62 | Description: | 62 | Description: |
| 63 | This group contains functions available to this USB gadget. | 63 | This group contains functions available to this USB gadget. |
| 64 | 64 | ||
| 65 | What: /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n> | ||
| 66 | Date: May 2014 | ||
| 67 | KernelVersion: 3.16 | ||
| 68 | Description: | ||
| 69 | This group contains "Feature Descriptors" specific for one | ||
| 70 | gadget's USB interface or one interface group described | ||
| 71 | by an IAD. | ||
| 72 | |||
| 73 | The attributes: | ||
| 74 | |||
| 75 | compatible_id - 8-byte string for "Compatible ID" | ||
| 76 | sub_compatible_id - 8-byte string for "Sub Compatible ID" | ||
| 77 | |||
| 78 | What: /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n>/<property> | ||
| 79 | Date: May 2014 | ||
| 80 | KernelVersion: 3.16 | ||
| 81 | Description: | ||
| 82 | This group contains "Extended Property Descriptors" specific for one | ||
| 83 | gadget's USB interface or one interface group described | ||
| 84 | by an IAD. | ||
| 85 | |||
| 86 | The attributes: | ||
| 87 | |||
| 88 | type - value 1..7 for interpreting the data | ||
| 89 | 1: unicode string | ||
| 90 | 2: unicode string with environment variable | ||
| 91 | 3: binary | ||
| 92 | 4: little-endian 32-bit | ||
| 93 | 5: big-endian 32-bit | ||
| 94 | 6: unicode string with a symbolic link | ||
| 95 | 7: multiple unicode strings | ||
| 96 | data - blob of data to be interpreted depending on | ||
| 97 | type | ||
| 98 | |||
| 65 | What: /config/usb-gadget/gadget/strings | 99 | What: /config/usb-gadget/gadget/strings |
| 66 | Date: Jun 2013 | 100 | Date: Jun 2013 |
| 67 | KernelVersion: 3.11 | 101 | KernelVersion: 3.11 |
| @@ -79,3 +113,14 @@ Description: | |||
| 79 | product - gadget's product description | 113 | product - gadget's product description |
| 80 | manufacturer - gadget's manufacturer description | 114 | manufacturer - gadget's manufacturer description |
| 81 | 115 | ||
| 116 | What: /config/usb-gadget/gadget/os_desc | ||
| 117 | Date: May 2014 | ||
| 118 | KernelVersion: 3.16 | ||
| 119 | Description: | ||
| 120 | This group contains "OS String" extension handling attributes. | ||
| 121 | |||
| 122 | use - flag turning "OS Desctiptors" support on/off | ||
| 123 | b_vendor_code - one-byte value used for custom per-device and | ||
| 124 | per-interface requests | ||
| 125 | qw_sign - an identifier to be reported as "OS String" | ||
| 126 | proper | ||
diff --git a/Documentation/ABI/testing/ima_policy b/Documentation/ABI/testing/ima_policy index f1c5cc9d17a8..4c3efe434806 100644 --- a/Documentation/ABI/testing/ima_policy +++ b/Documentation/ABI/testing/ima_policy | |||
| @@ -23,7 +23,7 @@ Description: | |||
| 23 | [fowner]] | 23 | [fowner]] |
| 24 | lsm: [[subj_user=] [subj_role=] [subj_type=] | 24 | lsm: [[subj_user=] [subj_role=] [subj_type=] |
| 25 | [obj_user=] [obj_role=] [obj_type=]] | 25 | [obj_user=] [obj_role=] [obj_type=]] |
| 26 | option: [[appraise_type=]] | 26 | option: [[appraise_type=]] [permit_directio] |
| 27 | 27 | ||
| 28 | base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK] | 28 | base: func:= [BPRM_CHECK][MMAP_CHECK][FILE_CHECK][MODULE_CHECK] |
| 29 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] | 29 | mask:= [MAY_READ] [MAY_WRITE] [MAY_APPEND] [MAY_EXEC] |
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 6e02c5029152..a9757dcf2e81 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
| @@ -114,14 +114,17 @@ What: /sys/bus/iio/devices/iio:deviceX/in_temp_raw | |||
| 114 | What: /sys/bus/iio/devices/iio:deviceX/in_tempX_raw | 114 | What: /sys/bus/iio/devices/iio:deviceX/in_tempX_raw |
| 115 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_x_raw | 115 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_x_raw |
| 116 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_y_raw | 116 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_y_raw |
| 117 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_z_raw | 117 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_ambient_raw |
| 118 | What: /sys/bus/iio/devices/iio:deviceX/in_temp_object_raw | ||
| 118 | KernelVersion: 2.6.35 | 119 | KernelVersion: 2.6.35 |
| 119 | Contact: linux-iio@vger.kernel.org | 120 | Contact: linux-iio@vger.kernel.org |
| 120 | Description: | 121 | Description: |
| 121 | Raw (unscaled no bias removal etc.) temperature measurement. | 122 | Raw (unscaled no bias removal etc.) temperature measurement. |
| 122 | If an axis is specified it generally means that the temperature | 123 | If an axis is specified it generally means that the temperature |
| 123 | sensor is associated with one part of a compound device (e.g. | 124 | sensor is associated with one part of a compound device (e.g. |
| 124 | a gyroscope axis). Units after application of scale and offset | 125 | a gyroscope axis). The ambient and object modifiers distinguish |
| 126 | between ambient (reference) and distant temperature for contact- | ||
| 127 | less measurements. Units after application of scale and offset | ||
| 125 | are milli degrees Celsius. | 128 | are milli degrees Celsius. |
| 126 | 129 | ||
| 127 | What: /sys/bus/iio/devices/iio:deviceX/in_tempX_input | 130 | What: /sys/bus/iio/devices/iio:deviceX/in_tempX_input |
| @@ -210,6 +213,14 @@ Contact: linux-iio@vger.kernel.org | |||
| 210 | Description: | 213 | Description: |
| 211 | Scaled humidity measurement in milli percent. | 214 | Scaled humidity measurement in milli percent. |
| 212 | 215 | ||
| 216 | What: /sys/bus/iio/devices/iio:deviceX/in_X_mean_raw | ||
| 217 | KernelVersion: 3.5 | ||
| 218 | Contact: linux-iio@vger.kernel.org | ||
| 219 | Description: | ||
| 220 | Averaged raw measurement from channel X. The number of values | ||
| 221 | used for averaging is device specific. The converting rules for | ||
| 222 | normal raw values also applies to the averaged raw values. | ||
| 223 | |||
| 213 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset | 224 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset |
| 214 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset | 225 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset |
| 215 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset | 226 | What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset |
| @@ -784,6 +795,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_incli_x_en | |||
| 784 | What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en | 795 | What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en |
| 785 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en | 796 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en |
| 786 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_en | 797 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_en |
| 798 | What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en | ||
| 787 | KernelVersion: 2.6.37 | 799 | KernelVersion: 2.6.37 |
| 788 | Contact: linux-iio@vger.kernel.org | 800 | Contact: linux-iio@vger.kernel.org |
| 789 | Description: | 801 | Description: |
| @@ -799,6 +811,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_type | |||
| 799 | What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type | 811 | What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type |
| 800 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type | 812 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type |
| 801 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_type | 813 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_type |
| 814 | What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type | ||
| 802 | KernelVersion: 2.6.37 | 815 | KernelVersion: 2.6.37 |
| 803 | Contact: linux-iio@vger.kernel.org | 816 | Contact: linux-iio@vger.kernel.org |
| 804 | Description: | 817 | Description: |
| @@ -845,6 +858,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_incli_y_index | |||
| 845 | What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index | 858 | What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index |
| 846 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index | 859 | What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index |
| 847 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_index | 860 | What: /sys/.../iio:deviceX/scan_elements/in_pressure_index |
| 861 | What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index | ||
| 848 | KernelVersion: 2.6.37 | 862 | KernelVersion: 2.6.37 |
| 849 | Contact: linux-iio@vger.kernel.org | 863 | Contact: linux-iio@vger.kernel.org |
| 850 | Description: | 864 | Description: |
| @@ -881,6 +895,25 @@ Description: | |||
| 881 | on-chip EEPROM. After power-up or chip reset the device will | 895 | on-chip EEPROM. After power-up or chip reset the device will |
| 882 | automatically load the saved configuration. | 896 | automatically load the saved configuration. |
| 883 | 897 | ||
| 898 | What: /sys/.../iio:deviceX/in_illuminanceY_input | ||
| 899 | What: /sys/.../iio:deviceX/in_illuminanceY_raw | ||
| 900 | What: /sys/.../iio:deviceX/in_illuminanceY_mean_raw | ||
| 901 | KernelVersion: 3.4 | ||
| 902 | Contact: linux-iio@vger.kernel.org | ||
| 903 | Description: | ||
| 904 | Illuminance measurement, units after application of scale | ||
| 905 | and offset are lux. | ||
| 906 | |||
| 907 | What: /sys/.../iio:deviceX/in_intensityY_raw | ||
| 908 | What: /sys/.../iio:deviceX/in_intensityY_ir_raw | ||
| 909 | What: /sys/.../iio:deviceX/in_intensityY_both_raw | ||
| 910 | KernelVersion: 3.4 | ||
| 911 | Contact: linux-iio@vger.kernel.org | ||
| 912 | Description: | ||
| 913 | Unit-less light intensity. Modifiers both and ir indicate | ||
| 914 | that measurements contains visible and infrared light | ||
| 915 | components or just infrared light, respectively. | ||
| 916 | |||
| 884 | What: /sys/.../iio:deviceX/in_intensity_red_integration_time | 917 | What: /sys/.../iio:deviceX/in_intensity_red_integration_time |
| 885 | What: /sys/.../iio:deviceX/in_intensity_green_integration_time | 918 | What: /sys/.../iio:deviceX/in_intensity_green_integration_time |
| 886 | What: /sys/.../iio:deviceX/in_intensity_blue_integration_time | 919 | What: /sys/.../iio:deviceX/in_intensity_blue_integration_time |
| @@ -891,3 +924,12 @@ Contact: linux-iio@vger.kernel.org | |||
| 891 | Description: | 924 | Description: |
| 892 | This attribute is used to get/set the integration time in | 925 | This attribute is used to get/set the integration time in |
| 893 | seconds. | 926 | seconds. |
| 927 | |||
| 928 | What: /sys/bus/iio/devices/iio:deviceX/in_rot_quaternion_raw | ||
| 929 | KernelVersion: 3.15 | ||
| 930 | Contact: linux-iio@vger.kernel.org | ||
| 931 | Description: | ||
| 932 | Raw value of quaternion components using a format | ||
| 933 | x y z w. Here x, y, and z component represents the axis about | ||
| 934 | which a rotation will occur and w component represents the | ||
| 935 | amount of rotation. | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935 b/Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935 new file mode 100644 index 000000000000..6708c5e264aa --- /dev/null +++ b/Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935 | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | What /sys/bus/iio/devices/iio:deviceX/in_proximity_raw | ||
| 2 | Date: March 2014 | ||
| 3 | KernelVersion: 3.15 | ||
| 4 | Contact: Matt Ranostay <mranostay@gmail.com> | ||
| 5 | Description: | ||
| 6 | Get the current distance in meters of storm (1km steps) | ||
| 7 | 1000-40000 = distance in meters | ||
| 8 | |||
| 9 | What /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity | ||
| 10 | Date: March 2014 | ||
| 11 | KernelVersion: 3.15 | ||
| 12 | Contact: Matt Ranostay <mranostay@gmail.com> | ||
| 13 | Description: | ||
| 14 | Show or set the gain boost of the amp, from 0-31 range. | ||
| 15 | 18 = indoors (default) | ||
| 16 | 14 = outdoors | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-pci b/Documentation/ABI/testing/sysfs-bus-pci index a3c5a6685036..6615fda0abfb 100644 --- a/Documentation/ABI/testing/sysfs-bus-pci +++ b/Documentation/ABI/testing/sysfs-bus-pci | |||
| @@ -117,7 +117,7 @@ Description: | |||
| 117 | 117 | ||
| 118 | What: /sys/bus/pci/devices/.../vpd | 118 | What: /sys/bus/pci/devices/.../vpd |
| 119 | Date: February 2008 | 119 | Date: February 2008 |
| 120 | Contact: Ben Hutchings <bhutchings@solarflare.com> | 120 | Contact: Ben Hutchings <bwh@kernel.org> |
| 121 | Description: | 121 | Description: |
| 122 | A file named vpd in a device directory will be a | 122 | A file named vpd in a device directory will be a |
| 123 | binary file containing the Vital Product Data for the | 123 | binary file containing the Vital Product Data for the |
| @@ -250,3 +250,24 @@ Description: | |||
| 250 | valid. For example, writing a 2 to this file when sriov_numvfs | 250 | valid. For example, writing a 2 to this file when sriov_numvfs |
| 251 | is not 0 and not 2 already will return an error. Writing a 10 | 251 | is not 0 and not 2 already will return an error. Writing a 10 |
| 252 | when the value of sriov_totalvfs is 8 will return an error. | 252 | when the value of sriov_totalvfs is 8 will return an error. |
| 253 | |||
| 254 | What: /sys/bus/pci/devices/.../driver_override | ||
| 255 | Date: April 2014 | ||
| 256 | Contact: Alex Williamson <alex.williamson@redhat.com> | ||
| 257 | Description: | ||
| 258 | This file allows the driver for a device to be specified which | ||
| 259 | will override standard static and dynamic ID matching. When | ||
| 260 | specified, only a driver with a name matching the value written | ||
| 261 | to driver_override will have an opportunity to bind to the | ||
| 262 | device. The override is specified by writing a string to the | ||
| 263 | driver_override file (echo pci-stub > driver_override) and | ||
| 264 | may be cleared with an empty string (echo > driver_override). | ||
| 265 | This returns the device to standard matching rules binding. | ||
| 266 | Writing to driver_override does not automatically unbind the | ||
| 267 | device from its current driver or make any attempt to | ||
| 268 | automatically load the specified driver. If no driver with a | ||
| 269 | matching name is currently loaded in the kernel, the device | ||
| 270 | will not bind to any driver. This also allows devices to | ||
| 271 | opt-out of driver binding using a driver_override name such as | ||
| 272 | "none". Only a single driver may be specified in the override, | ||
| 273 | there is no support for parsing delimiters. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net b/Documentation/ABI/testing/sysfs-class-net index d922060e455d..416c5d59f52e 100644 --- a/Documentation/ABI/testing/sysfs-class-net +++ b/Documentation/ABI/testing/sysfs-class-net | |||
| @@ -169,6 +169,14 @@ Description: | |||
| 169 | "unknown", "notpresent", "down", "lowerlayerdown", "testing", | 169 | "unknown", "notpresent", "down", "lowerlayerdown", "testing", |
| 170 | "dormant", "up". | 170 | "dormant", "up". |
| 171 | 171 | ||
| 172 | What: /sys/class/net/<iface>/phys_port_id | ||
| 173 | Date: July 2013 | ||
| 174 | KernelVersion: 3.12 | ||
| 175 | Contact: netdev@vger.kernel.org | ||
| 176 | Description: | ||
| 177 | Indicates the interface unique physical port identifier within | ||
| 178 | the NIC, as a string. | ||
| 179 | |||
| 172 | What: /sys/class/net/<iface>/speed | 180 | What: /sys/class/net/<iface>/speed |
| 173 | Date: October 2009 | 181 | Date: October 2009 |
| 174 | KernelVersion: 2.6.33 | 182 | KernelVersion: 2.6.33 |
diff --git a/Documentation/ABI/testing/sysfs-class-net-cdc_ncm b/Documentation/ABI/testing/sysfs-class-net-cdc_ncm new file mode 100644 index 000000000000..5cedf72df358 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-cdc_ncm | |||
| @@ -0,0 +1,149 @@ | |||
| 1 | What: /sys/class/net/<iface>/cdc_ncm/min_tx_pkt | ||
| 2 | Date: May 2014 | ||
| 3 | KernelVersion: 3.16 | ||
| 4 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 5 | Description: | ||
| 6 | The driver will pad NCM Transfer Blocks (NTBs) longer | ||
| 7 | than this to tx_max, allowing the device to receive | ||
| 8 | tx_max sized frames with no terminating short | ||
| 9 | packet. NTBs shorter than this limit are transmitted | ||
| 10 | as-is, without any padding, and are terminated with a | ||
| 11 | short USB packet. | ||
| 12 | |||
| 13 | Padding to tx_max allows the driver to transmit NTBs | ||
| 14 | back-to-back without any interleaving short USB | ||
| 15 | packets. This reduces the number of short packet | ||
| 16 | interrupts in the device, and represents a tradeoff | ||
| 17 | between USB bus bandwidth and device DMA optimization. | ||
| 18 | |||
| 19 | Set to 0 to pad all frames. Set greater than tx_max to | ||
| 20 | disable all padding. | ||
| 21 | |||
| 22 | What: /sys/class/net/<iface>/cdc_ncm/rx_max | ||
| 23 | Date: May 2014 | ||
| 24 | KernelVersion: 3.16 | ||
| 25 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 26 | Description: | ||
| 27 | The maximum NTB size for RX. Cannot exceed the | ||
| 28 | maximum value supported by the device. Must allow at | ||
| 29 | least one max sized datagram plus headers. | ||
| 30 | |||
| 31 | The actual limits are device dependent. See | ||
| 32 | dwNtbInMaxSize. | ||
| 33 | |||
| 34 | Note: Some devices will silently ignore changes to | ||
| 35 | this value, resulting in oversized NTBs and | ||
| 36 | corresponding framing errors. | ||
| 37 | |||
| 38 | What: /sys/class/net/<iface>/cdc_ncm/tx_max | ||
| 39 | Date: May 2014 | ||
| 40 | KernelVersion: 3.16 | ||
| 41 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 42 | Description: | ||
| 43 | The maximum NTB size for TX. Cannot exceed the | ||
| 44 | maximum value supported by the device. Must allow at | ||
| 45 | least one max sized datagram plus headers. | ||
| 46 | |||
| 47 | The actual limits are device dependent. See | ||
| 48 | dwNtbOutMaxSize. | ||
| 49 | |||
| 50 | What: /sys/class/net/<iface>/cdc_ncm/tx_timer_usecs | ||
| 51 | Date: May 2014 | ||
| 52 | KernelVersion: 3.16 | ||
| 53 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 54 | Description: | ||
| 55 | Datagram aggregation timeout in µs. The driver will | ||
| 56 | wait up to 3 times this timeout for more datagrams to | ||
| 57 | aggregate before transmitting an NTB frame. | ||
| 58 | |||
| 59 | Valid range: 5 to 4000000 | ||
| 60 | |||
| 61 | Set to 0 to disable aggregation. | ||
| 62 | |||
| 63 | The following read-only attributes all represent fields of the | ||
| 64 | structure defined in section 6.2.1 "GetNtbParameters" of "Universal | ||
| 65 | Serial Bus Communications Class Subclass Specifications for Network | ||
| 66 | Control Model Devices" (CDC NCM), Revision 1.0 (Errata 1), November | ||
| 67 | 24, 2010 from USB Implementers Forum, Inc. The descriptions are | ||
| 68 | quoted from table 6-3 of CDC NCM: "NTB Parameter Structure". | ||
| 69 | |||
| 70 | What: /sys/class/net/<iface>/cdc_ncm/bmNtbFormatsSupported | ||
| 71 | Date: May 2014 | ||
| 72 | KernelVersion: 3.16 | ||
| 73 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 74 | Description: | ||
| 75 | Bit 0: 16-bit NTB supported (set to 1) | ||
| 76 | Bit 1: 32-bit NTB supported | ||
| 77 | Bits 2 – 15: reserved (reset to zero; must be ignored by host) | ||
| 78 | |||
| 79 | What: /sys/class/net/<iface>/cdc_ncm/dwNtbInMaxSize | ||
| 80 | Date: May 2014 | ||
| 81 | KernelVersion: 3.16 | ||
| 82 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 83 | Description: | ||
| 84 | IN NTB Maximum Size in bytes | ||
| 85 | |||
| 86 | What: /sys/class/net/<iface>/cdc_ncm/wNdpInDivisor | ||
| 87 | Date: May 2014 | ||
| 88 | KernelVersion: 3.16 | ||
| 89 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 90 | Description: | ||
| 91 | Divisor used for IN NTB Datagram payload alignment | ||
| 92 | |||
| 93 | What: /sys/class/net/<iface>/cdc_ncm/wNdpInPayloadRemainder | ||
| 94 | Date: May 2014 | ||
| 95 | KernelVersion: 3.16 | ||
| 96 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 97 | Description: | ||
| 98 | Remainder used to align input datagram payload within | ||
| 99 | the NTB: (Payload Offset) mod (wNdpInDivisor) = | ||
| 100 | wNdpInPayloadRemainder | ||
| 101 | |||
| 102 | What: /sys/class/net/<iface>/cdc_ncm/wNdpInAlignment | ||
| 103 | Date: May 2014 | ||
| 104 | KernelVersion: 3.16 | ||
| 105 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 106 | Description: | ||
| 107 | NDP alignment modulus for NTBs on the IN pipe. Shall | ||
| 108 | be a power of 2, and shall be at least 4. | ||
| 109 | |||
| 110 | What: /sys/class/net/<iface>/cdc_ncm/dwNtbOutMaxSize | ||
| 111 | Date: May 2014 | ||
| 112 | KernelVersion: 3.16 | ||
| 113 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 114 | Description: | ||
| 115 | OUT NTB Maximum Size | ||
| 116 | |||
| 117 | What: /sys/class/net/<iface>/cdc_ncm/wNdpOutDivisor | ||
| 118 | Date: May 2014 | ||
| 119 | KernelVersion: 3.16 | ||
| 120 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 121 | Description: | ||
| 122 | OUT NTB Datagram alignment modulus | ||
| 123 | |||
| 124 | What: /sys/class/net/<iface>/cdc_ncm/wNdpOutPayloadRemainder | ||
| 125 | Date: May 2014 | ||
| 126 | KernelVersion: 3.16 | ||
| 127 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 128 | Description: | ||
| 129 | Remainder used to align output datagram payload | ||
| 130 | offsets within the NTB: Padding, shall be transmitted | ||
| 131 | as zero by function, and ignored by host. (Payload | ||
| 132 | Offset) mod (wNdpOutDivisor) = wNdpOutPayloadRemainder | ||
| 133 | |||
| 134 | What: /sys/class/net/<iface>/cdc_ncm/wNdpOutAlignment | ||
| 135 | Date: May 2014 | ||
| 136 | KernelVersion: 3.16 | ||
| 137 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 138 | Description: | ||
| 139 | NDP alignment modulus for use in NTBs on the OUT | ||
| 140 | pipe. Shall be a power of 2, and shall be at least 4. | ||
| 141 | |||
| 142 | What: /sys/class/net/<iface>/cdc_ncm/wNtbOutMaxDatagrams | ||
| 143 | Date: May 2014 | ||
| 144 | KernelVersion: 3.16 | ||
| 145 | Contact: Bjørn Mork <bjorn@mork.no> | ||
| 146 | Description: | ||
| 147 | Maximum number of datagrams that the host may pack | ||
| 148 | into a single OUT NTB. Zero means that the device | ||
| 149 | imposes no limit. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net-queues b/Documentation/ABI/testing/sysfs-class-net-queues new file mode 100644 index 000000000000..5e9aeb91d355 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-queues | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | What: /sys/class/<iface>/queues/rx-<queue>/rps_cpus | ||
| 2 | Date: March 2010 | ||
| 3 | KernelVersion: 2.6.35 | ||
| 4 | Contact: netdev@vger.kernel.org | ||
| 5 | Description: | ||
| 6 | Mask of the CPU(s) currently enabled to participate into the | ||
| 7 | Receive Packet Steering packet processing flow for this | ||
| 8 | network device queue. Possible values depend on the number | ||
| 9 | of available CPU(s) in the system. | ||
| 10 | |||
| 11 | What: /sys/class/<iface>/queues/rx-<queue>/rps_flow_cnt | ||
| 12 | Date: April 2010 | ||
| 13 | KernelVersion: 2.6.35 | ||
| 14 | Contact: netdev@vger.kernel.org | ||
| 15 | Description: | ||
| 16 | Number of Receive Packet Steering flows being currently | ||
| 17 | processed by this particular network device receive queue. | ||
| 18 | |||
| 19 | What: /sys/class/<iface>/queues/tx-<queue>/tx_timeout | ||
| 20 | Date: November 2011 | ||
| 21 | KernelVersion: 3.3 | ||
| 22 | Contact: netdev@vger.kernel.org | ||
| 23 | Description: | ||
| 24 | Indicates the number of transmit timeout events seen by this | ||
| 25 | network interface transmit queue. | ||
| 26 | |||
| 27 | What: /sys/class/<iface>/queues/tx-<queue>/xps_cpus | ||
| 28 | Date: November 2010 | ||
| 29 | KernelVersion: 2.6.38 | ||
| 30 | Contact: netdev@vger.kernel.org | ||
| 31 | Description: | ||
| 32 | Mask of the CPU(s) currently enabled to participate into the | ||
| 33 | Transmit Packet Steering packet processing flow for this | ||
| 34 | network device transmit queue. Possible vaules depend on the | ||
| 35 | number of available CPU(s) in the system. | ||
| 36 | |||
| 37 | What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/hold_time | ||
| 38 | Date: November 2011 | ||
| 39 | KernelVersion: 3.3 | ||
| 40 | Contact: netdev@vger.kernel.org | ||
| 41 | Description: | ||
| 42 | Indicates the hold time in milliseconds to measure the slack | ||
| 43 | of this particular network device transmit queue. | ||
| 44 | Default value is 1000. | ||
| 45 | |||
| 46 | What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/inflight | ||
| 47 | Date: November 2011 | ||
| 48 | KernelVersion: 3.3 | ||
| 49 | Contact: netdev@vger.kernel.org | ||
| 50 | Description: | ||
| 51 | Indicates the number of bytes (objects) in flight on this | ||
| 52 | network device transmit queue. | ||
| 53 | |||
| 54 | What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit | ||
| 55 | Date: November 2011 | ||
| 56 | KernelVersion: 3.3 | ||
| 57 | Contact: netdev@vger.kernel.org | ||
| 58 | Description: | ||
| 59 | Indicates the current limit of bytes allowed to be queued | ||
| 60 | on this network device transmit queue. This value is clamped | ||
| 61 | to be within the bounds defined by limit_max and limit_min. | ||
| 62 | |||
| 63 | What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit_max | ||
| 64 | Date: November 2011 | ||
| 65 | KernelVersion: 3.3 | ||
| 66 | Contact: netdev@vger.kernel.org | ||
| 67 | Description: | ||
| 68 | Indicates the absolute maximum limit of bytes allowed to be | ||
| 69 | queued on this network device transmit queue. See | ||
| 70 | include/linux/dynamic_queue_limits.h for the default value. | ||
| 71 | |||
| 72 | What: /sys/class/<iface>/queues/tx-<queue>/byte_queue_limits/limit_min | ||
| 73 | Date: November 2011 | ||
| 74 | KernelVersion: 3.3 | ||
| 75 | Contact: netdev@vger.kernel.org | ||
| 76 | Description: | ||
| 77 | Indicates the absolute minimum limit of bytes allowed to be | ||
| 78 | queued on this network device transmit queue. Default value is | ||
| 79 | 0. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-net-statistics b/Documentation/ABI/testing/sysfs-class-net-statistics new file mode 100644 index 000000000000..397118de7b5e --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-net-statistics | |||
| @@ -0,0 +1,201 @@ | |||
| 1 | What: /sys/class/<iface>/statistics/collisions | ||
| 2 | Date: April 2005 | ||
| 3 | KernelVersion: 2.6.12 | ||
| 4 | Contact: netdev@vger.kernel.org | ||
| 5 | Description: | ||
| 6 | Indicates the number of collisions seen by this network device. | ||
| 7 | This value might not be relevant with all MAC layers. | ||
| 8 | |||
| 9 | What: /sys/class/<iface>/statistics/multicast | ||
| 10 | Date: April 2005 | ||
| 11 | KernelVersion: 2.6.12 | ||
| 12 | Contact: netdev@vger.kernel.org | ||
| 13 | Description: | ||
| 14 | Indicates the number of multicast packets received by this | ||
| 15 | network device. | ||
| 16 | |||
| 17 | What: /sys/class/<iface>/statistics/rx_bytes | ||
| 18 | Date: April 2005 | ||
| 19 | KernelVersion: 2.6.12 | ||
| 20 | Contact: netdev@vger.kernel.org | ||
| 21 | Description: | ||
| 22 | Indicates the number of bytes received by this network device. | ||
| 23 | See the network driver for the exact meaning of when this | ||
| 24 | value is incremented. | ||
| 25 | |||
| 26 | What: /sys/class/<iface>/statistics/rx_compressed | ||
| 27 | Date: April 2005 | ||
| 28 | KernelVersion: 2.6.12 | ||
| 29 | Contact: netdev@vger.kernel.org | ||
| 30 | Description: | ||
| 31 | Indicates the number of compressed packets received by this | ||
| 32 | network device. This value might only be relevant for interfaces | ||
| 33 | that support packet compression (e.g: PPP). | ||
| 34 | |||
| 35 | What: /sys/class/<iface>/statistics/rx_crc_errors | ||
| 36 | Date: April 2005 | ||
| 37 | KernelVersion: 2.6.12 | ||
| 38 | Contact: netdev@vger.kernel.org | ||
| 39 | Description: | ||
| 40 | Indicates the number of packets received with a CRC (FCS) error | ||
| 41 | by this network device. Note that the specific meaning might | ||
| 42 | depend on the MAC layer used by the interface. | ||
| 43 | |||
| 44 | What: /sys/class/<iface>/statistics/rx_dropped | ||
| 45 | Date: April 2005 | ||
| 46 | KernelVersion: 2.6.12 | ||
| 47 | Contact: netdev@vger.kernel.org | ||
| 48 | Description: | ||
| 49 | Indicates the number of packets received by the network device | ||
| 50 | but dropped, that are not forwarded to the upper layers for | ||
| 51 | packet processing. See the network driver for the exact | ||
| 52 | meaning of this value. | ||
| 53 | |||
| 54 | What: /sys/class/<iface>/statistics/rx_fifo_errors | ||
| 55 | Date: April 2005 | ||
| 56 | KernelVersion: 2.6.12 | ||
| 57 | Contact: netdev@vger.kernel.org | ||
| 58 | Description: | ||
| 59 | Indicates the number of receive FIFO errors seen by this | ||
| 60 | network device. See the network driver for the exact | ||
| 61 | meaning of this value. | ||
| 62 | |||
| 63 | What: /sys/class/<iface>/statistics/rx_frame_errors | ||
| 64 | Date: April 2005 | ||
| 65 | KernelVersion: 2.6.12 | ||
| 66 | Contact: netdev@vger.kernel.org | ||
| 67 | Description: | ||
| 68 | Indicates the number of received frames with error, such as | ||
| 69 | alignment errors. Note that the specific meaning depends on | ||
| 70 | on the MAC layer protocol used. See the network driver for | ||
| 71 | the exact meaning of this value. | ||
| 72 | |||
| 73 | What: /sys/class/<iface>/statistics/rx_length_errors | ||
| 74 | Date: April 2005 | ||
| 75 | KernelVersion: 2.6.12 | ||
| 76 | Contact: netdev@vger.kernel.org | ||
| 77 | Description: | ||
| 78 | Indicates the number of received error packet with a length | ||
| 79 | error, oversized or undersized. See the network driver for the | ||
| 80 | exact meaning of this value. | ||
| 81 | |||
| 82 | What: /sys/class/<iface>/statistics/rx_missed_errors | ||
| 83 | Date: April 2005 | ||
| 84 | KernelVersion: 2.6.12 | ||
| 85 | Contact: netdev@vger.kernel.org | ||
| 86 | Description: | ||
| 87 | Indicates the number of received packets that have been missed | ||
| 88 | due to lack of capacity in the receive side. See the network | ||
| 89 | driver for the exact meaning of this value. | ||
| 90 | |||
| 91 | What: /sys/class/<iface>/statistics/rx_over_errors | ||
| 92 | Date: April 2005 | ||
| 93 | KernelVersion: 2.6.12 | ||
| 94 | Contact: netdev@vger.kernel.org | ||
| 95 | Description: | ||
| 96 | Indicates the number of received packets that are oversized | ||
| 97 | compared to what the network device is configured to accept | ||
| 98 | (e.g: larger than MTU). See the network driver for the exact | ||
| 99 | meaning of this value. | ||
| 100 | |||
| 101 | What: /sys/class/<iface>/statistics/rx_packets | ||
| 102 | Date: April 2005 | ||
| 103 | KernelVersion: 2.6.12 | ||
| 104 | Contact: netdev@vger.kernel.org | ||
| 105 | Description: | ||
| 106 | Indicates the total number of good packets received by this | ||
| 107 | network device. | ||
| 108 | |||
| 109 | What: /sys/class/<iface>/statistics/tx_aborted_errors | ||
| 110 | Date: April 2005 | ||
| 111 | KernelVersion: 2.6.12 | ||
| 112 | Contact: netdev@vger.kernel.org | ||
| 113 | Description: | ||
| 114 | Indicates the number of packets that have been aborted | ||
| 115 | during transmission by a network device (e.g: because of | ||
| 116 | a medium collision). See the network driver for the exact | ||
| 117 | meaning of this value. | ||
| 118 | |||
| 119 | What: /sys/class/<iface>/statistics/tx_bytes | ||
| 120 | Date: April 2005 | ||
| 121 | KernelVersion: 2.6.12 | ||
| 122 | Contact: netdev@vger.kernel.org | ||
| 123 | Description: | ||
| 124 | Indicates the number of bytes transmitted by a network | ||
| 125 | device. See the network driver for the exact meaning of this | ||
| 126 | value, in particular whether this accounts for all successfully | ||
| 127 | transmitted packets or all packets that have been queued for | ||
| 128 | transmission. | ||
| 129 | |||
| 130 | What: /sys/class/<iface>/statistics/tx_carrier_errors | ||
| 131 | Date: April 2005 | ||
| 132 | KernelVersion: 2.6.12 | ||
| 133 | Contact: netdev@vger.kernel.org | ||
| 134 | Description: | ||
| 135 | Indicates the number of packets that could not be transmitted | ||
| 136 | because of carrier errors (e.g: physical link down). See the | ||
| 137 | network driver for the exact meaning of this value. | ||
| 138 | |||
| 139 | What: /sys/class/<iface>/statistics/tx_compressed | ||
| 140 | Date: April 2005 | ||
| 141 | KernelVersion: 2.6.12 | ||
| 142 | Contact: netdev@vger.kernel.org | ||
| 143 | Description: | ||
| 144 | Indicates the number of transmitted compressed packets. Note | ||
| 145 | this might only be relevant for devices that support | ||
| 146 | compression (e.g: PPP). | ||
| 147 | |||
| 148 | What: /sys/class/<iface>/statistics/tx_dropped | ||
| 149 | Date: April 2005 | ||
| 150 | KernelVersion: 2.6.12 | ||
| 151 | Contact: netdev@vger.kernel.org | ||
| 152 | Description: | ||
| 153 | Indicates the number of packets dropped during transmission. | ||
| 154 | See the driver for the exact reasons as to why the packets were | ||
| 155 | dropped. | ||
| 156 | |||
| 157 | What: /sys/class/<iface>/statistics/tx_errors | ||
| 158 | Date: April 2005 | ||
| 159 | KernelVersion: 2.6.12 | ||
| 160 | Contact: netdev@vger.kernel.org | ||
| 161 | Description: | ||
| 162 | Indicates the number of packets in error during transmission by | ||
| 163 | a network device. See the driver for the exact reasons as to | ||
| 164 | why the packets were dropped. | ||
| 165 | |||
| 166 | What: /sys/class/<iface>/statistics/tx_fifo_errors | ||
| 167 | Date: April 2005 | ||
| 168 | KernelVersion: 2.6.12 | ||
| 169 | Contact: netdev@vger.kernel.org | ||
| 170 | Description: | ||
| 171 | Indicates the number of packets having caused a transmit | ||
| 172 | FIFO error. See the driver for the exact reasons as to why the | ||
| 173 | packets were dropped. | ||
| 174 | |||
| 175 | What: /sys/class/<iface>/statistics/tx_heartbeat_errors | ||
| 176 | Date: April 2005 | ||
| 177 | KernelVersion: 2.6.12 | ||
| 178 | Contact: netdev@vger.kernel.org | ||
| 179 | Description: | ||
| 180 | Indicates the number of packets transmitted that have been | ||
| 181 | reported as heartbeat errors. See the driver for the exact | ||
| 182 | reasons as to why the packets were dropped. | ||
| 183 | |||
| 184 | What: /sys/class/<iface>/statistics/tx_packets | ||
| 185 | Date: April 2005 | ||
| 186 | KernelVersion: 2.6.12 | ||
| 187 | Contact: netdev@vger.kernel.org | ||
| 188 | Description: | ||
| 189 | Indicates the number of packets transmitted by a network | ||
| 190 | device. See the driver for whether this reports the number of all | ||
| 191 | attempted or successful transmissions. | ||
| 192 | |||
| 193 | What: /sys/class/<iface>/statistics/tx_window_errors | ||
| 194 | Date: April 2005 | ||
| 195 | KernelVersion: 2.6.12 | ||
| 196 | Contact: netdev@vger.kernel.org | ||
| 197 | Description: | ||
| 198 | Indicates the number of packets not successfully transmitted | ||
| 199 | due to a window collision. The specific meaning depends on the | ||
| 200 | MAC layer used. On Ethernet this is usually used to report | ||
| 201 | late collisions errors. | ||
diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu b/Documentation/ABI/testing/sysfs-devices-system-cpu index d5a0d33c571f..acb9bfc89b48 100644 --- a/Documentation/ABI/testing/sysfs-devices-system-cpu +++ b/Documentation/ABI/testing/sysfs-devices-system-cpu | |||
| @@ -128,7 +128,7 @@ Description: Discover cpuidle policy and mechanism | |||
| 128 | 128 | ||
| 129 | What: /sys/devices/system/cpu/cpu#/cpufreq/* | 129 | What: /sys/devices/system/cpu/cpu#/cpufreq/* |
| 130 | Date: pre-git history | 130 | Date: pre-git history |
| 131 | Contact: cpufreq@vger.kernel.org | 131 | Contact: linux-pm@vger.kernel.org |
| 132 | Description: Discover and change clock speed of CPUs | 132 | Description: Discover and change clock speed of CPUs |
| 133 | 133 | ||
| 134 | Clock scaling allows you to change the clock speed of the | 134 | Clock scaling allows you to change the clock speed of the |
| @@ -146,7 +146,7 @@ Description: Discover and change clock speed of CPUs | |||
| 146 | 146 | ||
| 147 | What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus | 147 | What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus |
| 148 | Date: June 2013 | 148 | Date: June 2013 |
| 149 | Contact: cpufreq@vger.kernel.org | 149 | Contact: linux-pm@vger.kernel.org |
| 150 | Description: Discover CPUs in the same CPU frequency coordination domain | 150 | Description: Discover CPUs in the same CPU frequency coordination domain |
| 151 | 151 | ||
| 152 | freqdomain_cpus is the list of CPUs (online+offline) that share | 152 | freqdomain_cpus is the list of CPUs (online+offline) that share |
diff --git a/Documentation/ABI/testing/sysfs-driver-hid-thingm b/Documentation/ABI/testing/sysfs-driver-hid-thingm deleted file mode 100644 index abcffeedd20a..000000000000 --- a/Documentation/ABI/testing/sysfs-driver-hid-thingm +++ /dev/null | |||
| @@ -1,23 +0,0 @@ | |||
| 1 | What: /sys/class/leds/blink1::<serial>/rgb | ||
| 2 | Date: January 2013 | ||
| 3 | Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com> | ||
| 4 | Description: The ThingM blink1 is an USB RGB LED. The color notation is | ||
| 5 | 3-byte hexadecimal. Read this attribute to get the last set | ||
| 6 | color. Write the 24-bit hexadecimal color to change the current | ||
| 7 | LED color. The default color is full white (0xFFFFFF). | ||
| 8 | For instance, set the color to green with: echo 00FF00 > rgb | ||
| 9 | |||
| 10 | What: /sys/class/leds/blink1::<serial>/fade | ||
| 11 | Date: January 2013 | ||
| 12 | Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com> | ||
| 13 | Description: This attribute allows to set a fade time in milliseconds for | ||
| 14 | the next color change. Read the attribute to know the current | ||
| 15 | fade time. The default value is set to 0 (no fade time). For | ||
| 16 | instance, set a fade time of 2 seconds with: echo 2000 > fade | ||
| 17 | |||
| 18 | What: /sys/class/leds/blink1::<serial>/play | ||
| 19 | Date: January 2013 | ||
| 20 | Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com> | ||
| 21 | Description: This attribute is used to play/pause the light patterns. Write 1 | ||
| 22 | to start playing, 0 to stop. Reading this attribute returns the | ||
| 23 | current playing status. | ||
diff --git a/Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb b/Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb new file mode 100644 index 000000000000..f1bad92bbe27 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-brcmstb-gisb-arb | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | What: /sys/devices/../../gisb_arb_timeout | ||
| 2 | Date: May 2014 | ||
| 3 | KernelVersion: 3.17 | ||
| 4 | Contact: Florian Fainelli <f.fainelli@gmail.com> | ||
| 5 | Description: | ||
| 6 | Returns the currently configured raw timeout value of the | ||
| 7 | Broadcom Set Top Box internal GISB bus arbiter. Minimum value | ||
| 8 | is 1, and maximum value is 0xffffffff. | ||
diff --git a/Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg b/Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg new file mode 100644 index 000000000000..151c59578db4 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-platform-chipidea-usb-otg | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req | ||
| 2 | Date: Feb 2014 | ||
| 3 | Contact: Li Jun <b47624@freescale.com> | ||
| 4 | Description: | ||
| 5 | Can be set and read. | ||
| 6 | Set a_bus_req(A-device bus request) input to be 1 if | ||
| 7 | the application running on the A-device wants to use the bus, | ||
| 8 | and to be 0 when the application no longer wants to use | ||
| 9 | the bus(or wants to work as peripheral). a_bus_req can also | ||
| 10 | be set to 1 by kernel in response to remote wakeup signaling | ||
| 11 | from the B-device, the A-device should decide to resume the bus. | ||
| 12 | |||
| 13 | Valid values are "1" and "0". | ||
| 14 | |||
| 15 | Reading: returns 1 if the application running on the A-device | ||
| 16 | is using the bus as host role, otherwise 0. | ||
| 17 | |||
| 18 | What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop | ||
| 19 | Date: Feb 2014 | ||
| 20 | Contact: Li Jun <b47624@freescale.com> | ||
| 21 | Description: | ||
| 22 | Can be set and read | ||
| 23 | The a_bus_drop(A-device bus drop) input is 1 when the | ||
| 24 | application running on the A-device wants to power down | ||
| 25 | the bus, and is 0 otherwise, When a_bus_drop is 1, then | ||
| 26 | the a_bus_req shall be 0. | ||
| 27 | |||
| 28 | Valid values are "1" and "0". | ||
| 29 | |||
| 30 | Reading: returns 1 if the bus is off(vbus is turned off) by | ||
| 31 | A-device, otherwise 0. | ||
| 32 | |||
| 33 | What: /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req | ||
| 34 | Date: Feb 2014 | ||
| 35 | Contact: Li Jun <b47624@freescale.com> | ||
| 36 | Description: | ||
| 37 | Can be set and read. | ||
| 38 | The b_bus_req(B-device bus request) input is 1 during the time | ||
| 39 | that the application running on the B-device wants to use the | ||
| 40 | bus as host, and is 0 when the application no longer wants to | ||
| 41 | work as host and decides to switch back to be peripheral. | ||
| 42 | |||
| 43 | Valid values are "1" and "0". | ||
| 44 | |||
| 45 | Reading: returns if the application running on the B device | ||
| 46 | is using the bus as host role, otherwise 0. | ||
| 47 | |||
| 48 | What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_clr_err | ||
| 49 | Date: Feb 2014 | ||
| 50 | Contact: Li Jun <b47624@freescale.com> | ||
| 51 | Description: | ||
| 52 | Only can be set. | ||
| 53 | The a_clr_err(A-device Vbus error clear) input is used to clear | ||
| 54 | vbus error, then A-device will power down the bus. | ||
| 55 | |||
| 56 | Valid value is "1" | ||
diff --git a/Documentation/ABI/testing/sysfs-power b/Documentation/ABI/testing/sysfs-power index 64c9276e9421..f4551816329e 100644 --- a/Documentation/ABI/testing/sysfs-power +++ b/Documentation/ABI/testing/sysfs-power | |||
| @@ -7,19 +7,30 @@ Description: | |||
| 7 | subsystem. | 7 | subsystem. |
| 8 | 8 | ||
| 9 | What: /sys/power/state | 9 | What: /sys/power/state |
| 10 | Date: August 2006 | 10 | Date: May 2014 |
| 11 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> | 11 | Contact: Rafael J. Wysocki <rjw@rjwysocki.net> |
| 12 | Description: | 12 | Description: |
| 13 | The /sys/power/state file controls the system power state. | 13 | The /sys/power/state file controls system sleep states. |
| 14 | Reading from this file returns what states are supported, | 14 | Reading from this file returns the available sleep state |
| 15 | which is hard-coded to 'freeze' (Low-Power Idle), 'standby' | 15 | labels, which may be "mem", "standby", "freeze" and "disk" |
| 16 | (Power-On Suspend), 'mem' (Suspend-to-RAM), and 'disk' | 16 | (hibernation). The meanings of the first three labels depend on |
| 17 | (Suspend-to-Disk). | 17 | the relative_sleep_states command line argument as follows: |
| 18 | 1) relative_sleep_states = 1 | ||
| 19 | "mem", "standby", "freeze" represent non-hibernation sleep | ||
| 20 | states from the deepest ("mem", always present) to the | ||
| 21 | shallowest ("freeze"). "standby" and "freeze" may or may | ||
| 22 | not be present depending on the capabilities of the | ||
| 23 | platform. "freeze" can only be present if "standby" is | ||
| 24 | present. | ||
| 25 | 2) relative_sleep_states = 0 (default) | ||
| 26 | "mem" - "suspend-to-RAM", present if supported. | ||
| 27 | "standby" - "power-on suspend", present if supported. | ||
| 28 | "freeze" - "suspend-to-idle", always present. | ||
| 18 | 29 | ||
| 19 | Writing to this file one of these strings causes the system to | 30 | Writing to this file one of these strings causes the system to |
| 20 | transition into that state. Please see the file | 31 | transition into the corresponding state, if available. See |
| 21 | Documentation/power/states.txt for a description of each of | 32 | Documentation/power/states.txt for a description of what |
| 22 | these states. | 33 | "suspend-to-RAM", "power-on suspend" and "suspend-to-idle" mean. |
| 23 | 34 | ||
| 24 | What: /sys/power/disk | 35 | What: /sys/power/disk |
| 25 | Date: September 2006 | 36 | Date: September 2006 |
diff --git a/Documentation/Changes b/Documentation/Changes index 07c75d18154e..2254db0f00a5 100644 --- a/Documentation/Changes +++ b/Documentation/Changes | |||
| @@ -73,6 +73,11 @@ Perl | |||
| 73 | You will need perl 5 and the following modules: Getopt::Long, Getopt::Std, | 73 | You will need perl 5 and the following modules: Getopt::Long, Getopt::Std, |
| 74 | File::Basename, and File::Find to build the kernel. | 74 | File::Basename, and File::Find to build the kernel. |
| 75 | 75 | ||
| 76 | BC | ||
| 77 | -- | ||
| 78 | |||
| 79 | You will need bc to build kernels 3.10 and higher | ||
| 80 | |||
| 76 | 81 | ||
| 77 | System utilities | 82 | System utilities |
| 78 | ================ | 83 | ================ |
diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index 7fe0546c504a..6b6bef31e956 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle | |||
| @@ -660,15 +660,23 @@ There are a number of driver model diagnostic macros in <linux/device.h> | |||
| 660 | which you should use to make sure messages are matched to the right device | 660 | which you should use to make sure messages are matched to the right device |
| 661 | and driver, and are tagged with the right level: dev_err(), dev_warn(), | 661 | and driver, and are tagged with the right level: dev_err(), dev_warn(), |
| 662 | dev_info(), and so forth. For messages that aren't associated with a | 662 | dev_info(), and so forth. For messages that aren't associated with a |
| 663 | particular device, <linux/printk.h> defines pr_debug() and pr_info(). | 663 | particular device, <linux/printk.h> defines pr_notice(), pr_info(), |
| 664 | pr_warn(), pr_err(), etc. | ||
| 664 | 665 | ||
| 665 | Coming up with good debugging messages can be quite a challenge; and once | 666 | Coming up with good debugging messages can be quite a challenge; and once |
| 666 | you have them, they can be a huge help for remote troubleshooting. Such | 667 | you have them, they can be a huge help for remote troubleshooting. However |
| 667 | messages should be compiled out when the DEBUG symbol is not defined (that | 668 | debug message printing is handled differently than printing other non-debug |
| 668 | is, by default they are not included). When you use dev_dbg() or pr_debug(), | 669 | messages. While the other pr_XXX() functions print unconditionally, |
| 669 | that's automatic. Many subsystems have Kconfig options to turn on -DDEBUG. | 670 | pr_debug() does not; it is compiled out by default, unless either DEBUG is |
| 670 | A related convention uses VERBOSE_DEBUG to add dev_vdbg() messages to the | 671 | defined or CONFIG_DYNAMIC_DEBUG is set. That is true for dev_dbg() also, |
| 671 | ones already enabled by DEBUG. | 672 | and a related convention uses VERBOSE_DEBUG to add dev_vdbg() messages to |
| 673 | the ones already enabled by DEBUG. | ||
| 674 | |||
| 675 | Many subsystems have Kconfig debug options to turn on -DDEBUG in the | ||
| 676 | corresponding Makefile; in other cases specific files #define DEBUG. And | ||
| 677 | when a debug message should be unconditionally printed, such as if it is | ||
| 678 | already inside a debug-related #ifdef secton, printk(KERN_DEBUG ...) can be | ||
| 679 | used. | ||
| 672 | 680 | ||
| 673 | 681 | ||
| 674 | Chapter 14: Allocating memory | 682 | Chapter 14: Allocating memory |
diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt index 5e983031cc11..dcbbe3602d78 100644 --- a/Documentation/DMA-API-HOWTO.txt +++ b/Documentation/DMA-API-HOWTO.txt | |||
| @@ -9,16 +9,76 @@ This is a guide to device driver writers on how to use the DMA API | |||
| 9 | with example pseudo-code. For a concise description of the API, see | 9 | with example pseudo-code. For a concise description of the API, see |
| 10 | DMA-API.txt. | 10 | DMA-API.txt. |
| 11 | 11 | ||
| 12 | Most of the 64bit platforms have special hardware that translates bus | 12 | CPU and DMA addresses |
| 13 | addresses (DMA addresses) into physical addresses. This is similar to | 13 | |
| 14 | how page tables and/or a TLB translates virtual addresses to physical | 14 | There are several kinds of addresses involved in the DMA API, and it's |
| 15 | addresses on a CPU. This is needed so that e.g. PCI devices can | 15 | important to understand the differences. |
| 16 | access with a Single Address Cycle (32bit DMA address) any page in the | 16 | |
| 17 | 64bit physical address space. Previously in Linux those 64bit | 17 | The kernel normally uses virtual addresses. Any address returned by |
| 18 | platforms had to set artificial limits on the maximum RAM size in the | 18 | kmalloc(), vmalloc(), and similar interfaces is a virtual address and can |
| 19 | system, so that the virt_to_bus() static scheme works (the DMA address | 19 | be stored in a "void *". |
| 20 | translation tables were simply filled on bootup to map each bus | 20 | |
| 21 | address to the physical page __pa(bus_to_virt())). | 21 | The virtual memory system (TLB, page tables, etc.) translates virtual |
| 22 | addresses to CPU physical addresses, which are stored as "phys_addr_t" or | ||
| 23 | "resource_size_t". The kernel manages device resources like registers as | ||
| 24 | physical addresses. These are the addresses in /proc/iomem. The physical | ||
| 25 | address is not directly useful to a driver; it must use ioremap() to map | ||
| 26 | the space and produce a virtual address. | ||
| 27 | |||
| 28 | I/O devices use a third kind of address: a "bus address" or "DMA address". | ||
| 29 | If a device has registers at an MMIO address, or if it performs DMA to read | ||
| 30 | or write system memory, the addresses used by the device are bus addresses. | ||
| 31 | In some systems, bus addresses are identical to CPU physical addresses, but | ||
| 32 | in general they are not. IOMMUs and host bridges can produce arbitrary | ||
| 33 | mappings between physical and bus addresses. | ||
| 34 | |||
| 35 | Here's a picture and some examples: | ||
| 36 | |||
| 37 | CPU CPU Bus | ||
| 38 | Virtual Physical Address | ||
| 39 | Address Address Space | ||
| 40 | Space Space | ||
| 41 | |||
| 42 | +-------+ +------+ +------+ | ||
| 43 | | | |MMIO | Offset | | | ||
| 44 | | | Virtual |Space | applied | | | ||
| 45 | C +-------+ --------> B +------+ ----------> +------+ A | ||
| 46 | | | mapping | | by host | | | ||
| 47 | +-----+ | | | | bridge | | +--------+ | ||
| 48 | | | | | +------+ | | | | | ||
| 49 | | CPU | | | | RAM | | | | Device | | ||
| 50 | | | | | | | | | | | | ||
| 51 | +-----+ +-------+ +------+ +------+ +--------+ | ||
| 52 | | | Virtual |Buffer| Mapping | | | ||
| 53 | X +-------+ --------> Y +------+ <---------- +------+ Z | ||
| 54 | | | mapping | RAM | by IOMMU | ||
| 55 | | | | | | ||
| 56 | | | | | | ||
| 57 | +-------+ +------+ | ||
| 58 | |||
| 59 | During the enumeration process, the kernel learns about I/O devices and | ||
| 60 | their MMIO space and the host bridges that connect them to the system. For | ||
| 61 | example, if a PCI device has a BAR, the kernel reads the bus address (A) | ||
| 62 | from the BAR and converts it to a CPU physical address (B). The address B | ||
| 63 | is stored in a struct resource and usually exposed via /proc/iomem. When a | ||
| 64 | driver claims a device, it typically uses ioremap() to map physical address | ||
| 65 | B at a virtual address (C). It can then use, e.g., ioread32(C), to access | ||
| 66 | the device registers at bus address A. | ||
| 67 | |||
| 68 | If the device supports DMA, the driver sets up a buffer using kmalloc() or | ||
| 69 | a similar interface, which returns a virtual address (X). The virtual | ||
| 70 | memory system maps X to a physical address (Y) in system RAM. The driver | ||
| 71 | can use virtual address X to access the buffer, but the device itself | ||
| 72 | cannot because DMA doesn't go through the CPU virtual memory system. | ||
| 73 | |||
| 74 | In some simple systems, the device can do DMA directly to physical address | ||
| 75 | Y. But in many others, there is IOMMU hardware that translates bus | ||
| 76 | addresses to physical addresses, e.g., it translates Z to Y. This is part | ||
| 77 | of the reason for the DMA API: the driver can give a virtual address X to | ||
| 78 | an interface like dma_map_single(), which sets up any required IOMMU | ||
| 79 | mapping and returns the bus address Z. The driver then tells the device to | ||
| 80 | do DMA to Z, and the IOMMU maps it to the buffer at address Y in system | ||
| 81 | RAM. | ||
| 22 | 82 | ||
| 23 | So that Linux can use the dynamic DMA mapping, it needs some help from the | 83 | So that Linux can use the dynamic DMA mapping, it needs some help from the |
| 24 | drivers, namely it has to take into account that DMA addresses should be | 84 | drivers, namely it has to take into account that DMA addresses should be |
| @@ -29,17 +89,17 @@ The following API will work of course even on platforms where no such | |||
| 29 | hardware exists. | 89 | hardware exists. |
| 30 | 90 | ||
| 31 | Note that the DMA API works with any bus independent of the underlying | 91 | Note that the DMA API works with any bus independent of the underlying |
| 32 | microprocessor architecture. You should use the DMA API rather than | 92 | microprocessor architecture. You should use the DMA API rather than the |
| 33 | the bus specific DMA API (e.g. pci_dma_*). | 93 | bus-specific DMA API, i.e., use the dma_map_*() interfaces rather than the |
| 94 | pci_map_*() interfaces. | ||
| 34 | 95 | ||
| 35 | First of all, you should make sure | 96 | First of all, you should make sure |
| 36 | 97 | ||
| 37 | #include <linux/dma-mapping.h> | 98 | #include <linux/dma-mapping.h> |
| 38 | 99 | ||
| 39 | is in your driver. This file will obtain for you the definition of the | 100 | is in your driver, which provides the definition of dma_addr_t. This type |
| 40 | dma_addr_t (which can hold any valid DMA address for the platform) | 101 | can hold any valid DMA or bus address for the platform and should be used |
| 41 | type which should be used everywhere you hold a DMA (bus) address | 102 | everywhere you hold a DMA address returned from the DMA mapping functions. |
| 42 | returned from the DMA mapping functions. | ||
| 43 | 103 | ||
| 44 | What memory is DMA'able? | 104 | What memory is DMA'able? |
| 45 | 105 | ||
| @@ -123,9 +183,9 @@ Here, dev is a pointer to the device struct of your device, and mask | |||
| 123 | is a bit mask describing which bits of an address your device | 183 | is a bit mask describing which bits of an address your device |
| 124 | supports. It returns zero if your card can perform DMA properly on | 184 | supports. It returns zero if your card can perform DMA properly on |
| 125 | the machine given the address mask you provided. In general, the | 185 | the machine given the address mask you provided. In general, the |
| 126 | device struct of your device is embedded in the bus specific device | 186 | device struct of your device is embedded in the bus-specific device |
| 127 | struct of your device. For example, a pointer to the device struct of | 187 | struct of your device. For example, &pdev->dev is a pointer to the |
| 128 | your PCI device is pdev->dev (pdev is a pointer to the PCI device | 188 | device struct of a PCI device (pdev is a pointer to the PCI device |
| 129 | struct of your device). | 189 | struct of your device). |
| 130 | 190 | ||
| 131 | If it returns non-zero, your device cannot perform DMA properly on | 191 | If it returns non-zero, your device cannot perform DMA properly on |
| @@ -147,8 +207,7 @@ exactly why. | |||
| 147 | The standard 32-bit addressing device would do something like this: | 207 | The standard 32-bit addressing device would do something like this: |
| 148 | 208 | ||
| 149 | if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32))) { | 209 | if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32))) { |
| 150 | printk(KERN_WARNING | 210 | dev_warn(dev, "mydev: No suitable DMA available\n"); |
| 151 | "mydev: No suitable DMA available.\n"); | ||
| 152 | goto ignore_this_device; | 211 | goto ignore_this_device; |
| 153 | } | 212 | } |
| 154 | 213 | ||
| @@ -170,8 +229,7 @@ all 64-bits when accessing streaming DMA: | |||
| 170 | } else if (!dma_set_mask(dev, DMA_BIT_MASK(32))) { | 229 | } else if (!dma_set_mask(dev, DMA_BIT_MASK(32))) { |
| 171 | using_dac = 0; | 230 | using_dac = 0; |
| 172 | } else { | 231 | } else { |
| 173 | printk(KERN_WARNING | 232 | dev_warn(dev, "mydev: No suitable DMA available\n"); |
| 174 | "mydev: No suitable DMA available.\n"); | ||
| 175 | goto ignore_this_device; | 233 | goto ignore_this_device; |
| 176 | } | 234 | } |
| 177 | 235 | ||
| @@ -187,22 +245,20 @@ the case would look like this: | |||
| 187 | using_dac = 0; | 245 | using_dac = 0; |
| 188 | consistent_using_dac = 0; | 246 | consistent_using_dac = 0; |
| 189 | } else { | 247 | } else { |
| 190 | printk(KERN_WARNING | 248 | dev_warn(dev, "mydev: No suitable DMA available\n"); |
| 191 | "mydev: No suitable DMA available.\n"); | ||
| 192 | goto ignore_this_device; | 249 | goto ignore_this_device; |
| 193 | } | 250 | } |
| 194 | 251 | ||
| 195 | The coherent coherent mask will always be able to set the same or a | 252 | The coherent mask will always be able to set the same or a smaller mask as |
| 196 | smaller mask as the streaming mask. However for the rare case that a | 253 | the streaming mask. However for the rare case that a device driver only |
| 197 | device driver only uses consistent allocations, one would have to | 254 | uses consistent allocations, one would have to check the return value from |
| 198 | check the return value from dma_set_coherent_mask(). | 255 | dma_set_coherent_mask(). |
| 199 | 256 | ||
| 200 | Finally, if your device can only drive the low 24-bits of | 257 | Finally, if your device can only drive the low 24-bits of |
| 201 | address you might do something like: | 258 | address you might do something like: |
| 202 | 259 | ||
| 203 | if (dma_set_mask(dev, DMA_BIT_MASK(24))) { | 260 | if (dma_set_mask(dev, DMA_BIT_MASK(24))) { |
| 204 | printk(KERN_WARNING | 261 | dev_warn(dev, "mydev: 24-bit DMA addressing not available\n"); |
| 205 | "mydev: 24-bit DMA addressing not available.\n"); | ||
| 206 | goto ignore_this_device; | 262 | goto ignore_this_device; |
| 207 | } | 263 | } |
| 208 | 264 | ||
| @@ -232,14 +288,14 @@ Here is pseudo-code showing how this might be done: | |||
| 232 | card->playback_enabled = 1; | 288 | card->playback_enabled = 1; |
| 233 | } else { | 289 | } else { |
| 234 | card->playback_enabled = 0; | 290 | card->playback_enabled = 0; |
| 235 | printk(KERN_WARNING "%s: Playback disabled due to DMA limitations.\n", | 291 | dev_warn(dev, "%s: Playback disabled due to DMA limitations\n", |
| 236 | card->name); | 292 | card->name); |
| 237 | } | 293 | } |
| 238 | if (!dma_set_mask(dev, RECORD_ADDRESS_BITS)) { | 294 | if (!dma_set_mask(dev, RECORD_ADDRESS_BITS)) { |
| 239 | card->record_enabled = 1; | 295 | card->record_enabled = 1; |
| 240 | } else { | 296 | } else { |
| 241 | card->record_enabled = 0; | 297 | card->record_enabled = 0; |
| 242 | printk(KERN_WARNING "%s: Record disabled due to DMA limitations.\n", | 298 | dev_warn(dev, "%s: Record disabled due to DMA limitations\n", |
| 243 | card->name); | 299 | card->name); |
| 244 | } | 300 | } |
| 245 | 301 | ||
| @@ -331,7 +387,7 @@ context with the GFP_ATOMIC flag. | |||
| 331 | Size is the length of the region you want to allocate, in bytes. | 387 | Size is the length of the region you want to allocate, in bytes. |
| 332 | 388 | ||
| 333 | This routine will allocate RAM for that region, so it acts similarly to | 389 | This routine will allocate RAM for that region, so it acts similarly to |
| 334 | __get_free_pages (but takes size instead of a page order). If your | 390 | __get_free_pages() (but takes size instead of a page order). If your |
| 335 | driver needs regions sized smaller than a page, you may prefer using | 391 | driver needs regions sized smaller than a page, you may prefer using |
| 336 | the dma_pool interface, described below. | 392 | the dma_pool interface, described below. |
| 337 | 393 | ||
| @@ -343,11 +399,11 @@ the consistent DMA mask has been explicitly changed via | |||
| 343 | dma_set_coherent_mask(). This is true of the dma_pool interface as | 399 | dma_set_coherent_mask(). This is true of the dma_pool interface as |
| 344 | well. | 400 | well. |
| 345 | 401 | ||
| 346 | dma_alloc_coherent returns two values: the virtual address which you | 402 | dma_alloc_coherent() returns two values: the virtual address which you |
| 347 | can use to access it from the CPU and dma_handle which you pass to the | 403 | can use to access it from the CPU and dma_handle which you pass to the |
| 348 | card. | 404 | card. |
| 349 | 405 | ||
| 350 | The cpu return address and the DMA bus master address are both | 406 | The CPU virtual address and the DMA bus address are both |
| 351 | guaranteed to be aligned to the smallest PAGE_SIZE order which | 407 | guaranteed to be aligned to the smallest PAGE_SIZE order which |
| 352 | is greater than or equal to the requested size. This invariant | 408 | is greater than or equal to the requested size. This invariant |
| 353 | exists (for example) to guarantee that if you allocate a chunk | 409 | exists (for example) to guarantee that if you allocate a chunk |
| @@ -359,13 +415,13 @@ To unmap and free such a DMA region, you call: | |||
| 359 | dma_free_coherent(dev, size, cpu_addr, dma_handle); | 415 | dma_free_coherent(dev, size, cpu_addr, dma_handle); |
| 360 | 416 | ||
| 361 | where dev, size are the same as in the above call and cpu_addr and | 417 | where dev, size are the same as in the above call and cpu_addr and |
| 362 | dma_handle are the values dma_alloc_coherent returned to you. | 418 | dma_handle are the values dma_alloc_coherent() returned to you. |
| 363 | This function may not be called in interrupt context. | 419 | This function may not be called in interrupt context. |
| 364 | 420 | ||
| 365 | If your driver needs lots of smaller memory regions, you can write | 421 | If your driver needs lots of smaller memory regions, you can write |
| 366 | custom code to subdivide pages returned by dma_alloc_coherent, | 422 | custom code to subdivide pages returned by dma_alloc_coherent(), |
| 367 | or you can use the dma_pool API to do that. A dma_pool is like | 423 | or you can use the dma_pool API to do that. A dma_pool is like |
| 368 | a kmem_cache, but it uses dma_alloc_coherent not __get_free_pages. | 424 | a kmem_cache, but it uses dma_alloc_coherent(), not __get_free_pages(). |
| 369 | Also, it understands common hardware constraints for alignment, | 425 | Also, it understands common hardware constraints for alignment, |
| 370 | like queue heads needing to be aligned on N byte boundaries. | 426 | like queue heads needing to be aligned on N byte boundaries. |
| 371 | 427 | ||
| @@ -373,37 +429,37 @@ Create a dma_pool like this: | |||
| 373 | 429 | ||
| 374 | struct dma_pool *pool; | 430 | struct dma_pool *pool; |
| 375 | 431 | ||
| 376 | pool = dma_pool_create(name, dev, size, align, alloc); | 432 | pool = dma_pool_create(name, dev, size, align, boundary); |
| 377 | 433 | ||
| 378 | The "name" is for diagnostics (like a kmem_cache name); dev and size | 434 | The "name" is for diagnostics (like a kmem_cache name); dev and size |
| 379 | are as above. The device's hardware alignment requirement for this | 435 | are as above. The device's hardware alignment requirement for this |
| 380 | type of data is "align" (which is expressed in bytes, and must be a | 436 | type of data is "align" (which is expressed in bytes, and must be a |
| 381 | power of two). If your device has no boundary crossing restrictions, | 437 | power of two). If your device has no boundary crossing restrictions, |
| 382 | pass 0 for alloc; passing 4096 says memory allocated from this pool | 438 | pass 0 for boundary; passing 4096 says memory allocated from this pool |
| 383 | must not cross 4KByte boundaries (but at that time it may be better to | 439 | must not cross 4KByte boundaries (but at that time it may be better to |
| 384 | go for dma_alloc_coherent directly instead). | 440 | use dma_alloc_coherent() directly instead). |
| 385 | 441 | ||
| 386 | Allocate memory from a dma pool like this: | 442 | Allocate memory from a DMA pool like this: |
| 387 | 443 | ||
| 388 | cpu_addr = dma_pool_alloc(pool, flags, &dma_handle); | 444 | cpu_addr = dma_pool_alloc(pool, flags, &dma_handle); |
| 389 | 445 | ||
| 390 | flags are SLAB_KERNEL if blocking is permitted (not in_interrupt nor | 446 | flags are GFP_KERNEL if blocking is permitted (not in_interrupt nor |
| 391 | holding SMP locks), SLAB_ATOMIC otherwise. Like dma_alloc_coherent, | 447 | holding SMP locks), GFP_ATOMIC otherwise. Like dma_alloc_coherent(), |
| 392 | this returns two values, cpu_addr and dma_handle. | 448 | this returns two values, cpu_addr and dma_handle. |
| 393 | 449 | ||
| 394 | Free memory that was allocated from a dma_pool like this: | 450 | Free memory that was allocated from a dma_pool like this: |
| 395 | 451 | ||
| 396 | dma_pool_free(pool, cpu_addr, dma_handle); | 452 | dma_pool_free(pool, cpu_addr, dma_handle); |
| 397 | 453 | ||
| 398 | where pool is what you passed to dma_pool_alloc, and cpu_addr and | 454 | where pool is what you passed to dma_pool_alloc(), and cpu_addr and |
| 399 | dma_handle are the values dma_pool_alloc returned. This function | 455 | dma_handle are the values dma_pool_alloc() returned. This function |
| 400 | may be called in interrupt context. | 456 | may be called in interrupt context. |
| 401 | 457 | ||
| 402 | Destroy a dma_pool by calling: | 458 | Destroy a dma_pool by calling: |
| 403 | 459 | ||
| 404 | dma_pool_destroy(pool); | 460 | dma_pool_destroy(pool); |
| 405 | 461 | ||
| 406 | Make sure you've called dma_pool_free for all memory allocated | 462 | Make sure you've called dma_pool_free() for all memory allocated |
| 407 | from a pool before you destroy the pool. This function may not | 463 | from a pool before you destroy the pool. This function may not |
| 408 | be called in interrupt context. | 464 | be called in interrupt context. |
| 409 | 465 | ||
| @@ -418,7 +474,7 @@ one of the following values: | |||
| 418 | DMA_FROM_DEVICE | 474 | DMA_FROM_DEVICE |
| 419 | DMA_NONE | 475 | DMA_NONE |
| 420 | 476 | ||
| 421 | One should provide the exact DMA direction if you know it. | 477 | You should provide the exact DMA direction if you know it. |
| 422 | 478 | ||
| 423 | DMA_TO_DEVICE means "from main memory to the device" | 479 | DMA_TO_DEVICE means "from main memory to the device" |
| 424 | DMA_FROM_DEVICE means "from the device to main memory" | 480 | DMA_FROM_DEVICE means "from the device to main memory" |
| @@ -489,14 +545,14 @@ and to unmap it: | |||
| 489 | dma_unmap_single(dev, dma_handle, size, direction); | 545 | dma_unmap_single(dev, dma_handle, size, direction); |
| 490 | 546 | ||
| 491 | You should call dma_mapping_error() as dma_map_single() could fail and return | 547 | You should call dma_mapping_error() as dma_map_single() could fail and return |
| 492 | error. Not all dma implementations support dma_mapping_error() interface. | 548 | error. Not all DMA implementations support the dma_mapping_error() interface. |
| 493 | However, it is a good practice to call dma_mapping_error() interface, which | 549 | However, it is a good practice to call dma_mapping_error() interface, which |
| 494 | will invoke the generic mapping error check interface. Doing so will ensure | 550 | will invoke the generic mapping error check interface. Doing so will ensure |
| 495 | that the mapping code will work correctly on all dma implementations without | 551 | that the mapping code will work correctly on all DMA implementations without |
| 496 | any dependency on the specifics of the underlying implementation. Using the | 552 | any dependency on the specifics of the underlying implementation. Using the |
| 497 | returned address without checking for errors could result in failures ranging | 553 | returned address without checking for errors could result in failures ranging |
| 498 | from panics to silent data corruption. A couple of examples of incorrect ways | 554 | from panics to silent data corruption. A couple of examples of incorrect ways |
| 499 | to check for errors that make assumptions about the underlying dma | 555 | to check for errors that make assumptions about the underlying DMA |
| 500 | implementation are as follows and these are applicable to dma_map_page() as | 556 | implementation are as follows and these are applicable to dma_map_page() as |
| 501 | well. | 557 | well. |
| 502 | 558 | ||
| @@ -516,13 +572,13 @@ Incorrect example 2: | |||
| 516 | goto map_error; | 572 | goto map_error; |
| 517 | } | 573 | } |
| 518 | 574 | ||
| 519 | You should call dma_unmap_single when the DMA activity is finished, e.g. | 575 | You should call dma_unmap_single() when the DMA activity is finished, e.g., |
| 520 | from the interrupt which told you that the DMA transfer is done. | 576 | from the interrupt which told you that the DMA transfer is done. |
| 521 | 577 | ||
| 522 | Using cpu pointers like this for single mappings has a disadvantage, | 578 | Using CPU pointers like this for single mappings has a disadvantage: |
| 523 | you cannot reference HIGHMEM memory in this way. Thus, there is a | 579 | you cannot reference HIGHMEM memory in this way. Thus, there is a |
| 524 | map/unmap interface pair akin to dma_{map,unmap}_single. These | 580 | map/unmap interface pair akin to dma_{map,unmap}_single(). These |
| 525 | interfaces deal with page/offset pairs instead of cpu pointers. | 581 | interfaces deal with page/offset pairs instead of CPU pointers. |
| 526 | Specifically: | 582 | Specifically: |
| 527 | 583 | ||
| 528 | struct device *dev = &my_dev->dev; | 584 | struct device *dev = &my_dev->dev; |
| @@ -550,7 +606,7 @@ Here, "offset" means byte offset within the given page. | |||
| 550 | You should call dma_mapping_error() as dma_map_page() could fail and return | 606 | You should call dma_mapping_error() as dma_map_page() could fail and return |
| 551 | error as outlined under the dma_map_single() discussion. | 607 | error as outlined under the dma_map_single() discussion. |
| 552 | 608 | ||
| 553 | You should call dma_unmap_page when the DMA activity is finished, e.g. | 609 | You should call dma_unmap_page() when the DMA activity is finished, e.g., |
| 554 | from the interrupt which told you that the DMA transfer is done. | 610 | from the interrupt which told you that the DMA transfer is done. |
| 555 | 611 | ||
| 556 | With scatterlists, you map a region gathered from several regions by: | 612 | With scatterlists, you map a region gathered from several regions by: |
| @@ -588,18 +644,16 @@ PLEASE NOTE: The 'nents' argument to the dma_unmap_sg call must be | |||
| 588 | it should _NOT_ be the 'count' value _returned_ from the | 644 | it should _NOT_ be the 'count' value _returned_ from the |
| 589 | dma_map_sg call. | 645 | dma_map_sg call. |
| 590 | 646 | ||
| 591 | Every dma_map_{single,sg} call should have its dma_unmap_{single,sg} | 647 | Every dma_map_{single,sg}() call should have its dma_unmap_{single,sg}() |
| 592 | counterpart, because the bus address space is a shared resource (although | 648 | counterpart, because the bus address space is a shared resource and |
| 593 | in some ports the mapping is per each BUS so less devices contend for the | 649 | you could render the machine unusable by consuming all bus addresses. |
| 594 | same bus address space) and you could render the machine unusable by eating | ||
| 595 | all bus addresses. | ||
| 596 | 650 | ||
| 597 | If you need to use the same streaming DMA region multiple times and touch | 651 | If you need to use the same streaming DMA region multiple times and touch |
| 598 | the data in between the DMA transfers, the buffer needs to be synced | 652 | the data in between the DMA transfers, the buffer needs to be synced |
| 599 | properly in order for the cpu and device to see the most uptodate and | 653 | properly in order for the CPU and device to see the most up-to-date and |
| 600 | correct copy of the DMA buffer. | 654 | correct copy of the DMA buffer. |
| 601 | 655 | ||
| 602 | So, firstly, just map it with dma_map_{single,sg}, and after each DMA | 656 | So, firstly, just map it with dma_map_{single,sg}(), and after each DMA |
| 603 | transfer call either: | 657 | transfer call either: |
| 604 | 658 | ||
| 605 | dma_sync_single_for_cpu(dev, dma_handle, size, direction); | 659 | dma_sync_single_for_cpu(dev, dma_handle, size, direction); |
| @@ -611,7 +665,7 @@ or: | |||
| 611 | as appropriate. | 665 | as appropriate. |
| 612 | 666 | ||
| 613 | Then, if you wish to let the device get at the DMA area again, | 667 | Then, if you wish to let the device get at the DMA area again, |
| 614 | finish accessing the data with the cpu, and then before actually | 668 | finish accessing the data with the CPU, and then before actually |
| 615 | giving the buffer to the hardware call either: | 669 | giving the buffer to the hardware call either: |
| 616 | 670 | ||
| 617 | dma_sync_single_for_device(dev, dma_handle, size, direction); | 671 | dma_sync_single_for_device(dev, dma_handle, size, direction); |
| @@ -623,9 +677,9 @@ or: | |||
| 623 | as appropriate. | 677 | as appropriate. |
| 624 | 678 | ||
| 625 | After the last DMA transfer call one of the DMA unmap routines | 679 | After the last DMA transfer call one of the DMA unmap routines |
| 626 | dma_unmap_{single,sg}. If you don't touch the data from the first dma_map_* | 680 | dma_unmap_{single,sg}(). If you don't touch the data from the first |
| 627 | call till dma_unmap_*, then you don't have to call the dma_sync_* | 681 | dma_map_*() call till dma_unmap_*(), then you don't have to call the |
| 628 | routines at all. | 682 | dma_sync_*() routines at all. |
| 629 | 683 | ||
| 630 | Here is pseudo code which shows a situation in which you would need | 684 | Here is pseudo code which shows a situation in which you would need |
| 631 | to use the dma_sync_*() interfaces. | 685 | to use the dma_sync_*() interfaces. |
| @@ -690,12 +744,12 @@ to use the dma_sync_*() interfaces. | |||
| 690 | } | 744 | } |
| 691 | } | 745 | } |
| 692 | 746 | ||
| 693 | Drivers converted fully to this interface should not use virt_to_bus any | 747 | Drivers converted fully to this interface should not use virt_to_bus() any |
| 694 | longer, nor should they use bus_to_virt. Some drivers have to be changed a | 748 | longer, nor should they use bus_to_virt(). Some drivers have to be changed a |
| 695 | little bit, because there is no longer an equivalent to bus_to_virt in the | 749 | little bit, because there is no longer an equivalent to bus_to_virt() in the |
| 696 | dynamic DMA mapping scheme - you have to always store the DMA addresses | 750 | dynamic DMA mapping scheme - you have to always store the DMA addresses |
| 697 | returned by the dma_alloc_coherent, dma_pool_alloc, and dma_map_single | 751 | returned by the dma_alloc_coherent(), dma_pool_alloc(), and dma_map_single() |
| 698 | calls (dma_map_sg stores them in the scatterlist itself if the platform | 752 | calls (dma_map_sg() stores them in the scatterlist itself if the platform |
| 699 | supports dynamic DMA mapping in hardware) in your driver structures and/or | 753 | supports dynamic DMA mapping in hardware) in your driver structures and/or |
| 700 | in the card registers. | 754 | in the card registers. |
| 701 | 755 | ||
| @@ -709,9 +763,9 @@ as it is impossible to correctly support them. | |||
| 709 | DMA address space is limited on some architectures and an allocation | 763 | DMA address space is limited on some architectures and an allocation |
| 710 | failure can be determined by: | 764 | failure can be determined by: |
| 711 | 765 | ||
| 712 | - checking if dma_alloc_coherent returns NULL or dma_map_sg returns 0 | 766 | - checking if dma_alloc_coherent() returns NULL or dma_map_sg returns 0 |
| 713 | 767 | ||
| 714 | - checking the returned dma_addr_t of dma_map_single and dma_map_page | 768 | - checking the dma_addr_t returned from dma_map_single() and dma_map_page() |
| 715 | by using dma_mapping_error(): | 769 | by using dma_mapping_error(): |
| 716 | 770 | ||
| 717 | dma_addr_t dma_handle; | 771 | dma_addr_t dma_handle; |
| @@ -794,7 +848,7 @@ Example 2: (if buffers are allocated in a loop, unmap all mapped buffers when | |||
| 794 | dma_unmap_single(array[i].dma_addr); | 848 | dma_unmap_single(array[i].dma_addr); |
| 795 | } | 849 | } |
| 796 | 850 | ||
| 797 | Networking drivers must call dev_kfree_skb to free the socket buffer | 851 | Networking drivers must call dev_kfree_skb() to free the socket buffer |
| 798 | and return NETDEV_TX_OK if the DMA mapping fails on the transmit hook | 852 | and return NETDEV_TX_OK if the DMA mapping fails on the transmit hook |
| 799 | (ndo_start_xmit). This means that the socket buffer is just dropped in | 853 | (ndo_start_xmit). This means that the socket buffer is just dropped in |
| 800 | the failure case. | 854 | the failure case. |
| @@ -831,7 +885,7 @@ transform some example code. | |||
| 831 | DEFINE_DMA_UNMAP_LEN(len); | 885 | DEFINE_DMA_UNMAP_LEN(len); |
| 832 | }; | 886 | }; |
| 833 | 887 | ||
| 834 | 2) Use dma_unmap_{addr,len}_set to set these values. | 888 | 2) Use dma_unmap_{addr,len}_set() to set these values. |
| 835 | Example, before: | 889 | Example, before: |
| 836 | 890 | ||
| 837 | ringp->mapping = FOO; | 891 | ringp->mapping = FOO; |
| @@ -842,7 +896,7 @@ transform some example code. | |||
| 842 | dma_unmap_addr_set(ringp, mapping, FOO); | 896 | dma_unmap_addr_set(ringp, mapping, FOO); |
| 843 | dma_unmap_len_set(ringp, len, BAR); | 897 | dma_unmap_len_set(ringp, len, BAR); |
| 844 | 898 | ||
| 845 | 3) Use dma_unmap_{addr,len} to access these values. | 899 | 3) Use dma_unmap_{addr,len}() to access these values. |
| 846 | Example, before: | 900 | Example, before: |
| 847 | 901 | ||
| 848 | dma_unmap_single(dev, ringp->mapping, ringp->len, | 902 | dma_unmap_single(dev, ringp->mapping, ringp->len, |
diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index e865279cec58..52088408668a 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt | |||
| @@ -4,22 +4,26 @@ | |||
| 4 | James E.J. Bottomley <James.Bottomley@HansenPartnership.com> | 4 | James E.J. Bottomley <James.Bottomley@HansenPartnership.com> |
| 5 | 5 | ||
| 6 | This document describes the DMA API. For a more gentle introduction | 6 | This document describes the DMA API. For a more gentle introduction |
| 7 | of the API (and actual examples) see | 7 | of the API (and actual examples), see Documentation/DMA-API-HOWTO.txt. |
| 8 | Documentation/DMA-API-HOWTO.txt. | ||
| 9 | 8 | ||
| 10 | This API is split into two pieces. Part I describes the API. Part II | 9 | This API is split into two pieces. Part I describes the basic API. |
| 11 | describes the extensions to the API for supporting non-consistent | 10 | Part II describes extensions for supporting non-consistent memory |
| 12 | memory machines. Unless you know that your driver absolutely has to | 11 | machines. Unless you know that your driver absolutely has to support |
| 13 | support non-consistent platforms (this is usually only legacy | 12 | non-consistent platforms (this is usually only legacy platforms) you |
| 14 | platforms) you should only use the API described in part I. | 13 | should only use the API described in part I. |
| 15 | 14 | ||
| 16 | Part I - dma_ API | 15 | Part I - dma_ API |
| 17 | ------------------------------------- | 16 | ------------------------------------- |
| 18 | 17 | ||
| 19 | To get the dma_ API, you must #include <linux/dma-mapping.h> | 18 | To get the dma_ API, you must #include <linux/dma-mapping.h>. This |
| 19 | provides dma_addr_t and the interfaces described below. | ||
| 20 | 20 | ||
| 21 | A dma_addr_t can hold any valid DMA or bus address for the platform. It | ||
| 22 | can be given to a device to use as a DMA source or target. A CPU cannot | ||
| 23 | reference a dma_addr_t directly because there may be translation between | ||
| 24 | its physical address space and the bus address space. | ||
| 21 | 25 | ||
| 22 | Part Ia - Using large dma-coherent buffers | 26 | Part Ia - Using large DMA-coherent buffers |
| 23 | ------------------------------------------ | 27 | ------------------------------------------ |
| 24 | 28 | ||
| 25 | void * | 29 | void * |
| @@ -33,20 +37,21 @@ to make sure to flush the processor's write buffers before telling | |||
| 33 | devices to read that memory.) | 37 | devices to read that memory.) |
| 34 | 38 | ||
| 35 | This routine allocates a region of <size> bytes of consistent memory. | 39 | This routine allocates a region of <size> bytes of consistent memory. |
| 36 | It also returns a <dma_handle> which may be cast to an unsigned | ||
| 37 | integer the same width as the bus and used as the physical address | ||
| 38 | base of the region. | ||
| 39 | 40 | ||
| 40 | Returns: a pointer to the allocated region (in the processor's virtual | 41 | It returns a pointer to the allocated region (in the processor's virtual |
| 41 | address space) or NULL if the allocation failed. | 42 | address space) or NULL if the allocation failed. |
| 42 | 43 | ||
| 44 | It also returns a <dma_handle> which may be cast to an unsigned integer the | ||
| 45 | same width as the bus and given to the device as the bus address base of | ||
| 46 | the region. | ||
| 47 | |||
| 43 | Note: consistent memory can be expensive on some platforms, and the | 48 | Note: consistent memory can be expensive on some platforms, and the |
| 44 | minimum allocation length may be as big as a page, so you should | 49 | minimum allocation length may be as big as a page, so you should |
| 45 | consolidate your requests for consistent memory as much as possible. | 50 | consolidate your requests for consistent memory as much as possible. |
| 46 | The simplest way to do that is to use the dma_pool calls (see below). | 51 | The simplest way to do that is to use the dma_pool calls (see below). |
| 47 | 52 | ||
| 48 | The flag parameter (dma_alloc_coherent only) allows the caller to | 53 | The flag parameter (dma_alloc_coherent() only) allows the caller to |
| 49 | specify the GFP_ flags (see kmalloc) for the allocation (the | 54 | specify the GFP_ flags (see kmalloc()) for the allocation (the |
| 50 | implementation may choose to ignore flags that affect the location of | 55 | implementation may choose to ignore flags that affect the location of |
| 51 | the returned memory, like GFP_DMA). | 56 | the returned memory, like GFP_DMA). |
| 52 | 57 | ||
| @@ -61,24 +66,24 @@ void | |||
| 61 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | 66 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, |
| 62 | dma_addr_t dma_handle) | 67 | dma_addr_t dma_handle) |
| 63 | 68 | ||
| 64 | Free the region of consistent memory you previously allocated. dev, | 69 | Free a region of consistent memory you previously allocated. dev, |
| 65 | size and dma_handle must all be the same as those passed into the | 70 | size and dma_handle must all be the same as those passed into |
| 66 | consistent allocate. cpu_addr must be the virtual address returned by | 71 | dma_alloc_coherent(). cpu_addr must be the virtual address returned by |
| 67 | the consistent allocate. | 72 | the dma_alloc_coherent(). |
| 68 | 73 | ||
| 69 | Note that unlike their sibling allocation calls, these routines | 74 | Note that unlike their sibling allocation calls, these routines |
| 70 | may only be called with IRQs enabled. | 75 | may only be called with IRQs enabled. |
| 71 | 76 | ||
| 72 | 77 | ||
| 73 | Part Ib - Using small dma-coherent buffers | 78 | Part Ib - Using small DMA-coherent buffers |
| 74 | ------------------------------------------ | 79 | ------------------------------------------ |
| 75 | 80 | ||
| 76 | To get this part of the dma_ API, you must #include <linux/dmapool.h> | 81 | To get this part of the dma_ API, you must #include <linux/dmapool.h> |
| 77 | 82 | ||
| 78 | Many drivers need lots of small dma-coherent memory regions for DMA | 83 | Many drivers need lots of small DMA-coherent memory regions for DMA |
| 79 | descriptors or I/O buffers. Rather than allocating in units of a page | 84 | descriptors or I/O buffers. Rather than allocating in units of a page |
| 80 | or more using dma_alloc_coherent(), you can use DMA pools. These work | 85 | or more using dma_alloc_coherent(), you can use DMA pools. These work |
| 81 | much like a struct kmem_cache, except that they use the dma-coherent allocator, | 86 | much like a struct kmem_cache, except that they use the DMA-coherent allocator, |
| 82 | not __get_free_pages(). Also, they understand common hardware constraints | 87 | not __get_free_pages(). Also, they understand common hardware constraints |
| 83 | for alignment, like queue heads needing to be aligned on N-byte boundaries. | 88 | for alignment, like queue heads needing to be aligned on N-byte boundaries. |
| 84 | 89 | ||
| @@ -87,7 +92,7 @@ for alignment, like queue heads needing to be aligned on N-byte boundaries. | |||
| 87 | dma_pool_create(const char *name, struct device *dev, | 92 | dma_pool_create(const char *name, struct device *dev, |
| 88 | size_t size, size_t align, size_t alloc); | 93 | size_t size, size_t align, size_t alloc); |
| 89 | 94 | ||
| 90 | The pool create() routines initialize a pool of dma-coherent buffers | 95 | dma_pool_create() initializes a pool of DMA-coherent buffers |
| 91 | for use with a given device. It must be called in a context which | 96 | for use with a given device. It must be called in a context which |
| 92 | can sleep. | 97 | can sleep. |
| 93 | 98 | ||
| @@ -102,25 +107,26 @@ from this pool must not cross 4KByte boundaries. | |||
| 102 | void *dma_pool_alloc(struct dma_pool *pool, gfp_t gfp_flags, | 107 | void *dma_pool_alloc(struct dma_pool *pool, gfp_t gfp_flags, |
| 103 | dma_addr_t *dma_handle); | 108 | dma_addr_t *dma_handle); |
| 104 | 109 | ||
| 105 | This allocates memory from the pool; the returned memory will meet the size | 110 | This allocates memory from the pool; the returned memory will meet the |
| 106 | and alignment requirements specified at creation time. Pass GFP_ATOMIC to | 111 | size and alignment requirements specified at creation time. Pass |
| 107 | prevent blocking, or if it's permitted (not in_interrupt, not holding SMP locks), | 112 | GFP_ATOMIC to prevent blocking, or if it's permitted (not |
| 108 | pass GFP_KERNEL to allow blocking. Like dma_alloc_coherent(), this returns | 113 | in_interrupt, not holding SMP locks), pass GFP_KERNEL to allow |
| 109 | two values: an address usable by the cpu, and the dma address usable by the | 114 | blocking. Like dma_alloc_coherent(), this returns two values: an |
| 110 | pool's device. | 115 | address usable by the CPU, and the DMA address usable by the pool's |
| 116 | device. | ||
| 111 | 117 | ||
| 112 | 118 | ||
| 113 | void dma_pool_free(struct dma_pool *pool, void *vaddr, | 119 | void dma_pool_free(struct dma_pool *pool, void *vaddr, |
| 114 | dma_addr_t addr); | 120 | dma_addr_t addr); |
| 115 | 121 | ||
| 116 | This puts memory back into the pool. The pool is what was passed to | 122 | This puts memory back into the pool. The pool is what was passed to |
| 117 | the pool allocation routine; the cpu (vaddr) and dma addresses are what | 123 | dma_pool_alloc(); the CPU (vaddr) and DMA addresses are what |
| 118 | were returned when that routine allocated the memory being freed. | 124 | were returned when that routine allocated the memory being freed. |
| 119 | 125 | ||
| 120 | 126 | ||
| 121 | void dma_pool_destroy(struct dma_pool *pool); | 127 | void dma_pool_destroy(struct dma_pool *pool); |
| 122 | 128 | ||
| 123 | The pool destroy() routines free the resources of the pool. They must be | 129 | dma_pool_destroy() frees the resources of the pool. It must be |
| 124 | called in a context which can sleep. Make sure you've freed all allocated | 130 | called in a context which can sleep. Make sure you've freed all allocated |
| 125 | memory back to the pool before you destroy it. | 131 | memory back to the pool before you destroy it. |
| 126 | 132 | ||
| @@ -187,9 +193,9 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size, | |||
| 187 | enum dma_data_direction direction) | 193 | enum dma_data_direction direction) |
| 188 | 194 | ||
| 189 | Maps a piece of processor virtual memory so it can be accessed by the | 195 | Maps a piece of processor virtual memory so it can be accessed by the |
| 190 | device and returns the physical handle of the memory. | 196 | device and returns the bus address of the memory. |
| 191 | 197 | ||
| 192 | The direction for both api's may be converted freely by casting. | 198 | The direction for both APIs may be converted freely by casting. |
| 193 | However the dma_ API uses a strongly typed enumerator for its | 199 | However the dma_ API uses a strongly typed enumerator for its |
| 194 | direction: | 200 | direction: |
| 195 | 201 | ||
| @@ -198,31 +204,30 @@ DMA_TO_DEVICE data is going from the memory to the device | |||
| 198 | DMA_FROM_DEVICE data is coming from the device to the memory | 204 | DMA_FROM_DEVICE data is coming from the device to the memory |
| 199 | DMA_BIDIRECTIONAL direction isn't known | 205 | DMA_BIDIRECTIONAL direction isn't known |
| 200 | 206 | ||
| 201 | Notes: Not all memory regions in a machine can be mapped by this | 207 | Notes: Not all memory regions in a machine can be mapped by this API. |
| 202 | API. Further, regions that appear to be physically contiguous in | 208 | Further, contiguous kernel virtual space may not be contiguous as |
| 203 | kernel virtual space may not be contiguous as physical memory. Since | 209 | physical memory. Since this API does not provide any scatter/gather |
| 204 | this API does not provide any scatter/gather capability, it will fail | 210 | capability, it will fail if the user tries to map a non-physically |
| 205 | if the user tries to map a non-physically contiguous piece of memory. | 211 | contiguous piece of memory. For this reason, memory to be mapped by |
| 206 | For this reason, it is recommended that memory mapped by this API be | 212 | this API should be obtained from sources which guarantee it to be |
| 207 | obtained only from sources which guarantee it to be physically contiguous | 213 | physically contiguous (like kmalloc). |
| 208 | (like kmalloc). | 214 | |
| 209 | 215 | Further, the bus address of the memory must be within the | |
| 210 | Further, the physical address of the memory must be within the | 216 | dma_mask of the device (the dma_mask is a bit mask of the |
| 211 | dma_mask of the device (the dma_mask represents a bit mask of the | 217 | addressable region for the device, i.e., if the bus address of |
| 212 | addressable region for the device. I.e., if the physical address of | 218 | the memory ANDed with the dma_mask is still equal to the bus |
| 213 | the memory anded with the dma_mask is still equal to the physical | 219 | address, then the device can perform DMA to the memory). To |
| 214 | address, then the device can perform DMA to the memory). In order to | ||
| 215 | ensure that the memory allocated by kmalloc is within the dma_mask, | 220 | ensure that the memory allocated by kmalloc is within the dma_mask, |
| 216 | the driver may specify various platform-dependent flags to restrict | 221 | the driver may specify various platform-dependent flags to restrict |
| 217 | the physical memory range of the allocation (e.g. on x86, GFP_DMA | 222 | the bus address range of the allocation (e.g., on x86, GFP_DMA |
| 218 | guarantees to be within the first 16Mb of available physical memory, | 223 | guarantees to be within the first 16MB of available bus addresses, |
| 219 | as required by ISA devices). | 224 | as required by ISA devices). |
| 220 | 225 | ||
| 221 | Note also that the above constraints on physical contiguity and | 226 | Note also that the above constraints on physical contiguity and |
| 222 | dma_mask may not apply if the platform has an IOMMU (a device which | 227 | dma_mask may not apply if the platform has an IOMMU (a device which |
| 223 | supplies a physical to virtual mapping between the I/O memory bus and | 228 | maps an I/O bus address to a physical memory address). However, to be |
| 224 | the device). However, to be portable, device driver writers may *not* | 229 | portable, device driver writers may *not* assume that such an IOMMU |
| 225 | assume that such an IOMMU exists. | 230 | exists. |
| 226 | 231 | ||
| 227 | Warnings: Memory coherency operates at a granularity called the cache | 232 | Warnings: Memory coherency operates at a granularity called the cache |
| 228 | line width. In order for memory mapped by this API to operate | 233 | line width. In order for memory mapped by this API to operate |
| @@ -281,9 +286,9 @@ cache width is. | |||
| 281 | int | 286 | int |
| 282 | dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | 287 | dma_mapping_error(struct device *dev, dma_addr_t dma_addr) |
| 283 | 288 | ||
| 284 | In some circumstances dma_map_single and dma_map_page will fail to create | 289 | In some circumstances dma_map_single() and dma_map_page() will fail to create |
| 285 | a mapping. A driver can check for these errors by testing the returned | 290 | a mapping. A driver can check for these errors by testing the returned |
| 286 | dma address with dma_mapping_error(). A non-zero return value means the mapping | 291 | DMA address with dma_mapping_error(). A non-zero return value means the mapping |
| 287 | could not be created and the driver should take appropriate action (e.g. | 292 | could not be created and the driver should take appropriate action (e.g. |
| 288 | reduce current DMA mapping usage or delay and try again later). | 293 | reduce current DMA mapping usage or delay and try again later). |
| 289 | 294 | ||
| @@ -291,7 +296,7 @@ reduce current DMA mapping usage or delay and try again later). | |||
| 291 | dma_map_sg(struct device *dev, struct scatterlist *sg, | 296 | dma_map_sg(struct device *dev, struct scatterlist *sg, |
| 292 | int nents, enum dma_data_direction direction) | 297 | int nents, enum dma_data_direction direction) |
| 293 | 298 | ||
| 294 | Returns: the number of physical segments mapped (this may be shorter | 299 | Returns: the number of bus address segments mapped (this may be shorter |
| 295 | than <nents> passed in if some elements of the scatter/gather list are | 300 | than <nents> passed in if some elements of the scatter/gather list are |
| 296 | physically or virtually adjacent and an IOMMU maps them with a single | 301 | physically or virtually adjacent and an IOMMU maps them with a single |
| 297 | entry). | 302 | entry). |
| @@ -299,7 +304,7 @@ entry). | |||
| 299 | Please note that the sg cannot be mapped again if it has been mapped once. | 304 | Please note that the sg cannot be mapped again if it has been mapped once. |
| 300 | The mapping process is allowed to destroy information in the sg. | 305 | The mapping process is allowed to destroy information in the sg. |
| 301 | 306 | ||
| 302 | As with the other mapping interfaces, dma_map_sg can fail. When it | 307 | As with the other mapping interfaces, dma_map_sg() can fail. When it |
| 303 | does, 0 is returned and a driver must take appropriate action. It is | 308 | does, 0 is returned and a driver must take appropriate action. It is |
| 304 | critical that the driver do something, in the case of a block driver | 309 | critical that the driver do something, in the case of a block driver |
| 305 | aborting the request or even oopsing is better than doing nothing and | 310 | aborting the request or even oopsing is better than doing nothing and |
| @@ -335,7 +340,7 @@ must be the same as those and passed in to the scatter/gather mapping | |||
| 335 | API. | 340 | API. |
| 336 | 341 | ||
| 337 | Note: <nents> must be the number you passed in, *not* the number of | 342 | Note: <nents> must be the number you passed in, *not* the number of |
| 338 | physical entries returned. | 343 | bus address entries returned. |
| 339 | 344 | ||
| 340 | void | 345 | void |
| 341 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, | 346 | dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, |
| @@ -350,7 +355,7 @@ void | |||
| 350 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, | 355 | dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, |
| 351 | enum dma_data_direction direction) | 356 | enum dma_data_direction direction) |
| 352 | 357 | ||
| 353 | Synchronise a single contiguous or scatter/gather mapping for the cpu | 358 | Synchronise a single contiguous or scatter/gather mapping for the CPU |
| 354 | and device. With the sync_sg API, all the parameters must be the same | 359 | and device. With the sync_sg API, all the parameters must be the same |
| 355 | as those passed into the single mapping API. With the sync_single API, | 360 | as those passed into the single mapping API. With the sync_single API, |
| 356 | you can use dma_handle and size parameters that aren't identical to | 361 | you can use dma_handle and size parameters that aren't identical to |
| @@ -391,10 +396,10 @@ The four functions above are just like the counterpart functions | |||
| 391 | without the _attrs suffixes, except that they pass an optional | 396 | without the _attrs suffixes, except that they pass an optional |
| 392 | struct dma_attrs*. | 397 | struct dma_attrs*. |
| 393 | 398 | ||
| 394 | struct dma_attrs encapsulates a set of "dma attributes". For the | 399 | struct dma_attrs encapsulates a set of "DMA attributes". For the |
| 395 | definition of struct dma_attrs see linux/dma-attrs.h. | 400 | definition of struct dma_attrs see linux/dma-attrs.h. |
| 396 | 401 | ||
| 397 | The interpretation of dma attributes is architecture-specific, and | 402 | The interpretation of DMA attributes is architecture-specific, and |
| 398 | each attribute should be documented in Documentation/DMA-attributes.txt. | 403 | each attribute should be documented in Documentation/DMA-attributes.txt. |
| 399 | 404 | ||
| 400 | If struct dma_attrs* is NULL, the semantics of each of these | 405 | If struct dma_attrs* is NULL, the semantics of each of these |
| @@ -458,7 +463,7 @@ Note: where the platform can return consistent memory, it will | |||
| 458 | guarantee that the sync points become nops. | 463 | guarantee that the sync points become nops. |
| 459 | 464 | ||
| 460 | Warning: Handling non-consistent memory is a real pain. You should | 465 | Warning: Handling non-consistent memory is a real pain. You should |
| 461 | only ever use this API if you positively know your driver will be | 466 | only use this API if you positively know your driver will be |
| 462 | required to work on one of the rare (usually non-PCI) architectures | 467 | required to work on one of the rare (usually non-PCI) architectures |
| 463 | that simply cannot make consistent memory. | 468 | that simply cannot make consistent memory. |
| 464 | 469 | ||
| @@ -492,30 +497,29 @@ continuing on for size. Again, you *must* observe the cache line | |||
| 492 | boundaries when doing this. | 497 | boundaries when doing this. |
| 493 | 498 | ||
| 494 | int | 499 | int |
| 495 | dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | 500 | dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, |
| 496 | dma_addr_t device_addr, size_t size, int | 501 | dma_addr_t device_addr, size_t size, int |
| 497 | flags) | 502 | flags) |
| 498 | 503 | ||
| 499 | Declare region of memory to be handed out by dma_alloc_coherent when | 504 | Declare region of memory to be handed out by dma_alloc_coherent() when |
| 500 | it's asked for coherent memory for this device. | 505 | it's asked for coherent memory for this device. |
| 501 | 506 | ||
| 502 | bus_addr is the physical address to which the memory is currently | 507 | phys_addr is the CPU physical address to which the memory is currently |
| 503 | assigned in the bus responding region (this will be used by the | 508 | assigned (this will be ioremapped so the CPU can access the region). |
| 504 | platform to perform the mapping). | ||
| 505 | 509 | ||
| 506 | device_addr is the physical address the device needs to be programmed | 510 | device_addr is the bus address the device needs to be programmed |
| 507 | with actually to address this memory (this will be handed out as the | 511 | with to actually address this memory (this will be handed out as the |
| 508 | dma_addr_t in dma_alloc_coherent()). | 512 | dma_addr_t in dma_alloc_coherent()). |
| 509 | 513 | ||
| 510 | size is the size of the area (must be multiples of PAGE_SIZE). | 514 | size is the size of the area (must be multiples of PAGE_SIZE). |
| 511 | 515 | ||
| 512 | flags can be or'd together and are: | 516 | flags can be ORed together and are: |
| 513 | 517 | ||
| 514 | DMA_MEMORY_MAP - request that the memory returned from | 518 | DMA_MEMORY_MAP - request that the memory returned from |
| 515 | dma_alloc_coherent() be directly writable. | 519 | dma_alloc_coherent() be directly writable. |
| 516 | 520 | ||
| 517 | DMA_MEMORY_IO - request that the memory returned from | 521 | DMA_MEMORY_IO - request that the memory returned from |
| 518 | dma_alloc_coherent() be addressable using read/write/memcpy_toio etc. | 522 | dma_alloc_coherent() be addressable using read()/write()/memcpy_toio() etc. |
| 519 | 523 | ||
| 520 | One or both of these flags must be present. | 524 | One or both of these flags must be present. |
| 521 | 525 | ||
| @@ -572,7 +576,7 @@ region is occupied. | |||
| 572 | Part III - Debug drivers use of the DMA-API | 576 | Part III - Debug drivers use of the DMA-API |
| 573 | ------------------------------------------- | 577 | ------------------------------------------- |
| 574 | 578 | ||
| 575 | The DMA-API as described above as some constraints. DMA addresses must be | 579 | The DMA-API as described above has some constraints. DMA addresses must be |
| 576 | released with the corresponding function with the same size for example. With | 580 | released with the corresponding function with the same size for example. With |
| 577 | the advent of hardware IOMMUs it becomes more and more important that drivers | 581 | the advent of hardware IOMMUs it becomes more and more important that drivers |
| 578 | do not violate those constraints. In the worst case such a violation can | 582 | do not violate those constraints. In the worst case such a violation can |
| @@ -690,11 +694,11 @@ architectural default. | |||
| 690 | void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr); | 694 | void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr); |
| 691 | 695 | ||
| 692 | dma-debug interface debug_dma_mapping_error() to debug drivers that fail | 696 | dma-debug interface debug_dma_mapping_error() to debug drivers that fail |
| 693 | to check dma mapping errors on addresses returned by dma_map_single() and | 697 | to check DMA mapping errors on addresses returned by dma_map_single() and |
| 694 | dma_map_page() interfaces. This interface clears a flag set by | 698 | dma_map_page() interfaces. This interface clears a flag set by |
| 695 | debug_dma_map_page() to indicate that dma_mapping_error() has been called by | 699 | debug_dma_map_page() to indicate that dma_mapping_error() has been called by |
| 696 | the driver. When driver does unmap, debug_dma_unmap() checks the flag and if | 700 | the driver. When driver does unmap, debug_dma_unmap() checks the flag and if |
| 697 | this flag is still set, prints warning message that includes call trace that | 701 | this flag is still set, prints warning message that includes call trace that |
| 698 | leads up to the unmap. This interface can be called from dma_mapping_error() | 702 | leads up to the unmap. This interface can be called from dma_mapping_error() |
| 699 | routines to enable dma mapping error check debugging. | 703 | routines to enable DMA mapping error check debugging. |
| 700 | 704 | ||
diff --git a/Documentation/DMA-ISA-LPC.txt b/Documentation/DMA-ISA-LPC.txt index e767805b4182..b1a19835e907 100644 --- a/Documentation/DMA-ISA-LPC.txt +++ b/Documentation/DMA-ISA-LPC.txt | |||
| @@ -16,7 +16,7 @@ To do ISA style DMA you need to include two headers: | |||
| 16 | #include <asm/dma.h> | 16 | #include <asm/dma.h> |
| 17 | 17 | ||
| 18 | The first is the generic DMA API used to convert virtual addresses to | 18 | The first is the generic DMA API used to convert virtual addresses to |
| 19 | physical addresses (see Documentation/DMA-API.txt for details). | 19 | bus addresses (see Documentation/DMA-API.txt for details). |
| 20 | 20 | ||
| 21 | The second contains the routines specific to ISA DMA transfers. Since | 21 | The second contains the routines specific to ISA DMA transfers. Since |
| 22 | this is not present on all platforms make sure you construct your | 22 | this is not present on all platforms make sure you construct your |
| @@ -50,7 +50,7 @@ early as possible and not release it until the driver is unloaded.) | |||
| 50 | Part III - Address translation | 50 | Part III - Address translation |
| 51 | ------------------------------ | 51 | ------------------------------ |
| 52 | 52 | ||
| 53 | To translate the virtual address to a physical use the normal DMA | 53 | To translate the virtual address to a bus address, use the normal DMA |
| 54 | API. Do _not_ use isa_virt_to_phys() even though it does the same | 54 | API. Do _not_ use isa_virt_to_phys() even though it does the same |
| 55 | thing. The reason for this is that the function isa_virt_to_phys() | 55 | thing. The reason for this is that the function isa_virt_to_phys() |
| 56 | will require a Kconfig dependency to ISA, not just ISA_DMA_API which | 56 | will require a Kconfig dependency to ISA, not just ISA_DMA_API which |
diff --git a/Documentation/DMA-attributes.txt b/Documentation/DMA-attributes.txt index cc2450d80310..18dc52c4f2a0 100644 --- a/Documentation/DMA-attributes.txt +++ b/Documentation/DMA-attributes.txt | |||
| @@ -98,5 +98,5 @@ DMA_ATTR_FORCE_CONTIGUOUS | |||
| 98 | By default DMA-mapping subsystem is allowed to assemble the buffer | 98 | By default DMA-mapping subsystem is allowed to assemble the buffer |
| 99 | allocated by dma_alloc_attrs() function from individual pages if it can | 99 | allocated by dma_alloc_attrs() function from individual pages if it can |
| 100 | be mapped as contiguous chunk into device dma address space. By | 100 | be mapped as contiguous chunk into device dma address space. By |
| 101 | specifing this attribute the allocated buffer is forced to be contiguous | 101 | specifying this attribute the allocated buffer is forced to be contiguous |
| 102 | also in physical memory. | 102 | also in physical memory. |
diff --git a/Documentation/DocBook/80211.tmpl b/Documentation/DocBook/80211.tmpl index 044b76436e83..d9b9416c989f 100644 --- a/Documentation/DocBook/80211.tmpl +++ b/Documentation/DocBook/80211.tmpl | |||
| @@ -100,6 +100,7 @@ | |||
| 100 | !Finclude/net/cfg80211.h wdev_priv | 100 | !Finclude/net/cfg80211.h wdev_priv |
| 101 | !Finclude/net/cfg80211.h ieee80211_iface_limit | 101 | !Finclude/net/cfg80211.h ieee80211_iface_limit |
| 102 | !Finclude/net/cfg80211.h ieee80211_iface_combination | 102 | !Finclude/net/cfg80211.h ieee80211_iface_combination |
| 103 | !Finclude/net/cfg80211.h cfg80211_check_combinations | ||
| 103 | </chapter> | 104 | </chapter> |
| 104 | <chapter> | 105 | <chapter> |
| 105 | <title>Actions and configuration</title> | 106 | <title>Actions and configuration</title> |
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index b444f2e8fe32..bec06659e0eb 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
| @@ -14,7 +14,8 @@ DOCBOOKS := z8530book.xml device-drivers.xml \ | |||
| 14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ | 14 | genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ |
| 15 | 80211.xml debugobjects.xml sh.xml regulator.xml \ | 15 | 80211.xml debugobjects.xml sh.xml regulator.xml \ |
| 16 | alsa-driver-api.xml writing-an-alsa-driver.xml \ | 16 | alsa-driver-api.xml writing-an-alsa-driver.xml \ |
| 17 | tracepoint.xml drm.xml media_api.xml w1.xml | 17 | tracepoint.xml drm.xml media_api.xml w1.xml \ |
| 18 | writing_musb_glue_layer.xml | ||
| 18 | 19 | ||
| 19 | include Documentation/DocBook/media/Makefile | 20 | include Documentation/DocBook/media/Makefile |
| 20 | 21 | ||
diff --git a/Documentation/DocBook/device-drivers.tmpl b/Documentation/DocBook/device-drivers.tmpl index f5170082bdb3..cc63f30de166 100644 --- a/Documentation/DocBook/device-drivers.tmpl +++ b/Documentation/DocBook/device-drivers.tmpl | |||
| @@ -276,7 +276,7 @@ X!Isound/sound_firmware.c | |||
| 276 | </para> | 276 | </para> |
| 277 | 277 | ||
| 278 | <sect1><title>Frame Buffer Memory</title> | 278 | <sect1><title>Frame Buffer Memory</title> |
| 279 | !Edrivers/video/fbmem.c | 279 | !Edrivers/video/fbdev/core/fbmem.c |
| 280 | </sect1> | 280 | </sect1> |
| 281 | <!-- | 281 | <!-- |
| 282 | <sect1><title>Frame Buffer Console</title> | 282 | <sect1><title>Frame Buffer Console</title> |
| @@ -284,7 +284,7 @@ X!Edrivers/video/console/fbcon.c | |||
| 284 | </sect1> | 284 | </sect1> |
| 285 | --> | 285 | --> |
| 286 | <sect1><title>Frame Buffer Colormap</title> | 286 | <sect1><title>Frame Buffer Colormap</title> |
| 287 | !Edrivers/video/fbcmap.c | 287 | !Edrivers/video/fbdev/core/fbcmap.c |
| 288 | </sect1> | 288 | </sect1> |
| 289 | <!-- FIXME: | 289 | <!-- FIXME: |
| 290 | drivers/video/fbgen.c has no docs, which stuffs up the sgml. Comment | 290 | drivers/video/fbgen.c has no docs, which stuffs up the sgml. Comment |
| @@ -294,11 +294,11 @@ X!Idrivers/video/fbgen.c | |||
| 294 | </sect1> | 294 | </sect1> |
| 295 | KAO --> | 295 | KAO --> |
| 296 | <sect1><title>Frame Buffer Video Mode Database</title> | 296 | <sect1><title>Frame Buffer Video Mode Database</title> |
| 297 | !Idrivers/video/modedb.c | 297 | !Idrivers/video/fbdev/core/modedb.c |
| 298 | !Edrivers/video/modedb.c | 298 | !Edrivers/video/fbdev/core/modedb.c |
| 299 | </sect1> | 299 | </sect1> |
| 300 | <sect1><title>Frame Buffer Macintosh Video Mode Database</title> | 300 | <sect1><title>Frame Buffer Macintosh Video Mode Database</title> |
| 301 | !Edrivers/video/macmodes.c | 301 | !Edrivers/video/fbdev/macmodes.c |
| 302 | </sect1> | 302 | </sect1> |
| 303 | <sect1><title>Frame Buffer Fonts</title> | 303 | <sect1><title>Frame Buffer Fonts</title> |
| 304 | <para> | 304 | <para> |
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index 702c4474919c..7df3134ebc0e 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl | |||
| @@ -79,7 +79,7 @@ | |||
| 79 | <partintro> | 79 | <partintro> |
| 80 | <para> | 80 | <para> |
| 81 | This first part of the DRM Developer's Guide documents core DRM code, | 81 | This first part of the DRM Developer's Guide documents core DRM code, |
| 82 | helper libraries for writting drivers and generic userspace interfaces | 82 | helper libraries for writing drivers and generic userspace interfaces |
| 83 | exposed by DRM drivers. | 83 | exposed by DRM drivers. |
| 84 | </para> | 84 | </para> |
| 85 | </partintro> | 85 | </partintro> |
| @@ -142,6 +142,12 @@ | |||
| 142 | to register it with the DRM subsystem. | 142 | to register it with the DRM subsystem. |
| 143 | </para> | 143 | </para> |
| 144 | <para> | 144 | <para> |
| 145 | Newer drivers that no longer require a <structname>drm_bus</structname> | ||
| 146 | structure can alternatively use the low-level device initialization and | ||
| 147 | registration functions such as <function>drm_dev_alloc()</function> and | ||
| 148 | <function>drm_dev_register()</function> directly. | ||
| 149 | </para> | ||
| 150 | <para> | ||
| 145 | The <structname>drm_driver</structname> structure contains static | 151 | The <structname>drm_driver</structname> structure contains static |
| 146 | information that describes the driver and features it supports, and | 152 | information that describes the driver and features it supports, and |
| 147 | pointers to methods that the DRM core will call to implement the DRM API. | 153 | pointers to methods that the DRM core will call to implement the DRM API. |
| @@ -282,6 +288,36 @@ char *date;</synopsis> | |||
| 282 | </sect3> | 288 | </sect3> |
| 283 | </sect2> | 289 | </sect2> |
| 284 | <sect2> | 290 | <sect2> |
| 291 | <title>Device Registration</title> | ||
| 292 | <para> | ||
| 293 | A number of functions are provided to help with device registration. | ||
| 294 | The functions deal with PCI, USB and platform devices, respectively. | ||
| 295 | </para> | ||
| 296 | !Edrivers/gpu/drm/drm_pci.c | ||
| 297 | !Edrivers/gpu/drm/drm_usb.c | ||
| 298 | !Edrivers/gpu/drm/drm_platform.c | ||
| 299 | <para> | ||
| 300 | New drivers that no longer rely on the services provided by the | ||
| 301 | <structname>drm_bus</structname> structure can call the low-level | ||
| 302 | device registration functions directly. The | ||
| 303 | <function>drm_dev_alloc()</function> function can be used to allocate | ||
| 304 | and initialize a new <structname>drm_device</structname> structure. | ||
| 305 | Drivers will typically want to perform some additional setup on this | ||
| 306 | structure, such as allocating driver-specific data and storing a | ||
| 307 | pointer to it in the DRM device's <structfield>dev_private</structfield> | ||
| 308 | field. Drivers should also set the device's unique name using the | ||
| 309 | <function>drm_dev_set_unique()</function> function. After it has been | ||
| 310 | set up a device can be registered with the DRM subsystem by calling | ||
| 311 | <function>drm_dev_register()</function>. This will cause the device to | ||
| 312 | be exposed to userspace and will call the driver's | ||
| 313 | <structfield>.load()</structfield> implementation. When a device is | ||
| 314 | removed, the DRM device can safely be unregistered and freed by calling | ||
| 315 | <function>drm_dev_unregister()</function> followed by a call to | ||
| 316 | <function>drm_dev_unref()</function>. | ||
| 317 | </para> | ||
| 318 | !Edrivers/gpu/drm/drm_stub.c | ||
| 319 | </sect2> | ||
| 320 | <sect2> | ||
| 285 | <title>Driver Load</title> | 321 | <title>Driver Load</title> |
| 286 | <para> | 322 | <para> |
| 287 | The <methodname>load</methodname> method is the driver and device | 323 | The <methodname>load</methodname> method is the driver and device |
| @@ -342,21 +378,13 @@ char *date;</synopsis> | |||
| 342 | <sect4> | 378 | <sect4> |
| 343 | <title>Managed IRQ Registration</title> | 379 | <title>Managed IRQ Registration</title> |
| 344 | <para> | 380 | <para> |
| 345 | Both the <function>drm_irq_install</function> and | ||
| 346 | <function>drm_irq_uninstall</function> functions get the device IRQ by | ||
| 347 | calling <function>drm_dev_to_irq</function>. This inline function will | ||
| 348 | call a bus-specific operation to retrieve the IRQ number. For platform | ||
| 349 | devices, <function>platform_get_irq</function>(..., 0) is used to | ||
| 350 | retrieve the IRQ number. | ||
| 351 | </para> | ||
| 352 | <para> | ||
| 353 | <function>drm_irq_install</function> starts by calling the | 381 | <function>drm_irq_install</function> starts by calling the |
| 354 | <methodname>irq_preinstall</methodname> driver operation. The operation | 382 | <methodname>irq_preinstall</methodname> driver operation. The operation |
| 355 | is optional and must make sure that the interrupt will not get fired by | 383 | is optional and must make sure that the interrupt will not get fired by |
| 356 | clearing all pending interrupt flags or disabling the interrupt. | 384 | clearing all pending interrupt flags or disabling the interrupt. |
| 357 | </para> | 385 | </para> |
| 358 | <para> | 386 | <para> |
| 359 | The IRQ will then be requested by a call to | 387 | The passed-in IRQ will then be requested by a call to |
| 360 | <function>request_irq</function>. If the DRIVER_IRQ_SHARED driver | 388 | <function>request_irq</function>. If the DRIVER_IRQ_SHARED driver |
| 361 | feature flag is set, a shared (IRQF_SHARED) IRQ handler will be | 389 | feature flag is set, a shared (IRQF_SHARED) IRQ handler will be |
| 362 | requested. | 390 | requested. |
| @@ -459,7 +487,7 @@ char *date;</synopsis> | |||
| 459 | providing a solution to every graphics memory-related problems, GEM | 487 | providing a solution to every graphics memory-related problems, GEM |
| 460 | identified common code between drivers and created a support library to | 488 | identified common code between drivers and created a support library to |
| 461 | share it. GEM has simpler initialization and execution requirements than | 489 | share it. GEM has simpler initialization and execution requirements than |
| 462 | TTM, but has no video RAM management capabitilies and is thus limited to | 490 | TTM, but has no video RAM management capabilities and is thus limited to |
| 463 | UMA devices. | 491 | UMA devices. |
| 464 | </para> | 492 | </para> |
| 465 | <sect2> | 493 | <sect2> |
| @@ -889,7 +917,7 @@ int (*prime_fd_to_handle)(struct drm_device *dev, | |||
| 889 | vice versa. Drivers must use the kernel dma-buf buffer sharing framework | 917 | vice versa. Drivers must use the kernel dma-buf buffer sharing framework |
| 890 | to manage the PRIME file descriptors. Similar to the mode setting | 918 | to manage the PRIME file descriptors. Similar to the mode setting |
| 891 | API PRIME is agnostic to the underlying buffer object manager, as | 919 | API PRIME is agnostic to the underlying buffer object manager, as |
| 892 | long as handles are 32bit unsinged integers. | 920 | long as handles are 32bit unsigned integers. |
| 893 | </para> | 921 | </para> |
| 894 | <para> | 922 | <para> |
| 895 | While non-GEM drivers must implement the operations themselves, GEM | 923 | While non-GEM drivers must implement the operations themselves, GEM |
| @@ -1799,6 +1827,12 @@ void intel_crt_init(struct drm_device *dev) | |||
| 1799 | <title>KMS API Functions</title> | 1827 | <title>KMS API Functions</title> |
| 1800 | !Edrivers/gpu/drm/drm_crtc.c | 1828 | !Edrivers/gpu/drm/drm_crtc.c |
| 1801 | </sect2> | 1829 | </sect2> |
| 1830 | <sect2> | ||
| 1831 | <title>KMS Locking</title> | ||
| 1832 | !Pdrivers/gpu/drm/drm_modeset_lock.c kms locking | ||
| 1833 | !Iinclude/drm/drm_modeset_lock.h | ||
| 1834 | !Edrivers/gpu/drm/drm_modeset_lock.c | ||
| 1835 | </sect2> | ||
| 1802 | </sect1> | 1836 | </sect1> |
| 1803 | 1837 | ||
| 1804 | <!-- Internals: kms helper functions --> | 1838 | <!-- Internals: kms helper functions --> |
| @@ -1903,8 +1937,8 @@ void intel_crt_init(struct drm_device *dev) | |||
| 1903 | <para> | 1937 | <para> |
| 1904 | The function filters out modes larger than | 1938 | The function filters out modes larger than |
| 1905 | <parameter>max_width</parameter> and <parameter>max_height</parameter> | 1939 | <parameter>max_width</parameter> and <parameter>max_height</parameter> |
| 1906 | if specified. It then calls the connector | 1940 | if specified. It then calls the optional connector |
| 1907 | <methodname>mode_valid</methodname> helper operation for each mode in | 1941 | <methodname>mode_valid</methodname> helper operation for each mode in |
| 1908 | the probed list to check whether the mode is valid for the connector. | 1942 | the probed list to check whether the mode is valid for the connector. |
| 1909 | </para> | 1943 | </para> |
| 1910 | </listitem> | 1944 | </listitem> |
| @@ -2265,7 +2299,7 @@ void intel_crt_init(struct drm_device *dev) | |||
| 2265 | <para> | 2299 | <para> |
| 2266 | Verify whether a mode is valid for the connector. Return MODE_OK for | 2300 | Verify whether a mode is valid for the connector. Return MODE_OK for |
| 2267 | supported modes and one of the enum drm_mode_status values (MODE_*) | 2301 | supported modes and one of the enum drm_mode_status values (MODE_*) |
| 2268 | for unsupported modes. This operation is mandatory. | 2302 | for unsupported modes. This operation is optional. |
| 2269 | </para> | 2303 | </para> |
| 2270 | <para> | 2304 | <para> |
| 2271 | As the mode rejection reason is currently not used beside for | 2305 | As the mode rejection reason is currently not used beside for |
| @@ -2287,6 +2321,11 @@ void intel_crt_init(struct drm_device *dev) | |||
| 2287 | !Edrivers/gpu/drm/drm_crtc_helper.c | 2321 | !Edrivers/gpu/drm/drm_crtc_helper.c |
| 2288 | </sect2> | 2322 | </sect2> |
| 2289 | <sect2> | 2323 | <sect2> |
| 2324 | <title>Output Probing Helper Functions Reference</title> | ||
| 2325 | !Pdrivers/gpu/drm/drm_probe_helper.c output probing helper overview | ||
| 2326 | !Edrivers/gpu/drm/drm_probe_helper.c | ||
| 2327 | </sect2> | ||
| 2328 | <sect2> | ||
| 2290 | <title>fbdev Helper Functions Reference</title> | 2329 | <title>fbdev Helper Functions Reference</title> |
| 2291 | !Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers | 2330 | !Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers |
| 2292 | !Edrivers/gpu/drm/drm_fb_helper.c | 2331 | !Edrivers/gpu/drm/drm_fb_helper.c |
| @@ -2351,7 +2390,7 @@ void intel_crt_init(struct drm_device *dev) | |||
| 2351 | first create properties and then create and associate individual instances | 2390 | first create properties and then create and associate individual instances |
| 2352 | of those properties to objects. A property can be instantiated multiple | 2391 | of those properties to objects. A property can be instantiated multiple |
| 2353 | times and associated with different objects. Values are stored in property | 2392 | times and associated with different objects. Values are stored in property |
| 2354 | instances, and all other property information are stored in the propery | 2393 | instances, and all other property information are stored in the property |
| 2355 | and shared between all instances of the property. | 2394 | and shared between all instances of the property. |
| 2356 | </para> | 2395 | </para> |
| 2357 | <para> | 2396 | <para> |
| @@ -2445,6 +2484,863 @@ void intel_crt_init(struct drm_device *dev) | |||
| 2445 | pointer to the target object, a pointer to the previously created property | 2484 | pointer to the target object, a pointer to the previously created property |
| 2446 | and an initial instance value. | 2485 | and an initial instance value. |
| 2447 | </para> | 2486 | </para> |
| 2487 | <sect2> | ||
| 2488 | <title>Existing KMS Properties</title> | ||
| 2489 | <para> | ||
| 2490 | The following table gives description of drm properties exposed by various | ||
| 2491 | modules/drivers. | ||
| 2492 | </para> | ||
| 2493 | <table border="1" cellpadding="0" cellspacing="0"> | ||
| 2494 | <tbody> | ||
| 2495 | <tr style="font-weight: bold;"> | ||
| 2496 | <td valign="top" >Owner Module/Drivers</td> | ||
| 2497 | <td valign="top" >Group</td> | ||
| 2498 | <td valign="top" >Property Name</td> | ||
| 2499 | <td valign="top" >Type</td> | ||
| 2500 | <td valign="top" >Property Values</td> | ||
| 2501 | <td valign="top" >Object attached</td> | ||
| 2502 | <td valign="top" >Description/Restrictions</td> | ||
| 2503 | </tr> | ||
| 2504 | <tr> | ||
| 2505 | <td rowspan="20" valign="top" >DRM</td> | ||
| 2506 | <td rowspan="2" valign="top" >Generic</td> | ||
| 2507 | <td valign="top" >“EDID”</td> | ||
| 2508 | <td valign="top" >BLOB | IMMUTABLE</td> | ||
| 2509 | <td valign="top" >0</td> | ||
| 2510 | <td valign="top" >Connector</td> | ||
| 2511 | <td valign="top" >Contains id of edid blob ptr object.</td> | ||
| 2512 | </tr> | ||
| 2513 | <tr> | ||
| 2514 | <td valign="top" >“DPMS”</td> | ||
| 2515 | <td valign="top" >ENUM</td> | ||
| 2516 | <td valign="top" >{ “On”, “Standby”, “Suspend”, “Off” }</td> | ||
| 2517 | <td valign="top" >Connector</td> | ||
| 2518 | <td valign="top" >Contains DPMS operation mode value.</td> | ||
| 2519 | </tr> | ||
| 2520 | <tr> | ||
| 2521 | <td rowspan="1" valign="top" >Plane</td> | ||
| 2522 | <td valign="top" >“type”</td> | ||
| 2523 | <td valign="top" >ENUM | IMMUTABLE</td> | ||
| 2524 | <td valign="top" >{ "Overlay", "Primary", "Cursor" }</td> | ||
| 2525 | <td valign="top" >Plane</td> | ||
| 2526 | <td valign="top" >Plane type</td> | ||
| 2527 | </tr> | ||
| 2528 | <tr> | ||
| 2529 | <td rowspan="2" valign="top" >DVI-I</td> | ||
| 2530 | <td valign="top" >“subconnector”</td> | ||
| 2531 | <td valign="top" >ENUM</td> | ||
| 2532 | <td valign="top" >{ “Unknown”, “DVI-D”, “DVI-A” }</td> | ||
| 2533 | <td valign="top" >Connector</td> | ||
| 2534 | <td valign="top" >TBD</td> | ||
| 2535 | </tr> | ||
| 2536 | <tr> | ||
| 2537 | <td valign="top" >“select subconnector”</td> | ||
| 2538 | <td valign="top" >ENUM</td> | ||
| 2539 | <td valign="top" >{ “Automatic”, “DVI-D”, “DVI-A” }</td> | ||
| 2540 | <td valign="top" >Connector</td> | ||
| 2541 | <td valign="top" >TBD</td> | ||
| 2542 | </tr> | ||
| 2543 | <tr> | ||
| 2544 | <td rowspan="13" valign="top" >TV</td> | ||
| 2545 | <td valign="top" >“subconnector”</td> | ||
| 2546 | <td valign="top" >ENUM</td> | ||
| 2547 | <td valign="top" >{ "Unknown", "Composite", "SVIDEO", "Component", "SCART" }</td> | ||
| 2548 | <td valign="top" >Connector</td> | ||
| 2549 | <td valign="top" >TBD</td> | ||
| 2550 | </tr> | ||
| 2551 | <tr> | ||
| 2552 | <td valign="top" >“select subconnector”</td> | ||
| 2553 | <td valign="top" >ENUM</td> | ||
| 2554 | <td valign="top" >{ "Automatic", "Composite", "SVIDEO", "Component", "SCART" }</td> | ||
| 2555 | <td valign="top" >Connector</td> | ||
| 2556 | <td valign="top" >TBD</td> | ||
| 2557 | </tr> | ||
| 2558 | <tr> | ||
| 2559 | <td valign="top" >“mode”</td> | ||
| 2560 | <td valign="top" >ENUM</td> | ||
| 2561 | <td valign="top" >{ "NTSC_M", "NTSC_J", "NTSC_443", "PAL_B" } etc.</td> | ||
| 2562 | <td valign="top" >Connector</td> | ||
| 2563 | <td valign="top" >TBD</td> | ||
| 2564 | </tr> | ||
| 2565 | <tr> | ||
| 2566 | <td valign="top" >“left margin”</td> | ||
| 2567 | <td valign="top" >RANGE</td> | ||
| 2568 | <td valign="top" >Min=0, Max=100</td> | ||
| 2569 | <td valign="top" >Connector</td> | ||
| 2570 | <td valign="top" >TBD</td> | ||
| 2571 | </tr> | ||
| 2572 | <tr> | ||
| 2573 | <td valign="top" >“right margin”</td> | ||
| 2574 | <td valign="top" >RANGE</td> | ||
| 2575 | <td valign="top" >Min=0, Max=100</td> | ||
| 2576 | <td valign="top" >Connector</td> | ||
| 2577 | <td valign="top" >TBD</td> | ||
| 2578 | </tr> | ||
| 2579 | <tr> | ||
| 2580 | <td valign="top" >“top margin”</td> | ||
| 2581 | <td valign="top" >RANGE</td> | ||
| 2582 | <td valign="top" >Min=0, Max=100</td> | ||
| 2583 | <td valign="top" >Connector</td> | ||
| 2584 | <td valign="top" >TBD</td> | ||
| 2585 | </tr> | ||
| 2586 | <tr> | ||
| 2587 | <td valign="top" >“bottom margin”</td> | ||
| 2588 | <td valign="top" >RANGE</td> | ||
| 2589 | <td valign="top" >Min=0, Max=100</td> | ||
| 2590 | <td valign="top" >Connector</td> | ||
| 2591 | <td valign="top" >TBD</td> | ||
| 2592 | </tr> | ||
| 2593 | <tr> | ||
| 2594 | <td valign="top" >“brightness”</td> | ||
| 2595 | <td valign="top" >RANGE</td> | ||
| 2596 | <td valign="top" >Min=0, Max=100</td> | ||
| 2597 | <td valign="top" >Connector</td> | ||
| 2598 | <td valign="top" >TBD</td> | ||
| 2599 | </tr> | ||
| 2600 | <tr> | ||
| 2601 | <td valign="top" >“contrast”</td> | ||
| 2602 | <td valign="top" >RANGE</td> | ||
| 2603 | <td valign="top" >Min=0, Max=100</td> | ||
| 2604 | <td valign="top" >Connector</td> | ||
| 2605 | <td valign="top" >TBD</td> | ||
| 2606 | </tr> | ||
| 2607 | <tr> | ||
| 2608 | <td valign="top" >“flicker reduction”</td> | ||
| 2609 | <td valign="top" >RANGE</td> | ||
| 2610 | <td valign="top" >Min=0, Max=100</td> | ||
| 2611 | <td valign="top" >Connector</td> | ||
| 2612 | <td valign="top" >TBD</td> | ||
| 2613 | </tr> | ||
| 2614 | <tr> | ||
| 2615 | <td valign="top" >“overscan”</td> | ||
| 2616 | <td valign="top" >RANGE</td> | ||
| 2617 | <td valign="top" >Min=0, Max=100</td> | ||
| 2618 | <td valign="top" >Connector</td> | ||
| 2619 | <td valign="top" >TBD</td> | ||
| 2620 | </tr> | ||
| 2621 | <tr> | ||
| 2622 | <td valign="top" >“saturation”</td> | ||
| 2623 | <td valign="top" >RANGE</td> | ||
| 2624 | <td valign="top" >Min=0, Max=100</td> | ||
| 2625 | <td valign="top" >Connector</td> | ||
| 2626 | <td valign="top" >TBD</td> | ||
| 2627 | </tr> | ||
| 2628 | <tr> | ||
| 2629 | <td valign="top" >“hue”</td> | ||
| 2630 | <td valign="top" >RANGE</td> | ||
| 2631 | <td valign="top" >Min=0, Max=100</td> | ||
| 2632 | <td valign="top" >Connector</td> | ||
| 2633 | <td valign="top" >TBD</td> | ||
| 2634 | </tr> | ||
| 2635 | <tr> | ||
| 2636 | <td rowspan="2" valign="top" >Optional</td> | ||
| 2637 | <td valign="top" >“scaling mode”</td> | ||
| 2638 | <td valign="top" >ENUM</td> | ||
| 2639 | <td valign="top" >{ "None", "Full", "Center", "Full aspect" }</td> | ||
| 2640 | <td valign="top" >Connector</td> | ||
| 2641 | <td valign="top" >TBD</td> | ||
| 2642 | </tr> | ||
| 2643 | <tr> | ||
| 2644 | <td valign="top" >“dirty”</td> | ||
| 2645 | <td valign="top" >ENUM | IMMUTABLE</td> | ||
| 2646 | <td valign="top" >{ "Off", "On", "Annotate" }</td> | ||
| 2647 | <td valign="top" >Connector</td> | ||
| 2648 | <td valign="top" >TBD</td> | ||
| 2649 | </tr> | ||
| 2650 | <tr> | ||
| 2651 | <td rowspan="21" valign="top" >i915</td> | ||
| 2652 | <td rowspan="3" valign="top" >Generic</td> | ||
| 2653 | <td valign="top" >"Broadcast RGB"</td> | ||
| 2654 | <td valign="top" >ENUM</td> | ||
| 2655 | <td valign="top" >{ "Automatic", "Full", "Limited 16:235" }</td> | ||
| 2656 | <td valign="top" >Connector</td> | ||
| 2657 | <td valign="top" >TBD</td> | ||
| 2658 | </tr> | ||
| 2659 | <tr> | ||
| 2660 | <td valign="top" >“audio”</td> | ||
| 2661 | <td valign="top" >ENUM</td> | ||
| 2662 | <td valign="top" >{ "force-dvi", "off", "auto", "on" }</td> | ||
| 2663 | <td valign="top" >Connector</td> | ||
| 2664 | <td valign="top" >TBD</td> | ||
| 2665 | </tr> | ||
| 2666 | <tr> | ||
| 2667 | <td valign="top" >Standard name as in DRM</td> | ||
| 2668 | <td valign="top" >Standard type as in DRM</td> | ||
| 2669 | <td valign="top" >Standard value as in DRM</td> | ||
| 2670 | <td valign="top" >Standard Object as in DRM</td> | ||
| 2671 | <td valign="top" >TBD</td> | ||
| 2672 | </tr> | ||
| 2673 | <tr> | ||
| 2674 | <td rowspan="17" valign="top" >SDVO-TV</td> | ||
| 2675 | <td valign="top" >“mode”</td> | ||
| 2676 | <td valign="top" >ENUM</td> | ||
| 2677 | <td valign="top" >{ "NTSC_M", "NTSC_J", "NTSC_443", "PAL_B" } etc.</td> | ||
| 2678 | <td valign="top" >Connector</td> | ||
| 2679 | <td valign="top" >TBD</td> | ||
| 2680 | </tr> | ||
| 2681 | <tr> | ||
| 2682 | <td valign="top" >"left_margin"</td> | ||
| 2683 | <td valign="top" >RANGE</td> | ||
| 2684 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2685 | <td valign="top" >Connector</td> | ||
| 2686 | <td valign="top" >TBD</td> | ||
| 2687 | </tr> | ||
| 2688 | <tr> | ||
| 2689 | <td valign="top" >"right_margin"</td> | ||
| 2690 | <td valign="top" >RANGE</td> | ||
| 2691 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2692 | <td valign="top" >Connector</td> | ||
| 2693 | <td valign="top" >TBD</td> | ||
| 2694 | </tr> | ||
| 2695 | <tr> | ||
| 2696 | <td valign="top" >"top_margin"</td> | ||
| 2697 | <td valign="top" >RANGE</td> | ||
| 2698 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2699 | <td valign="top" >Connector</td> | ||
| 2700 | <td valign="top" >TBD</td> | ||
| 2701 | </tr> | ||
| 2702 | <tr> | ||
| 2703 | <td valign="top" >"bottom_margin"</td> | ||
| 2704 | <td valign="top" >RANGE</td> | ||
| 2705 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2706 | <td valign="top" >Connector</td> | ||
| 2707 | <td valign="top" >TBD</td> | ||
| 2708 | </tr> | ||
| 2709 | <tr> | ||
| 2710 | <td valign="top" >“hpos”</td> | ||
| 2711 | <td valign="top" >RANGE</td> | ||
| 2712 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2713 | <td valign="top" >Connector</td> | ||
| 2714 | <td valign="top" >TBD</td> | ||
| 2715 | </tr> | ||
| 2716 | <tr> | ||
| 2717 | <td valign="top" >“vpos”</td> | ||
| 2718 | <td valign="top" >RANGE</td> | ||
| 2719 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2720 | <td valign="top" >Connector</td> | ||
| 2721 | <td valign="top" >TBD</td> | ||
| 2722 | </tr> | ||
| 2723 | <tr> | ||
| 2724 | <td valign="top" >“contrast”</td> | ||
| 2725 | <td valign="top" >RANGE</td> | ||
| 2726 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2727 | <td valign="top" >Connector</td> | ||
| 2728 | <td valign="top" >TBD</td> | ||
| 2729 | </tr> | ||
| 2730 | <tr> | ||
| 2731 | <td valign="top" >“saturation”</td> | ||
| 2732 | <td valign="top" >RANGE</td> | ||
| 2733 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2734 | <td valign="top" >Connector</td> | ||
| 2735 | <td valign="top" >TBD</td> | ||
| 2736 | </tr> | ||
| 2737 | <tr> | ||
| 2738 | <td valign="top" >“hue”</td> | ||
| 2739 | <td valign="top" >RANGE</td> | ||
| 2740 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2741 | <td valign="top" >Connector</td> | ||
| 2742 | <td valign="top" >TBD</td> | ||
| 2743 | </tr> | ||
| 2744 | <tr> | ||
| 2745 | <td valign="top" >“sharpness”</td> | ||
| 2746 | <td valign="top" >RANGE</td> | ||
| 2747 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2748 | <td valign="top" >Connector</td> | ||
| 2749 | <td valign="top" >TBD</td> | ||
| 2750 | </tr> | ||
| 2751 | <tr> | ||
| 2752 | <td valign="top" >“flicker_filter”</td> | ||
| 2753 | <td valign="top" >RANGE</td> | ||
| 2754 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2755 | <td valign="top" >Connector</td> | ||
| 2756 | <td valign="top" >TBD</td> | ||
| 2757 | </tr> | ||
| 2758 | <tr> | ||
| 2759 | <td valign="top" >“flicker_filter_adaptive”</td> | ||
| 2760 | <td valign="top" >RANGE</td> | ||
| 2761 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2762 | <td valign="top" >Connector</td> | ||
| 2763 | <td valign="top" >TBD</td> | ||
| 2764 | </tr> | ||
| 2765 | <tr> | ||
| 2766 | <td valign="top" >“flicker_filter_2d”</td> | ||
| 2767 | <td valign="top" >RANGE</td> | ||
| 2768 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2769 | <td valign="top" >Connector</td> | ||
| 2770 | <td valign="top" >TBD</td> | ||
| 2771 | </tr> | ||
| 2772 | <tr> | ||
| 2773 | <td valign="top" >“tv_chroma_filter”</td> | ||
| 2774 | <td valign="top" >RANGE</td> | ||
| 2775 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2776 | <td valign="top" >Connector</td> | ||
| 2777 | <td valign="top" >TBD</td> | ||
| 2778 | </tr> | ||
| 2779 | <tr> | ||
| 2780 | <td valign="top" >“tv_luma_filter”</td> | ||
| 2781 | <td valign="top" >RANGE</td> | ||
| 2782 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2783 | <td valign="top" >Connector</td> | ||
| 2784 | <td valign="top" >TBD</td> | ||
| 2785 | </tr> | ||
| 2786 | <tr> | ||
| 2787 | <td valign="top" >“dot_crawl”</td> | ||
| 2788 | <td valign="top" >RANGE</td> | ||
| 2789 | <td valign="top" >Min=0, Max=1</td> | ||
| 2790 | <td valign="top" >Connector</td> | ||
| 2791 | <td valign="top" >TBD</td> | ||
| 2792 | </tr> | ||
| 2793 | <tr> | ||
| 2794 | <td valign="top" >SDVO-TV/LVDS</td> | ||
| 2795 | <td valign="top" >“brightness”</td> | ||
| 2796 | <td valign="top" >RANGE</td> | ||
| 2797 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2798 | <td valign="top" >Connector</td> | ||
| 2799 | <td valign="top" >TBD</td> | ||
| 2800 | </tr> | ||
| 2801 | <tr> | ||
| 2802 | <td rowspan="3" valign="top" >CDV gma-500</td> | ||
| 2803 | <td rowspan="3" valign="top" >Generic</td> | ||
| 2804 | <td valign="top" >"Broadcast RGB"</td> | ||
| 2805 | <td valign="top" >ENUM</td> | ||
| 2806 | <td valign="top" >{ “Full”, “Limited 16:235” }</td> | ||
| 2807 | <td valign="top" >Connector</td> | ||
| 2808 | <td valign="top" >TBD</td> | ||
| 2809 | </tr> | ||
| 2810 | <tr> | ||
| 2811 | <td valign="top" >"Broadcast RGB"</td> | ||
| 2812 | <td valign="top" >ENUM</td> | ||
| 2813 | <td valign="top" >{ “off”, “auto”, “on” }</td> | ||
| 2814 | <td valign="top" >Connector</td> | ||
| 2815 | <td valign="top" >TBD</td> | ||
| 2816 | </tr> | ||
| 2817 | <tr> | ||
| 2818 | <td valign="top" >Standard name as in DRM</td> | ||
| 2819 | <td valign="top" >Standard type as in DRM</td> | ||
| 2820 | <td valign="top" >Standard value as in DRM</td> | ||
| 2821 | <td valign="top" >Standard Object as in DRM</td> | ||
| 2822 | <td valign="top" >TBD</td> | ||
| 2823 | </tr> | ||
| 2824 | <tr> | ||
| 2825 | <td rowspan="20" valign="top" >Poulsbo</td> | ||
| 2826 | <td rowspan="2" valign="top" >Generic</td> | ||
| 2827 | <td valign="top" >“backlight”</td> | ||
| 2828 | <td valign="top" >RANGE</td> | ||
| 2829 | <td valign="top" >Min=0, Max=100</td> | ||
| 2830 | <td valign="top" >Connector</td> | ||
| 2831 | <td valign="top" >TBD</td> | ||
| 2832 | </tr> | ||
| 2833 | <tr> | ||
| 2834 | <td valign="top" >Standard name as in DRM</td> | ||
| 2835 | <td valign="top" >Standard type as in DRM</td> | ||
| 2836 | <td valign="top" >Standard value as in DRM</td> | ||
| 2837 | <td valign="top" >Standard Object as in DRM</td> | ||
| 2838 | <td valign="top" >TBD</td> | ||
| 2839 | </tr> | ||
| 2840 | <tr> | ||
| 2841 | <td rowspan="17" valign="top" >SDVO-TV</td> | ||
| 2842 | <td valign="top" >“mode”</td> | ||
| 2843 | <td valign="top" >ENUM</td> | ||
| 2844 | <td valign="top" >{ "NTSC_M", "NTSC_J", "NTSC_443", "PAL_B" } etc.</td> | ||
| 2845 | <td valign="top" >Connector</td> | ||
| 2846 | <td valign="top" >TBD</td> | ||
| 2847 | </tr> | ||
| 2848 | <tr> | ||
| 2849 | <td valign="top" >"left_margin"</td> | ||
| 2850 | <td valign="top" >RANGE</td> | ||
| 2851 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2852 | <td valign="top" >Connector</td> | ||
| 2853 | <td valign="top" >TBD</td> | ||
| 2854 | </tr> | ||
| 2855 | <tr> | ||
| 2856 | <td valign="top" >"right_margin"</td> | ||
| 2857 | <td valign="top" >RANGE</td> | ||
| 2858 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2859 | <td valign="top" >Connector</td> | ||
| 2860 | <td valign="top" >TBD</td> | ||
| 2861 | </tr> | ||
| 2862 | <tr> | ||
| 2863 | <td valign="top" >"top_margin"</td> | ||
| 2864 | <td valign="top" >RANGE</td> | ||
| 2865 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2866 | <td valign="top" >Connector</td> | ||
| 2867 | <td valign="top" >TBD</td> | ||
| 2868 | </tr> | ||
| 2869 | <tr> | ||
| 2870 | <td valign="top" >"bottom_margin"</td> | ||
| 2871 | <td valign="top" >RANGE</td> | ||
| 2872 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2873 | <td valign="top" >Connector</td> | ||
| 2874 | <td valign="top" >TBD</td> | ||
| 2875 | </tr> | ||
| 2876 | <tr> | ||
| 2877 | <td valign="top" >“hpos”</td> | ||
| 2878 | <td valign="top" >RANGE</td> | ||
| 2879 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2880 | <td valign="top" >Connector</td> | ||
| 2881 | <td valign="top" >TBD</td> | ||
| 2882 | </tr> | ||
| 2883 | <tr> | ||
| 2884 | <td valign="top" >“vpos”</td> | ||
| 2885 | <td valign="top" >RANGE</td> | ||
| 2886 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2887 | <td valign="top" >Connector</td> | ||
| 2888 | <td valign="top" >TBD</td> | ||
| 2889 | </tr> | ||
| 2890 | <tr> | ||
| 2891 | <td valign="top" >“contrast”</td> | ||
| 2892 | <td valign="top" >RANGE</td> | ||
| 2893 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2894 | <td valign="top" >Connector</td> | ||
| 2895 | <td valign="top" >TBD</td> | ||
| 2896 | </tr> | ||
| 2897 | <tr> | ||
| 2898 | <td valign="top" >“saturation”</td> | ||
| 2899 | <td valign="top" >RANGE</td> | ||
| 2900 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2901 | <td valign="top" >Connector</td> | ||
| 2902 | <td valign="top" >TBD</td> | ||
| 2903 | </tr> | ||
| 2904 | <tr> | ||
| 2905 | <td valign="top" >“hue”</td> | ||
| 2906 | <td valign="top" >RANGE</td> | ||
| 2907 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2908 | <td valign="top" >Connector</td> | ||
| 2909 | <td valign="top" >TBD</td> | ||
| 2910 | </tr> | ||
| 2911 | <tr> | ||
| 2912 | <td valign="top" >“sharpness”</td> | ||
| 2913 | <td valign="top" >RANGE</td> | ||
| 2914 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2915 | <td valign="top" >Connector</td> | ||
| 2916 | <td valign="top" >TBD</td> | ||
| 2917 | </tr> | ||
| 2918 | <tr> | ||
| 2919 | <td valign="top" >“flicker_filter”</td> | ||
| 2920 | <td valign="top" >RANGE</td> | ||
| 2921 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2922 | <td valign="top" >Connector</td> | ||
| 2923 | <td valign="top" >TBD</td> | ||
| 2924 | </tr> | ||
| 2925 | <tr> | ||
| 2926 | <td valign="top" >“flicker_filter_adaptive”</td> | ||
| 2927 | <td valign="top" >RANGE</td> | ||
| 2928 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2929 | <td valign="top" >Connector</td> | ||
| 2930 | <td valign="top" >TBD</td> | ||
| 2931 | </tr> | ||
| 2932 | <tr> | ||
| 2933 | <td valign="top" >“flicker_filter_2d”</td> | ||
| 2934 | <td valign="top" >RANGE</td> | ||
| 2935 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2936 | <td valign="top" >Connector</td> | ||
| 2937 | <td valign="top" >TBD</td> | ||
| 2938 | </tr> | ||
| 2939 | <tr> | ||
| 2940 | <td valign="top" >“tv_chroma_filter”</td> | ||
| 2941 | <td valign="top" >RANGE</td> | ||
| 2942 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2943 | <td valign="top" >Connector</td> | ||
| 2944 | <td valign="top" >TBD</td> | ||
| 2945 | </tr> | ||
| 2946 | <tr> | ||
| 2947 | <td valign="top" >“tv_luma_filter”</td> | ||
| 2948 | <td valign="top" >RANGE</td> | ||
| 2949 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2950 | <td valign="top" >Connector</td> | ||
| 2951 | <td valign="top" >TBD</td> | ||
| 2952 | </tr> | ||
| 2953 | <tr> | ||
| 2954 | <td valign="top" >“dot_crawl”</td> | ||
| 2955 | <td valign="top" >RANGE</td> | ||
| 2956 | <td valign="top" >Min=0, Max=1</td> | ||
| 2957 | <td valign="top" >Connector</td> | ||
| 2958 | <td valign="top" >TBD</td> | ||
| 2959 | </tr> | ||
| 2960 | <tr> | ||
| 2961 | <td valign="top" >SDVO-TV/LVDS</td> | ||
| 2962 | <td valign="top" >“brightness”</td> | ||
| 2963 | <td valign="top" >RANGE</td> | ||
| 2964 | <td valign="top" >Min=0, Max= SDVO dependent</td> | ||
| 2965 | <td valign="top" >Connector</td> | ||
| 2966 | <td valign="top" >TBD</td> | ||
| 2967 | </tr> | ||
| 2968 | <tr> | ||
| 2969 | <td rowspan="11" valign="top" >armada</td> | ||
| 2970 | <td rowspan="2" valign="top" >CRTC</td> | ||
| 2971 | <td valign="top" >"CSC_YUV"</td> | ||
| 2972 | <td valign="top" >ENUM</td> | ||
| 2973 | <td valign="top" >{ "Auto" , "CCIR601", "CCIR709" }</td> | ||
| 2974 | <td valign="top" >CRTC</td> | ||
| 2975 | <td valign="top" >TBD</td> | ||
| 2976 | </tr> | ||
| 2977 | <tr> | ||
| 2978 | <td valign="top" >"CSC_RGB"</td> | ||
| 2979 | <td valign="top" >ENUM</td> | ||
| 2980 | <td valign="top" >{ "Auto", "Computer system", "Studio" }</td> | ||
| 2981 | <td valign="top" >CRTC</td> | ||
| 2982 | <td valign="top" >TBD</td> | ||
| 2983 | </tr> | ||
| 2984 | <tr> | ||
| 2985 | <td rowspan="9" valign="top" >Overlay</td> | ||
| 2986 | <td valign="top" >"colorkey"</td> | ||
| 2987 | <td valign="top" >RANGE</td> | ||
| 2988 | <td valign="top" >Min=0, Max=0xffffff</td> | ||
| 2989 | <td valign="top" >Plane</td> | ||
| 2990 | <td valign="top" >TBD</td> | ||
| 2991 | </tr> | ||
| 2992 | <tr> | ||
| 2993 | <td valign="top" >"colorkey_min"</td> | ||
| 2994 | <td valign="top" >RANGE</td> | ||
| 2995 | <td valign="top" >Min=0, Max=0xffffff</td> | ||
| 2996 | <td valign="top" >Plane</td> | ||
| 2997 | <td valign="top" >TBD</td> | ||
| 2998 | </tr> | ||
| 2999 | <tr> | ||
| 3000 | <td valign="top" >"colorkey_max"</td> | ||
| 3001 | <td valign="top" >RANGE</td> | ||
| 3002 | <td valign="top" >Min=0, Max=0xffffff</td> | ||
| 3003 | <td valign="top" >Plane</td> | ||
| 3004 | <td valign="top" >TBD</td> | ||
| 3005 | </tr> | ||
| 3006 | <tr> | ||
| 3007 | <td valign="top" >"colorkey_val"</td> | ||
| 3008 | <td valign="top" >RANGE</td> | ||
| 3009 | <td valign="top" >Min=0, Max=0xffffff</td> | ||
| 3010 | <td valign="top" >Plane</td> | ||
| 3011 | <td valign="top" >TBD</td> | ||
| 3012 | </tr> | ||
| 3013 | <tr> | ||
| 3014 | <td valign="top" >"colorkey_alpha"</td> | ||
| 3015 | <td valign="top" >RANGE</td> | ||
| 3016 | <td valign="top" >Min=0, Max=0xffffff</td> | ||
| 3017 | <td valign="top" >Plane</td> | ||
| 3018 | <td valign="top" >TBD</td> | ||
| 3019 | </tr> | ||
| 3020 | <tr> | ||
| 3021 | <td valign="top" >"colorkey_mode"</td> | ||
| 3022 | <td valign="top" >ENUM</td> | ||
| 3023 | <td valign="top" >{ "disabled", "Y component", "U component" | ||
| 3024 | , "V component", "RGB", “R component", "G component", "B component" }</td> | ||
| 3025 | <td valign="top" >Plane</td> | ||
| 3026 | <td valign="top" >TBD</td> | ||
| 3027 | </tr> | ||
| 3028 | <tr> | ||
| 3029 | <td valign="top" >"brightness"</td> | ||
| 3030 | <td valign="top" >RANGE</td> | ||
| 3031 | <td valign="top" >Min=0, Max=256 + 255</td> | ||
| 3032 | <td valign="top" >Plane</td> | ||
| 3033 | <td valign="top" >TBD</td> | ||
| 3034 | </tr> | ||
| 3035 | <tr> | ||
| 3036 | <td valign="top" >"contrast"</td> | ||
| 3037 | <td valign="top" >RANGE</td> | ||
| 3038 | <td valign="top" >Min=0, Max=0x7fff</td> | ||
| 3039 | <td valign="top" >Plane</td> | ||
| 3040 | <td valign="top" >TBD</td> | ||
| 3041 | </tr> | ||
| 3042 | <tr> | ||
| 3043 | <td valign="top" >"saturation"</td> | ||
| 3044 | <td valign="top" >RANGE</td> | ||
| 3045 | <td valign="top" >Min=0, Max=0x7fff</td> | ||
| 3046 | <td valign="top" >Plane</td> | ||
| 3047 | <td valign="top" >TBD</td> | ||
| 3048 | </tr> | ||
| 3049 | <tr> | ||
| 3050 | <td rowspan="2" valign="top" >exynos</td> | ||
| 3051 | <td valign="top" >CRTC</td> | ||
| 3052 | <td valign="top" >“mode”</td> | ||
| 3053 | <td valign="top" >ENUM</td> | ||
| 3054 | <td valign="top" >{ "normal", "blank" }</td> | ||
| 3055 | <td valign="top" >CRTC</td> | ||
| 3056 | <td valign="top" >TBD</td> | ||
| 3057 | </tr> | ||
| 3058 | <tr> | ||
| 3059 | <td valign="top" >Overlay</td> | ||
| 3060 | <td valign="top" >“zpos”</td> | ||
| 3061 | <td valign="top" >RANGE</td> | ||
| 3062 | <td valign="top" >Min=0, Max=MAX_PLANE-1</td> | ||
| 3063 | <td valign="top" >Plane</td> | ||
| 3064 | <td valign="top" >TBD</td> | ||
| 3065 | </tr> | ||
| 3066 | <tr> | ||
| 3067 | <td rowspan="3" valign="top" >i2c/ch7006_drv</td> | ||
| 3068 | <td valign="top" >Generic</td> | ||
| 3069 | <td valign="top" >“scale”</td> | ||
| 3070 | <td valign="top" >RANGE</td> | ||
| 3071 | <td valign="top" >Min=0, Max=2</td> | ||
| 3072 | <td valign="top" >Connector</td> | ||
| 3073 | <td valign="top" >TBD</td> | ||
| 3074 | </tr> | ||
| 3075 | <tr> | ||
| 3076 | <td rowspan="2" valign="top" >TV</td> | ||
| 3077 | <td valign="top" >Standard names as in DRM</td> | ||
| 3078 | <td valign="top" >Standard types as in DRM</td> | ||
| 3079 | <td valign="top" >Standard Values as in DRM</td> | ||
| 3080 | <td valign="top" >Standard object as in DRM</td> | ||
| 3081 | <td valign="top" >TBD</td> | ||
| 3082 | </tr> | ||
| 3083 | <tr> | ||
| 3084 | <td valign="top" >“mode”</td> | ||
| 3085 | <td valign="top" >ENUM</td> | ||
| 3086 | <td valign="top" >{ "PAL", "PAL-M","PAL-N"}, ”PAL-Nc" | ||
| 3087 | , "PAL-60", "NTSC-M", "NTSC-J" }</td> | ||
| 3088 | <td valign="top" >Connector</td> | ||
| 3089 | <td valign="top" >TBD</td> | ||
| 3090 | </tr> | ||
| 3091 | <tr> | ||
| 3092 | <td rowspan="16" valign="top" >nouveau</td> | ||
| 3093 | <td rowspan="6" valign="top" >NV10 Overlay</td> | ||
| 3094 | <td valign="top" >"colorkey"</td> | ||
| 3095 | <td valign="top" >RANGE</td> | ||
| 3096 | <td valign="top" >Min=0, Max=0x01ffffff</td> | ||
| 3097 | <td valign="top" >Plane</td> | ||
| 3098 | <td valign="top" >TBD</td> | ||
| 3099 | </tr> | ||
| 3100 | <tr> | ||
| 3101 | <td valign="top" >“contrast”</td> | ||
| 3102 | <td valign="top" >RANGE</td> | ||
| 3103 | <td valign="top" >Min=0, Max=8192-1</td> | ||
| 3104 | <td valign="top" >Plane</td> | ||
| 3105 | <td valign="top" >TBD</td> | ||
| 3106 | </tr> | ||
| 3107 | <tr> | ||
| 3108 | <td valign="top" >“brightness”</td> | ||
| 3109 | <td valign="top" >RANGE</td> | ||
| 3110 | <td valign="top" >Min=0, Max=1024</td> | ||
| 3111 | <td valign="top" >Plane</td> | ||
| 3112 | <td valign="top" >TBD</td> | ||
| 3113 | </tr> | ||
| 3114 | <tr> | ||
| 3115 | <td valign="top" >“hue”</td> | ||
| 3116 | <td valign="top" >RANGE</td> | ||
| 3117 | <td valign="top" >Min=0, Max=359</td> | ||
| 3118 | <td valign="top" >Plane</td> | ||
| 3119 | <td valign="top" >TBD</td> | ||
| 3120 | </tr> | ||
| 3121 | <tr> | ||
| 3122 | <td valign="top" >“saturation”</td> | ||
| 3123 | <td valign="top" >RANGE</td> | ||
| 3124 | <td valign="top" >Min=0, Max=8192-1</td> | ||
| 3125 | <td valign="top" >Plane</td> | ||
| 3126 | <td valign="top" >TBD</td> | ||
| 3127 | </tr> | ||
| 3128 | <tr> | ||
| 3129 | <td valign="top" >“iturbt_709”</td> | ||
| 3130 | <td valign="top" >RANGE</td> | ||
| 3131 | <td valign="top" >Min=0, Max=1</td> | ||
| 3132 | <td valign="top" >Plane</td> | ||
| 3133 | <td valign="top" >TBD</td> | ||
| 3134 | </tr> | ||
| 3135 | <tr> | ||
| 3136 | <td rowspan="2" valign="top" >Nv04 Overlay</td> | ||
| 3137 | <td valign="top" >“colorkey”</td> | ||
| 3138 | <td valign="top" >RANGE</td> | ||
| 3139 | <td valign="top" >Min=0, Max=0x01ffffff</td> | ||
| 3140 | <td valign="top" >Plane</td> | ||
| 3141 | <td valign="top" >TBD</td> | ||
| 3142 | </tr> | ||
| 3143 | <tr> | ||
| 3144 | <td valign="top" >“brightness”</td> | ||
| 3145 | <td valign="top" >RANGE</td> | ||
| 3146 | <td valign="top" >Min=0, Max=1024</td> | ||
| 3147 | <td valign="top" >Plane</td> | ||
| 3148 | <td valign="top" >TBD</td> | ||
| 3149 | </tr> | ||
| 3150 | <tr> | ||
| 3151 | <td rowspan="7" valign="top" >Display</td> | ||
| 3152 | <td valign="top" >“dithering mode”</td> | ||
| 3153 | <td valign="top" >ENUM</td> | ||
| 3154 | <td valign="top" >{ "auto", "off", "on" }</td> | ||
| 3155 | <td valign="top" >Connector</td> | ||
| 3156 | <td valign="top" >TBD</td> | ||
| 3157 | </tr> | ||
| 3158 | <tr> | ||
| 3159 | <td valign="top" >“dithering depth”</td> | ||
| 3160 | <td valign="top" >ENUM</td> | ||
| 3161 | <td valign="top" >{ "auto", "off", "on", "static 2x2", "dynamic 2x2", "temporal" }</td> | ||
| 3162 | <td valign="top" >Connector</td> | ||
| 3163 | <td valign="top" >TBD</td> | ||
| 3164 | </tr> | ||
| 3165 | <tr> | ||
| 3166 | <td valign="top" >“underscan”</td> | ||
| 3167 | <td valign="top" >ENUM</td> | ||
| 3168 | <td valign="top" >{ "auto", "6 bpc", "8 bpc" }</td> | ||
| 3169 | <td valign="top" >Connector</td> | ||
| 3170 | <td valign="top" >TBD</td> | ||
| 3171 | </tr> | ||
| 3172 | <tr> | ||
| 3173 | <td valign="top" >“underscan hborder”</td> | ||
| 3174 | <td valign="top" >RANGE</td> | ||
| 3175 | <td valign="top" >Min=0, Max=128</td> | ||
| 3176 | <td valign="top" >Connector</td> | ||
| 3177 | <td valign="top" >TBD</td> | ||
| 3178 | </tr> | ||
| 3179 | <tr> | ||
| 3180 | <td valign="top" >“underscan vborder”</td> | ||
| 3181 | <td valign="top" >RANGE</td> | ||
| 3182 | <td valign="top" >Min=0, Max=128</td> | ||
| 3183 | <td valign="top" >Connector</td> | ||
| 3184 | <td valign="top" >TBD</td> | ||
| 3185 | </tr> | ||
| 3186 | <tr> | ||
| 3187 | <td valign="top" >“vibrant hue”</td> | ||
| 3188 | <td valign="top" >RANGE</td> | ||
| 3189 | <td valign="top" >Min=0, Max=180</td> | ||
| 3190 | <td valign="top" >Connector</td> | ||
| 3191 | <td valign="top" >TBD</td> | ||
| 3192 | </tr> | ||
| 3193 | <tr> | ||
| 3194 | <td valign="top" >“color vibrance”</td> | ||
| 3195 | <td valign="top" >RANGE</td> | ||
| 3196 | <td valign="top" >Min=0, Max=200</td> | ||
| 3197 | <td valign="top" >Connector</td> | ||
| 3198 | <td valign="top" >TBD</td> | ||
| 3199 | </tr> | ||
| 3200 | <tr> | ||
| 3201 | <td valign="top" >Generic</td> | ||
| 3202 | <td valign="top" >Standard name as in DRM</td> | ||
| 3203 | <td valign="top" >Standard type as in DRM</td> | ||
| 3204 | <td valign="top" >Standard value as in DRM</td> | ||
| 3205 | <td valign="top" >Standard Object as in DRM</td> | ||
| 3206 | <td valign="top" >TBD</td> | ||
| 3207 | </tr> | ||
| 3208 | <tr> | ||
| 3209 | <td rowspan="2" valign="top" >omap</td> | ||
| 3210 | <td rowspan="2" valign="top" >Generic</td> | ||
| 3211 | <td valign="top" >“rotation”</td> | ||
| 3212 | <td valign="top" >BITMASK</td> | ||
| 3213 | <td valign="top" >{ 0, "rotate-0" }, | ||
| 3214 | { 1, "rotate-90" }, | ||
| 3215 | { 2, "rotate-180" }, | ||
| 3216 | { 3, "rotate-270" }, | ||
| 3217 | { 4, "reflect-x" }, | ||
| 3218 | { 5, "reflect-y" }</td> | ||
| 3219 | <td valign="top" >CRTC, Plane</td> | ||
| 3220 | <td valign="top" >TBD</td> | ||
| 3221 | </tr> | ||
| 3222 | <tr> | ||
| 3223 | <td valign="top" >“zorder”</td> | ||
| 3224 | <td valign="top" >RANGE</td> | ||
| 3225 | <td valign="top" >Min=0, Max=3</td> | ||
| 3226 | <td valign="top" >CRTC, Plane</td> | ||
| 3227 | <td valign="top" >TBD</td> | ||
| 3228 | </tr> | ||
| 3229 | <tr> | ||
| 3230 | <td valign="top" >qxl</td> | ||
| 3231 | <td valign="top" >Generic</td> | ||
| 3232 | <td valign="top" >“hotplug_mode_update"</td> | ||
| 3233 | <td valign="top" >RANGE</td> | ||
| 3234 | <td valign="top" >Min=0, Max=1</td> | ||
| 3235 | <td valign="top" >Connector</td> | ||
| 3236 | <td valign="top" >TBD</td> | ||
| 3237 | </tr> | ||
| 3238 | <tr> | ||
| 3239 | <td rowspan="10" valign="top" >radeon</td> | ||
| 3240 | <td valign="top" >DVI-I</td> | ||
| 3241 | <td valign="top" >“coherent”</td> | ||
| 3242 | <td valign="top" >RANGE</td> | ||
| 3243 | <td valign="top" >Min=0, Max=1</td> | ||
| 3244 | <td valign="top" >Connector</td> | ||
| 3245 | <td valign="top" >TBD</td> | ||
| 3246 | </tr> | ||
| 3247 | <tr> | ||
| 3248 | <td valign="top" >DAC enable load detect</td> | ||
| 3249 | <td valign="top" >“load detection”</td> | ||
| 3250 | <td valign="top" >RANGE</td> | ||
| 3251 | <td valign="top" >Min=0, Max=1</td> | ||
| 3252 | <td valign="top" >Connector</td> | ||
| 3253 | <td valign="top" >TBD</td> | ||
| 3254 | </tr> | ||
| 3255 | <tr> | ||
| 3256 | <td valign="top" >TV Standard</td> | ||
| 3257 | <td valign="top" >"tv standard"</td> | ||
| 3258 | <td valign="top" >ENUM</td> | ||
| 3259 | <td valign="top" >{ "ntsc", "pal", "pal-m", "pal-60", "ntsc-j" | ||
| 3260 | , "scart-pal", "pal-cn", "secam" }</td> | ||
| 3261 | <td valign="top" >Connector</td> | ||
| 3262 | <td valign="top" >TBD</td> | ||
| 3263 | </tr> | ||
| 3264 | <tr> | ||
| 3265 | <td valign="top" >legacy TMDS PLL detect</td> | ||
| 3266 | <td valign="top" >"tmds_pll"</td> | ||
| 3267 | <td valign="top" >ENUM</td> | ||
| 3268 | <td valign="top" >{ "driver", "bios" }</td> | ||
| 3269 | <td valign="top" >-</td> | ||
| 3270 | <td valign="top" >TBD</td> | ||
| 3271 | </tr> | ||
| 3272 | <tr> | ||
| 3273 | <td rowspan="3" valign="top" >Underscan</td> | ||
| 3274 | <td valign="top" >"underscan"</td> | ||
| 3275 | <td valign="top" >ENUM</td> | ||
| 3276 | <td valign="top" >{ "off", "on", "auto" }</td> | ||
| 3277 | <td valign="top" >Connector</td> | ||
| 3278 | <td valign="top" >TBD</td> | ||
| 3279 | </tr> | ||
| 3280 | <tr> | ||
| 3281 | <td valign="top" >"underscan hborder"</td> | ||
| 3282 | <td valign="top" >RANGE</td> | ||
| 3283 | <td valign="top" >Min=0, Max=128</td> | ||
| 3284 | <td valign="top" >Connector</td> | ||
| 3285 | <td valign="top" >TBD</td> | ||
| 3286 | </tr> | ||
| 3287 | <tr> | ||
| 3288 | <td valign="top" >"underscan vborder"</td> | ||
| 3289 | <td valign="top" >RANGE</td> | ||
| 3290 | <td valign="top" >Min=0, Max=128</td> | ||
| 3291 | <td valign="top" >Connector</td> | ||
| 3292 | <td valign="top" >TBD</td> | ||
| 3293 | </tr> | ||
| 3294 | <tr> | ||
| 3295 | <td valign="top" >Audio</td> | ||
| 3296 | <td valign="top" >“audio”</td> | ||
| 3297 | <td valign="top" >ENUM</td> | ||
| 3298 | <td valign="top" >{ "off", "on", "auto" }</td> | ||
| 3299 | <td valign="top" >Connector</td> | ||
| 3300 | <td valign="top" >TBD</td> | ||
| 3301 | </tr> | ||
| 3302 | <tr> | ||
| 3303 | <td valign="top" >FMT Dithering</td> | ||
| 3304 | <td valign="top" >“dither”</td> | ||
| 3305 | <td valign="top" >ENUM</td> | ||
| 3306 | <td valign="top" >{ "off", "on" }</td> | ||
| 3307 | <td valign="top" >Connector</td> | ||
| 3308 | <td valign="top" >TBD</td> | ||
| 3309 | </tr> | ||
| 3310 | <tr> | ||
| 3311 | <td valign="top" >Generic</td> | ||
| 3312 | <td valign="top" >Standard name as in DRM</td> | ||
| 3313 | <td valign="top" >Standard type as in DRM</td> | ||
| 3314 | <td valign="top" >Standard value as in DRM</td> | ||
| 3315 | <td valign="top" >Standard Object as in DRM</td> | ||
| 3316 | <td valign="top" >TBD</td> | ||
| 3317 | </tr> | ||
| 3318 | <tr> | ||
| 3319 | <td rowspan="3" valign="top" >rcar-du</td> | ||
| 3320 | <td rowspan="3" valign="top" >Generic</td> | ||
| 3321 | <td valign="top" >"alpha"</td> | ||
| 3322 | <td valign="top" >RANGE</td> | ||
| 3323 | <td valign="top" >Min=0, Max=255</td> | ||
| 3324 | <td valign="top" >Plane</td> | ||
| 3325 | <td valign="top" >TBD</td> | ||
| 3326 | </tr> | ||
| 3327 | <tr> | ||
| 3328 | <td valign="top" >"colorkey"</td> | ||
| 3329 | <td valign="top" >RANGE</td> | ||
| 3330 | <td valign="top" >Min=0, Max=0x01ffffff</td> | ||
| 3331 | <td valign="top" >Plane</td> | ||
| 3332 | <td valign="top" >TBD</td> | ||
| 3333 | </tr> | ||
| 3334 | <tr> | ||
| 3335 | <td valign="top" >"zpos"</td> | ||
| 3336 | <td valign="top" >RANGE</td> | ||
| 3337 | <td valign="top" >Min=1, Max=7</td> | ||
| 3338 | <td valign="top" >Plane</td> | ||
| 3339 | <td valign="top" >TBD</td> | ||
| 3340 | </tr> | ||
| 3341 | </tbody> | ||
| 3342 | </table> | ||
| 3343 | </sect2> | ||
| 2448 | </sect1> | 3344 | </sect1> |
| 2449 | 3345 | ||
| 2450 | <!-- Internals: vertical blanking --> | 3346 | <!-- Internals: vertical blanking --> |
| @@ -2522,6 +3418,10 @@ void (*disable_vblank) (struct drm_device *dev, int crtc);</synopsis> | |||
| 2522 | with a call to <function>drm_vblank_cleanup</function> in the driver | 3418 | with a call to <function>drm_vblank_cleanup</function> in the driver |
| 2523 | <methodname>unload</methodname> operation handler. | 3419 | <methodname>unload</methodname> operation handler. |
| 2524 | </para> | 3420 | </para> |
| 3421 | <sect2> | ||
| 3422 | <title>Vertical Blanking and Interrupt Handling Functions Reference</title> | ||
| 3423 | !Edrivers/gpu/drm/drm_irq.c | ||
| 3424 | </sect2> | ||
| 2525 | </sect1> | 3425 | </sect1> |
| 2526 | 3426 | ||
| 2527 | <!-- Internals: open/close, file operations and ioctls --> | 3427 | <!-- Internals: open/close, file operations and ioctls --> |
| @@ -2692,10 +3592,10 @@ int num_ioctls;</synopsis> | |||
| 2692 | <sect1> | 3592 | <sect1> |
| 2693 | <title>Legacy Support Code</title> | 3593 | <title>Legacy Support Code</title> |
| 2694 | <para> | 3594 | <para> |
| 2695 | The section very brievely covers some of the old legacy support code which | 3595 | The section very briefly covers some of the old legacy support code which |
| 2696 | is only used by old DRM drivers which have done a so-called shadow-attach | 3596 | is only used by old DRM drivers which have done a so-called shadow-attach |
| 2697 | to the underlying device instead of registering as a real driver. This | 3597 | to the underlying device instead of registering as a real driver. This |
| 2698 | also includes some of the old generic buffer mangement and command | 3598 | also includes some of the old generic buffer management and command |
| 2699 | submission code. Do not use any of this in new and modern drivers. | 3599 | submission code. Do not use any of this in new and modern drivers. |
| 2700 | </para> | 3600 | </para> |
| 2701 | 3601 | ||
| @@ -2864,17 +3764,16 @@ int num_ioctls;</synopsis> | |||
| 2864 | <term>DRM_IOCTL_MODESET_CTL</term> | 3764 | <term>DRM_IOCTL_MODESET_CTL</term> |
| 2865 | <listitem> | 3765 | <listitem> |
| 2866 | <para> | 3766 | <para> |
| 2867 | This should be called by application level drivers before and | 3767 | This was only used for user-mode-settind drivers around |
| 2868 | after mode setting, since on many devices the vertical blank | 3768 | modesetting changes to allow the kernel to update the vblank |
| 2869 | counter is reset at that time. Internally, the DRM snapshots | 3769 | interrupt after mode setting, since on many devices the vertical |
| 2870 | the last vblank count when the ioctl is called with the | 3770 | blank counter is reset to 0 at some point during modeset. Modern |
| 2871 | _DRM_PRE_MODESET command, so that the counter won't go backwards | 3771 | drivers should not call this any more since with kernel mode |
| 2872 | (which is dealt with when _DRM_POST_MODESET is used). | 3772 | setting it is a no-op. |
| 2873 | </para> | 3773 | </para> |
| 2874 | </listitem> | 3774 | </listitem> |
| 2875 | </varlistentry> | 3775 | </varlistentry> |
| 2876 | </variablelist> | 3776 | </variablelist> |
| 2877 | <!--!Edrivers/char/drm/drm_irq.c--> | ||
| 2878 | </para> | 3777 | </para> |
| 2879 | </sect1> | 3778 | </sect1> |
| 2880 | 3779 | ||
| @@ -2937,6 +3836,96 @@ int num_ioctls;</synopsis> | |||
| 2937 | probing, so those sections fully apply. | 3836 | probing, so those sections fully apply. |
| 2938 | </para> | 3837 | </para> |
| 2939 | </sect2> | 3838 | </sect2> |
| 3839 | <sect2> | ||
| 3840 | <title>DPIO</title> | ||
| 3841 | !Pdrivers/gpu/drm/i915/i915_reg.h DPIO | ||
| 3842 | <table id="dpiox2"> | ||
| 3843 | <title>Dual channel PHY (VLV/CHV)</title> | ||
| 3844 | <tgroup cols="8"> | ||
| 3845 | <colspec colname="c0" /> | ||
| 3846 | <colspec colname="c1" /> | ||
| 3847 | <colspec colname="c2" /> | ||
| 3848 | <colspec colname="c3" /> | ||
| 3849 | <colspec colname="c4" /> | ||
| 3850 | <colspec colname="c5" /> | ||
| 3851 | <colspec colname="c6" /> | ||
| 3852 | <colspec colname="c7" /> | ||
| 3853 | <spanspec spanname="ch0" namest="c0" nameend="c3" /> | ||
| 3854 | <spanspec spanname="ch1" namest="c4" nameend="c7" /> | ||
| 3855 | <spanspec spanname="ch0pcs01" namest="c0" nameend="c1" /> | ||
| 3856 | <spanspec spanname="ch0pcs23" namest="c2" nameend="c3" /> | ||
| 3857 | <spanspec spanname="ch1pcs01" namest="c4" nameend="c5" /> | ||
| 3858 | <spanspec spanname="ch1pcs23" namest="c6" nameend="c7" /> | ||
| 3859 | <thead> | ||
| 3860 | <row> | ||
| 3861 | <entry spanname="ch0">CH0</entry> | ||
| 3862 | <entry spanname="ch1">CH1</entry> | ||
| 3863 | </row> | ||
| 3864 | </thead> | ||
| 3865 | <tbody valign="top" align="center"> | ||
| 3866 | <row> | ||
| 3867 | <entry spanname="ch0">CMN/PLL/REF</entry> | ||
| 3868 | <entry spanname="ch1">CMN/PLL/REF</entry> | ||
| 3869 | </row> | ||
| 3870 | <row> | ||
| 3871 | <entry spanname="ch0pcs01">PCS01</entry> | ||
| 3872 | <entry spanname="ch0pcs23">PCS23</entry> | ||
| 3873 | <entry spanname="ch1pcs01">PCS01</entry> | ||
| 3874 | <entry spanname="ch1pcs23">PCS23</entry> | ||
| 3875 | </row> | ||
| 3876 | <row> | ||
| 3877 | <entry>TX0</entry> | ||
| 3878 | <entry>TX1</entry> | ||
| 3879 | <entry>TX2</entry> | ||
| 3880 | <entry>TX3</entry> | ||
| 3881 | <entry>TX0</entry> | ||
| 3882 | <entry>TX1</entry> | ||
| 3883 | <entry>TX2</entry> | ||
| 3884 | <entry>TX3</entry> | ||
| 3885 | </row> | ||
| 3886 | <row> | ||
| 3887 | <entry spanname="ch0">DDI0</entry> | ||
| 3888 | <entry spanname="ch1">DDI1</entry> | ||
| 3889 | </row> | ||
| 3890 | </tbody> | ||
| 3891 | </tgroup> | ||
| 3892 | </table> | ||
| 3893 | <table id="dpiox1"> | ||
| 3894 | <title>Single channel PHY (CHV)</title> | ||
| 3895 | <tgroup cols="4"> | ||
| 3896 | <colspec colname="c0" /> | ||
| 3897 | <colspec colname="c1" /> | ||
| 3898 | <colspec colname="c2" /> | ||
| 3899 | <colspec colname="c3" /> | ||
| 3900 | <spanspec spanname="ch0" namest="c0" nameend="c3" /> | ||
| 3901 | <spanspec spanname="ch0pcs01" namest="c0" nameend="c1" /> | ||
| 3902 | <spanspec spanname="ch0pcs23" namest="c2" nameend="c3" /> | ||
| 3903 | <thead> | ||
| 3904 | <row> | ||
| 3905 | <entry spanname="ch0">CH0</entry> | ||
| 3906 | </row> | ||
| 3907 | </thead> | ||
| 3908 | <tbody valign="top" align="center"> | ||
| 3909 | <row> | ||
| 3910 | <entry spanname="ch0">CMN/PLL/REF</entry> | ||
| 3911 | </row> | ||
| 3912 | <row> | ||
| 3913 | <entry spanname="ch0pcs01">PCS01</entry> | ||
| 3914 | <entry spanname="ch0pcs23">PCS23</entry> | ||
| 3915 | </row> | ||
| 3916 | <row> | ||
| 3917 | <entry>TX0</entry> | ||
| 3918 | <entry>TX1</entry> | ||
| 3919 | <entry>TX2</entry> | ||
| 3920 | <entry>TX3</entry> | ||
| 3921 | </row> | ||
| 3922 | <row> | ||
| 3923 | <entry spanname="ch0">DDI2</entry> | ||
| 3924 | </row> | ||
| 3925 | </tbody> | ||
| 3926 | </tgroup> | ||
| 3927 | </table> | ||
| 3928 | </sect2> | ||
| 2940 | </sect1> | 3929 | </sect1> |
| 2941 | 3930 | ||
| 2942 | <sect1> | 3931 | <sect1> |
| @@ -2945,6 +3934,11 @@ int num_ioctls;</synopsis> | |||
| 2945 | This sections covers all things related to the GEM implementation in the | 3934 | This sections covers all things related to the GEM implementation in the |
| 2946 | i915 driver. | 3935 | i915 driver. |
| 2947 | </para> | 3936 | </para> |
| 3937 | <sect2> | ||
| 3938 | <title>Batchbuffer Parsing</title> | ||
| 3939 | !Pdrivers/gpu/drm/i915/i915_cmd_parser.c batch buffer command parser | ||
| 3940 | !Idrivers/gpu/drm/i915/i915_cmd_parser.c | ||
| 3941 | </sect2> | ||
| 2948 | </sect1> | 3942 | </sect1> |
| 2949 | </chapter> | 3943 | </chapter> |
| 2950 | </part> | 3944 | </part> |
diff --git a/Documentation/DocBook/filesystems.tmpl b/Documentation/DocBook/filesystems.tmpl index 4f676838da06..bcdfdb9a9277 100644 --- a/Documentation/DocBook/filesystems.tmpl +++ b/Documentation/DocBook/filesystems.tmpl | |||
| @@ -62,7 +62,7 @@ | |||
| 62 | !Efs/mpage.c | 62 | !Efs/mpage.c |
| 63 | !Efs/namei.c | 63 | !Efs/namei.c |
| 64 | !Efs/buffer.c | 64 | !Efs/buffer.c |
| 65 | !Efs/bio.c | 65 | !Eblock/bio.c |
| 66 | !Efs/seq_file.c | 66 | !Efs/seq_file.c |
| 67 | !Efs/filesystems.c | 67 | !Efs/filesystems.c |
| 68 | !Efs/fs-writeback.c | 68 | !Efs/fs-writeback.c |
diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile index f9fd615427fb..1d27f0a1abd1 100644 --- a/Documentation/DocBook/media/Makefile +++ b/Documentation/DocBook/media/Makefile | |||
| @@ -195,7 +195,7 @@ DVB_DOCUMENTED = \ | |||
| 195 | # | 195 | # |
| 196 | 196 | ||
| 197 | install_media_images = \ | 197 | install_media_images = \ |
| 198 | $(Q)cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api | 198 | $(Q)-cp $(OBJIMGFILES) $(MEDIA_SRC_DIR)/v4l/*.svg $(MEDIA_OBJ_DIR)/media_api |
| 199 | 199 | ||
| 200 | $(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64 | 200 | $(MEDIA_OBJ_DIR)/%: $(MEDIA_SRC_DIR)/%.b64 |
| 201 | $(Q)base64 -d $< >$@ | 201 | $(Q)base64 -d $< >$@ |
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml index 97a69bf6f3eb..a086a5db7a18 100644 --- a/Documentation/DocBook/media/v4l/io.xml +++ b/Documentation/DocBook/media/v4l/io.xml | |||
| @@ -125,7 +125,7 @@ location of the buffers in device memory can be determined with the | |||
| 125 | <structfield>m.offset</structfield> and <structfield>length</structfield> | 125 | <structfield>m.offset</structfield> and <structfield>length</structfield> |
| 126 | returned in a &v4l2-buffer; are passed as sixth and second parameter to the | 126 | returned in a &v4l2-buffer; are passed as sixth and second parameter to the |
| 127 | <function>mmap()</function> function. When using the multi-planar API, | 127 | <function>mmap()</function> function. When using the multi-planar API, |
| 128 | struct &v4l2-buffer; contains an array of &v4l2-plane; structures, each | 128 | &v4l2-buffer; contains an array of &v4l2-plane; structures, each |
| 129 | containing its own <structfield>m.offset</structfield> and | 129 | containing its own <structfield>m.offset</structfield> and |
| 130 | <structfield>length</structfield>. When using the multi-planar API, every | 130 | <structfield>length</structfield>. When using the multi-planar API, every |
| 131 | plane of every buffer has to be mapped separately, so the number of | 131 | plane of every buffer has to be mapped separately, so the number of |
| @@ -699,7 +699,12 @@ linkend="v4l2-buf-type" /></entry> | |||
| 699 | buffer. It depends on the negotiated data format and may change with | 699 | buffer. It depends on the negotiated data format and may change with |
| 700 | each buffer for compressed variable size data like JPEG images. | 700 | each buffer for compressed variable size data like JPEG images. |
| 701 | Drivers must set this field when <structfield>type</structfield> | 701 | Drivers must set this field when <structfield>type</structfield> |
| 702 | refers to an input stream, applications when it refers to an output stream.</entry> | 702 | refers to an input stream, applications when it refers to an output stream. |
| 703 | If the application sets this to 0 for an output stream, then | ||
| 704 | <structfield>bytesused</structfield> will be set to the size of the | ||
| 705 | buffer (see the <structfield>length</structfield> field of this struct) by | ||
| 706 | the driver. For multiplanar formats this field is ignored and the | ||
| 707 | <structfield>planes</structfield> pointer is used instead.</entry> | ||
| 703 | </row> | 708 | </row> |
| 704 | <row> | 709 | <row> |
| 705 | <entry>__u32</entry> | 710 | <entry>__u32</entry> |
| @@ -861,7 +866,11 @@ should set this to 0.</entry> | |||
| 861 | <entry></entry> | 866 | <entry></entry> |
| 862 | <entry>The number of bytes occupied by data in the plane | 867 | <entry>The number of bytes occupied by data in the plane |
| 863 | (its payload). Drivers must set this field when <structfield>type</structfield> | 868 | (its payload). Drivers must set this field when <structfield>type</structfield> |
| 864 | refers to an input stream, applications when it refers to an output stream.</entry> | 869 | refers to an input stream, applications when it refers to an output stream. |
| 870 | If the application sets this to 0 for an output stream, then | ||
| 871 | <structfield>bytesused</structfield> will be set to the size of the | ||
| 872 | plane (see the <structfield>length</structfield> field of this struct) | ||
| 873 | by the driver.</entry> | ||
| 865 | </row> | 874 | </row> |
| 866 | <row> | 875 | <row> |
| 867 | <entry>__u32</entry> | 876 | <entry>__u32</entry> |
diff --git a/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml b/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml index cf8548556c7d..74fb394ec667 100644 --- a/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml +++ b/Documentation/DocBook/media/v4l/media-ioc-enum-links.xml | |||
| @@ -79,13 +79,13 @@ | |||
| 79 | <entry>Entity id, set by the application.</entry> | 79 | <entry>Entity id, set by the application.</entry> |
| 80 | </row> | 80 | </row> |
| 81 | <row> | 81 | <row> |
| 82 | <entry>struct &media-pad-desc;</entry> | 82 | <entry>&media-pad-desc;</entry> |
| 83 | <entry>*<structfield>pads</structfield></entry> | 83 | <entry>*<structfield>pads</structfield></entry> |
| 84 | <entry>Pointer to a pads array allocated by the application. Ignored | 84 | <entry>Pointer to a pads array allocated by the application. Ignored |
| 85 | if NULL.</entry> | 85 | if NULL.</entry> |
| 86 | </row> | 86 | </row> |
| 87 | <row> | 87 | <row> |
| 88 | <entry>struct &media-link-desc;</entry> | 88 | <entry>&media-link-desc;</entry> |
| 89 | <entry>*<structfield>links</structfield></entry> | 89 | <entry>*<structfield>links</structfield></entry> |
| 90 | <entry>Pointer to a links array allocated by the application. Ignored | 90 | <entry>Pointer to a links array allocated by the application. Ignored |
| 91 | if NULL.</entry> | 91 | if NULL.</entry> |
| @@ -153,12 +153,12 @@ | |||
| 153 | &cs-str; | 153 | &cs-str; |
| 154 | <tbody valign="top"> | 154 | <tbody valign="top"> |
| 155 | <row> | 155 | <row> |
| 156 | <entry>struct &media-pad-desc;</entry> | 156 | <entry>&media-pad-desc;</entry> |
| 157 | <entry><structfield>source</structfield></entry> | 157 | <entry><structfield>source</structfield></entry> |
| 158 | <entry>Pad at the origin of this link.</entry> | 158 | <entry>Pad at the origin of this link.</entry> |
| 159 | </row> | 159 | </row> |
| 160 | <row> | 160 | <row> |
| 161 | <entry>struct &media-pad-desc;</entry> | 161 | <entry>&media-pad-desc;</entry> |
| 162 | <entry><structfield>sink</structfield></entry> | 162 | <entry><structfield>sink</structfield></entry> |
| 163 | <entry>Pad at the target of this link.</entry> | 163 | <entry>Pad at the target of this link.</entry> |
| 164 | </row> | 164 | </row> |
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index ea514d6075c5..91dcbc84f3f8 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml | |||
| @@ -772,7 +772,7 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see | |||
| 772 | </row> | 772 | </row> |
| 773 | <row id="V4L2-PIX-FMT-H264-MVC"> | 773 | <row id="V4L2-PIX-FMT-H264-MVC"> |
| 774 | <entry><constant>V4L2_PIX_FMT_H264_MVC</constant></entry> | 774 | <entry><constant>V4L2_PIX_FMT_H264_MVC</constant></entry> |
| 775 | <entry>'MVC'</entry> | 775 | <entry>'M264'</entry> |
| 776 | <entry>H264 MVC video elementary stream.</entry> | 776 | <entry>H264 MVC video elementary stream.</entry> |
| 777 | </row> | 777 | </row> |
| 778 | <row id="V4L2-PIX-FMT-H263"> | 778 | <row id="V4L2-PIX-FMT-H263"> |
| @@ -812,7 +812,7 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see | |||
| 812 | </row> | 812 | </row> |
| 813 | <row id="V4L2-PIX-FMT-VP8"> | 813 | <row id="V4L2-PIX-FMT-VP8"> |
| 814 | <entry><constant>V4L2_PIX_FMT_VP8</constant></entry> | 814 | <entry><constant>V4L2_PIX_FMT_VP8</constant></entry> |
| 815 | <entry>'VP8'</entry> | 815 | <entry>'VP80'</entry> |
| 816 | <entry>VP8 video elementary stream.</entry> | 816 | <entry>VP8 video elementary stream.</entry> |
| 817 | </row> | 817 | </row> |
| 818 | </tbody> | 818 | </tbody> |
diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml index 7331ce116f4c..b2d5a0363cba 100644 --- a/Documentation/DocBook/media/v4l/subdev-formats.xml +++ b/Documentation/DocBook/media/v4l/subdev-formats.xml | |||
| @@ -1898,6 +1898,134 @@ | |||
| 1898 | <entry>y<subscript>1</subscript></entry> | 1898 | <entry>y<subscript>1</subscript></entry> |
| 1899 | <entry>y<subscript>0</subscript></entry> | 1899 | <entry>y<subscript>0</subscript></entry> |
| 1900 | </row> | 1900 | </row> |
| 1901 | <row id="V4L2-MBUS-FMT-UYVY10-2X10"> | ||
| 1902 | <entry>V4L2_MBUS_FMT_UYVY10_2X10</entry> | ||
| 1903 | <entry>0x2018</entry> | ||
| 1904 | <entry></entry> | ||
| 1905 | &dash-ent-22; | ||
| 1906 | <entry>u<subscript>9</subscript></entry> | ||
| 1907 | <entry>u<subscript>8</subscript></entry> | ||
| 1908 | <entry>u<subscript>7</subscript></entry> | ||
| 1909 | <entry>u<subscript>6</subscript></entry> | ||
| 1910 | <entry>u<subscript>5</subscript></entry> | ||
| 1911 | <entry>u<subscript>4</subscript></entry> | ||
| 1912 | <entry>u<subscript>3</subscript></entry> | ||
| 1913 | <entry>u<subscript>2</subscript></entry> | ||
| 1914 | <entry>u<subscript>1</subscript></entry> | ||
| 1915 | <entry>u<subscript>0</subscript></entry> | ||
| 1916 | </row> | ||
| 1917 | <row> | ||
| 1918 | <entry></entry> | ||
| 1919 | <entry></entry> | ||
| 1920 | <entry></entry> | ||
| 1921 | &dash-ent-22; | ||
| 1922 | <entry>y<subscript>9</subscript></entry> | ||
| 1923 | <entry>y<subscript>8</subscript></entry> | ||
| 1924 | <entry>y<subscript>7</subscript></entry> | ||
| 1925 | <entry>y<subscript>6</subscript></entry> | ||
| 1926 | <entry>y<subscript>5</subscript></entry> | ||
| 1927 | <entry>y<subscript>4</subscript></entry> | ||
| 1928 | <entry>y<subscript>3</subscript></entry> | ||
| 1929 | <entry>y<subscript>2</subscript></entry> | ||
| 1930 | <entry>y<subscript>1</subscript></entry> | ||
| 1931 | <entry>y<subscript>0</subscript></entry> | ||
| 1932 | </row> | ||
| 1933 | <row> | ||
| 1934 | <entry></entry> | ||
| 1935 | <entry></entry> | ||
| 1936 | <entry></entry> | ||
| 1937 | &dash-ent-22; | ||
| 1938 | <entry>v<subscript>9</subscript></entry> | ||
| 1939 | <entry>v<subscript>8</subscript></entry> | ||
| 1940 | <entry>v<subscript>7</subscript></entry> | ||
| 1941 | <entry>v<subscript>6</subscript></entry> | ||
| 1942 | <entry>v<subscript>5</subscript></entry> | ||
| 1943 | <entry>v<subscript>4</subscript></entry> | ||
| 1944 | <entry>v<subscript>3</subscript></entry> | ||
| 1945 | <entry>v<subscript>2</subscript></entry> | ||
| 1946 | <entry>v<subscript>1</subscript></entry> | ||
| 1947 | <entry>v<subscript>0</subscript></entry> | ||
| 1948 | </row> | ||
| 1949 | <row> | ||
| 1950 | <entry></entry> | ||
| 1951 | <entry></entry> | ||
| 1952 | <entry></entry> | ||
| 1953 | &dash-ent-22; | ||
| 1954 | <entry>y<subscript>9</subscript></entry> | ||
| 1955 | <entry>y<subscript>8</subscript></entry> | ||
| 1956 | <entry>y<subscript>7</subscript></entry> | ||
| 1957 | <entry>y<subscript>6</subscript></entry> | ||
| 1958 | <entry>y<subscript>5</subscript></entry> | ||
| 1959 | <entry>y<subscript>4</subscript></entry> | ||
| 1960 | <entry>y<subscript>3</subscript></entry> | ||
| 1961 | <entry>y<subscript>2</subscript></entry> | ||
| 1962 | <entry>y<subscript>1</subscript></entry> | ||
| 1963 | <entry>y<subscript>0</subscript></entry> | ||
| 1964 | </row> | ||
| 1965 | <row id="V4L2-MBUS-FMT-VYUY10-2X10"> | ||
| 1966 | <entry>V4L2_MBUS_FMT_VYUY10_2X10</entry> | ||
| 1967 | <entry>0x2019</entry> | ||
| 1968 | <entry></entry> | ||
| 1969 | &dash-ent-22; | ||
| 1970 | <entry>v<subscript>9</subscript></entry> | ||
| 1971 | <entry>v<subscript>8</subscript></entry> | ||
| 1972 | <entry>v<subscript>7</subscript></entry> | ||
| 1973 | <entry>v<subscript>6</subscript></entry> | ||
| 1974 | <entry>v<subscript>5</subscript></entry> | ||
| 1975 | <entry>v<subscript>4</subscript></entry> | ||
| 1976 | <entry>v<subscript>3</subscript></entry> | ||
| 1977 | <entry>v<subscript>2</subscript></entry> | ||
| 1978 | <entry>v<subscript>1</subscript></entry> | ||
| 1979 | <entry>v<subscript>0</subscript></entry> | ||
| 1980 | </row> | ||
| 1981 | <row> | ||
| 1982 | <entry></entry> | ||
| 1983 | <entry></entry> | ||
| 1984 | <entry></entry> | ||
| 1985 | &dash-ent-22; | ||
| 1986 | <entry>y<subscript>9</subscript></entry> | ||
| 1987 | <entry>y<subscript>8</subscript></entry> | ||
| 1988 | <entry>y<subscript>7</subscript></entry> | ||
| 1989 | <entry>y<subscript>6</subscript></entry> | ||
| 1990 | <entry>y<subscript>5</subscript></entry> | ||
| 1991 | <entry>y<subscript>4</subscript></entry> | ||
| 1992 | <entry>y<subscript>3</subscript></entry> | ||
| 1993 | <entry>y<subscript>2</subscript></entry> | ||
| 1994 | <entry>y<subscript>1</subscript></entry> | ||
| 1995 | <entry>y<subscript>0</subscript></entry> | ||
| 1996 | </row> | ||
| 1997 | <row> | ||
| 1998 | <entry></entry> | ||
| 1999 | <entry></entry> | ||
| 2000 | <entry></entry> | ||
| 2001 | &dash-ent-22; | ||
| 2002 | <entry>u<subscript>9</subscript></entry> | ||
| 2003 | <entry>u<subscript>8</subscript></entry> | ||
| 2004 | <entry>u<subscript>7</subscript></entry> | ||
| 2005 | <entry>u<subscript>6</subscript></entry> | ||
| 2006 | <entry>u<subscript>5</subscript></entry> | ||
| 2007 | <entry>u<subscript>4</subscript></entry> | ||
| 2008 | <entry>u<subscript>3</subscript></entry> | ||
| 2009 | <entry>u<subscript>2</subscript></entry> | ||
| 2010 | <entry>u<subscript>1</subscript></entry> | ||
| 2011 | <entry>u<subscript>0</subscript></entry> | ||
| 2012 | </row> | ||
| 2013 | <row> | ||
| 2014 | <entry></entry> | ||
| 2015 | <entry></entry> | ||
| 2016 | <entry></entry> | ||
| 2017 | &dash-ent-22; | ||
| 2018 | <entry>y<subscript>9</subscript></entry> | ||
| 2019 | <entry>y<subscript>8</subscript></entry> | ||
| 2020 | <entry>y<subscript>7</subscript></entry> | ||
| 2021 | <entry>y<subscript>6</subscript></entry> | ||
| 2022 | <entry>y<subscript>5</subscript></entry> | ||
| 2023 | <entry>y<subscript>4</subscript></entry> | ||
| 2024 | <entry>y<subscript>3</subscript></entry> | ||
| 2025 | <entry>y<subscript>2</subscript></entry> | ||
| 2026 | <entry>y<subscript>1</subscript></entry> | ||
| 2027 | <entry>y<subscript>0</subscript></entry> | ||
| 2028 | </row> | ||
| 1901 | <row id="V4L2-MBUS-FMT-YUYV10-2X10"> | 2029 | <row id="V4L2-MBUS-FMT-YUYV10-2X10"> |
| 1902 | <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry> | 2030 | <entry>V4L2_MBUS_FMT_YUYV10_2X10</entry> |
| 1903 | <entry>0x200b</entry> | 2031 | <entry>0x200b</entry> |
| @@ -2308,6 +2436,110 @@ | |||
| 2308 | <entry>v<subscript>1</subscript></entry> | 2436 | <entry>v<subscript>1</subscript></entry> |
| 2309 | <entry>v<subscript>0</subscript></entry> | 2437 | <entry>v<subscript>0</subscript></entry> |
| 2310 | </row> | 2438 | </row> |
| 2439 | <row id="V4L2-MBUS-FMT-UYVY10-1X20"> | ||
| 2440 | <entry>V4L2_MBUS_FMT_UYVY10_1X20</entry> | ||
| 2441 | <entry>0x201a</entry> | ||
| 2442 | <entry></entry> | ||
| 2443 | &dash-ent-12; | ||
| 2444 | <entry>u<subscript>9</subscript></entry> | ||
| 2445 | <entry>u<subscript>8</subscript></entry> | ||
| 2446 | <entry>u<subscript>7</subscript></entry> | ||
| 2447 | <entry>u<subscript>6</subscript></entry> | ||
| 2448 | <entry>u<subscript>5</subscript></entry> | ||
| 2449 | <entry>u<subscript>4</subscript></entry> | ||
| 2450 | <entry>u<subscript>3</subscript></entry> | ||
| 2451 | <entry>u<subscript>2</subscript></entry> | ||
| 2452 | <entry>u<subscript>1</subscript></entry> | ||
| 2453 | <entry>u<subscript>0</subscript></entry> | ||
| 2454 | <entry>y<subscript>9</subscript></entry> | ||
| 2455 | <entry>y<subscript>8</subscript></entry> | ||
| 2456 | <entry>y<subscript>7</subscript></entry> | ||
| 2457 | <entry>y<subscript>6</subscript></entry> | ||
| 2458 | <entry>y<subscript>5</subscript></entry> | ||
| 2459 | <entry>y<subscript>4</subscript></entry> | ||
| 2460 | <entry>y<subscript>3</subscript></entry> | ||
| 2461 | <entry>y<subscript>2</subscript></entry> | ||
| 2462 | <entry>y<subscript>1</subscript></entry> | ||
| 2463 | <entry>y<subscript>0</subscript></entry> | ||
| 2464 | </row> | ||
| 2465 | <row> | ||
| 2466 | <entry></entry> | ||
| 2467 | <entry></entry> | ||
| 2468 | <entry></entry> | ||
| 2469 | &dash-ent-12; | ||
| 2470 | <entry>v<subscript>9</subscript></entry> | ||
| 2471 | <entry>v<subscript>8</subscript></entry> | ||
| 2472 | <entry>v<subscript>7</subscript></entry> | ||
| 2473 | <entry>v<subscript>6</subscript></entry> | ||
| 2474 | <entry>v<subscript>5</subscript></entry> | ||
| 2475 | <entry>v<subscript>4</subscript></entry> | ||
| 2476 | <entry>v<subscript>3</subscript></entry> | ||
| 2477 | <entry>v<subscript>2</subscript></entry> | ||
| 2478 | <entry>v<subscript>1</subscript></entry> | ||
| 2479 | <entry>v<subscript>0</subscript></entry> | ||
| 2480 | <entry>y<subscript>9</subscript></entry> | ||
| 2481 | <entry>y<subscript>8</subscript></entry> | ||
| 2482 | <entry>y<subscript>7</subscript></entry> | ||
| 2483 | <entry>y<subscript>6</subscript></entry> | ||
| 2484 | <entry>y<subscript>5</subscript></entry> | ||
| 2485 | <entry>y<subscript>4</subscript></entry> | ||
| 2486 | <entry>y<subscript>3</subscript></entry> | ||
| 2487 | <entry>y<subscript>2</subscript></entry> | ||
| 2488 | <entry>y<subscript>1</subscript></entry> | ||
| 2489 | <entry>y<subscript>0</subscript></entry> | ||
| 2490 | </row> | ||
| 2491 | <row id="V4L2-MBUS-FMT-VYUY10-1X20"> | ||
| 2492 | <entry>V4L2_MBUS_FMT_VYUY10_1X20</entry> | ||
| 2493 | <entry>0x201b</entry> | ||
| 2494 | <entry></entry> | ||
| 2495 | &dash-ent-12; | ||
| 2496 | <entry>v<subscript>9</subscript></entry> | ||
| 2497 | <entry>v<subscript>8</subscript></entry> | ||
| 2498 | <entry>v<subscript>7</subscript></entry> | ||
| 2499 | <entry>v<subscript>6</subscript></entry> | ||
| 2500 | <entry>v<subscript>5</subscript></entry> | ||
| 2501 | <entry>v<subscript>4</subscript></entry> | ||
| 2502 | <entry>v<subscript>3</subscript></entry> | ||
| 2503 | <entry>v<subscript>2</subscript></entry> | ||
| 2504 | <entry>v<subscript>1</subscript></entry> | ||
| 2505 | <entry>v<subscript>0</subscript></entry> | ||
| 2506 | <entry>y<subscript>9</subscript></entry> | ||
| 2507 | <entry>y<subscript>8</subscript></entry> | ||
| 2508 | <entry>y<subscript>7</subscript></entry> | ||
| 2509 | <entry>y<subscript>6</subscript></entry> | ||
| 2510 | <entry>y<subscript>5</subscript></entry> | ||
| 2511 | <entry>y<subscript>4</subscript></entry> | ||
| 2512 | <entry>y<subscript>3</subscript></entry> | ||
| 2513 | <entry>y<subscript>2</subscript></entry> | ||
| 2514 | <entry>y<subscript>1</subscript></entry> | ||
| 2515 | <entry>y<subscript>0</subscript></entry> | ||
| 2516 | </row> | ||
| 2517 | <row> | ||
| 2518 | <entry></entry> | ||
| 2519 | <entry></entry> | ||
| 2520 | <entry></entry> | ||
| 2521 | &dash-ent-12; | ||
| 2522 | <entry>u<subscript>9</subscript></entry> | ||
| 2523 | <entry>u<subscript>8</subscript></entry> | ||
| 2524 | <entry>u<subscript>7</subscript></entry> | ||
| 2525 | <entry>u<subscript>6</subscript></entry> | ||
| 2526 | <entry>u<subscript>5</subscript></entry> | ||
| 2527 | <entry>u<subscript>4</subscript></entry> | ||
| 2528 | <entry>u<subscript>3</subscript></entry> | ||
| 2529 | <entry>u<subscript>2</subscript></entry> | ||
| 2530 | <entry>u<subscript>1</subscript></entry> | ||
| 2531 | <entry>u<subscript>0</subscript></entry> | ||
| 2532 | <entry>y<subscript>9</subscript></entry> | ||
| 2533 | <entry>y<subscript>8</subscript></entry> | ||
| 2534 | <entry>y<subscript>7</subscript></entry> | ||
| 2535 | <entry>y<subscript>6</subscript></entry> | ||
| 2536 | <entry>y<subscript>5</subscript></entry> | ||
| 2537 | <entry>y<subscript>4</subscript></entry> | ||
| 2538 | <entry>y<subscript>3</subscript></entry> | ||
| 2539 | <entry>y<subscript>2</subscript></entry> | ||
| 2540 | <entry>y<subscript>1</subscript></entry> | ||
| 2541 | <entry>y<subscript>0</subscript></entry> | ||
| 2542 | </row> | ||
| 2311 | <row id="V4L2-MBUS-FMT-YUYV10-1X20"> | 2543 | <row id="V4L2-MBUS-FMT-YUYV10-1X20"> |
| 2312 | <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry> | 2544 | <entry>V4L2_MBUS_FMT_YUYV10_1X20</entry> |
| 2313 | <entry>0x200d</entry> | 2545 | <entry>0x200d</entry> |
| @@ -2486,6 +2718,534 @@ | |||
| 2486 | <entry>v<subscript>1</subscript></entry> | 2718 | <entry>v<subscript>1</subscript></entry> |
| 2487 | <entry>v<subscript>0</subscript></entry> | 2719 | <entry>v<subscript>0</subscript></entry> |
| 2488 | </row> | 2720 | </row> |
| 2721 | <row id="V4L2-MBUS-FMT-UYVY12-2X12"> | ||
| 2722 | <entry>V4L2_MBUS_FMT_UYVY12_2X12</entry> | ||
| 2723 | <entry>0x201c</entry> | ||
| 2724 | <entry></entry> | ||
| 2725 | &dash-ent-20; | ||
| 2726 | <entry>u<subscript>11</subscript></entry> | ||
| 2727 | <entry>u<subscript>10</subscript></entry> | ||
| 2728 | <entry>u<subscript>9</subscript></entry> | ||
| 2729 | <entry>u<subscript>8</subscript></entry> | ||
| 2730 | <entry>u<subscript>7</subscript></entry> | ||
| 2731 | <entry>u<subscript>6</subscript></entry> | ||
| 2732 | <entry>u<subscript>5</subscript></entry> | ||
| 2733 | <entry>u<subscript>4</subscript></entry> | ||
| 2734 | <entry>u<subscript>3</subscript></entry> | ||
| 2735 | <entry>u<subscript>2</subscript></entry> | ||
| 2736 | <entry>u<subscript>1</subscript></entry> | ||
| 2737 | <entry>u<subscript>0</subscript></entry> | ||
| 2738 | </row> | ||
| 2739 | <row> | ||
| 2740 | <entry></entry> | ||
| 2741 | <entry></entry> | ||
| 2742 | <entry></entry> | ||
| 2743 | &dash-ent-20; | ||
| 2744 | <entry>y<subscript>11</subscript></entry> | ||
| 2745 | <entry>y<subscript>10</subscript></entry> | ||
| 2746 | <entry>y<subscript>9</subscript></entry> | ||
| 2747 | <entry>y<subscript>8</subscript></entry> | ||
| 2748 | <entry>y<subscript>7</subscript></entry> | ||
| 2749 | <entry>y<subscript>6</subscript></entry> | ||
| 2750 | <entry>y<subscript>5</subscript></entry> | ||
| 2751 | <entry>y<subscript>4</subscript></entry> | ||
| 2752 | <entry>y<subscript>3</subscript></entry> | ||
| 2753 | <entry>y<subscript>2</subscript></entry> | ||
| 2754 | <entry>y<subscript>1</subscript></entry> | ||
| 2755 | <entry>y<subscript>0</subscript></entry> | ||
| 2756 | </row> | ||
| 2757 | <row> | ||
| 2758 | <entry></entry> | ||
| 2759 | <entry></entry> | ||
| 2760 | <entry></entry> | ||
| 2761 | &dash-ent-20; | ||
| 2762 | <entry>v<subscript>11</subscript></entry> | ||
| 2763 | <entry>v<subscript>10</subscript></entry> | ||
| 2764 | <entry>v<subscript>9</subscript></entry> | ||
| 2765 | <entry>v<subscript>8</subscript></entry> | ||
| 2766 | <entry>v<subscript>7</subscript></entry> | ||
| 2767 | <entry>v<subscript>6</subscript></entry> | ||
| 2768 | <entry>v<subscript>5</subscript></entry> | ||
| 2769 | <entry>v<subscript>4</subscript></entry> | ||
| 2770 | <entry>v<subscript>3</subscript></entry> | ||
| 2771 | <entry>v<subscript>2</subscript></entry> | ||
| 2772 | <entry>v<subscript>1</subscript></entry> | ||
| 2773 | <entry>v<subscript>0</subscript></entry> | ||
| 2774 | </row> | ||
| 2775 | <row> | ||
| 2776 | <entry></entry> | ||
| 2777 | <entry></entry> | ||
| 2778 | <entry></entry> | ||
| 2779 | &dash-ent-20; | ||
| 2780 | <entry>y<subscript>11</subscript></entry> | ||
| 2781 | <entry>y<subscript>10</subscript></entry> | ||
| 2782 | <entry>y<subscript>9</subscript></entry> | ||
| 2783 | <entry>y<subscript>8</subscript></entry> | ||
| 2784 | <entry>y<subscript>7</subscript></entry> | ||
| 2785 | <entry>y<subscript>6</subscript></entry> | ||
| 2786 | <entry>y<subscript>5</subscript></entry> | ||
| 2787 | <entry>y<subscript>4</subscript></entry> | ||
| 2788 | <entry>y<subscript>3</subscript></entry> | ||
| 2789 | <entry>y<subscript>2</subscript></entry> | ||
| 2790 | <entry>y<subscript>1</subscript></entry> | ||
| 2791 | <entry>y<subscript>0</subscript></entry> | ||
| 2792 | </row> | ||
| 2793 | <row id="V4L2-MBUS-FMT-VYUY12-2X12"> | ||
| 2794 | <entry>V4L2_MBUS_FMT_VYUY12_2X12</entry> | ||
| 2795 | <entry>0x201d</entry> | ||
| 2796 | <entry></entry> | ||
| 2797 | &dash-ent-20; | ||
| 2798 | <entry>v<subscript>11</subscript></entry> | ||
| 2799 | <entry>v<subscript>10</subscript></entry> | ||
| 2800 | <entry>v<subscript>9</subscript></entry> | ||
| 2801 | <entry>v<subscript>8</subscript></entry> | ||
| 2802 | <entry>v<subscript>7</subscript></entry> | ||
| 2803 | <entry>v<subscript>6</subscript></entry> | ||
| 2804 | <entry>v<subscript>5</subscript></entry> | ||
| 2805 | <entry>v<subscript>4</subscript></entry> | ||
| 2806 | <entry>v<subscript>3</subscript></entry> | ||
| 2807 | <entry>v<subscript>2</subscript></entry> | ||
| 2808 | <entry>v<subscript>1</subscript></entry> | ||
| 2809 | <entry>v<subscript>0</subscript></entry> | ||
| 2810 | </row> | ||
| 2811 | <row> | ||
| 2812 | <entry></entry> | ||
| 2813 | <entry></entry> | ||
| 2814 | <entry></entry> | ||
| 2815 | &dash-ent-20; | ||
| 2816 | <entry>y<subscript>11</subscript></entry> | ||
| 2817 | <entry>y<subscript>10</subscript></entry> | ||
| 2818 | <entry>y<subscript>9</subscript></entry> | ||
| 2819 | <entry>y<subscript>8</subscript></entry> | ||
| 2820 | <entry>y<subscript>7</subscript></entry> | ||
| 2821 | <entry>y<subscript>6</subscript></entry> | ||
| 2822 | <entry>y<subscript>5</subscript></entry> | ||
| 2823 | <entry>y<subscript>4</subscript></entry> | ||
| 2824 | <entry>y<subscript>3</subscript></entry> | ||
| 2825 | <entry>y<subscript>2</subscript></entry> | ||
| 2826 | <entry>y<subscript>1</subscript></entry> | ||
| 2827 | <entry>y<subscript>0</subscript></entry> | ||
| 2828 | </row> | ||
| 2829 | <row> | ||
| 2830 | <entry></entry> | ||
| 2831 | <entry></entry> | ||
| 2832 | <entry></entry> | ||
| 2833 | &dash-ent-20; | ||
| 2834 | <entry>u<subscript>11</subscript></entry> | ||
| 2835 | <entry>u<subscript>10</subscript></entry> | ||
| 2836 | <entry>u<subscript>9</subscript></entry> | ||
| 2837 | <entry>u<subscript>8</subscript></entry> | ||
| 2838 | <entry>u<subscript>7</subscript></entry> | ||
| 2839 | <entry>u<subscript>6</subscript></entry> | ||
| 2840 | <entry>u<subscript>5</subscript></entry> | ||
| 2841 | <entry>u<subscript>4</subscript></entry> | ||
| 2842 | <entry>u<subscript>3</subscript></entry> | ||
| 2843 | <entry>u<subscript>2</subscript></entry> | ||
| 2844 | <entry>u<subscript>1</subscript></entry> | ||
| 2845 | <entry>u<subscript>0</subscript></entry> | ||
| 2846 | </row> | ||
| 2847 | <row> | ||
| 2848 | <entry></entry> | ||
| 2849 | <entry></entry> | ||
| 2850 | <entry></entry> | ||
| 2851 | &dash-ent-20; | ||
| 2852 | <entry>y<subscript>11</subscript></entry> | ||
| 2853 | <entry>y<subscript>10</subscript></entry> | ||
| 2854 | <entry>y<subscript>9</subscript></entry> | ||
| 2855 | <entry>y<subscript>8</subscript></entry> | ||
| 2856 | <entry>y<subscript>7</subscript></entry> | ||
| 2857 | <entry>y<subscript>6</subscript></entry> | ||
| 2858 | <entry>y<subscript>5</subscript></entry> | ||
| 2859 | <entry>y<subscript>4</subscript></entry> | ||
| 2860 | <entry>y<subscript>3</subscript></entry> | ||
| 2861 | <entry>y<subscript>2</subscript></entry> | ||
| 2862 | <entry>y<subscript>1</subscript></entry> | ||
| 2863 | <entry>y<subscript>0</subscript></entry> | ||
| 2864 | </row> | ||
| 2865 | <row id="V4L2-MBUS-FMT-YUYV12-2X12"> | ||
| 2866 | <entry>V4L2_MBUS_FMT_YUYV12_2X12</entry> | ||
| 2867 | <entry>0x201e</entry> | ||
| 2868 | <entry></entry> | ||
| 2869 | &dash-ent-20; | ||
| 2870 | <entry>y<subscript>11</subscript></entry> | ||
| 2871 | <entry>y<subscript>10</subscript></entry> | ||
| 2872 | <entry>y<subscript>9</subscript></entry> | ||
| 2873 | <entry>y<subscript>8</subscript></entry> | ||
| 2874 | <entry>y<subscript>7</subscript></entry> | ||
| 2875 | <entry>y<subscript>6</subscript></entry> | ||
| 2876 | <entry>y<subscript>5</subscript></entry> | ||
| 2877 | <entry>y<subscript>4</subscript></entry> | ||
| 2878 | <entry>y<subscript>3</subscript></entry> | ||
| 2879 | <entry>y<subscript>2</subscript></entry> | ||
| 2880 | <entry>y<subscript>1</subscript></entry> | ||
| 2881 | <entry>y<subscript>0</subscript></entry> | ||
| 2882 | </row> | ||
| 2883 | <row> | ||
| 2884 | <entry></entry> | ||
| 2885 | <entry></entry> | ||
| 2886 | <entry></entry> | ||
| 2887 | &dash-ent-20; | ||
| 2888 | <entry>u<subscript>11</subscript></entry> | ||
| 2889 | <entry>u<subscript>10</subscript></entry> | ||
| 2890 | <entry>u<subscript>9</subscript></entry> | ||
| 2891 | <entry>u<subscript>8</subscript></entry> | ||
| 2892 | <entry>u<subscript>7</subscript></entry> | ||
| 2893 | <entry>u<subscript>6</subscript></entry> | ||
| 2894 | <entry>u<subscript>5</subscript></entry> | ||
| 2895 | <entry>u<subscript>4</subscript></entry> | ||
| 2896 | <entry>u<subscript>3</subscript></entry> | ||
| 2897 | <entry>u<subscript>2</subscript></entry> | ||
| 2898 | <entry>u<subscript>1</subscript></entry> | ||
| 2899 | <entry>u<subscript>0</subscript></entry> | ||
| 2900 | </row> | ||
| 2901 | <row> | ||
| 2902 | <entry></entry> | ||
| 2903 | <entry></entry> | ||
| 2904 | <entry></entry> | ||
| 2905 | &dash-ent-20; | ||
| 2906 | <entry>y<subscript>11</subscript></entry> | ||
| 2907 | <entry>y<subscript>10</subscript></entry> | ||
| 2908 | <entry>y<subscript>9</subscript></entry> | ||
| 2909 | <entry>y<subscript>8</subscript></entry> | ||
| 2910 | <entry>y<subscript>7</subscript></entry> | ||
| 2911 | <entry>y<subscript>6</subscript></entry> | ||
| 2912 | <entry>y<subscript>5</subscript></entry> | ||
| 2913 | <entry>y<subscript>4</subscript></entry> | ||
| 2914 | <entry>y<subscript>3</subscript></entry> | ||
| 2915 | <entry>y<subscript>2</subscript></entry> | ||
| 2916 | <entry>y<subscript>1</subscript></entry> | ||
| 2917 | <entry>y<subscript>0</subscript></entry> | ||
| 2918 | </row> | ||
| 2919 | <row> | ||
| 2920 | <entry></entry> | ||
| 2921 | <entry></entry> | ||
| 2922 | <entry></entry> | ||
| 2923 | &dash-ent-20; | ||
| 2924 | <entry>v<subscript>11</subscript></entry> | ||
| 2925 | <entry>v<subscript>10</subscript></entry> | ||
| 2926 | <entry>v<subscript>9</subscript></entry> | ||
| 2927 | <entry>v<subscript>8</subscript></entry> | ||
| 2928 | <entry>v<subscript>7</subscript></entry> | ||
| 2929 | <entry>v<subscript>6</subscript></entry> | ||
| 2930 | <entry>v<subscript>5</subscript></entry> | ||
| 2931 | <entry>v<subscript>4</subscript></entry> | ||
| 2932 | <entry>v<subscript>3</subscript></entry> | ||
| 2933 | <entry>v<subscript>2</subscript></entry> | ||
| 2934 | <entry>v<subscript>1</subscript></entry> | ||
| 2935 | <entry>v<subscript>0</subscript></entry> | ||
| 2936 | </row> | ||
| 2937 | <row id="V4L2-MBUS-FMT-YVYU12-2X12"> | ||
| 2938 | <entry>V4L2_MBUS_FMT_YVYU12_2X12</entry> | ||
| 2939 | <entry>0x201f</entry> | ||
| 2940 | <entry></entry> | ||
| 2941 | &dash-ent-20; | ||
| 2942 | <entry>y<subscript>11</subscript></entry> | ||
| 2943 | <entry>y<subscript>10</subscript></entry> | ||
| 2944 | <entry>y<subscript>9</subscript></entry> | ||
| 2945 | <entry>y<subscript>8</subscript></entry> | ||
| 2946 | <entry>y<subscript>7</subscript></entry> | ||
| 2947 | <entry>y<subscript>6</subscript></entry> | ||
| 2948 | <entry>y<subscript>5</subscript></entry> | ||
| 2949 | <entry>y<subscript>4</subscript></entry> | ||
| 2950 | <entry>y<subscript>3</subscript></entry> | ||
| 2951 | <entry>y<subscript>2</subscript></entry> | ||
| 2952 | <entry>y<subscript>1</subscript></entry> | ||
| 2953 | <entry>y<subscript>0</subscript></entry> | ||
| 2954 | </row> | ||
| 2955 | <row> | ||
| 2956 | <entry></entry> | ||
| 2957 | <entry></entry> | ||
| 2958 | <entry></entry> | ||
| 2959 | &dash-ent-20; | ||
| 2960 | <entry>v<subscript>11</subscript></entry> | ||
| 2961 | <entry>v<subscript>10</subscript></entry> | ||
| 2962 | <entry>v<subscript>9</subscript></entry> | ||
| 2963 | <entry>v<subscript>8</subscript></entry> | ||
| 2964 | <entry>v<subscript>7</subscript></entry> | ||
| 2965 | <entry>v<subscript>6</subscript></entry> | ||
| 2966 | <entry>v<subscript>5</subscript></entry> | ||
| 2967 | <entry>v<subscript>4</subscript></entry> | ||
| 2968 | <entry>v<subscript>3</subscript></entry> | ||
| 2969 | <entry>v<subscript>2</subscript></entry> | ||
| 2970 | <entry>v<subscript>1</subscript></entry> | ||
| 2971 | <entry>v<subscript>0</subscript></entry> | ||
| 2972 | </row> | ||
| 2973 | <row> | ||
| 2974 | <entry></entry> | ||
| 2975 | <entry></entry> | ||
| 2976 | <entry></entry> | ||
| 2977 | &dash-ent-20; | ||
| 2978 | <entry>y<subscript>11</subscript></entry> | ||
| 2979 | <entry>y<subscript>10</subscript></entry> | ||
| 2980 | <entry>y<subscript>9</subscript></entry> | ||
| 2981 | <entry>y<subscript>8</subscript></entry> | ||
| 2982 | <entry>y<subscript>7</subscript></entry> | ||
| 2983 | <entry>y<subscript>6</subscript></entry> | ||
| 2984 | <entry>y<subscript>5</subscript></entry> | ||
| 2985 | <entry>y<subscript>4</subscript></entry> | ||
| 2986 | <entry>y<subscript>3</subscript></entry> | ||
| 2987 | <entry>y<subscript>2</subscript></entry> | ||
| 2988 | <entry>y<subscript>1</subscript></entry> | ||
| 2989 | <entry>y<subscript>0</subscript></entry> | ||
| 2990 | </row> | ||
| 2991 | <row> | ||
| 2992 | <entry></entry> | ||
| 2993 | <entry></entry> | ||
| 2994 | <entry></entry> | ||
| 2995 | &dash-ent-20; | ||
| 2996 | <entry>u<subscript>11</subscript></entry> | ||
| 2997 | <entry>u<subscript>10</subscript></entry> | ||
| 2998 | <entry>u<subscript>9</subscript></entry> | ||
| 2999 | <entry>u<subscript>8</subscript></entry> | ||
| 3000 | <entry>u<subscript>7</subscript></entry> | ||
| 3001 | <entry>u<subscript>6</subscript></entry> | ||
| 3002 | <entry>u<subscript>5</subscript></entry> | ||
| 3003 | <entry>u<subscript>4</subscript></entry> | ||
| 3004 | <entry>u<subscript>3</subscript></entry> | ||
| 3005 | <entry>u<subscript>2</subscript></entry> | ||
| 3006 | <entry>u<subscript>1</subscript></entry> | ||
| 3007 | <entry>u<subscript>0</subscript></entry> | ||
| 3008 | </row> | ||
| 3009 | <row id="V4L2-MBUS-FMT-UYVY12-1X24"> | ||
| 3010 | <entry>V4L2_MBUS_FMT_UYVY12_1X24</entry> | ||
| 3011 | <entry>0x2020</entry> | ||
| 3012 | <entry></entry> | ||
| 3013 | &dash-ent-8; | ||
| 3014 | <entry>u<subscript>11</subscript></entry> | ||
| 3015 | <entry>u<subscript>10</subscript></entry> | ||
| 3016 | <entry>u<subscript>9</subscript></entry> | ||
| 3017 | <entry>u<subscript>8</subscript></entry> | ||
| 3018 | <entry>u<subscript>7</subscript></entry> | ||
| 3019 | <entry>u<subscript>6</subscript></entry> | ||
| 3020 | <entry>u<subscript>5</subscript></entry> | ||
| 3021 | <entry>u<subscript>4</subscript></entry> | ||
| 3022 | <entry>u<subscript>3</subscript></entry> | ||
| 3023 | <entry>u<subscript>2</subscript></entry> | ||
| 3024 | <entry>u<subscript>1</subscript></entry> | ||
| 3025 | <entry>u<subscript>0</subscript></entry> | ||
| 3026 | <entry>y<subscript>11</subscript></entry> | ||
| 3027 | <entry>y<subscript>10</subscript></entry> | ||
| 3028 | <entry>y<subscript>9</subscript></entry> | ||
| 3029 | <entry>y<subscript>8</subscript></entry> | ||
| 3030 | <entry>y<subscript>7</subscript></entry> | ||
| 3031 | <entry>y<subscript>6</subscript></entry> | ||
| 3032 | <entry>y<subscript>5</subscript></entry> | ||
| 3033 | <entry>y<subscript>4</subscript></entry> | ||
| 3034 | <entry>y<subscript>3</subscript></entry> | ||
| 3035 | <entry>y<subscript>2</subscript></entry> | ||
| 3036 | <entry>y<subscript>1</subscript></entry> | ||
| 3037 | <entry>y<subscript>0</subscript></entry> | ||
| 3038 | </row> | ||
| 3039 | <row> | ||
| 3040 | <entry></entry> | ||
| 3041 | <entry></entry> | ||
| 3042 | <entry></entry> | ||
| 3043 | &dash-ent-8; | ||
| 3044 | <entry>v<subscript>11</subscript></entry> | ||
| 3045 | <entry>v<subscript>10</subscript></entry> | ||
| 3046 | <entry>v<subscript>9</subscript></entry> | ||
| 3047 | <entry>v<subscript>8</subscript></entry> | ||
| 3048 | <entry>v<subscript>7</subscript></entry> | ||
| 3049 | <entry>v<subscript>6</subscript></entry> | ||
| 3050 | <entry>v<subscript>5</subscript></entry> | ||
| 3051 | <entry>v<subscript>4</subscript></entry> | ||
| 3052 | <entry>v<subscript>3</subscript></entry> | ||
| 3053 | <entry>v<subscript>2</subscript></entry> | ||
| 3054 | <entry>v<subscript>1</subscript></entry> | ||
| 3055 | <entry>v<subscript>0</subscript></entry> | ||
| 3056 | <entry>y<subscript>11</subscript></entry> | ||
| 3057 | <entry>y<subscript>10</subscript></entry> | ||
| 3058 | <entry>y<subscript>9</subscript></entry> | ||
| 3059 | <entry>y<subscript>8</subscript></entry> | ||
| 3060 | <entry>y<subscript>7</subscript></entry> | ||
| 3061 | <entry>y<subscript>6</subscript></entry> | ||
| 3062 | <entry>y<subscript>5</subscript></entry> | ||
| 3063 | <entry>y<subscript>4</subscript></entry> | ||
| 3064 | <entry>y<subscript>3</subscript></entry> | ||
| 3065 | <entry>y<subscript>2</subscript></entry> | ||
| 3066 | <entry>y<subscript>1</subscript></entry> | ||
| 3067 | <entry>y<subscript>0</subscript></entry> | ||
| 3068 | </row> | ||
| 3069 | <row id="V4L2-MBUS-FMT-VYUY12-1X24"> | ||
| 3070 | <entry>V4L2_MBUS_FMT_VYUY12_1X24</entry> | ||
| 3071 | <entry>0x2021</entry> | ||
| 3072 | <entry></entry> | ||
| 3073 | &dash-ent-8; | ||
| 3074 | <entry>v<subscript>11</subscript></entry> | ||
| 3075 | <entry>v<subscript>10</subscript></entry> | ||
| 3076 | <entry>v<subscript>9</subscript></entry> | ||
| 3077 | <entry>v<subscript>8</subscript></entry> | ||
| 3078 | <entry>v<subscript>7</subscript></entry> | ||
| 3079 | <entry>v<subscript>6</subscript></entry> | ||
| 3080 | <entry>v<subscript>5</subscript></entry> | ||
| 3081 | <entry>v<subscript>4</subscript></entry> | ||
| 3082 | <entry>v<subscript>3</subscript></entry> | ||
| 3083 | <entry>v<subscript>2</subscript></entry> | ||
| 3084 | <entry>v<subscript>1</subscript></entry> | ||
| 3085 | <entry>v<subscript>0</subscript></entry> | ||
| 3086 | <entry>y<subscript>11</subscript></entry> | ||
| 3087 | <entry>y<subscript>10</subscript></entry> | ||
| 3088 | <entry>y<subscript>9</subscript></entry> | ||
| 3089 | <entry>y<subscript>8</subscript></entry> | ||
| 3090 | <entry>y<subscript>7</subscript></entry> | ||
| 3091 | <entry>y<subscript>6</subscript></entry> | ||
| 3092 | <entry>y<subscript>5</subscript></entry> | ||
| 3093 | <entry>y<subscript>4</subscript></entry> | ||
| 3094 | <entry>y<subscript>3</subscript></entry> | ||
| 3095 | <entry>y<subscript>2</subscript></entry> | ||
| 3096 | <entry>y<subscript>1</subscript></entry> | ||
| 3097 | <entry>y<subscript>0</subscript></entry> | ||
| 3098 | </row> | ||
| 3099 | <row> | ||
| 3100 | <entry></entry> | ||
| 3101 | <entry></entry> | ||
| 3102 | <entry></entry> | ||
| 3103 | &dash-ent-8; | ||
| 3104 | <entry>u<subscript>11</subscript></entry> | ||
| 3105 | <entry>u<subscript>10</subscript></entry> | ||
| 3106 | <entry>u<subscript>9</subscript></entry> | ||
| 3107 | <entry>u<subscript>8</subscript></entry> | ||
| 3108 | <entry>u<subscript>7</subscript></entry> | ||
| 3109 | <entry>u<subscript>6</subscript></entry> | ||
| 3110 | <entry>u<subscript>5</subscript></entry> | ||
| 3111 | <entry>u<subscript>4</subscript></entry> | ||
| 3112 | <entry>u<subscript>3</subscript></entry> | ||
| 3113 | <entry>u<subscript>2</subscript></entry> | ||
| 3114 | <entry>u<subscript>1</subscript></entry> | ||
| 3115 | <entry>u<subscript>0</subscript></entry> | ||
| 3116 | <entry>y<subscript>11</subscript></entry> | ||
| 3117 | <entry>y<subscript>10</subscript></entry> | ||
| 3118 | <entry>y<subscript>9</subscript></entry> | ||
| 3119 | <entry>y<subscript>8</subscript></entry> | ||
| 3120 | <entry>y<subscript>7</subscript></entry> | ||
| 3121 | <entry>y<subscript>6</subscript></entry> | ||
| 3122 | <entry>y<subscript>5</subscript></entry> | ||
| 3123 | <entry>y<subscript>4</subscript></entry> | ||
| 3124 | <entry>y<subscript>3</subscript></entry> | ||
| 3125 | <entry>y<subscript>2</subscript></entry> | ||
| 3126 | <entry>y<subscript>1</subscript></entry> | ||
| 3127 | <entry>y<subscript>0</subscript></entry> | ||
| 3128 | </row> | ||
| 3129 | <row id="V4L2-MBUS-FMT-YUYV12-1X24"> | ||
| 3130 | <entry>V4L2_MBUS_FMT_YUYV12_1X24</entry> | ||
| 3131 | <entry>0x2022</entry> | ||
| 3132 | <entry></entry> | ||
| 3133 | &dash-ent-8; | ||
| 3134 | <entry>y<subscript>11</subscript></entry> | ||
| 3135 | <entry>y<subscript>10</subscript></entry> | ||
| 3136 | <entry>y<subscript>9</subscript></entry> | ||
| 3137 | <entry>y<subscript>8</subscript></entry> | ||
| 3138 | <entry>y<subscript>7</subscript></entry> | ||
| 3139 | <entry>y<subscript>6</subscript></entry> | ||
| 3140 | <entry>y<subscript>5</subscript></entry> | ||
| 3141 | <entry>y<subscript>4</subscript></entry> | ||
| 3142 | <entry>y<subscript>3</subscript></entry> | ||
| 3143 | <entry>y<subscript>2</subscript></entry> | ||
| 3144 | <entry>y<subscript>1</subscript></entry> | ||
| 3145 | <entry>y<subscript>0</subscript></entry> | ||
| 3146 | <entry>u<subscript>11</subscript></entry> | ||
| 3147 | <entry>u<subscript>10</subscript></entry> | ||
| 3148 | <entry>u<subscript>9</subscript></entry> | ||
| 3149 | <entry>u<subscript>8</subscript></entry> | ||
| 3150 | <entry>u<subscript>7</subscript></entry> | ||
| 3151 | <entry>u<subscript>6</subscript></entry> | ||
| 3152 | <entry>u<subscript>5</subscript></entry> | ||
| 3153 | <entry>u<subscript>4</subscript></entry> | ||
| 3154 | <entry>u<subscript>3</subscript></entry> | ||
| 3155 | <entry>u<subscript>2</subscript></entry> | ||
| 3156 | <entry>u<subscript>1</subscript></entry> | ||
| 3157 | <entry>u<subscript>0</subscript></entry> | ||
| 3158 | </row> | ||
| 3159 | <row> | ||
| 3160 | <entry></entry> | ||
| 3161 | <entry></entry> | ||
| 3162 | <entry></entry> | ||
| 3163 | &dash-ent-8; | ||
| 3164 | <entry>y<subscript>11</subscript></entry> | ||
| 3165 | <entry>y<subscript>10</subscript></entry> | ||
| 3166 | <entry>y<subscript>9</subscript></entry> | ||
| 3167 | <entry>y<subscript>8</subscript></entry> | ||
| 3168 | <entry>y<subscript>7</subscript></entry> | ||
| 3169 | <entry>y<subscript>6</subscript></entry> | ||
| 3170 | <entry>y<subscript>5</subscript></entry> | ||
| 3171 | <entry>y<subscript>4</subscript></entry> | ||
| 3172 | <entry>y<subscript>3</subscript></entry> | ||
| 3173 | <entry>y<subscript>2</subscript></entry> | ||
| 3174 | <entry>y<subscript>1</subscript></entry> | ||
| 3175 | <entry>y<subscript>0</subscript></entry> | ||
| 3176 | <entry>v<subscript>11</subscript></entry> | ||
| 3177 | <entry>v<subscript>10</subscript></entry> | ||
| 3178 | <entry>v<subscript>9</subscript></entry> | ||
| 3179 | <entry>v<subscript>8</subscript></entry> | ||
| 3180 | <entry>v<subscript>7</subscript></entry> | ||
| 3181 | <entry>v<subscript>6</subscript></entry> | ||
| 3182 | <entry>v<subscript>5</subscript></entry> | ||
| 3183 | <entry>v<subscript>4</subscript></entry> | ||
| 3184 | <entry>v<subscript>3</subscript></entry> | ||
| 3185 | <entry>v<subscript>2</subscript></entry> | ||
| 3186 | <entry>v<subscript>1</subscript></entry> | ||
| 3187 | <entry>v<subscript>0</subscript></entry> | ||
| 3188 | </row> | ||
| 3189 | <row id="V4L2-MBUS-FMT-YVYU12-1X24"> | ||
| 3190 | <entry>V4L2_MBUS_FMT_YVYU12_1X24</entry> | ||
| 3191 | <entry>0x2023</entry> | ||
| 3192 | <entry></entry> | ||
| 3193 | &dash-ent-8; | ||
| 3194 | <entry>y<subscript>11</subscript></entry> | ||
| 3195 | <entry>y<subscript>10</subscript></entry> | ||
| 3196 | <entry>y<subscript>9</subscript></entry> | ||
| 3197 | <entry>y<subscript>8</subscript></entry> | ||
| 3198 | <entry>y<subscript>7</subscript></entry> | ||
| 3199 | <entry>y<subscript>6</subscript></entry> | ||
| 3200 | <entry>y<subscript>5</subscript></entry> | ||
| 3201 | <entry>y<subscript>4</subscript></entry> | ||
| 3202 | <entry>y<subscript>3</subscript></entry> | ||
| 3203 | <entry>y<subscript>2</subscript></entry> | ||
| 3204 | <entry>y<subscript>1</subscript></entry> | ||
| 3205 | <entry>y<subscript>0</subscript></entry> | ||
| 3206 | <entry>v<subscript>11</subscript></entry> | ||
| 3207 | <entry>v<subscript>10</subscript></entry> | ||
| 3208 | <entry>v<subscript>9</subscript></entry> | ||
| 3209 | <entry>v<subscript>8</subscript></entry> | ||
| 3210 | <entry>v<subscript>7</subscript></entry> | ||
| 3211 | <entry>v<subscript>6</subscript></entry> | ||
| 3212 | <entry>v<subscript>5</subscript></entry> | ||
| 3213 | <entry>v<subscript>4</subscript></entry> | ||
| 3214 | <entry>v<subscript>3</subscript></entry> | ||
| 3215 | <entry>v<subscript>2</subscript></entry> | ||
| 3216 | <entry>v<subscript>1</subscript></entry> | ||
| 3217 | <entry>v<subscript>0</subscript></entry> | ||
| 3218 | </row> | ||
| 3219 | <row> | ||
| 3220 | <entry></entry> | ||
| 3221 | <entry></entry> | ||
| 3222 | <entry></entry> | ||
| 3223 | &dash-ent-8; | ||
| 3224 | <entry>y<subscript>11</subscript></entry> | ||
| 3225 | <entry>y<subscript>10</subscript></entry> | ||
| 3226 | <entry>y<subscript>9</subscript></entry> | ||
| 3227 | <entry>y<subscript>8</subscript></entry> | ||
| 3228 | <entry>y<subscript>7</subscript></entry> | ||
| 3229 | <entry>y<subscript>6</subscript></entry> | ||
| 3230 | <entry>y<subscript>5</subscript></entry> | ||
| 3231 | <entry>y<subscript>4</subscript></entry> | ||
| 3232 | <entry>y<subscript>3</subscript></entry> | ||
| 3233 | <entry>y<subscript>2</subscript></entry> | ||
| 3234 | <entry>y<subscript>1</subscript></entry> | ||
| 3235 | <entry>y<subscript>0</subscript></entry> | ||
| 3236 | <entry>u<subscript>11</subscript></entry> | ||
| 3237 | <entry>u<subscript>10</subscript></entry> | ||
| 3238 | <entry>u<subscript>9</subscript></entry> | ||
| 3239 | <entry>u<subscript>8</subscript></entry> | ||
| 3240 | <entry>u<subscript>7</subscript></entry> | ||
| 3241 | <entry>u<subscript>6</subscript></entry> | ||
| 3242 | <entry>u<subscript>5</subscript></entry> | ||
| 3243 | <entry>u<subscript>4</subscript></entry> | ||
| 3244 | <entry>u<subscript>3</subscript></entry> | ||
| 3245 | <entry>u<subscript>2</subscript></entry> | ||
| 3246 | <entry>u<subscript>1</subscript></entry> | ||
| 3247 | <entry>u<subscript>0</subscript></entry> | ||
| 3248 | </row> | ||
| 2489 | </tbody> | 3249 | </tbody> |
| 2490 | </tgroup> | 3250 | </tgroup> |
| 2491 | </table> | 3251 | </table> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml index 89891adb928a..820f86e8744b 100644 --- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml +++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml | |||
| @@ -242,6 +242,22 @@ | |||
| 242 | </tgroup> | 242 | </tgroup> |
| 243 | </table> | 243 | </table> |
| 244 | 244 | ||
| 245 | <table frame="none" pgwide="1" id="v4l2-event-src-change"> | ||
| 246 | <title>struct <structname>v4l2_event_src_change</structname></title> | ||
| 247 | <tgroup cols="3"> | ||
| 248 | &cs-str; | ||
| 249 | <tbody valign="top"> | ||
| 250 | <row> | ||
| 251 | <entry>__u32</entry> | ||
| 252 | <entry><structfield>changes</structfield></entry> | ||
| 253 | <entry> | ||
| 254 | A bitmask that tells what has changed. See <xref linkend="src-changes-flags" />. | ||
| 255 | </entry> | ||
| 256 | </row> | ||
| 257 | </tbody> | ||
| 258 | </tgroup> | ||
| 259 | </table> | ||
| 260 | |||
| 245 | <table pgwide="1" frame="none" id="changes-flags"> | 261 | <table pgwide="1" frame="none" id="changes-flags"> |
| 246 | <title>Changes</title> | 262 | <title>Changes</title> |
| 247 | <tgroup cols="3"> | 263 | <tgroup cols="3"> |
| @@ -270,6 +286,23 @@ | |||
| 270 | </tbody> | 286 | </tbody> |
| 271 | </tgroup> | 287 | </tgroup> |
| 272 | </table> | 288 | </table> |
| 289 | |||
| 290 | <table pgwide="1" frame="none" id="src-changes-flags"> | ||
| 291 | <title>Source Changes</title> | ||
| 292 | <tgroup cols="3"> | ||
| 293 | &cs-def; | ||
| 294 | <tbody valign="top"> | ||
| 295 | <row> | ||
| 296 | <entry><constant>V4L2_EVENT_SRC_CH_RESOLUTION</constant></entry> | ||
| 297 | <entry>0x0001</entry> | ||
| 298 | <entry>This event gets triggered when a resolution change is | ||
| 299 | detected at an input. This can come from an input connector or | ||
| 300 | from a video decoder. | ||
| 301 | </entry> | ||
| 302 | </row> | ||
| 303 | </tbody> | ||
| 304 | </tgroup> | ||
| 305 | </table> | ||
| 273 | </refsect1> | 306 | </refsect1> |
| 274 | <refsect1> | 307 | <refsect1> |
| 275 | &return-value; | 308 | &return-value; |
diff --git a/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml b/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml index cd7720d404ea..28a8c1e1c705 100644 --- a/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml +++ b/Documentation/DocBook/media/v4l/vidioc-dv-timings-cap.xml | |||
| @@ -1,11 +1,12 @@ | |||
| 1 | <refentry id="vidioc-dv-timings-cap"> | 1 | <refentry id="vidioc-dv-timings-cap"> |
| 2 | <refmeta> | 2 | <refmeta> |
| 3 | <refentrytitle>ioctl VIDIOC_DV_TIMINGS_CAP</refentrytitle> | 3 | <refentrytitle>ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP</refentrytitle> |
| 4 | &manvol; | 4 | &manvol; |
| 5 | </refmeta> | 5 | </refmeta> |
| 6 | 6 | ||
| 7 | <refnamediv> | 7 | <refnamediv> |
| 8 | <refname>VIDIOC_DV_TIMINGS_CAP</refname> | 8 | <refname>VIDIOC_DV_TIMINGS_CAP</refname> |
| 9 | <refname>VIDIOC_SUBDEV_DV_TIMINGS_CAP</refname> | ||
| 9 | <refpurpose>The capabilities of the Digital Video receiver/transmitter</refpurpose> | 10 | <refpurpose>The capabilities of the Digital Video receiver/transmitter</refpurpose> |
| 10 | </refnamediv> | 11 | </refnamediv> |
| 11 | 12 | ||
| @@ -33,7 +34,7 @@ | |||
| 33 | <varlistentry> | 34 | <varlistentry> |
| 34 | <term><parameter>request</parameter></term> | 35 | <term><parameter>request</parameter></term> |
| 35 | <listitem> | 36 | <listitem> |
| 36 | <para>VIDIOC_DV_TIMINGS_CAP</para> | 37 | <para>VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP</para> |
| 37 | </listitem> | 38 | </listitem> |
| 38 | </varlistentry> | 39 | </varlistentry> |
| 39 | <varlistentry> | 40 | <varlistentry> |
| @@ -54,10 +55,19 @@ | |||
| 54 | interface and may change in the future.</para> | 55 | interface and may change in the future.</para> |
| 55 | </note> | 56 | </note> |
| 56 | 57 | ||
| 57 | <para>To query the capabilities of the DV receiver/transmitter applications can call | 58 | <para>To query the capabilities of the DV receiver/transmitter applications |
| 58 | this ioctl and the driver will fill in the structure. Note that drivers may return | 59 | can call the <constant>VIDIOC_DV_TIMINGS_CAP</constant> ioctl on a video node |
| 60 | and the driver will fill in the structure. Note that drivers may return | ||
| 59 | different values after switching the video input or output.</para> | 61 | different values after switching the video input or output.</para> |
| 60 | 62 | ||
| 63 | <para>When implemented by the driver DV capabilities of subdevices can be | ||
| 64 | queried by calling the <constant>VIDIOC_SUBDEV_DV_TIMINGS_CAP</constant> ioctl | ||
| 65 | directly on a subdevice node. The capabilities are specific to inputs (for DV | ||
| 66 | receivers) or outputs (for DV transmitters), applications must specify the | ||
| 67 | desired pad number in the &v4l2-dv-timings-cap; <structfield>pad</structfield> | ||
| 68 | field. Attempts to query capabilities on a pad that doesn't support them will | ||
| 69 | return an &EINVAL;.</para> | ||
| 70 | |||
| 61 | <table pgwide="1" frame="none" id="v4l2-bt-timings-cap"> | 71 | <table pgwide="1" frame="none" id="v4l2-bt-timings-cap"> |
| 62 | <title>struct <structname>v4l2_bt_timings_cap</structname></title> | 72 | <title>struct <structname>v4l2_bt_timings_cap</structname></title> |
| 63 | <tgroup cols="3"> | 73 | <tgroup cols="3"> |
| @@ -127,7 +137,14 @@ different values after switching the video input or output.</para> | |||
| 127 | </row> | 137 | </row> |
| 128 | <row> | 138 | <row> |
| 129 | <entry>__u32</entry> | 139 | <entry>__u32</entry> |
| 130 | <entry><structfield>reserved</structfield>[3]</entry> | 140 | <entry><structfield>pad</structfield></entry> |
| 141 | <entry>Pad number as reported by the media controller API. This field | ||
| 142 | is only used when operating on a subdevice node. When operating on a | ||
| 143 | video node applications must set this field to zero.</entry> | ||
| 144 | </row> | ||
| 145 | <row> | ||
| 146 | <entry>__u32</entry> | ||
| 147 | <entry><structfield>reserved</structfield>[2]</entry> | ||
| 131 | <entry>Reserved for future extensions. Drivers must set the array to zero.</entry> | 148 | <entry>Reserved for future extensions. Drivers must set the array to zero.</entry> |
| 132 | </row> | 149 | </row> |
| 133 | <row> | 150 | <row> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml b/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml index b3e17c1dfaf5..b9fdfeacdbcb 100644 --- a/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml +++ b/Documentation/DocBook/media/v4l/vidioc-enum-dv-timings.xml | |||
| @@ -1,11 +1,12 @@ | |||
| 1 | <refentry id="vidioc-enum-dv-timings"> | 1 | <refentry id="vidioc-enum-dv-timings"> |
| 2 | <refmeta> | 2 | <refmeta> |
| 3 | <refentrytitle>ioctl VIDIOC_ENUM_DV_TIMINGS</refentrytitle> | 3 | <refentrytitle>ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS</refentrytitle> |
| 4 | &manvol; | 4 | &manvol; |
| 5 | </refmeta> | 5 | </refmeta> |
| 6 | 6 | ||
| 7 | <refnamediv> | 7 | <refnamediv> |
| 8 | <refname>VIDIOC_ENUM_DV_TIMINGS</refname> | 8 | <refname>VIDIOC_ENUM_DV_TIMINGS</refname> |
| 9 | <refname>VIDIOC_SUBDEV_ENUM_DV_TIMINGS</refname> | ||
| 9 | <refpurpose>Enumerate supported Digital Video timings</refpurpose> | 10 | <refpurpose>Enumerate supported Digital Video timings</refpurpose> |
| 10 | </refnamediv> | 11 | </refnamediv> |
| 11 | 12 | ||
| @@ -33,7 +34,7 @@ | |||
| 33 | <varlistentry> | 34 | <varlistentry> |
| 34 | <term><parameter>request</parameter></term> | 35 | <term><parameter>request</parameter></term> |
| 35 | <listitem> | 36 | <listitem> |
| 36 | <para>VIDIOC_ENUM_DV_TIMINGS</para> | 37 | <para>VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS</para> |
| 37 | </listitem> | 38 | </listitem> |
| 38 | </varlistentry> | 39 | </varlistentry> |
| 39 | <varlistentry> | 40 | <varlistentry> |
| @@ -61,14 +62,21 @@ standards or even custom timings that are not in this list.</para> | |||
| 61 | 62 | ||
| 62 | <para>To query the available timings, applications initialize the | 63 | <para>To query the available timings, applications initialize the |
| 63 | <structfield>index</structfield> field and zero the reserved array of &v4l2-enum-dv-timings; | 64 | <structfield>index</structfield> field and zero the reserved array of &v4l2-enum-dv-timings; |
| 64 | and call the <constant>VIDIOC_ENUM_DV_TIMINGS</constant> ioctl with a pointer to this | 65 | and call the <constant>VIDIOC_ENUM_DV_TIMINGS</constant> ioctl on a video node with a |
| 65 | structure. Drivers fill the rest of the structure or return an | 66 | pointer to this structure. Drivers fill the rest of the structure or return an |
| 66 | &EINVAL; when the index is out of bounds. To enumerate all supported DV timings, | 67 | &EINVAL; when the index is out of bounds. To enumerate all supported DV timings, |
| 67 | applications shall begin at index zero, incrementing by one until the | 68 | applications shall begin at index zero, incrementing by one until the |
| 68 | driver returns <errorcode>EINVAL</errorcode>. Note that drivers may enumerate a | 69 | driver returns <errorcode>EINVAL</errorcode>. Note that drivers may enumerate a |
| 69 | different set of DV timings after switching the video input or | 70 | different set of DV timings after switching the video input or |
| 70 | output.</para> | 71 | output.</para> |
| 71 | 72 | ||
| 73 | <para>When implemented by the driver DV timings of subdevices can be queried | ||
| 74 | by calling the <constant>VIDIOC_SUBDEV_ENUM_DV_TIMINGS</constant> ioctl directly | ||
| 75 | on a subdevice node. The DV timings are specific to inputs (for DV receivers) or | ||
| 76 | outputs (for DV transmitters), applications must specify the desired pad number | ||
| 77 | in the &v4l2-enum-dv-timings; <structfield>pad</structfield> field. Attempts to | ||
| 78 | enumerate timings on a pad that doesn't support them will return an &EINVAL;.</para> | ||
| 79 | |||
| 72 | <table pgwide="1" frame="none" id="v4l2-enum-dv-timings"> | 80 | <table pgwide="1" frame="none" id="v4l2-enum-dv-timings"> |
| 73 | <title>struct <structname>v4l2_enum_dv_timings</structname></title> | 81 | <title>struct <structname>v4l2_enum_dv_timings</structname></title> |
| 74 | <tgroup cols="3"> | 82 | <tgroup cols="3"> |
| @@ -82,8 +90,16 @@ application.</entry> | |||
| 82 | </row> | 90 | </row> |
| 83 | <row> | 91 | <row> |
| 84 | <entry>__u32</entry> | 92 | <entry>__u32</entry> |
| 85 | <entry><structfield>reserved</structfield>[3]</entry> | 93 | <entry><structfield>pad</structfield></entry> |
| 86 | <entry>Reserved for future extensions. Drivers must set the array to zero.</entry> | 94 | <entry>Pad number as reported by the media controller API. This field |
| 95 | is only used when operating on a subdevice node. When operating on a | ||
| 96 | video node applications must set this field to zero.</entry> | ||
| 97 | </row> | ||
| 98 | <row> | ||
| 99 | <entry>__u32</entry> | ||
| 100 | <entry><structfield>reserved</structfield>[2]</entry> | ||
| 101 | <entry>Reserved for future extensions. Drivers and applications must | ||
| 102 | set the array to zero.</entry> | ||
| 87 | </row> | 103 | </row> |
| 88 | <row> | 104 | <row> |
| 89 | <entry>&v4l2-dv-timings;</entry> | 105 | <entry>&v4l2-dv-timings;</entry> |
| @@ -103,7 +119,7 @@ application.</entry> | |||
| 103 | <term><errorcode>EINVAL</errorcode></term> | 119 | <term><errorcode>EINVAL</errorcode></term> |
| 104 | <listitem> | 120 | <listitem> |
| 105 | <para>The &v4l2-enum-dv-timings; <structfield>index</structfield> | 121 | <para>The &v4l2-enum-dv-timings; <structfield>index</structfield> |
| 106 | is out of bounds.</para> | 122 | is out of bounds or the <structfield>pad</structfield> number is invalid.</para> |
| 107 | </listitem> | 123 | </listitem> |
| 108 | </varlistentry> | 124 | </varlistentry> |
| 109 | <varlistentry> | 125 | <varlistentry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml index 5c70b616d818..17efa870d4d2 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml +++ b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml | |||
| @@ -155,6 +155,26 @@ | |||
| 155 | </entry> | 155 | </entry> |
| 156 | </row> | 156 | </row> |
| 157 | <row> | 157 | <row> |
| 158 | <entry><constant>V4L2_EVENT_SOURCE_CHANGE</constant></entry> | ||
| 159 | <entry>5</entry> | ||
| 160 | <entry> | ||
| 161 | <para>This event is triggered when a source parameter change is | ||
| 162 | detected during runtime by the video device. It can be a | ||
| 163 | runtime resolution change triggered by a video decoder or the | ||
| 164 | format change happening on an input connector. | ||
| 165 | This event requires that the <structfield>id</structfield> | ||
| 166 | matches the input index (when used with a video device node) | ||
| 167 | or the pad index (when used with a subdevice node) from which | ||
| 168 | you want to receive events.</para> | ||
| 169 | |||
| 170 | <para>This event has a &v4l2-event-src-change; associated | ||
| 171 | with it. The <structfield>changes</structfield> bitfield denotes | ||
| 172 | what has changed for the subscribed pad. If multiple events | ||
| 173 | occurred before application could dequeue them, then the changes | ||
| 174 | will have the ORed value of all the events generated.</para> | ||
| 175 | </entry> | ||
| 176 | </row> | ||
| 177 | <row> | ||
| 158 | <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> | 178 | <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> |
| 159 | <entry>0x08000000</entry> | 179 | <entry>0x08000000</entry> |
| 160 | <entry>Base event number for driver-private events.</entry> | 180 | <entry>Base event number for driver-private events.</entry> |
diff --git a/Documentation/DocBook/writing_musb_glue_layer.tmpl b/Documentation/DocBook/writing_musb_glue_layer.tmpl new file mode 100644 index 000000000000..837eca77f274 --- /dev/null +++ b/Documentation/DocBook/writing_musb_glue_layer.tmpl | |||
| @@ -0,0 +1,873 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" | ||
| 3 | "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> | ||
| 4 | |||
| 5 | <book id="Writing-MUSB-Glue-Layer"> | ||
| 6 | <bookinfo> | ||
| 7 | <title>Writing an MUSB Glue Layer</title> | ||
| 8 | |||
| 9 | <authorgroup> | ||
| 10 | <author> | ||
| 11 | <firstname>Apelete</firstname> | ||
| 12 | <surname>Seketeli</surname> | ||
| 13 | <affiliation> | ||
| 14 | <address> | ||
| 15 | <email>apelete at seketeli.net</email> | ||
| 16 | </address> | ||
| 17 | </affiliation> | ||
| 18 | </author> | ||
| 19 | </authorgroup> | ||
| 20 | |||
| 21 | <copyright> | ||
| 22 | <year>2014</year> | ||
| 23 | <holder>Apelete Seketeli</holder> | ||
| 24 | </copyright> | ||
| 25 | |||
| 26 | <legalnotice> | ||
| 27 | <para> | ||
| 28 | This documentation is free software; you can redistribute it | ||
| 29 | and/or modify it under the terms of the GNU General Public | ||
| 30 | License as published by the Free Software Foundation; either | ||
| 31 | version 2 of the License, or (at your option) any later version. | ||
| 32 | </para> | ||
| 33 | |||
| 34 | <para> | ||
| 35 | This documentation is distributed in the hope that it will be | ||
| 36 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
| 37 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
| 38 | See the GNU General Public License for more details. | ||
| 39 | </para> | ||
| 40 | |||
| 41 | <para> | ||
| 42 | You should have received a copy of the GNU General Public License | ||
| 43 | along with this documentation; if not, write to the Free Software | ||
| 44 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
| 45 | 02111-1307 USA | ||
| 46 | </para> | ||
| 47 | |||
| 48 | <para> | ||
| 49 | For more details see the file COPYING in the Linux kernel source | ||
| 50 | tree. | ||
| 51 | </para> | ||
| 52 | </legalnotice> | ||
| 53 | </bookinfo> | ||
| 54 | |||
| 55 | <toc></toc> | ||
| 56 | |||
| 57 | <chapter id="introduction"> | ||
| 58 | <title>Introduction</title> | ||
| 59 | <para> | ||
| 60 | The Linux MUSB subsystem is part of the larger Linux USB | ||
| 61 | subsystem. It provides support for embedded USB Device Controllers | ||
| 62 | (UDC) that do not use Universal Host Controller Interface (UHCI) | ||
| 63 | or Open Host Controller Interface (OHCI). | ||
| 64 | </para> | ||
| 65 | <para> | ||
| 66 | Instead, these embedded UDC rely on the USB On-the-Go (OTG) | ||
| 67 | specification which they implement at least partially. The silicon | ||
| 68 | reference design used in most cases is the Multipoint USB | ||
| 69 | Highspeed Dual-Role Controller (MUSB HDRC) found in the Mentor | ||
| 70 | Graphics Inventra™ design. | ||
| 71 | </para> | ||
| 72 | <para> | ||
| 73 | As a self-taught exercise I have written an MUSB glue layer for | ||
| 74 | the Ingenic JZ4740 SoC, modelled after the many MUSB glue layers | ||
| 75 | in the kernel source tree. This layer can be found at | ||
| 76 | drivers/usb/musb/jz4740.c. In this documentation I will walk | ||
| 77 | through the basics of the jz4740.c glue layer, explaining the | ||
| 78 | different pieces and what needs to be done in order to write your | ||
| 79 | own device glue layer. | ||
| 80 | </para> | ||
| 81 | </chapter> | ||
| 82 | |||
| 83 | <chapter id="linux-musb-basics"> | ||
| 84 | <title>Linux MUSB Basics</title> | ||
| 85 | <para> | ||
| 86 | To get started on the topic, please read USB On-the-Go Basics (see | ||
| 87 | Resources) which provides an introduction of USB OTG operation at | ||
| 88 | the hardware level. A couple of wiki pages by Texas Instruments | ||
| 89 | and Analog Devices also provide an overview of the Linux kernel | ||
| 90 | MUSB configuration, albeit focused on some specific devices | ||
| 91 | provided by these companies. Finally, getting acquainted with the | ||
| 92 | USB specification at USB home page may come in handy, with | ||
| 93 | practical instance provided through the Writing USB Device Drivers | ||
| 94 | documentation (again, see Resources). | ||
| 95 | </para> | ||
| 96 | <para> | ||
| 97 | Linux USB stack is a layered architecture in which the MUSB | ||
| 98 | controller hardware sits at the lowest. The MUSB controller driver | ||
| 99 | abstract the MUSB controller hardware to the Linux USB stack. | ||
| 100 | </para> | ||
| 101 | <programlisting> | ||
| 102 | ------------------------ | ||
| 103 | | | <------- drivers/usb/gadget | ||
| 104 | | Linux USB Core Stack | <------- drivers/usb/host | ||
| 105 | | | <------- drivers/usb/core | ||
| 106 | ------------------------ | ||
| 107 | ⬍ | ||
| 108 | -------------------------- | ||
| 109 | | | <------ drivers/usb/musb/musb_gadget.c | ||
| 110 | | MUSB Controller driver | <------ drivers/usb/musb/musb_host.c | ||
| 111 | | | <------ drivers/usb/musb/musb_core.c | ||
| 112 | -------------------------- | ||
| 113 | ⬍ | ||
| 114 | --------------------------------- | ||
| 115 | | MUSB Platform Specific Driver | | ||
| 116 | | | <-- drivers/usb/musb/jz4740.c | ||
| 117 | | aka "Glue Layer" | | ||
| 118 | --------------------------------- | ||
| 119 | ⬍ | ||
| 120 | --------------------------------- | ||
| 121 | | MUSB Controller Hardware | | ||
| 122 | --------------------------------- | ||
| 123 | </programlisting> | ||
| 124 | <para> | ||
| 125 | As outlined above, the glue layer is actually the platform | ||
| 126 | specific code sitting in between the controller driver and the | ||
| 127 | controller hardware. | ||
| 128 | </para> | ||
| 129 | <para> | ||
| 130 | Just like a Linux USB driver needs to register itself with the | ||
| 131 | Linux USB subsystem, the MUSB glue layer needs first to register | ||
| 132 | itself with the MUSB controller driver. This will allow the | ||
| 133 | controller driver to know about which device the glue layer | ||
| 134 | supports and which functions to call when a supported device is | ||
| 135 | detected or released; remember we are talking about an embedded | ||
| 136 | controller chip here, so no insertion or removal at run-time. | ||
| 137 | </para> | ||
| 138 | <para> | ||
| 139 | All of this information is passed to the MUSB controller driver | ||
| 140 | through a platform_driver structure defined in the glue layer as: | ||
| 141 | </para> | ||
| 142 | <programlisting linenumbering="numbered"> | ||
| 143 | static struct platform_driver jz4740_driver = { | ||
| 144 | .probe = jz4740_probe, | ||
| 145 | .remove = jz4740_remove, | ||
| 146 | .driver = { | ||
| 147 | .name = "musb-jz4740", | ||
| 148 | }, | ||
| 149 | }; | ||
| 150 | </programlisting> | ||
| 151 | <para> | ||
| 152 | The probe and remove function pointers are called when a matching | ||
| 153 | device is detected and, respectively, released. The name string | ||
| 154 | describes the device supported by this glue layer. In the current | ||
| 155 | case it matches a platform_device structure declared in | ||
| 156 | arch/mips/jz4740/platform.c. Note that we are not using device | ||
| 157 | tree bindings here. | ||
| 158 | </para> | ||
| 159 | <para> | ||
| 160 | In order to register itself to the controller driver, the glue | ||
| 161 | layer goes through a few steps, basically allocating the | ||
| 162 | controller hardware resources and initialising a couple of | ||
| 163 | circuits. To do so, it needs to keep track of the information used | ||
| 164 | throughout these steps. This is done by defining a private | ||
| 165 | jz4740_glue structure: | ||
| 166 | </para> | ||
| 167 | <programlisting linenumbering="numbered"> | ||
| 168 | struct jz4740_glue { | ||
| 169 | struct device *dev; | ||
| 170 | struct platform_device *musb; | ||
| 171 | struct clk *clk; | ||
| 172 | }; | ||
| 173 | </programlisting> | ||
| 174 | <para> | ||
| 175 | The dev and musb members are both device structure variables. The | ||
| 176 | first one holds generic information about the device, since it's | ||
| 177 | the basic device structure, and the latter holds information more | ||
| 178 | closely related to the subsystem the device is registered to. The | ||
| 179 | clk variable keeps information related to the device clock | ||
| 180 | operation. | ||
| 181 | </para> | ||
| 182 | <para> | ||
| 183 | Let's go through the steps of the probe function that leads the | ||
| 184 | glue layer to register itself to the controller driver. | ||
| 185 | </para> | ||
| 186 | <para> | ||
| 187 | N.B.: For the sake of readability each function will be split in | ||
| 188 | logical parts, each part being shown as if it was independent from | ||
| 189 | the others. | ||
| 190 | </para> | ||
| 191 | <programlisting linenumbering="numbered"> | ||
| 192 | static int jz4740_probe(struct platform_device *pdev) | ||
| 193 | { | ||
| 194 | struct platform_device *musb; | ||
| 195 | struct jz4740_glue *glue; | ||
| 196 | struct clk *clk; | ||
| 197 | int ret; | ||
| 198 | |||
| 199 | glue = devm_kzalloc(&pdev->dev, sizeof(*glue), GFP_KERNEL); | ||
| 200 | if (!glue) | ||
| 201 | return -ENOMEM; | ||
| 202 | |||
| 203 | musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO); | ||
| 204 | if (!musb) { | ||
| 205 | dev_err(&pdev->dev, "failed to allocate musb device\n"); | ||
| 206 | return -ENOMEM; | ||
| 207 | } | ||
| 208 | |||
| 209 | clk = devm_clk_get(&pdev->dev, "udc"); | ||
| 210 | if (IS_ERR(clk)) { | ||
| 211 | dev_err(&pdev->dev, "failed to get clock\n"); | ||
| 212 | ret = PTR_ERR(clk); | ||
| 213 | goto err_platform_device_put; | ||
| 214 | } | ||
| 215 | |||
| 216 | ret = clk_prepare_enable(clk); | ||
| 217 | if (ret) { | ||
| 218 | dev_err(&pdev->dev, "failed to enable clock\n"); | ||
| 219 | goto err_platform_device_put; | ||
| 220 | } | ||
| 221 | |||
| 222 | musb->dev.parent = &pdev->dev; | ||
| 223 | |||
| 224 | glue->dev = &pdev->dev; | ||
| 225 | glue->musb = musb; | ||
| 226 | glue->clk = clk; | ||
| 227 | |||
| 228 | return 0; | ||
| 229 | |||
| 230 | err_platform_device_put: | ||
| 231 | platform_device_put(musb); | ||
| 232 | return ret; | ||
| 233 | } | ||
| 234 | </programlisting> | ||
| 235 | <para> | ||
| 236 | The first few lines of the probe function allocate and assign the | ||
| 237 | glue, musb and clk variables. The GFP_KERNEL flag (line 8) allows | ||
| 238 | the allocation process to sleep and wait for memory, thus being | ||
| 239 | usable in a blocking situation. The PLATFORM_DEVID_AUTO flag (line | ||
| 240 | 12) allows automatic allocation and management of device IDs in | ||
| 241 | order to avoid device namespace collisions with explicit IDs. With | ||
| 242 | devm_clk_get() (line 18) the glue layer allocates the clock -- the | ||
| 243 | <literal>devm_</literal> prefix indicates that clk_get() is | ||
| 244 | managed: it automatically frees the allocated clock resource data | ||
| 245 | when the device is released -- and enable it. | ||
| 246 | </para> | ||
| 247 | <para> | ||
| 248 | Then comes the registration steps: | ||
| 249 | </para> | ||
| 250 | <programlisting linenumbering="numbered"> | ||
| 251 | static int jz4740_probe(struct platform_device *pdev) | ||
| 252 | { | ||
| 253 | struct musb_hdrc_platform_data *pdata = &jz4740_musb_platform_data; | ||
| 254 | |||
| 255 | pdata->platform_ops = &jz4740_musb_ops; | ||
| 256 | |||
| 257 | platform_set_drvdata(pdev, glue); | ||
| 258 | |||
| 259 | ret = platform_device_add_resources(musb, pdev->resource, | ||
| 260 | pdev->num_resources); | ||
| 261 | if (ret) { | ||
| 262 | dev_err(&pdev->dev, "failed to add resources\n"); | ||
| 263 | goto err_clk_disable; | ||
| 264 | } | ||
| 265 | |||
| 266 | ret = platform_device_add_data(musb, pdata, sizeof(*pdata)); | ||
| 267 | if (ret) { | ||
| 268 | dev_err(&pdev->dev, "failed to add platform_data\n"); | ||
| 269 | goto err_clk_disable; | ||
| 270 | } | ||
| 271 | |||
| 272 | return 0; | ||
| 273 | |||
| 274 | err_clk_disable: | ||
| 275 | clk_disable_unprepare(clk); | ||
| 276 | err_platform_device_put: | ||
| 277 | platform_device_put(musb); | ||
| 278 | return ret; | ||
| 279 | } | ||
| 280 | </programlisting> | ||
| 281 | <para> | ||
| 282 | The first step is to pass the device data privately held by the | ||
| 283 | glue layer on to the controller driver through | ||
| 284 | platform_set_drvdata() (line 7). Next is passing on the device | ||
| 285 | resources information, also privately held at that point, through | ||
| 286 | platform_device_add_resources() (line 9). | ||
| 287 | </para> | ||
| 288 | <para> | ||
| 289 | Finally comes passing on the platform specific data to the | ||
| 290 | controller driver (line 16). Platform data will be discussed in | ||
| 291 | <link linkend="device-platform-data">Chapter 4</link>, but here | ||
| 292 | we are looking at the platform_ops function pointer (line 5) in | ||
| 293 | musb_hdrc_platform_data structure (line 3). This function | ||
| 294 | pointer allows the MUSB controller driver to know which function | ||
| 295 | to call for device operation: | ||
| 296 | </para> | ||
| 297 | <programlisting linenumbering="numbered"> | ||
| 298 | static const struct musb_platform_ops jz4740_musb_ops = { | ||
| 299 | .init = jz4740_musb_init, | ||
| 300 | .exit = jz4740_musb_exit, | ||
| 301 | }; | ||
| 302 | </programlisting> | ||
| 303 | <para> | ||
| 304 | Here we have the minimal case where only init and exit functions | ||
| 305 | are called by the controller driver when needed. Fact is the | ||
| 306 | JZ4740 MUSB controller is a basic controller, lacking some | ||
| 307 | features found in other controllers, otherwise we may also have | ||
| 308 | pointers to a few other functions like a power management function | ||
| 309 | or a function to switch between OTG and non-OTG modes, for | ||
| 310 | instance. | ||
| 311 | </para> | ||
| 312 | <para> | ||
| 313 | At that point of the registration process, the controller driver | ||
| 314 | actually calls the init function: | ||
| 315 | </para> | ||
| 316 | <programlisting linenumbering="numbered"> | ||
| 317 | static int jz4740_musb_init(struct musb *musb) | ||
| 318 | { | ||
| 319 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | ||
| 320 | if (!musb->xceiv) { | ||
| 321 | pr_err("HS UDC: no transceiver configured\n"); | ||
| 322 | return -ENODEV; | ||
| 323 | } | ||
| 324 | |||
| 325 | /* Silicon does not implement ConfigData register. | ||
| 326 | * Set dyn_fifo to avoid reading EP config from hardware. | ||
| 327 | */ | ||
| 328 | musb->dyn_fifo = true; | ||
| 329 | |||
| 330 | musb->isr = jz4740_musb_interrupt; | ||
| 331 | |||
| 332 | return 0; | ||
| 333 | } | ||
| 334 | </programlisting> | ||
| 335 | <para> | ||
| 336 | The goal of jz4740_musb_init() is to get hold of the transceiver | ||
| 337 | driver data of the MUSB controller hardware and pass it on to the | ||
| 338 | MUSB controller driver, as usual. The transceiver is the circuitry | ||
| 339 | inside the controller hardware responsible for sending/receiving | ||
| 340 | the USB data. Since it is an implementation of the physical layer | ||
| 341 | of the OSI model, the transceiver is also referred to as PHY. | ||
| 342 | </para> | ||
| 343 | <para> | ||
| 344 | Getting hold of the MUSB PHY driver data is done with | ||
| 345 | usb_get_phy() which returns a pointer to the structure | ||
| 346 | containing the driver instance data. The next couple of | ||
| 347 | instructions (line 12 and 14) are used as a quirk and to setup | ||
| 348 | IRQ handling respectively. Quirks and IRQ handling will be | ||
| 349 | discussed later in <link linkend="device-quirks">Chapter | ||
| 350 | 5</link> and <link linkend="handling-irqs">Chapter 3</link>. | ||
| 351 | </para> | ||
| 352 | <programlisting linenumbering="numbered"> | ||
| 353 | static int jz4740_musb_exit(struct musb *musb) | ||
| 354 | { | ||
| 355 | usb_put_phy(musb->xceiv); | ||
| 356 | |||
| 357 | return 0; | ||
| 358 | } | ||
| 359 | </programlisting> | ||
| 360 | <para> | ||
| 361 | Acting as the counterpart of init, the exit function releases the | ||
| 362 | MUSB PHY driver when the controller hardware itself is about to be | ||
| 363 | released. | ||
| 364 | </para> | ||
| 365 | <para> | ||
| 366 | Again, note that init and exit are fairly simple in this case due | ||
| 367 | to the basic set of features of the JZ4740 controller hardware. | ||
| 368 | When writing an musb glue layer for a more complex controller | ||
| 369 | hardware, you might need to take care of more processing in those | ||
| 370 | two functions. | ||
| 371 | </para> | ||
| 372 | <para> | ||
| 373 | Returning from the init function, the MUSB controller driver jumps | ||
| 374 | back into the probe function: | ||
| 375 | </para> | ||
| 376 | <programlisting linenumbering="numbered"> | ||
| 377 | static int jz4740_probe(struct platform_device *pdev) | ||
| 378 | { | ||
| 379 | ret = platform_device_add(musb); | ||
| 380 | if (ret) { | ||
| 381 | dev_err(&pdev->dev, "failed to register musb device\n"); | ||
| 382 | goto err_clk_disable; | ||
| 383 | } | ||
| 384 | |||
| 385 | return 0; | ||
| 386 | |||
| 387 | err_clk_disable: | ||
| 388 | clk_disable_unprepare(clk); | ||
| 389 | err_platform_device_put: | ||
| 390 | platform_device_put(musb); | ||
| 391 | return ret; | ||
| 392 | } | ||
| 393 | </programlisting> | ||
| 394 | <para> | ||
| 395 | This is the last part of the device registration process where the | ||
| 396 | glue layer adds the controller hardware device to Linux kernel | ||
| 397 | device hierarchy: at this stage, all known information about the | ||
| 398 | device is passed on to the Linux USB core stack. | ||
| 399 | </para> | ||
| 400 | <programlisting linenumbering="numbered"> | ||
| 401 | static int jz4740_remove(struct platform_device *pdev) | ||
| 402 | { | ||
| 403 | struct jz4740_glue *glue = platform_get_drvdata(pdev); | ||
| 404 | |||
| 405 | platform_device_unregister(glue->musb); | ||
| 406 | clk_disable_unprepare(glue->clk); | ||
| 407 | |||
| 408 | return 0; | ||
| 409 | } | ||
| 410 | </programlisting> | ||
| 411 | <para> | ||
| 412 | Acting as the counterpart of probe, the remove function unregister | ||
| 413 | the MUSB controller hardware (line 5) and disable the clock (line | ||
| 414 | 6), allowing it to be gated. | ||
| 415 | </para> | ||
| 416 | </chapter> | ||
| 417 | |||
| 418 | <chapter id="handling-irqs"> | ||
| 419 | <title>Handling IRQs</title> | ||
| 420 | <para> | ||
| 421 | Additionally to the MUSB controller hardware basic setup and | ||
| 422 | registration, the glue layer is also responsible for handling the | ||
| 423 | IRQs: | ||
| 424 | </para> | ||
| 425 | <programlisting linenumbering="numbered"> | ||
| 426 | static irqreturn_t jz4740_musb_interrupt(int irq, void *__hci) | ||
| 427 | { | ||
| 428 | unsigned long flags; | ||
| 429 | irqreturn_t retval = IRQ_NONE; | ||
| 430 | struct musb *musb = __hci; | ||
| 431 | |||
| 432 | spin_lock_irqsave(&musb->lock, flags); | ||
| 433 | |||
| 434 | musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB); | ||
| 435 | musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX); | ||
| 436 | musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX); | ||
| 437 | |||
| 438 | /* | ||
| 439 | * The controller is gadget only, the state of the host mode IRQ bits is | ||
| 440 | * undefined. Mask them to make sure that the musb driver core will | ||
| 441 | * never see them set | ||
| 442 | */ | ||
| 443 | musb->int_usb &= MUSB_INTR_SUSPEND | MUSB_INTR_RESUME | | ||
| 444 | MUSB_INTR_RESET | MUSB_INTR_SOF; | ||
| 445 | |||
| 446 | if (musb->int_usb || musb->int_tx || musb->int_rx) | ||
| 447 | retval = musb_interrupt(musb); | ||
| 448 | |||
| 449 | spin_unlock_irqrestore(&musb->lock, flags); | ||
| 450 | |||
| 451 | return retval; | ||
| 452 | } | ||
| 453 | </programlisting> | ||
| 454 | <para> | ||
| 455 | Here the glue layer mostly has to read the relevant hardware | ||
| 456 | registers and pass their values on to the controller driver which | ||
| 457 | will handle the actual event that triggered the IRQ. | ||
| 458 | </para> | ||
| 459 | <para> | ||
| 460 | The interrupt handler critical section is protected by the | ||
| 461 | spin_lock_irqsave() and counterpart spin_unlock_irqrestore() | ||
| 462 | functions (line 7 and 24 respectively), which prevent the | ||
| 463 | interrupt handler code to be run by two different threads at the | ||
| 464 | same time. | ||
| 465 | </para> | ||
| 466 | <para> | ||
| 467 | Then the relevant interrupt registers are read (line 9 to 11): | ||
| 468 | </para> | ||
| 469 | <itemizedlist> | ||
| 470 | <listitem> | ||
| 471 | <para> | ||
| 472 | MUSB_INTRUSB: indicates which USB interrupts are currently | ||
| 473 | active, | ||
| 474 | </para> | ||
| 475 | </listitem> | ||
| 476 | <listitem> | ||
| 477 | <para> | ||
| 478 | MUSB_INTRTX: indicates which of the interrupts for TX | ||
| 479 | endpoints are currently active, | ||
| 480 | </para> | ||
| 481 | </listitem> | ||
| 482 | <listitem> | ||
| 483 | <para> | ||
| 484 | MUSB_INTRRX: indicates which of the interrupts for TX | ||
| 485 | endpoints are currently active. | ||
| 486 | </para> | ||
| 487 | </listitem> | ||
| 488 | </itemizedlist> | ||
| 489 | <para> | ||
| 490 | Note that musb_readb() is used to read 8-bit registers at most, | ||
| 491 | while musb_readw() allows us to read at most 16-bit registers. | ||
| 492 | There are other functions that can be used depending on the size | ||
| 493 | of your device registers. See musb_io.h for more information. | ||
| 494 | </para> | ||
| 495 | <para> | ||
| 496 | Instruction on line 18 is another quirk specific to the JZ4740 | ||
| 497 | USB device controller, which will be discussed later in <link | ||
| 498 | linkend="device-quirks">Chapter 5</link>. | ||
| 499 | </para> | ||
| 500 | <para> | ||
| 501 | The glue layer still needs to register the IRQ handler though. | ||
| 502 | Remember the instruction on line 14 of the init function: | ||
| 503 | </para> | ||
| 504 | <programlisting linenumbering="numbered"> | ||
| 505 | static int jz4740_musb_init(struct musb *musb) | ||
| 506 | { | ||
| 507 | musb->isr = jz4740_musb_interrupt; | ||
| 508 | |||
| 509 | return 0; | ||
| 510 | } | ||
| 511 | </programlisting> | ||
| 512 | <para> | ||
| 513 | This instruction sets a pointer to the glue layer IRQ handler | ||
| 514 | function, in order for the controller hardware to call the handler | ||
| 515 | back when an IRQ comes from the controller hardware. The interrupt | ||
| 516 | handler is now implemented and registered. | ||
| 517 | </para> | ||
| 518 | </chapter> | ||
| 519 | |||
| 520 | <chapter id="device-platform-data"> | ||
| 521 | <title>Device Platform Data</title> | ||
| 522 | <para> | ||
| 523 | In order to write an MUSB glue layer, you need to have some data | ||
| 524 | describing the hardware capabilities of your controller hardware, | ||
| 525 | which is called the platform data. | ||
| 526 | </para> | ||
| 527 | <para> | ||
| 528 | Platform data is specific to your hardware, though it may cover a | ||
| 529 | broad range of devices, and is generally found somewhere in the | ||
| 530 | arch/ directory, depending on your device architecture. | ||
| 531 | </para> | ||
| 532 | <para> | ||
| 533 | For instance, platform data for the JZ4740 SoC is found in | ||
| 534 | arch/mips/jz4740/platform.c. In the platform.c file each device of | ||
| 535 | the JZ4740 SoC is described through a set of structures. | ||
| 536 | </para> | ||
| 537 | <para> | ||
| 538 | Here is the part of arch/mips/jz4740/platform.c that covers the | ||
| 539 | USB Device Controller (UDC): | ||
| 540 | </para> | ||
| 541 | <programlisting linenumbering="numbered"> | ||
| 542 | /* USB Device Controller */ | ||
| 543 | struct platform_device jz4740_udc_xceiv_device = { | ||
| 544 | .name = "usb_phy_gen_xceiv", | ||
| 545 | .id = 0, | ||
| 546 | }; | ||
| 547 | |||
| 548 | static struct resource jz4740_udc_resources[] = { | ||
| 549 | [0] = { | ||
| 550 | .start = JZ4740_UDC_BASE_ADDR, | ||
| 551 | .end = JZ4740_UDC_BASE_ADDR + 0x10000 - 1, | ||
| 552 | .flags = IORESOURCE_MEM, | ||
| 553 | }, | ||
| 554 | [1] = { | ||
| 555 | .start = JZ4740_IRQ_UDC, | ||
| 556 | .end = JZ4740_IRQ_UDC, | ||
| 557 | .flags = IORESOURCE_IRQ, | ||
| 558 | .name = "mc", | ||
| 559 | }, | ||
| 560 | }; | ||
| 561 | |||
| 562 | struct platform_device jz4740_udc_device = { | ||
| 563 | .name = "musb-jz4740", | ||
| 564 | .id = -1, | ||
| 565 | .dev = { | ||
| 566 | .dma_mask = &jz4740_udc_device.dev.coherent_dma_mask, | ||
| 567 | .coherent_dma_mask = DMA_BIT_MASK(32), | ||
| 568 | }, | ||
| 569 | .num_resources = ARRAY_SIZE(jz4740_udc_resources), | ||
| 570 | .resource = jz4740_udc_resources, | ||
| 571 | }; | ||
| 572 | </programlisting> | ||
| 573 | <para> | ||
| 574 | The jz4740_udc_xceiv_device platform device structure (line 2) | ||
| 575 | describes the UDC transceiver with a name and id number. | ||
| 576 | </para> | ||
| 577 | <para> | ||
| 578 | At the time of this writing, note that | ||
| 579 | "usb_phy_gen_xceiv" is the specific name to be used for | ||
| 580 | all transceivers that are either built-in with reference USB IP or | ||
| 581 | autonomous and doesn't require any PHY programming. You will need | ||
| 582 | to set CONFIG_NOP_USB_XCEIV=y in the kernel configuration to make | ||
| 583 | use of the corresponding transceiver driver. The id field could be | ||
| 584 | set to -1 (equivalent to PLATFORM_DEVID_NONE), -2 (equivalent to | ||
| 585 | PLATFORM_DEVID_AUTO) or start with 0 for the first device of this | ||
| 586 | kind if we want a specific id number. | ||
| 587 | </para> | ||
| 588 | <para> | ||
| 589 | The jz4740_udc_resources resource structure (line 7) defines the | ||
| 590 | UDC registers base addresses. | ||
| 591 | </para> | ||
| 592 | <para> | ||
| 593 | The first array (line 9 to 11) defines the UDC registers base | ||
| 594 | memory addresses: start points to the first register memory | ||
| 595 | address, end points to the last register memory address and the | ||
| 596 | flags member defines the type of resource we are dealing with. So | ||
| 597 | IORESOURCE_MEM is used to define the registers memory addresses. | ||
| 598 | The second array (line 14 to 17) defines the UDC IRQ registers | ||
| 599 | addresses. Since there is only one IRQ register available for the | ||
| 600 | JZ4740 UDC, start and end point at the same address. The | ||
| 601 | IORESOURCE_IRQ flag tells that we are dealing with IRQ resources, | ||
| 602 | and the name "mc" is in fact hard-coded in the MUSB core | ||
| 603 | in order for the controller driver to retrieve this IRQ resource | ||
| 604 | by querying it by its name. | ||
| 605 | </para> | ||
| 606 | <para> | ||
| 607 | Finally, the jz4740_udc_device platform device structure (line 21) | ||
| 608 | describes the UDC itself. | ||
| 609 | </para> | ||
| 610 | <para> | ||
| 611 | The "musb-jz4740" name (line 22) defines the MUSB | ||
| 612 | driver that is used for this device; remember this is in fact | ||
| 613 | the name that we used in the jz4740_driver platform driver | ||
| 614 | structure in <link linkend="linux-musb-basics">Chapter | ||
| 615 | 2</link>. The id field (line 23) is set to -1 (equivalent to | ||
| 616 | PLATFORM_DEVID_NONE) since we do not need an id for the device: | ||
| 617 | the MUSB controller driver was already set to allocate an | ||
| 618 | automatic id in <link linkend="linux-musb-basics">Chapter | ||
| 619 | 2</link>. In the dev field we care for DMA related information | ||
| 620 | here. The dma_mask field (line 25) defines the width of the DMA | ||
| 621 | mask that is going to be used, and coherent_dma_mask (line 26) | ||
| 622 | has the same purpose but for the alloc_coherent DMA mappings: in | ||
| 623 | both cases we are using a 32 bits mask. Then the resource field | ||
| 624 | (line 29) is simply a pointer to the resource structure defined | ||
| 625 | before, while the num_resources field (line 28) keeps track of | ||
| 626 | the number of arrays defined in the resource structure (in this | ||
| 627 | case there were two resource arrays defined before). | ||
| 628 | </para> | ||
| 629 | <para> | ||
| 630 | With this quick overview of the UDC platform data at the arch/ | ||
| 631 | level now done, let's get back to the MUSB glue layer specific | ||
| 632 | platform data in drivers/usb/musb/jz4740.c: | ||
| 633 | </para> | ||
| 634 | <programlisting linenumbering="numbered"> | ||
| 635 | static struct musb_hdrc_config jz4740_musb_config = { | ||
| 636 | /* Silicon does not implement USB OTG. */ | ||
| 637 | .multipoint = 0, | ||
| 638 | /* Max EPs scanned, driver will decide which EP can be used. */ | ||
| 639 | .num_eps = 4, | ||
| 640 | /* RAMbits needed to configure EPs from table */ | ||
| 641 | .ram_bits = 9, | ||
| 642 | .fifo_cfg = jz4740_musb_fifo_cfg, | ||
| 643 | .fifo_cfg_size = ARRAY_SIZE(jz4740_musb_fifo_cfg), | ||
| 644 | }; | ||
| 645 | |||
| 646 | static struct musb_hdrc_platform_data jz4740_musb_platform_data = { | ||
| 647 | .mode = MUSB_PERIPHERAL, | ||
| 648 | .config = &jz4740_musb_config, | ||
| 649 | }; | ||
| 650 | </programlisting> | ||
| 651 | <para> | ||
| 652 | First the glue layer configures some aspects of the controller | ||
| 653 | driver operation related to the controller hardware specifics. | ||
| 654 | This is done through the jz4740_musb_config musb_hdrc_config | ||
| 655 | structure. | ||
| 656 | </para> | ||
| 657 | <para> | ||
| 658 | Defining the OTG capability of the controller hardware, the | ||
| 659 | multipoint member (line 3) is set to 0 (equivalent to false) | ||
| 660 | since the JZ4740 UDC is not OTG compatible. Then num_eps (line | ||
| 661 | 5) defines the number of USB endpoints of the controller | ||
| 662 | hardware, including endpoint 0: here we have 3 endpoints + | ||
| 663 | endpoint 0. Next is ram_bits (line 7) which is the width of the | ||
| 664 | RAM address bus for the MUSB controller hardware. This | ||
| 665 | information is needed when the controller driver cannot | ||
| 666 | automatically configure endpoints by reading the relevant | ||
| 667 | controller hardware registers. This issue will be discussed when | ||
| 668 | we get to device quirks in <link linkend="device-quirks">Chapter | ||
| 669 | 5</link>. Last two fields (line 8 and 9) are also about device | ||
| 670 | quirks: fifo_cfg points to the USB endpoints configuration table | ||
| 671 | and fifo_cfg_size keeps track of the size of the number of | ||
| 672 | entries in that configuration table. More on that later in <link | ||
| 673 | linkend="device-quirks">Chapter 5</link>. | ||
| 674 | </para> | ||
| 675 | <para> | ||
| 676 | Then this configuration is embedded inside | ||
| 677 | jz4740_musb_platform_data musb_hdrc_platform_data structure (line | ||
| 678 | 11): config is a pointer to the configuration structure itself, | ||
| 679 | and mode tells the controller driver if the controller hardware | ||
| 680 | may be used as MUSB_HOST only, MUSB_PERIPHERAL only or MUSB_OTG | ||
| 681 | which is a dual mode. | ||
| 682 | </para> | ||
| 683 | <para> | ||
| 684 | Remember that jz4740_musb_platform_data is then used to convey | ||
| 685 | platform data information as we have seen in the probe function | ||
| 686 | in <link linkend="linux-musb-basics">Chapter 2</link> | ||
| 687 | </para> | ||
| 688 | </chapter> | ||
| 689 | |||
| 690 | <chapter id="device-quirks"> | ||
| 691 | <title>Device Quirks</title> | ||
| 692 | <para> | ||
| 693 | Completing the platform data specific to your device, you may also | ||
| 694 | need to write some code in the glue layer to work around some | ||
| 695 | device specific limitations. These quirks may be due to some | ||
| 696 | hardware bugs, or simply be the result of an incomplete | ||
| 697 | implementation of the USB On-the-Go specification. | ||
| 698 | </para> | ||
| 699 | <para> | ||
| 700 | The JZ4740 UDC exhibits such quirks, some of which we will discuss | ||
| 701 | here for the sake of insight even though these might not be found | ||
| 702 | in the controller hardware you are working on. | ||
| 703 | </para> | ||
| 704 | <para> | ||
| 705 | Let's get back to the init function first: | ||
| 706 | </para> | ||
| 707 | <programlisting linenumbering="numbered"> | ||
| 708 | static int jz4740_musb_init(struct musb *musb) | ||
| 709 | { | ||
| 710 | musb->xceiv = usb_get_phy(USB_PHY_TYPE_USB2); | ||
| 711 | if (!musb->xceiv) { | ||
| 712 | pr_err("HS UDC: no transceiver configured\n"); | ||
| 713 | return -ENODEV; | ||
| 714 | } | ||
| 715 | |||
| 716 | /* Silicon does not implement ConfigData register. | ||
| 717 | * Set dyn_fifo to avoid reading EP config from hardware. | ||
| 718 | */ | ||
| 719 | musb->dyn_fifo = true; | ||
| 720 | |||
| 721 | musb->isr = jz4740_musb_interrupt; | ||
| 722 | |||
| 723 | return 0; | ||
| 724 | } | ||
| 725 | </programlisting> | ||
| 726 | <para> | ||
| 727 | Instruction on line 12 helps the MUSB controller driver to work | ||
| 728 | around the fact that the controller hardware is missing registers | ||
| 729 | that are used for USB endpoints configuration. | ||
| 730 | </para> | ||
| 731 | <para> | ||
| 732 | Without these registers, the controller driver is unable to read | ||
| 733 | the endpoints configuration from the hardware, so we use line 12 | ||
| 734 | instruction to bypass reading the configuration from silicon, and | ||
| 735 | rely on a hard-coded table that describes the endpoints | ||
| 736 | configuration instead: | ||
| 737 | </para> | ||
| 738 | <programlisting linenumbering="numbered"> | ||
| 739 | static struct musb_fifo_cfg jz4740_musb_fifo_cfg[] = { | ||
| 740 | { .hw_ep_num = 1, .style = FIFO_TX, .maxpacket = 512, }, | ||
| 741 | { .hw_ep_num = 1, .style = FIFO_RX, .maxpacket = 512, }, | ||
| 742 | { .hw_ep_num = 2, .style = FIFO_TX, .maxpacket = 64, }, | ||
| 743 | }; | ||
| 744 | </programlisting> | ||
| 745 | <para> | ||
| 746 | Looking at the configuration table above, we see that each | ||
| 747 | endpoints is described by three fields: hw_ep_num is the endpoint | ||
| 748 | number, style is its direction (either FIFO_TX for the controller | ||
| 749 | driver to send packets in the controller hardware, or FIFO_RX to | ||
| 750 | receive packets from hardware), and maxpacket defines the maximum | ||
| 751 | size of each data packet that can be transmitted over that | ||
| 752 | endpoint. Reading from the table, the controller driver knows that | ||
| 753 | endpoint 1 can be used to send and receive USB data packets of 512 | ||
| 754 | bytes at once (this is in fact a bulk in/out endpoint), and | ||
| 755 | endpoint 2 can be used to send data packets of 64 bytes at once | ||
| 756 | (this is in fact an interrupt endpoint). | ||
| 757 | </para> | ||
| 758 | <para> | ||
| 759 | Note that there is no information about endpoint 0 here: that one | ||
| 760 | is implemented by default in every silicon design, with a | ||
| 761 | predefined configuration according to the USB specification. For | ||
| 762 | more examples of endpoint configuration tables, see musb_core.c. | ||
| 763 | </para> | ||
| 764 | <para> | ||
| 765 | Let's now get back to the interrupt handler function: | ||
| 766 | </para> | ||
| 767 | <programlisting linenumbering="numbered"> | ||
| 768 | static irqreturn_t jz4740_musb_interrupt(int irq, void *__hci) | ||
| 769 | { | ||
| 770 | unsigned long flags; | ||
| 771 | irqreturn_t retval = IRQ_NONE; | ||
| 772 | struct musb *musb = __hci; | ||
| 773 | |||
| 774 | spin_lock_irqsave(&musb->lock, flags); | ||
| 775 | |||
| 776 | musb->int_usb = musb_readb(musb->mregs, MUSB_INTRUSB); | ||
| 777 | musb->int_tx = musb_readw(musb->mregs, MUSB_INTRTX); | ||
| 778 | musb->int_rx = musb_readw(musb->mregs, MUSB_INTRRX); | ||
| 779 | |||
| 780 | /* | ||
| 781 | * The controller is gadget only, the state of the host mode IRQ bits is | ||
| 782 | * undefined. Mask them to make sure that the musb driver core will | ||
| 783 | * never see them set | ||
| 784 | */ | ||
| 785 | musb->int_usb &= MUSB_INTR_SUSPEND | MUSB_INTR_RESUME | | ||
| 786 | MUSB_INTR_RESET | MUSB_INTR_SOF; | ||
| 787 | |||
| 788 | if (musb->int_usb || musb->int_tx || musb->int_rx) | ||
| 789 | retval = musb_interrupt(musb); | ||
| 790 | |||
| 791 | spin_unlock_irqrestore(&musb->lock, flags); | ||
| 792 | |||
| 793 | return retval; | ||
| 794 | } | ||
| 795 | </programlisting> | ||
| 796 | <para> | ||
| 797 | Instruction on line 18 above is a way for the controller driver to | ||
| 798 | work around the fact that some interrupt bits used for USB host | ||
| 799 | mode operation are missing in the MUSB_INTRUSB register, thus left | ||
| 800 | in an undefined hardware state, since this MUSB controller | ||
| 801 | hardware is used in peripheral mode only. As a consequence, the | ||
| 802 | glue layer masks these missing bits out to avoid parasite | ||
| 803 | interrupts by doing a logical AND operation between the value read | ||
| 804 | from MUSB_INTRUSB and the bits that are actually implemented in | ||
| 805 | the register. | ||
| 806 | </para> | ||
| 807 | <para> | ||
| 808 | These are only a couple of the quirks found in the JZ4740 USB | ||
| 809 | device controller. Some others were directly addressed in the MUSB | ||
| 810 | core since the fixes were generic enough to provide a better | ||
| 811 | handling of the issues for others controller hardware eventually. | ||
| 812 | </para> | ||
| 813 | </chapter> | ||
| 814 | |||
| 815 | <chapter id="conclusion"> | ||
| 816 | <title>Conclusion</title> | ||
| 817 | <para> | ||
| 818 | Writing a Linux MUSB glue layer should be a more accessible task, | ||
| 819 | as this documentation tries to show the ins and outs of this | ||
| 820 | exercise. | ||
| 821 | </para> | ||
| 822 | <para> | ||
| 823 | The JZ4740 USB device controller being fairly simple, I hope its | ||
| 824 | glue layer serves as a good example for the curious mind. Used | ||
| 825 | with the current MUSB glue layers, this documentation should | ||
| 826 | provide enough guidance to get started; should anything gets out | ||
| 827 | of hand, the linux-usb mailing list archive is another helpful | ||
| 828 | resource to browse through. | ||
| 829 | </para> | ||
| 830 | </chapter> | ||
| 831 | |||
| 832 | <chapter id="acknowledgements"> | ||
| 833 | <title>Acknowledgements</title> | ||
| 834 | <para> | ||
| 835 | Many thanks to Lars-Peter Clausen and Maarten ter Huurne for | ||
| 836 | answering my questions while I was writing the JZ4740 glue layer | ||
| 837 | and for helping me out getting the code in good shape. | ||
| 838 | </para> | ||
| 839 | <para> | ||
| 840 | I would also like to thank the Qi-Hardware community at large for | ||
| 841 | its cheerful guidance and support. | ||
| 842 | </para> | ||
| 843 | </chapter> | ||
| 844 | |||
| 845 | <chapter id="resources"> | ||
| 846 | <title>Resources</title> | ||
| 847 | <para> | ||
| 848 | USB Home Page: | ||
| 849 | <ulink url="http://www.usb.org">http://www.usb.org</ulink> | ||
| 850 | </para> | ||
| 851 | <para> | ||
| 852 | linux-usb Mailing List Archives: | ||
| 853 | <ulink url="http://marc.info/?l=linux-usb">http://marc.info/?l=linux-usb</ulink> | ||
| 854 | </para> | ||
| 855 | <para> | ||
| 856 | USB On-the-Go Basics: | ||
| 857 | <ulink url="http://www.maximintegrated.com/app-notes/index.mvp/id/1822">http://www.maximintegrated.com/app-notes/index.mvp/id/1822</ulink> | ||
| 858 | </para> | ||
| 859 | <para> | ||
| 860 | Writing USB Device Drivers: | ||
| 861 | <ulink url="https://www.kernel.org/doc/htmldocs/writing_usb_driver/index.html">https://www.kernel.org/doc/htmldocs/writing_usb_driver/index.html</ulink> | ||
| 862 | </para> | ||
| 863 | <para> | ||
| 864 | Texas Instruments USB Configuration Wiki Page: | ||
| 865 | <ulink url="http://processors.wiki.ti.com/index.php/Usbgeneralpage">http://processors.wiki.ti.com/index.php/Usbgeneralpage</ulink> | ||
| 866 | </para> | ||
| 867 | <para> | ||
| 868 | Analog Devices Blackfin MUSB Configuration: | ||
| 869 | <ulink url="http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:musb">http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:musb</ulink> | ||
| 870 | </para> | ||
| 871 | </chapter> | ||
| 872 | |||
| 873 | </book> | ||
diff --git a/Documentation/EDID/1024x768.S b/Documentation/EDID/1024x768.S index 4b486fe31b32..6f3e4b75e49e 100644 --- a/Documentation/EDID/1024x768.S +++ b/Documentation/EDID/1024x768.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define DPI 72 | 36 | #define DPI 72 |
| 37 | #define VFREQ 60 /* Hz */ | 37 | #define VFREQ 60 /* Hz */ |
| 38 | #define TIMING_NAME "Linux XGA" | 38 | #define TIMING_NAME "Linux XGA" |
| 39 | #define ESTABLISHED_TIMINGS_BITS 0x08 /* Bit 3 -> 1024x768 @60 Hz */ | 39 | #define ESTABLISHED_TIMING2_BITS 0x08 /* Bit 3 -> 1024x768 @60 Hz */ |
| 40 | #define HSYNC_POL 0 | 40 | #define HSYNC_POL 0 |
| 41 | #define VSYNC_POL 0 | 41 | #define VSYNC_POL 0 |
| 42 | #define CRC 0x55 | 42 | #define CRC 0x55 |
diff --git a/Documentation/EDID/1280x1024.S b/Documentation/EDID/1280x1024.S index a2799fe33a4d..bd9bef2a65af 100644 --- a/Documentation/EDID/1280x1024.S +++ b/Documentation/EDID/1280x1024.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define DPI 72 | 36 | #define DPI 72 |
| 37 | #define VFREQ 60 /* Hz */ | 37 | #define VFREQ 60 /* Hz */ |
| 38 | #define TIMING_NAME "Linux SXGA" | 38 | #define TIMING_NAME "Linux SXGA" |
| 39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | 39 | /* No ESTABLISHED_TIMINGx_BITS */ |
| 40 | #define HSYNC_POL 1 | 40 | #define HSYNC_POL 1 |
| 41 | #define VSYNC_POL 1 | 41 | #define VSYNC_POL 1 |
| 42 | #define CRC 0xa0 | 42 | #define CRC 0xa0 |
diff --git a/Documentation/EDID/1600x1200.S b/Documentation/EDID/1600x1200.S index 0ded64cfd1f5..a45101c6160c 100644 --- a/Documentation/EDID/1600x1200.S +++ b/Documentation/EDID/1600x1200.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define DPI 72 | 36 | #define DPI 72 |
| 37 | #define VFREQ 60 /* Hz */ | 37 | #define VFREQ 60 /* Hz */ |
| 38 | #define TIMING_NAME "Linux UXGA" | 38 | #define TIMING_NAME "Linux UXGA" |
| 39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | 39 | /* No ESTABLISHED_TIMINGx_BITS */ |
| 40 | #define HSYNC_POL 1 | 40 | #define HSYNC_POL 1 |
| 41 | #define VSYNC_POL 1 | 41 | #define VSYNC_POL 1 |
| 42 | #define CRC 0x9d | 42 | #define CRC 0x9d |
diff --git a/Documentation/EDID/1680x1050.S b/Documentation/EDID/1680x1050.S index 96f67cafcf2e..b0d7c69282b4 100644 --- a/Documentation/EDID/1680x1050.S +++ b/Documentation/EDID/1680x1050.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define DPI 96 | 36 | #define DPI 96 |
| 37 | #define VFREQ 60 /* Hz */ | 37 | #define VFREQ 60 /* Hz */ |
| 38 | #define TIMING_NAME "Linux WSXGA" | 38 | #define TIMING_NAME "Linux WSXGA" |
| 39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | 39 | /* No ESTABLISHED_TIMINGx_BITS */ |
| 40 | #define HSYNC_POL 1 | 40 | #define HSYNC_POL 1 |
| 41 | #define VSYNC_POL 1 | 41 | #define VSYNC_POL 1 |
| 42 | #define CRC 0x26 | 42 | #define CRC 0x26 |
diff --git a/Documentation/EDID/1920x1080.S b/Documentation/EDID/1920x1080.S index 36ed5d571d0a..3084355e81e7 100644 --- a/Documentation/EDID/1920x1080.S +++ b/Documentation/EDID/1920x1080.S | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | #define DPI 96 | 36 | #define DPI 96 |
| 37 | #define VFREQ 60 /* Hz */ | 37 | #define VFREQ 60 /* Hz */ |
| 38 | #define TIMING_NAME "Linux FHD" | 38 | #define TIMING_NAME "Linux FHD" |
| 39 | #define ESTABLISHED_TIMINGS_BITS 0x00 /* none */ | 39 | /* No ESTABLISHED_TIMINGx_BITS */ |
| 40 | #define HSYNC_POL 1 | 40 | #define HSYNC_POL 1 |
| 41 | #define VSYNC_POL 1 | 41 | #define VSYNC_POL 1 |
| 42 | #define CRC 0x05 | 42 | #define CRC 0x05 |
diff --git a/Documentation/EDID/800x600.S b/Documentation/EDID/800x600.S new file mode 100644 index 000000000000..6644e26d5801 --- /dev/null +++ b/Documentation/EDID/800x600.S | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | /* | ||
| 2 | 800x600.S: EDID data set for standard 800x600 60 Hz monitor | ||
| 3 | |||
| 4 | Copyright (C) 2011 Carsten Emde <C.Emde@osadl.org> | ||
| 5 | Copyright (C) 2014 Linaro Limited | ||
| 6 | |||
| 7 | This program is free software; you can redistribute it and/or | ||
| 8 | modify it under the terms of the GNU General Public License | ||
| 9 | as published by the Free Software Foundation; either version 2 | ||
| 10 | of the License, or (at your option) any later version. | ||
| 11 | |||
| 12 | This program is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | */ | ||
| 17 | |||
| 18 | /* EDID */ | ||
| 19 | #define VERSION 1 | ||
| 20 | #define REVISION 3 | ||
| 21 | |||
| 22 | /* Display */ | ||
| 23 | #define CLOCK 40000 /* kHz */ | ||
| 24 | #define XPIX 800 | ||
| 25 | #define YPIX 600 | ||
| 26 | #define XY_RATIO XY_RATIO_4_3 | ||
| 27 | #define XBLANK 256 | ||
| 28 | #define YBLANK 28 | ||
| 29 | #define XOFFSET 40 | ||
| 30 | #define XPULSE 128 | ||
| 31 | #define YOFFSET (63+1) | ||
| 32 | #define YPULSE (63+4) | ||
| 33 | #define DPI 72 | ||
| 34 | #define VFREQ 60 /* Hz */ | ||
| 35 | #define TIMING_NAME "Linux SVGA" | ||
| 36 | #define ESTABLISHED_TIMING1_BITS 0x01 /* Bit 0: 800x600 @ 60Hz */ | ||
| 37 | #define HSYNC_POL 1 | ||
| 38 | #define VSYNC_POL 1 | ||
| 39 | #define CRC 0xc2 | ||
| 40 | |||
| 41 | #include "edid.S" | ||
diff --git a/Documentation/EDID/HOWTO.txt b/Documentation/EDID/HOWTO.txt index 7146db1d9e8c..835db332289b 100644 --- a/Documentation/EDID/HOWTO.txt +++ b/Documentation/EDID/HOWTO.txt | |||
| @@ -18,7 +18,7 @@ CONFIG_DRM_LOAD_EDID_FIRMWARE was introduced. It allows to provide an | |||
| 18 | individually prepared or corrected EDID data set in the /lib/firmware | 18 | individually prepared or corrected EDID data set in the /lib/firmware |
| 19 | directory from where it is loaded via the firmware interface. The code | 19 | directory from where it is loaded via the firmware interface. The code |
| 20 | (see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for | 20 | (see drivers/gpu/drm/drm_edid_load.c) contains built-in data sets for |
| 21 | commonly used screen resolutions (1024x768, 1280x1024, 1600x1200, | 21 | commonly used screen resolutions (800x600, 1024x768, 1280x1024, 1600x1200, |
| 22 | 1680x1050, 1920x1080) as binary blobs, but the kernel source tree does | 22 | 1680x1050, 1920x1080) as binary blobs, but the kernel source tree does |
| 23 | not contain code to create these data. In order to elucidate the origin | 23 | not contain code to create these data. In order to elucidate the origin |
| 24 | of the built-in binary EDID blobs and to facilitate the creation of | 24 | of the built-in binary EDID blobs and to facilitate the creation of |
diff --git a/Documentation/EDID/edid.S b/Documentation/EDID/edid.S index ea97ae275fca..7ac03276d7a2 100644 --- a/Documentation/EDID/edid.S +++ b/Documentation/EDID/edid.S | |||
| @@ -33,6 +33,17 @@ | |||
| 33 | #define XY_RATIO_5_4 0b10 | 33 | #define XY_RATIO_5_4 0b10 |
| 34 | #define XY_RATIO_16_9 0b11 | 34 | #define XY_RATIO_16_9 0b11 |
| 35 | 35 | ||
| 36 | /* Provide defaults for the timing bits */ | ||
| 37 | #ifndef ESTABLISHED_TIMING1_BITS | ||
| 38 | #define ESTABLISHED_TIMING1_BITS 0x00 | ||
| 39 | #endif | ||
| 40 | #ifndef ESTABLISHED_TIMING2_BITS | ||
| 41 | #define ESTABLISHED_TIMING2_BITS 0x00 | ||
| 42 | #endif | ||
| 43 | #ifndef ESTABLISHED_TIMING3_BITS | ||
| 44 | #define ESTABLISHED_TIMING3_BITS 0x00 | ||
| 45 | #endif | ||
| 46 | |||
| 36 | #define mfgname2id(v1,v2,v3) \ | 47 | #define mfgname2id(v1,v2,v3) \ |
| 37 | ((((v1-'@')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f)) | 48 | ((((v1-'@')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f)) |
| 38 | #define swap16(v1) ((v1>>8)+((v1&0xff)<<8)) | 49 | #define swap16(v1) ((v1>>8)+((v1&0xff)<<8)) |
| @@ -139,7 +150,7 @@ white_x_y_msb: .byte 0x50,0x54 | |||
| 139 | Bit 2 640x480 @ 75 Hz | 150 | Bit 2 640x480 @ 75 Hz |
| 140 | Bit 1 800x600 @ 56 Hz | 151 | Bit 1 800x600 @ 56 Hz |
| 141 | Bit 0 800x600 @ 60 Hz */ | 152 | Bit 0 800x600 @ 60 Hz */ |
| 142 | estbl_timing1: .byte 0x00 | 153 | estbl_timing1: .byte ESTABLISHED_TIMING1_BITS |
| 143 | 154 | ||
| 144 | /* Bit 7 800x600 @ 72 Hz | 155 | /* Bit 7 800x600 @ 72 Hz |
| 145 | Bit 6 800x600 @ 75 Hz | 156 | Bit 6 800x600 @ 75 Hz |
| @@ -149,11 +160,11 @@ estbl_timing1: .byte 0x00 | |||
| 149 | Bit 2 1024x768 @ 72 Hz | 160 | Bit 2 1024x768 @ 72 Hz |
| 150 | Bit 1 1024x768 @ 75 Hz | 161 | Bit 1 1024x768 @ 75 Hz |
| 151 | Bit 0 1280x1024 @ 75 Hz */ | 162 | Bit 0 1280x1024 @ 75 Hz */ |
| 152 | estbl_timing2: .byte ESTABLISHED_TIMINGS_BITS | 163 | estbl_timing2: .byte ESTABLISHED_TIMING2_BITS |
| 153 | 164 | ||
| 154 | /* Bit 7 1152x870 @ 75 Hz (Apple Macintosh II) | 165 | /* Bit 7 1152x870 @ 75 Hz (Apple Macintosh II) |
| 155 | Bits 6-0 Other manufacturer-specific display mod */ | 166 | Bits 6-0 Other manufacturer-specific display mod */ |
| 156 | estbl_timing3: .byte 0x00 | 167 | estbl_timing3: .byte ESTABLISHED_TIMING3_BITS |
| 157 | 168 | ||
| 158 | /* Standard timing */ | 169 | /* Standard timing */ |
| 159 | /* X resolution, less 31, divided by 8 (256-2288 pixels) */ | 170 | /* X resolution, less 31, divided by 8 (256-2288 pixels) */ |
diff --git a/Documentation/IRQ-domain.txt b/Documentation/IRQ-domain.txt index 03df71aeb38c..8a8b82c9ca53 100644 --- a/Documentation/IRQ-domain.txt +++ b/Documentation/IRQ-domain.txt | |||
| @@ -41,8 +41,7 @@ An interrupt controller driver creates and registers an irq_domain by | |||
| 41 | calling one of the irq_domain_add_*() functions (each mapping method | 41 | calling one of the irq_domain_add_*() functions (each mapping method |
| 42 | has a different allocator function, more on that later). The function | 42 | has a different allocator function, more on that later). The function |
| 43 | will return a pointer to the irq_domain on success. The caller must | 43 | will return a pointer to the irq_domain on success. The caller must |
| 44 | provide the allocator function with an irq_domain_ops structure with | 44 | provide the allocator function with an irq_domain_ops structure. |
| 45 | the .map callback populated as a minimum. | ||
| 46 | 45 | ||
| 47 | In most cases, the irq_domain will begin empty without any mappings | 46 | In most cases, the irq_domain will begin empty without any mappings |
| 48 | between hwirq and IRQ numbers. Mappings are added to the irq_domain | 47 | between hwirq and IRQ numbers. Mappings are added to the irq_domain |
diff --git a/Documentation/RCU/00-INDEX b/Documentation/RCU/00-INDEX index fa57139f50bf..f773a264ae02 100644 --- a/Documentation/RCU/00-INDEX +++ b/Documentation/RCU/00-INDEX | |||
| @@ -12,6 +12,8 @@ lockdep-splat.txt | |||
| 12 | - RCU Lockdep splats explained. | 12 | - RCU Lockdep splats explained. |
| 13 | NMI-RCU.txt | 13 | NMI-RCU.txt |
| 14 | - Using RCU to Protect Dynamic NMI Handlers | 14 | - Using RCU to Protect Dynamic NMI Handlers |
| 15 | rcu_dereference.txt | ||
| 16 | - Proper care and feeding of return values from rcu_dereference() | ||
| 15 | rcubarrier.txt | 17 | rcubarrier.txt |
| 16 | - RCU and Unloadable Modules | 18 | - RCU and Unloadable Modules |
| 17 | rculist_nulls.txt | 19 | rculist_nulls.txt |
diff --git a/Documentation/RCU/checklist.txt b/Documentation/RCU/checklist.txt index 9d10d1db16a5..877947130ebe 100644 --- a/Documentation/RCU/checklist.txt +++ b/Documentation/RCU/checklist.txt | |||
| @@ -114,12 +114,16 @@ over a rather long period of time, but improvements are always welcome! | |||
| 114 | http://www.openvms.compaq.com/wizard/wiz_2637.html | 114 | http://www.openvms.compaq.com/wizard/wiz_2637.html |
| 115 | 115 | ||
| 116 | The rcu_dereference() primitive is also an excellent | 116 | The rcu_dereference() primitive is also an excellent |
| 117 | documentation aid, letting the person reading the code | 117 | documentation aid, letting the person reading the |
| 118 | know exactly which pointers are protected by RCU. | 118 | code know exactly which pointers are protected by RCU. |
| 119 | Please note that compilers can also reorder code, and | 119 | Please note that compilers can also reorder code, and |
| 120 | they are becoming increasingly aggressive about doing | 120 | they are becoming increasingly aggressive about doing |
| 121 | just that. The rcu_dereference() primitive therefore | 121 | just that. The rcu_dereference() primitive therefore also |
| 122 | also prevents destructive compiler optimizations. | 122 | prevents destructive compiler optimizations. However, |
| 123 | with a bit of devious creativity, it is possible to | ||
| 124 | mishandle the return value from rcu_dereference(). | ||
| 125 | Please see rcu_dereference.txt in this directory for | ||
| 126 | more information. | ||
| 123 | 127 | ||
| 124 | The rcu_dereference() primitive is used by the | 128 | The rcu_dereference() primitive is used by the |
| 125 | various "_rcu()" list-traversal primitives, such | 129 | various "_rcu()" list-traversal primitives, such |
diff --git a/Documentation/RCU/rcu_dereference.txt b/Documentation/RCU/rcu_dereference.txt new file mode 100644 index 000000000000..ceb05da5a5ac --- /dev/null +++ b/Documentation/RCU/rcu_dereference.txt | |||
| @@ -0,0 +1,371 @@ | |||
| 1 | PROPER CARE AND FEEDING OF RETURN VALUES FROM rcu_dereference() | ||
| 2 | |||
| 3 | Most of the time, you can use values from rcu_dereference() or one of | ||
| 4 | the similar primitives without worries. Dereferencing (prefix "*"), | ||
| 5 | field selection ("->"), assignment ("="), address-of ("&"), addition and | ||
| 6 | subtraction of constants, and casts all work quite naturally and safely. | ||
| 7 | |||
| 8 | It is nevertheless possible to get into trouble with other operations. | ||
| 9 | Follow these rules to keep your RCU code working properly: | ||
| 10 | |||
| 11 | o You must use one of the rcu_dereference() family of primitives | ||
| 12 | to load an RCU-protected pointer, otherwise CONFIG_PROVE_RCU | ||
| 13 | will complain. Worse yet, your code can see random memory-corruption | ||
| 14 | bugs due to games that compilers and DEC Alpha can play. | ||
| 15 | Without one of the rcu_dereference() primitives, compilers | ||
| 16 | can reload the value, and won't your code have fun with two | ||
| 17 | different values for a single pointer! Without rcu_dereference(), | ||
| 18 | DEC Alpha can load a pointer, dereference that pointer, and | ||
| 19 | return data preceding initialization that preceded the store of | ||
| 20 | the pointer. | ||
| 21 | |||
| 22 | In addition, the volatile cast in rcu_dereference() prevents the | ||
| 23 | compiler from deducing the resulting pointer value. Please see | ||
| 24 | the section entitled "EXAMPLE WHERE THE COMPILER KNOWS TOO MUCH" | ||
| 25 | for an example where the compiler can in fact deduce the exact | ||
| 26 | value of the pointer, and thus cause misordering. | ||
| 27 | |||
| 28 | o Do not use single-element RCU-protected arrays. The compiler | ||
| 29 | is within its right to assume that the value of an index into | ||
| 30 | such an array must necessarily evaluate to zero. The compiler | ||
| 31 | could then substitute the constant zero for the computation, so | ||
| 32 | that the array index no longer depended on the value returned | ||
| 33 | by rcu_dereference(). If the array index no longer depends | ||
| 34 | on rcu_dereference(), then both the compiler and the CPU | ||
| 35 | are within their rights to order the array access before the | ||
| 36 | rcu_dereference(), which can cause the array access to return | ||
| 37 | garbage. | ||
| 38 | |||
| 39 | o Avoid cancellation when using the "+" and "-" infix arithmetic | ||
| 40 | operators. For example, for a given variable "x", avoid | ||
| 41 | "(x-x)". There are similar arithmetic pitfalls from other | ||
| 42 | arithmetic operatiors, such as "(x*0)", "(x/(x+1))" or "(x%1)". | ||
| 43 | The compiler is within its rights to substitute zero for all of | ||
| 44 | these expressions, so that subsequent accesses no longer depend | ||
| 45 | on the rcu_dereference(), again possibly resulting in bugs due | ||
| 46 | to misordering. | ||
| 47 | |||
| 48 | Of course, if "p" is a pointer from rcu_dereference(), and "a" | ||
| 49 | and "b" are integers that happen to be equal, the expression | ||
| 50 | "p+a-b" is safe because its value still necessarily depends on | ||
| 51 | the rcu_dereference(), thus maintaining proper ordering. | ||
| 52 | |||
| 53 | o Avoid all-zero operands to the bitwise "&" operator, and | ||
| 54 | similarly avoid all-ones operands to the bitwise "|" operator. | ||
| 55 | If the compiler is able to deduce the value of such operands, | ||
| 56 | it is within its rights to substitute the corresponding constant | ||
| 57 | for the bitwise operation. Once again, this causes subsequent | ||
| 58 | accesses to no longer depend on the rcu_dereference(), causing | ||
| 59 | bugs due to misordering. | ||
| 60 | |||
| 61 | Please note that single-bit operands to bitwise "&" can also | ||
| 62 | be dangerous. At this point, the compiler knows that the | ||
| 63 | resulting value can only take on one of two possible values. | ||
| 64 | Therefore, a very small amount of additional information will | ||
| 65 | allow the compiler to deduce the exact value, which again can | ||
| 66 | result in misordering. | ||
| 67 | |||
| 68 | o If you are using RCU to protect JITed functions, so that the | ||
| 69 | "()" function-invocation operator is applied to a value obtained | ||
| 70 | (directly or indirectly) from rcu_dereference(), you may need to | ||
| 71 | interact directly with the hardware to flush instruction caches. | ||
| 72 | This issue arises on some systems when a newly JITed function is | ||
| 73 | using the same memory that was used by an earlier JITed function. | ||
| 74 | |||
| 75 | o Do not use the results from the boolean "&&" and "||" when | ||
| 76 | dereferencing. For example, the following (rather improbable) | ||
| 77 | code is buggy: | ||
| 78 | |||
| 79 | int a[2]; | ||
| 80 | int index; | ||
| 81 | int force_zero_index = 1; | ||
| 82 | |||
| 83 | ... | ||
| 84 | |||
| 85 | r1 = rcu_dereference(i1) | ||
| 86 | r2 = a[r1 && force_zero_index]; /* BUGGY!!! */ | ||
| 87 | |||
| 88 | The reason this is buggy is that "&&" and "||" are often compiled | ||
| 89 | using branches. While weak-memory machines such as ARM or PowerPC | ||
| 90 | do order stores after such branches, they can speculate loads, | ||
| 91 | which can result in misordering bugs. | ||
| 92 | |||
| 93 | o Do not use the results from relational operators ("==", "!=", | ||
| 94 | ">", ">=", "<", or "<=") when dereferencing. For example, | ||
| 95 | the following (quite strange) code is buggy: | ||
| 96 | |||
| 97 | int a[2]; | ||
| 98 | int index; | ||
| 99 | int flip_index = 0; | ||
| 100 | |||
| 101 | ... | ||
| 102 | |||
| 103 | r1 = rcu_dereference(i1) | ||
| 104 | r2 = a[r1 != flip_index]; /* BUGGY!!! */ | ||
| 105 | |||
| 106 | As before, the reason this is buggy is that relational operators | ||
| 107 | are often compiled using branches. And as before, although | ||
| 108 | weak-memory machines such as ARM or PowerPC do order stores | ||
| 109 | after such branches, but can speculate loads, which can again | ||
| 110 | result in misordering bugs. | ||
| 111 | |||
| 112 | o Be very careful about comparing pointers obtained from | ||
| 113 | rcu_dereference() against non-NULL values. As Linus Torvalds | ||
| 114 | explained, if the two pointers are equal, the compiler could | ||
| 115 | substitute the pointer you are comparing against for the pointer | ||
| 116 | obtained from rcu_dereference(). For example: | ||
| 117 | |||
| 118 | p = rcu_dereference(gp); | ||
| 119 | if (p == &default_struct) | ||
| 120 | do_default(p->a); | ||
| 121 | |||
| 122 | Because the compiler now knows that the value of "p" is exactly | ||
| 123 | the address of the variable "default_struct", it is free to | ||
| 124 | transform this code into the following: | ||
| 125 | |||
| 126 | p = rcu_dereference(gp); | ||
| 127 | if (p == &default_struct) | ||
| 128 | do_default(default_struct.a); | ||
| 129 | |||
| 130 | On ARM and Power hardware, the load from "default_struct.a" | ||
| 131 | can now be speculated, such that it might happen before the | ||
| 132 | rcu_dereference(). This could result in bugs due to misordering. | ||
| 133 | |||
| 134 | However, comparisons are OK in the following cases: | ||
| 135 | |||
| 136 | o The comparison was against the NULL pointer. If the | ||
| 137 | compiler knows that the pointer is NULL, you had better | ||
| 138 | not be dereferencing it anyway. If the comparison is | ||
| 139 | non-equal, the compiler is none the wiser. Therefore, | ||
| 140 | it is safe to compare pointers from rcu_dereference() | ||
| 141 | against NULL pointers. | ||
| 142 | |||
| 143 | o The pointer is never dereferenced after being compared. | ||
| 144 | Since there are no subsequent dereferences, the compiler | ||
| 145 | cannot use anything it learned from the comparison | ||
| 146 | to reorder the non-existent subsequent dereferences. | ||
| 147 | This sort of comparison occurs frequently when scanning | ||
| 148 | RCU-protected circular linked lists. | ||
| 149 | |||
| 150 | o The comparison is against a pointer that references memory | ||
| 151 | that was initialized "a long time ago." The reason | ||
| 152 | this is safe is that even if misordering occurs, the | ||
| 153 | misordering will not affect the accesses that follow | ||
| 154 | the comparison. So exactly how long ago is "a long | ||
| 155 | time ago"? Here are some possibilities: | ||
| 156 | |||
| 157 | o Compile time. | ||
| 158 | |||
| 159 | o Boot time. | ||
| 160 | |||
| 161 | o Module-init time for module code. | ||
| 162 | |||
| 163 | o Prior to kthread creation for kthread code. | ||
| 164 | |||
| 165 | o During some prior acquisition of the lock that | ||
| 166 | we now hold. | ||
| 167 | |||
| 168 | o Before mod_timer() time for a timer handler. | ||
| 169 | |||
| 170 | There are many other possibilities involving the Linux | ||
| 171 | kernel's wide array of primitives that cause code to | ||
| 172 | be invoked at a later time. | ||
| 173 | |||
| 174 | o The pointer being compared against also came from | ||
| 175 | rcu_dereference(). In this case, both pointers depend | ||
| 176 | on one rcu_dereference() or another, so you get proper | ||
| 177 | ordering either way. | ||
| 178 | |||
| 179 | That said, this situation can make certain RCU usage | ||
| 180 | bugs more likely to happen. Which can be a good thing, | ||
| 181 | at least if they happen during testing. An example | ||
| 182 | of such an RCU usage bug is shown in the section titled | ||
| 183 | "EXAMPLE OF AMPLIFIED RCU-USAGE BUG". | ||
| 184 | |||
| 185 | o All of the accesses following the comparison are stores, | ||
| 186 | so that a control dependency preserves the needed ordering. | ||
| 187 | That said, it is easy to get control dependencies wrong. | ||
| 188 | Please see the "CONTROL DEPENDENCIES" section of | ||
| 189 | Documentation/memory-barriers.txt for more details. | ||
| 190 | |||
| 191 | o The pointers are not equal -and- the compiler does | ||
| 192 | not have enough information to deduce the value of the | ||
| 193 | pointer. Note that the volatile cast in rcu_dereference() | ||
| 194 | will normally prevent the compiler from knowing too much. | ||
| 195 | |||
| 196 | o Disable any value-speculation optimizations that your compiler | ||
| 197 | might provide, especially if you are making use of feedback-based | ||
| 198 | optimizations that take data collected from prior runs. Such | ||
| 199 | value-speculation optimizations reorder operations by design. | ||
| 200 | |||
| 201 | There is one exception to this rule: Value-speculation | ||
| 202 | optimizations that leverage the branch-prediction hardware are | ||
| 203 | safe on strongly ordered systems (such as x86), but not on weakly | ||
| 204 | ordered systems (such as ARM or Power). Choose your compiler | ||
| 205 | command-line options wisely! | ||
| 206 | |||
| 207 | |||
| 208 | EXAMPLE OF AMPLIFIED RCU-USAGE BUG | ||
| 209 | |||
| 210 | Because updaters can run concurrently with RCU readers, RCU readers can | ||
| 211 | see stale and/or inconsistent values. If RCU readers need fresh or | ||
| 212 | consistent values, which they sometimes do, they need to take proper | ||
| 213 | precautions. To see this, consider the following code fragment: | ||
| 214 | |||
| 215 | struct foo { | ||
| 216 | int a; | ||
| 217 | int b; | ||
| 218 | int c; | ||
| 219 | }; | ||
| 220 | struct foo *gp1; | ||
| 221 | struct foo *gp2; | ||
| 222 | |||
| 223 | void updater(void) | ||
| 224 | { | ||
| 225 | struct foo *p; | ||
| 226 | |||
| 227 | p = kmalloc(...); | ||
| 228 | if (p == NULL) | ||
| 229 | deal_with_it(); | ||
| 230 | p->a = 42; /* Each field in its own cache line. */ | ||
| 231 | p->b = 43; | ||
| 232 | p->c = 44; | ||
| 233 | rcu_assign_pointer(gp1, p); | ||
| 234 | p->b = 143; | ||
| 235 | p->c = 144; | ||
| 236 | rcu_assign_pointer(gp2, p); | ||
| 237 | } | ||
| 238 | |||
| 239 | void reader(void) | ||
| 240 | { | ||
| 241 | struct foo *p; | ||
| 242 | struct foo *q; | ||
| 243 | int r1, r2; | ||
| 244 | |||
| 245 | p = rcu_dereference(gp2); | ||
| 246 | if (p == NULL) | ||
| 247 | return; | ||
| 248 | r1 = p->b; /* Guaranteed to get 143. */ | ||
| 249 | q = rcu_dereference(gp1); /* Guaranteed non-NULL. */ | ||
| 250 | if (p == q) { | ||
| 251 | /* The compiler decides that q->c is same as p->c. */ | ||
| 252 | r2 = p->c; /* Could get 44 on weakly order system. */ | ||
| 253 | } | ||
| 254 | do_something_with(r1, r2); | ||
| 255 | } | ||
| 256 | |||
| 257 | You might be surprised that the outcome (r1 == 143 && r2 == 44) is possible, | ||
| 258 | but you should not be. After all, the updater might have been invoked | ||
| 259 | a second time between the time reader() loaded into "r1" and the time | ||
| 260 | that it loaded into "r2". The fact that this same result can occur due | ||
| 261 | to some reordering from the compiler and CPUs is beside the point. | ||
| 262 | |||
| 263 | But suppose that the reader needs a consistent view? | ||
| 264 | |||
| 265 | Then one approach is to use locking, for example, as follows: | ||
| 266 | |||
| 267 | struct foo { | ||
| 268 | int a; | ||
| 269 | int b; | ||
| 270 | int c; | ||
| 271 | spinlock_t lock; | ||
| 272 | }; | ||
| 273 | struct foo *gp1; | ||
| 274 | struct foo *gp2; | ||
| 275 | |||
| 276 | void updater(void) | ||
| 277 | { | ||
| 278 | struct foo *p; | ||
| 279 | |||
| 280 | p = kmalloc(...); | ||
| 281 | if (p == NULL) | ||
| 282 | deal_with_it(); | ||
| 283 | spin_lock(&p->lock); | ||
| 284 | p->a = 42; /* Each field in its own cache line. */ | ||
| 285 | p->b = 43; | ||
| 286 | p->c = 44; | ||
| 287 | spin_unlock(&p->lock); | ||
| 288 | rcu_assign_pointer(gp1, p); | ||
| 289 | spin_lock(&p->lock); | ||
| 290 | p->b = 143; | ||
| 291 | p->c = 144; | ||
| 292 | spin_unlock(&p->lock); | ||
| 293 | rcu_assign_pointer(gp2, p); | ||
| 294 | } | ||
| 295 | |||
| 296 | void reader(void) | ||
| 297 | { | ||
| 298 | struct foo *p; | ||
| 299 | struct foo *q; | ||
| 300 | int r1, r2; | ||
| 301 | |||
| 302 | p = rcu_dereference(gp2); | ||
| 303 | if (p == NULL) | ||
| 304 | return; | ||
| 305 | spin_lock(&p->lock); | ||
| 306 | r1 = p->b; /* Guaranteed to get 143. */ | ||
| 307 | q = rcu_dereference(gp1); /* Guaranteed non-NULL. */ | ||
| 308 | if (p == q) { | ||
| 309 | /* The compiler decides that q->c is same as p->c. */ | ||
| 310 | r2 = p->c; /* Locking guarantees r2 == 144. */ | ||
| 311 | } | ||
| 312 | spin_unlock(&p->lock); | ||
| 313 | do_something_with(r1, r2); | ||
| 314 | } | ||
| 315 | |||
| 316 | As always, use the right tool for the job! | ||
| 317 | |||
| 318 | |||
| 319 | EXAMPLE WHERE THE COMPILER KNOWS TOO MUCH | ||
| 320 | |||
| 321 | If a pointer obtained from rcu_dereference() compares not-equal to some | ||
| 322 | other pointer, the compiler normally has no clue what the value of the | ||
| 323 | first pointer might be. This lack of knowledge prevents the compiler | ||
| 324 | from carrying out optimizations that otherwise might destroy the ordering | ||
| 325 | guarantees that RCU depends on. And the volatile cast in rcu_dereference() | ||
| 326 | should prevent the compiler from guessing the value. | ||
| 327 | |||
| 328 | But without rcu_dereference(), the compiler knows more than you might | ||
| 329 | expect. Consider the following code fragment: | ||
| 330 | |||
| 331 | struct foo { | ||
| 332 | int a; | ||
| 333 | int b; | ||
| 334 | }; | ||
| 335 | static struct foo variable1; | ||
| 336 | static struct foo variable2; | ||
| 337 | static struct foo *gp = &variable1; | ||
| 338 | |||
| 339 | void updater(void) | ||
| 340 | { | ||
| 341 | initialize_foo(&variable2); | ||
| 342 | rcu_assign_pointer(gp, &variable2); | ||
| 343 | /* | ||
| 344 | * The above is the only store to gp in this translation unit, | ||
| 345 | * and the address of gp is not exported in any way. | ||
| 346 | */ | ||
| 347 | } | ||
| 348 | |||
| 349 | int reader(void) | ||
| 350 | { | ||
| 351 | struct foo *p; | ||
| 352 | |||
| 353 | p = gp; | ||
| 354 | barrier(); | ||
| 355 | if (p == &variable1) | ||
| 356 | return p->a; /* Must be variable1.a. */ | ||
| 357 | else | ||
| 358 | return p->b; /* Must be variable2.b. */ | ||
| 359 | } | ||
| 360 | |||
| 361 | Because the compiler can see all stores to "gp", it knows that the only | ||
| 362 | possible values of "gp" are "variable1" on the one hand and "variable2" | ||
| 363 | on the other. The comparison in reader() therefore tells the compiler | ||
| 364 | the exact value of "p" even in the not-equals case. This allows the | ||
| 365 | compiler to make the return values independent of the load from "gp", | ||
| 366 | in turn destroying the ordering between this load and the loads of the | ||
| 367 | return values. This can result in "p->b" returning pre-initialization | ||
| 368 | garbage values. | ||
| 369 | |||
| 370 | In short, rcu_dereference() is -not- optional when you are going to | ||
| 371 | dereference the resulting pointer. | ||
diff --git a/Documentation/RCU/stallwarn.txt b/Documentation/RCU/stallwarn.txt index 6f3a0057548e..68fe3ad27015 100644 --- a/Documentation/RCU/stallwarn.txt +++ b/Documentation/RCU/stallwarn.txt | |||
| @@ -24,7 +24,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT | |||
| 24 | timing of the next warning for the current stall. | 24 | timing of the next warning for the current stall. |
| 25 | 25 | ||
| 26 | Stall-warning messages may be enabled and disabled completely via | 26 | Stall-warning messages may be enabled and disabled completely via |
| 27 | /sys/module/rcutree/parameters/rcu_cpu_stall_suppress. | 27 | /sys/module/rcupdate/parameters/rcu_cpu_stall_suppress. |
| 28 | 28 | ||
| 29 | CONFIG_RCU_CPU_STALL_VERBOSE | 29 | CONFIG_RCU_CPU_STALL_VERBOSE |
| 30 | 30 | ||
diff --git a/Documentation/RCU/whatisRCU.txt b/Documentation/RCU/whatisRCU.txt index 0f0fb7c432c2..49b8551a3b68 100644 --- a/Documentation/RCU/whatisRCU.txt +++ b/Documentation/RCU/whatisRCU.txt | |||
| @@ -326,11 +326,11 @@ used as follows: | |||
| 326 | a. synchronize_rcu() rcu_read_lock() / rcu_read_unlock() | 326 | a. synchronize_rcu() rcu_read_lock() / rcu_read_unlock() |
| 327 | call_rcu() rcu_dereference() | 327 | call_rcu() rcu_dereference() |
| 328 | 328 | ||
| 329 | b. call_rcu_bh() rcu_read_lock_bh() / rcu_read_unlock_bh() | 329 | b. synchronize_rcu_bh() rcu_read_lock_bh() / rcu_read_unlock_bh() |
| 330 | rcu_dereference_bh() | 330 | call_rcu_bh() rcu_dereference_bh() |
| 331 | 331 | ||
| 332 | c. synchronize_sched() rcu_read_lock_sched() / rcu_read_unlock_sched() | 332 | c. synchronize_sched() rcu_read_lock_sched() / rcu_read_unlock_sched() |
| 333 | preempt_disable() / preempt_enable() | 333 | call_rcu_sched() preempt_disable() / preempt_enable() |
| 334 | local_irq_save() / local_irq_restore() | 334 | local_irq_save() / local_irq_restore() |
| 335 | hardirq enter / hardirq exit | 335 | hardirq enter / hardirq exit |
| 336 | NMI enter / NMI exit | 336 | NMI enter / NMI exit |
| @@ -794,10 +794,22 @@ in docbook. Here is the list, by category. | |||
| 794 | 794 | ||
| 795 | RCU list traversal: | 795 | RCU list traversal: |
| 796 | 796 | ||
| 797 | list_entry_rcu | ||
| 798 | list_first_entry_rcu | ||
| 799 | list_next_rcu | ||
| 797 | list_for_each_entry_rcu | 800 | list_for_each_entry_rcu |
| 801 | list_for_each_entry_continue_rcu | ||
| 802 | hlist_first_rcu | ||
| 803 | hlist_next_rcu | ||
| 804 | hlist_pprev_rcu | ||
| 798 | hlist_for_each_entry_rcu | 805 | hlist_for_each_entry_rcu |
| 806 | hlist_for_each_entry_rcu_bh | ||
| 807 | hlist_for_each_entry_continue_rcu | ||
| 808 | hlist_for_each_entry_continue_rcu_bh | ||
| 809 | hlist_nulls_first_rcu | ||
| 799 | hlist_nulls_for_each_entry_rcu | 810 | hlist_nulls_for_each_entry_rcu |
| 800 | list_for_each_entry_continue_rcu | 811 | hlist_bl_first_rcu |
| 812 | hlist_bl_for_each_entry_rcu | ||
| 801 | 813 | ||
| 802 | RCU pointer/list update: | 814 | RCU pointer/list update: |
| 803 | 815 | ||
| @@ -806,28 +818,38 @@ RCU pointer/list update: | |||
| 806 | list_add_tail_rcu | 818 | list_add_tail_rcu |
| 807 | list_del_rcu | 819 | list_del_rcu |
| 808 | list_replace_rcu | 820 | list_replace_rcu |
| 809 | hlist_del_rcu | ||
| 810 | hlist_add_after_rcu | 821 | hlist_add_after_rcu |
| 811 | hlist_add_before_rcu | 822 | hlist_add_before_rcu |
| 812 | hlist_add_head_rcu | 823 | hlist_add_head_rcu |
| 824 | hlist_del_rcu | ||
| 825 | hlist_del_init_rcu | ||
| 813 | hlist_replace_rcu | 826 | hlist_replace_rcu |
| 814 | list_splice_init_rcu() | 827 | list_splice_init_rcu() |
| 828 | hlist_nulls_del_init_rcu | ||
| 829 | hlist_nulls_del_rcu | ||
| 830 | hlist_nulls_add_head_rcu | ||
| 831 | hlist_bl_add_head_rcu | ||
| 832 | hlist_bl_del_init_rcu | ||
| 833 | hlist_bl_del_rcu | ||
| 834 | hlist_bl_set_first_rcu | ||
| 815 | 835 | ||
| 816 | RCU: Critical sections Grace period Barrier | 836 | RCU: Critical sections Grace period Barrier |
| 817 | 837 | ||
| 818 | rcu_read_lock synchronize_net rcu_barrier | 838 | rcu_read_lock synchronize_net rcu_barrier |
| 819 | rcu_read_unlock synchronize_rcu | 839 | rcu_read_unlock synchronize_rcu |
| 820 | rcu_dereference synchronize_rcu_expedited | 840 | rcu_dereference synchronize_rcu_expedited |
| 821 | call_rcu | 841 | rcu_read_lock_held call_rcu |
| 822 | kfree_rcu | 842 | rcu_dereference_check kfree_rcu |
| 823 | 843 | rcu_dereference_protected | |
| 824 | 844 | ||
| 825 | bh: Critical sections Grace period Barrier | 845 | bh: Critical sections Grace period Barrier |
| 826 | 846 | ||
| 827 | rcu_read_lock_bh call_rcu_bh rcu_barrier_bh | 847 | rcu_read_lock_bh call_rcu_bh rcu_barrier_bh |
| 828 | rcu_read_unlock_bh synchronize_rcu_bh | 848 | rcu_read_unlock_bh synchronize_rcu_bh |
| 829 | rcu_dereference_bh synchronize_rcu_bh_expedited | 849 | rcu_dereference_bh synchronize_rcu_bh_expedited |
| 830 | 850 | rcu_dereference_bh_check | |
| 851 | rcu_dereference_bh_protected | ||
| 852 | rcu_read_lock_bh_held | ||
| 831 | 853 | ||
| 832 | sched: Critical sections Grace period Barrier | 854 | sched: Critical sections Grace period Barrier |
| 833 | 855 | ||
| @@ -835,7 +857,12 @@ sched: Critical sections Grace period Barrier | |||
| 835 | rcu_read_unlock_sched call_rcu_sched | 857 | rcu_read_unlock_sched call_rcu_sched |
| 836 | [preempt_disable] synchronize_sched_expedited | 858 | [preempt_disable] synchronize_sched_expedited |
| 837 | [and friends] | 859 | [and friends] |
| 860 | rcu_read_lock_sched_notrace | ||
| 861 | rcu_read_unlock_sched_notrace | ||
| 838 | rcu_dereference_sched | 862 | rcu_dereference_sched |
| 863 | rcu_dereference_sched_check | ||
| 864 | rcu_dereference_sched_protected | ||
| 865 | rcu_read_lock_sched_held | ||
| 839 | 866 | ||
| 840 | 867 | ||
| 841 | SRCU: Critical sections Grace period Barrier | 868 | SRCU: Critical sections Grace period Barrier |
| @@ -843,6 +870,8 @@ SRCU: Critical sections Grace period Barrier | |||
| 843 | srcu_read_lock synchronize_srcu srcu_barrier | 870 | srcu_read_lock synchronize_srcu srcu_barrier |
| 844 | srcu_read_unlock call_srcu | 871 | srcu_read_unlock call_srcu |
| 845 | srcu_dereference synchronize_srcu_expedited | 872 | srcu_dereference synchronize_srcu_expedited |
| 873 | srcu_dereference_check | ||
| 874 | srcu_read_lock_held | ||
| 846 | 875 | ||
| 847 | SRCU: Initialization/cleanup | 876 | SRCU: Initialization/cleanup |
| 848 | init_srcu_struct | 877 | init_srcu_struct |
| @@ -850,9 +879,13 @@ SRCU: Initialization/cleanup | |||
| 850 | 879 | ||
| 851 | All: lockdep-checked RCU-protected pointer access | 880 | All: lockdep-checked RCU-protected pointer access |
| 852 | 881 | ||
| 853 | rcu_dereference_check | 882 | rcu_access_index |
| 854 | rcu_dereference_protected | ||
| 855 | rcu_access_pointer | 883 | rcu_access_pointer |
| 884 | rcu_dereference_index_check | ||
| 885 | rcu_dereference_raw | ||
| 886 | rcu_lockdep_assert | ||
| 887 | rcu_sleep_check | ||
| 888 | RCU_NONIDLE | ||
| 856 | 889 | ||
| 857 | See the comment headers in the source code (or the docbook generated | 890 | See the comment headers in the source code (or the docbook generated |
| 858 | from them) for more information. | 891 | from them) for more information. |
diff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches index 2a8e89e13e45..7e9abb8a276b 100644 --- a/Documentation/SubmittingPatches +++ b/Documentation/SubmittingPatches | |||
| @@ -132,6 +132,20 @@ Example: | |||
| 132 | platform_set_drvdata(), but left the variable "dev" unused, | 132 | platform_set_drvdata(), but left the variable "dev" unused, |
| 133 | delete it. | 133 | delete it. |
| 134 | 134 | ||
| 135 | If your patch fixes a bug in a specific commit, e.g. you found an issue using | ||
| 136 | git-bisect, please use the 'Fixes:' tag with the first 12 characters of the | ||
| 137 | SHA-1 ID, and the one line summary. | ||
| 138 | Example: | ||
| 139 | |||
| 140 | Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()") | ||
| 141 | |||
| 142 | The following git-config settings can be used to add a pretty format for | ||
| 143 | outputting the above style in the git log or git show commands | ||
| 144 | |||
| 145 | [core] | ||
| 146 | abbrev = 12 | ||
| 147 | [pretty] | ||
| 148 | fixes = Fixes: %h (\"%s\") | ||
| 135 | 149 | ||
| 136 | 3) Separate your changes. | 150 | 3) Separate your changes. |
| 137 | 151 | ||
| @@ -443,7 +457,7 @@ person it names. This tag documents that potentially interested parties | |||
| 443 | have been included in the discussion | 457 | have been included in the discussion |
| 444 | 458 | ||
| 445 | 459 | ||
| 446 | 14) Using Reported-by:, Tested-by:, Reviewed-by: and Suggested-by: | 460 | 14) Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes: |
| 447 | 461 | ||
| 448 | If this patch fixes a problem reported by somebody else, consider adding a | 462 | If this patch fixes a problem reported by somebody else, consider adding a |
| 449 | Reported-by: tag to credit the reporter for their contribution. Please | 463 | Reported-by: tag to credit the reporter for their contribution. Please |
| @@ -498,6 +512,12 @@ idea was not posted in a public forum. That said, if we diligently credit our | |||
| 498 | idea reporters, they will, hopefully, be inspired to help us again in the | 512 | idea reporters, they will, hopefully, be inspired to help us again in the |
| 499 | future. | 513 | future. |
| 500 | 514 | ||
| 515 | A Fixes: tag indicates that the patch fixes an issue in a previous commit. It | ||
| 516 | is used to make it easy to determine where a bug originated, which can help | ||
| 517 | review a bug fix. This tag also assists the stable kernel team in determining | ||
| 518 | which stable kernel versions should receive your fix. This is the preferred | ||
| 519 | method for indicating a bug fixed by the patch. See #2 above for more details. | ||
| 520 | |||
| 501 | 521 | ||
| 502 | 15) The canonical patch format | 522 | 15) The canonical patch format |
| 503 | 523 | ||
diff --git a/Documentation/acpi/enumeration.txt b/Documentation/acpi/enumeration.txt index 2a1519b87177..fd786ea13a1f 100644 --- a/Documentation/acpi/enumeration.txt +++ b/Documentation/acpi/enumeration.txt | |||
| @@ -296,7 +296,7 @@ specifies the path to the controller. In order to use these GPIOs in Linux | |||
| 296 | we need to translate them to the corresponding Linux GPIO descriptors. | 296 | we need to translate them to the corresponding Linux GPIO descriptors. |
| 297 | 297 | ||
| 298 | There is a standard GPIO API for that and is documented in | 298 | There is a standard GPIO API for that and is documented in |
| 299 | Documentation/gpio.txt. | 299 | Documentation/gpio/. |
| 300 | 300 | ||
| 301 | In the above example we can get the corresponding two GPIO descriptors with | 301 | In the above example we can get the corresponding two GPIO descriptors with |
| 302 | a code like this: | 302 | a code like this: |
diff --git a/Documentation/arm/00-INDEX b/Documentation/arm/00-INDEX index a94090cc785d..3b08bc2b04cf 100644 --- a/Documentation/arm/00-INDEX +++ b/Documentation/arm/00-INDEX | |||
| @@ -46,5 +46,7 @@ swp_emulation | |||
| 46 | - SWP/SWPB emulation handler/logging description | 46 | - SWP/SWPB emulation handler/logging description |
| 47 | tcm.txt | 47 | tcm.txt |
| 48 | - ARM Tightly Coupled Memory | 48 | - ARM Tightly Coupled Memory |
| 49 | uefi.txt | ||
| 50 | - [U]EFI configuration and runtime services documentation | ||
| 49 | vlocks.txt | 51 | vlocks.txt |
| 50 | - Voting locks, low-level mechanism relying on memory system atomic writes. | 52 | - Voting locks, low-level mechanism relying on memory system atomic writes. |
diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README index 963ec445e15a..2cce5401e323 100644 --- a/Documentation/arm/Marvell/README +++ b/Documentation/arm/Marvell/README | |||
| @@ -234,6 +234,11 @@ Berlin family (Digital Entertainment) | |||
| 234 | Core: Marvell PJ4B (ARMv7), Tauros3 L2CC | 234 | Core: Marvell PJ4B (ARMv7), Tauros3 L2CC |
| 235 | Homepage: http://www.marvell.com/digital-entertainment/armada-1500/ | 235 | Homepage: http://www.marvell.com/digital-entertainment/armada-1500/ |
| 236 | Product Brief: http://www.marvell.com/digital-entertainment/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf | 236 | Product Brief: http://www.marvell.com/digital-entertainment/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf |
| 237 | 88DE3114, Armada 1500 Pro | ||
| 238 | Design name: BG2-Q | ||
| 239 | Core: Quad Core ARM Cortex-A9, PL310 L2CC | ||
| 240 | Homepage: http://www.marvell.com/digital-entertainment/armada-1500-pro/ | ||
| 241 | Product Brief: http://www.marvell.com/digital-entertainment/armada-1500-pro/assets/Marvell_ARMADA_1500_PRO-01_product_brief.pdf | ||
| 237 | 88DE???? | 242 | 88DE???? |
| 238 | Design name: BG3 | 243 | Design name: BG3 |
| 239 | Core: ARM Cortex-A15, CA15 integrated L2CC | 244 | Core: ARM Cortex-A15, CA15 integrated L2CC |
diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt index 4bfb9ffbdbc1..38dc06d0a791 100644 --- a/Documentation/arm/memory.txt +++ b/Documentation/arm/memory.txt | |||
| @@ -41,16 +41,9 @@ fffe8000 fffeffff DTCM mapping area for platforms with | |||
| 41 | fffe0000 fffe7fff ITCM mapping area for platforms with | 41 | fffe0000 fffe7fff ITCM mapping area for platforms with |
| 42 | ITCM mounted inside the CPU. | 42 | ITCM mounted inside the CPU. |
| 43 | 43 | ||
| 44 | fff00000 fffdffff Fixmap mapping region. Addresses provided | 44 | ffc00000 ffdfffff Fixmap mapping region. Addresses provided |
| 45 | by fix_to_virt() will be located here. | 45 | by fix_to_virt() will be located here. |
| 46 | 46 | ||
| 47 | ffc00000 ffefffff DMA memory mapping region. Memory returned | ||
| 48 | by the dma_alloc_xxx functions will be | ||
| 49 | dynamically mapped here. | ||
| 50 | |||
| 51 | ff000000 ffbfffff Reserved for future expansion of DMA | ||
| 52 | mapping region. | ||
| 53 | |||
| 54 | fee00000 feffffff Mapping of PCI I/O space. This is a static | 47 | fee00000 feffffff Mapping of PCI I/O space. This is a static |
| 55 | mapping within the vmalloc space. | 48 | mapping within the vmalloc space. |
| 56 | 49 | ||
diff --git a/Documentation/arm/sti/stih407-overview.txt b/Documentation/arm/sti/stih407-overview.txt new file mode 100644 index 000000000000..3343f32f58bc --- /dev/null +++ b/Documentation/arm/sti/stih407-overview.txt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | STiH407 Overview | ||
| 2 | ================ | ||
| 3 | |||
| 4 | Introduction | ||
| 5 | ------------ | ||
| 6 | |||
| 7 | The STiH407 is the new generation of SoC for Multi-HD, AVC set-top boxes | ||
| 8 | and server/connected client application for satellite, cable, terrestrial | ||
| 9 | and IP-STB markets. | ||
| 10 | |||
| 11 | Features | ||
| 12 | - ARM Cortex-A9 1.5 GHz dual core CPU (28nm) | ||
| 13 | - SATA2, USB 3.0, PCIe, Gbit Ethernet | ||
| 14 | |||
| 15 | Document Author | ||
| 16 | --------------- | ||
| 17 | |||
| 18 | Maxime Coquelin <maxime.coquelin@st.com>, (c) 2014 ST Microelectronics | ||
diff --git a/Documentation/arm/uefi.txt b/Documentation/arm/uefi.txt new file mode 100644 index 000000000000..d60030a1b909 --- /dev/null +++ b/Documentation/arm/uefi.txt | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | UEFI, the Unified Extensible Firmware Interface, is a specification | ||
| 2 | governing the behaviours of compatible firmware interfaces. It is | ||
| 3 | maintained by the UEFI Forum - http://www.uefi.org/. | ||
| 4 | |||
| 5 | UEFI is an evolution of its predecessor 'EFI', so the terms EFI and | ||
| 6 | UEFI are used somewhat interchangeably in this document and associated | ||
| 7 | source code. As a rule, anything new uses 'UEFI', whereas 'EFI' refers | ||
| 8 | to legacy code or specifications. | ||
| 9 | |||
| 10 | UEFI support in Linux | ||
| 11 | ===================== | ||
| 12 | Booting on a platform with firmware compliant with the UEFI specification | ||
| 13 | makes it possible for the kernel to support additional features: | ||
| 14 | - UEFI Runtime Services | ||
| 15 | - Retrieving various configuration information through the standardised | ||
| 16 | interface of UEFI configuration tables. (ACPI, SMBIOS, ...) | ||
| 17 | |||
| 18 | For actually enabling [U]EFI support, enable: | ||
| 19 | - CONFIG_EFI=y | ||
| 20 | - CONFIG_EFI_VARS=y or m | ||
| 21 | |||
| 22 | The implementation depends on receiving information about the UEFI environment | ||
| 23 | in a Flattened Device Tree (FDT) - so is only available with CONFIG_OF. | ||
| 24 | |||
| 25 | UEFI stub | ||
| 26 | ========= | ||
| 27 | The "stub" is a feature that extends the Image/zImage into a valid UEFI | ||
| 28 | PE/COFF executable, including a loader application that makes it possible to | ||
| 29 | load the kernel directly from the UEFI shell, boot menu, or one of the | ||
| 30 | lightweight bootloaders like Gummiboot or rEFInd. | ||
| 31 | |||
| 32 | The kernel image built with stub support remains a valid kernel image for | ||
| 33 | booting in non-UEFI environments. | ||
| 34 | |||
| 35 | UEFI kernel support on ARM | ||
| 36 | ========================== | ||
| 37 | UEFI kernel support on the ARM architectures (arm and arm64) is only available | ||
| 38 | when boot is performed through the stub. | ||
| 39 | |||
| 40 | When booting in UEFI mode, the stub deletes any memory nodes from a provided DT. | ||
| 41 | Instead, the kernel reads the UEFI memory map. | ||
| 42 | |||
| 43 | The stub populates the FDT /chosen node with (and the kernel scans for) the | ||
| 44 | following parameters: | ||
| 45 | ________________________________________________________________________________ | ||
| 46 | Name | Size | Description | ||
| 47 | ================================================================================ | ||
| 48 | linux,uefi-system-table | 64-bit | Physical address of the UEFI System Table. | ||
| 49 | -------------------------------------------------------------------------------- | ||
| 50 | linux,uefi-mmap-start | 64-bit | Physical address of the UEFI memory map, | ||
| 51 | | | populated by the UEFI GetMemoryMap() call. | ||
| 52 | -------------------------------------------------------------------------------- | ||
| 53 | linux,uefi-mmap-size | 32-bit | Size in bytes of the UEFI memory map | ||
| 54 | | | pointed to in previous entry. | ||
| 55 | -------------------------------------------------------------------------------- | ||
| 56 | linux,uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI | ||
| 57 | | | memory map. | ||
| 58 | -------------------------------------------------------------------------------- | ||
| 59 | linux,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format. | ||
| 60 | -------------------------------------------------------------------------------- | ||
| 61 | linux,uefi-stub-kern-ver | string | Copy of linux_banner from build. | ||
| 62 | -------------------------------------------------------------------------------- | ||
| 63 | |||
| 64 | For verbose debug messages, specify 'uefi_debug' on the kernel command line. | ||
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt index beb754e87c65..37fc4f632176 100644 --- a/Documentation/arm64/booting.txt +++ b/Documentation/arm64/booting.txt | |||
| @@ -85,6 +85,10 @@ The decompressed kernel image contains a 64-byte header as follows: | |||
| 85 | Header notes: | 85 | Header notes: |
| 86 | 86 | ||
| 87 | - code0/code1 are responsible for branching to stext. | 87 | - code0/code1 are responsible for branching to stext. |
| 88 | - when booting through EFI, code0/code1 are initially skipped. | ||
| 89 | res5 is an offset to the PE header and the PE header has the EFI | ||
| 90 | entry point (efi_stub_entry). When the stub has done its work, it | ||
| 91 | jumps to code0 to resume the normal boot process. | ||
| 88 | 92 | ||
| 89 | The image must be placed at the specified offset (currently 0x80000) | 93 | The image must be placed at the specified offset (currently 0x80000) |
| 90 | from the start of the system RAM and called there. The start of the | 94 | from the start of the system RAM and called there. The start of the |
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt index d9ca5be9b471..68542fe13b85 100644 --- a/Documentation/atomic_ops.txt +++ b/Documentation/atomic_ops.txt | |||
| @@ -285,15 +285,13 @@ If a caller requires memory barrier semantics around an atomic_t | |||
| 285 | operation which does not return a value, a set of interfaces are | 285 | operation which does not return a value, a set of interfaces are |
| 286 | defined which accomplish this: | 286 | defined which accomplish this: |
| 287 | 287 | ||
| 288 | void smp_mb__before_atomic_dec(void); | 288 | void smp_mb__before_atomic(void); |
| 289 | void smp_mb__after_atomic_dec(void); | 289 | void smp_mb__after_atomic(void); |
| 290 | void smp_mb__before_atomic_inc(void); | ||
| 291 | void smp_mb__after_atomic_inc(void); | ||
| 292 | 290 | ||
| 293 | For example, smp_mb__before_atomic_dec() can be used like so: | 291 | For example, smp_mb__before_atomic() can be used like so: |
| 294 | 292 | ||
| 295 | obj->dead = 1; | 293 | obj->dead = 1; |
| 296 | smp_mb__before_atomic_dec(); | 294 | smp_mb__before_atomic(); |
| 297 | atomic_dec(&obj->ref_count); | 295 | atomic_dec(&obj->ref_count); |
| 298 | 296 | ||
| 299 | It makes sure that all memory operations preceding the atomic_dec() | 297 | It makes sure that all memory operations preceding the atomic_dec() |
| @@ -302,15 +300,10 @@ operation. In the above example, it guarantees that the assignment of | |||
| 302 | "1" to obj->dead will be globally visible to other cpus before the | 300 | "1" to obj->dead will be globally visible to other cpus before the |
| 303 | atomic counter decrement. | 301 | atomic counter decrement. |
| 304 | 302 | ||
| 305 | Without the explicit smp_mb__before_atomic_dec() call, the | 303 | Without the explicit smp_mb__before_atomic() call, the |
| 306 | implementation could legally allow the atomic counter update visible | 304 | implementation could legally allow the atomic counter update visible |
| 307 | to other cpus before the "obj->dead = 1;" assignment. | 305 | to other cpus before the "obj->dead = 1;" assignment. |
| 308 | 306 | ||
| 309 | The other three interfaces listed are used to provide explicit | ||
| 310 | ordering with respect to memory operations after an atomic_dec() call | ||
| 311 | (smp_mb__after_atomic_dec()) and around atomic_inc() calls | ||
| 312 | (smp_mb__{before,after}_atomic_inc()). | ||
| 313 | |||
| 314 | A missing memory barrier in the cases where they are required by the | 307 | A missing memory barrier in the cases where they are required by the |
| 315 | atomic_t implementation above can have disastrous results. Here is | 308 | atomic_t implementation above can have disastrous results. Here is |
| 316 | an example, which follows a pattern occurring frequently in the Linux | 309 | an example, which follows a pattern occurring frequently in the Linux |
| @@ -487,12 +480,12 @@ Finally there is the basic operation: | |||
| 487 | Which returns a boolean indicating if bit "nr" is set in the bitmask | 480 | Which returns a boolean indicating if bit "nr" is set in the bitmask |
| 488 | pointed to by "addr". | 481 | pointed to by "addr". |
| 489 | 482 | ||
| 490 | If explicit memory barriers are required around clear_bit() (which | 483 | If explicit memory barriers are required around {set,clear}_bit() (which do |
| 491 | does not return a value, and thus does not need to provide memory | 484 | not return a value, and thus does not need to provide memory barrier |
| 492 | barrier semantics), two interfaces are provided: | 485 | semantics), two interfaces are provided: |
| 493 | 486 | ||
| 494 | void smp_mb__before_clear_bit(void); | 487 | void smp_mb__before_atomic(void); |
| 495 | void smp_mb__after_clear_bit(void); | 488 | void smp_mb__after_atomic(void); |
| 496 | 489 | ||
| 497 | They are used as follows, and are akin to their atomic_t operation | 490 | They are used as follows, and are akin to their atomic_t operation |
| 498 | brothers: | 491 | brothers: |
| @@ -500,13 +493,13 @@ brothers: | |||
| 500 | /* All memory operations before this call will | 493 | /* All memory operations before this call will |
| 501 | * be globally visible before the clear_bit(). | 494 | * be globally visible before the clear_bit(). |
| 502 | */ | 495 | */ |
| 503 | smp_mb__before_clear_bit(); | 496 | smp_mb__before_atomic(); |
| 504 | clear_bit( ... ); | 497 | clear_bit( ... ); |
| 505 | 498 | ||
| 506 | /* The clear_bit() will be visible before all | 499 | /* The clear_bit() will be visible before all |
| 507 | * subsequent memory operations. | 500 | * subsequent memory operations. |
| 508 | */ | 501 | */ |
| 509 | smp_mb__after_clear_bit(); | 502 | smp_mb__after_atomic(); |
| 510 | 503 | ||
| 511 | There are two special bitops with lock barrier semantics (acquire/release, | 504 | There are two special bitops with lock barrier semantics (acquire/release, |
| 512 | same as spinlocks). These operate in the same way as their non-_lock/unlock | 505 | same as spinlocks). These operate in the same way as their non-_lock/unlock |
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index 2622115276aa..02ab997a1ed2 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
| @@ -270,6 +270,11 @@ When oom event notifier is registered, event will be delivered. | |||
| 270 | 270 | ||
| 271 | 2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM) | 271 | 2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM) |
| 272 | 272 | ||
| 273 | WARNING: Current implementation lacks reclaim support. That means allocation | ||
| 274 | attempts will fail when close to the limit even if there are plenty of | ||
| 275 | kmem available for reclaim. That makes this option unusable in real | ||
| 276 | life so DO NOT SELECT IT unless for development purposes. | ||
| 277 | |||
| 273 | With the Kernel memory extension, the Memory Controller is able to limit | 278 | With the Kernel memory extension, the Memory Controller is able to limit |
| 274 | the amount of kernel memory used by the system. Kernel memory is fundamentally | 279 | the amount of kernel memory used by the system. Kernel memory is fundamentally |
| 275 | different than user memory, since it can't be swapped out, which makes it | 280 | different than user memory, since it can't be swapped out, which makes it |
| @@ -453,15 +458,11 @@ About use_hierarchy, see Section 6. | |||
| 453 | 458 | ||
| 454 | 5.1 force_empty | 459 | 5.1 force_empty |
| 455 | memory.force_empty interface is provided to make cgroup's memory usage empty. | 460 | memory.force_empty interface is provided to make cgroup's memory usage empty. |
| 456 | You can use this interface only when the cgroup has no tasks. | ||
| 457 | When writing anything to this | 461 | When writing anything to this |
| 458 | 462 | ||
| 459 | # echo 0 > memory.force_empty | 463 | # echo 0 > memory.force_empty |
| 460 | 464 | ||
| 461 | Almost all pages tracked by this memory cgroup will be unmapped and freed. | 465 | the cgroup will be reclaimed and as many pages reclaimed as possible. |
| 462 | Some pages cannot be freed because they are locked or in-use. Such pages are | ||
| 463 | moved to parent (if use_hierarchy==1) or root (if use_hierarchy==0) and this | ||
| 464 | cgroup will be empty. | ||
| 465 | 466 | ||
| 466 | The typical use case for this interface is before calling rmdir(). | 467 | The typical use case for this interface is before calling rmdir(). |
| 467 | Because rmdir() moves all pages to parent, some out-of-use page caches can be | 468 | Because rmdir() moves all pages to parent, some out-of-use page caches can be |
| @@ -535,16 +536,13 @@ Note: | |||
| 535 | 536 | ||
| 536 | 5.3 swappiness | 537 | 5.3 swappiness |
| 537 | 538 | ||
| 538 | Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. | 539 | Overrides /proc/sys/vm/swappiness for the particular group. The tunable |
| 539 | Please note that unlike the global swappiness, memcg knob set to 0 | 540 | in the root cgroup corresponds to the global swappiness setting. |
| 540 | really prevents from any swapping even if there is a swap storage | ||
| 541 | available. This might lead to memcg OOM killer if there are no file | ||
| 542 | pages to reclaim. | ||
| 543 | 541 | ||
| 544 | Following cgroups' swappiness can't be changed. | 542 | Please note that unlike during the global reclaim, limit reclaim |
| 545 | - root cgroup (uses /proc/sys/vm/swappiness). | 543 | enforces that 0 swappiness really prevents from any swapping even if |
| 546 | - a cgroup which uses hierarchy and it has other cgroup(s) below it. | 544 | there is a swap storage available. This might lead to memcg OOM killer |
| 547 | - a cgroup which uses hierarchy and not the root of hierarchy. | 545 | if there are no file pages to reclaim. |
| 548 | 546 | ||
| 549 | 5.4 failcnt | 547 | 5.4 failcnt |
| 550 | 548 | ||
| @@ -754,7 +752,6 @@ You can disable the OOM-killer by writing "1" to memory.oom_control file, as: | |||
| 754 | 752 | ||
| 755 | #echo 1 > memory.oom_control | 753 | #echo 1 > memory.oom_control |
| 756 | 754 | ||
| 757 | This operation is only allowed to the top cgroup of a sub-hierarchy. | ||
| 758 | If OOM-killer is disabled, tasks under cgroup will hang/sleep | 755 | If OOM-killer is disabled, tasks under cgroup will hang/sleep |
| 759 | in memory cgroup's OOM-waitqueue when they request accountable memory. | 756 | in memory cgroup's OOM-waitqueue when they request accountable memory. |
| 760 | 757 | ||
diff --git a/Documentation/cgroups/unified-hierarchy.txt b/Documentation/cgroups/unified-hierarchy.txt new file mode 100644 index 000000000000..324b182e6000 --- /dev/null +++ b/Documentation/cgroups/unified-hierarchy.txt | |||
| @@ -0,0 +1,359 @@ | |||
| 1 | |||
| 2 | Cgroup unified hierarchy | ||
| 3 | |||
| 4 | April, 2014 Tejun Heo <tj@kernel.org> | ||
| 5 | |||
| 6 | This document describes the changes made by unified hierarchy and | ||
| 7 | their rationales. It will eventually be merged into the main cgroup | ||
| 8 | documentation. | ||
| 9 | |||
| 10 | CONTENTS | ||
| 11 | |||
| 12 | 1. Background | ||
| 13 | 2. Basic Operation | ||
| 14 | 2-1. Mounting | ||
| 15 | 2-2. cgroup.subtree_control | ||
| 16 | 2-3. cgroup.controllers | ||
| 17 | 3. Structural Constraints | ||
| 18 | 3-1. Top-down | ||
| 19 | 3-2. No internal tasks | ||
| 20 | 4. Other Changes | ||
| 21 | 4-1. [Un]populated Notification | ||
| 22 | 4-2. Other Core Changes | ||
| 23 | 4-3. Per-Controller Changes | ||
| 24 | 4-3-1. blkio | ||
| 25 | 4-3-2. cpuset | ||
| 26 | 4-3-3. memory | ||
| 27 | 5. Planned Changes | ||
| 28 | 5-1. CAP for resource control | ||
| 29 | |||
| 30 | |||
| 31 | 1. Background | ||
| 32 | |||
| 33 | cgroup allows an arbitrary number of hierarchies and each hierarchy | ||
| 34 | can host any number of controllers. While this seems to provide a | ||
| 35 | high level of flexibility, it isn't quite useful in practice. | ||
| 36 | |||
| 37 | For example, as there is only one instance of each controller, utility | ||
| 38 | type controllers such as freezer which can be useful in all | ||
| 39 | hierarchies can only be used in one. The issue is exacerbated by the | ||
| 40 | fact that controllers can't be moved around once hierarchies are | ||
| 41 | populated. Another issue is that all controllers bound to a hierarchy | ||
| 42 | are forced to have exactly the same view of the hierarchy. It isn't | ||
| 43 | possible to vary the granularity depending on the specific controller. | ||
| 44 | |||
| 45 | In practice, these issues heavily limit which controllers can be put | ||
| 46 | on the same hierarchy and most configurations resort to putting each | ||
| 47 | controller on its own hierarchy. Only closely related ones, such as | ||
| 48 | the cpu and cpuacct controllers, make sense to put on the same | ||
| 49 | hierarchy. This often means that userland ends up managing multiple | ||
| 50 | similar hierarchies repeating the same steps on each hierarchy | ||
| 51 | whenever a hierarchy management operation is necessary. | ||
| 52 | |||
| 53 | Unfortunately, support for multiple hierarchies comes at a steep cost. | ||
| 54 | Internal implementation in cgroup core proper is dazzlingly | ||
| 55 | complicated but more importantly the support for multiple hierarchies | ||
| 56 | restricts how cgroup is used in general and what controllers can do. | ||
| 57 | |||
| 58 | There's no limit on how many hierarchies there may be, which means | ||
| 59 | that a task's cgroup membership can't be described in finite length. | ||
| 60 | The key may contain any varying number of entries and is unlimited in | ||
| 61 | length, which makes it highly awkward to handle and leads to addition | ||
| 62 | of controllers which exist only to identify membership, which in turn | ||
| 63 | exacerbates the original problem. | ||
| 64 | |||
| 65 | Also, as a controller can't have any expectation regarding what shape | ||
| 66 | of hierarchies other controllers would be on, each controller has to | ||
| 67 | assume that all other controllers are operating on completely | ||
| 68 | orthogonal hierarchies. This makes it impossible, or at least very | ||
| 69 | cumbersome, for controllers to cooperate with each other. | ||
| 70 | |||
| 71 | In most use cases, putting controllers on hierarchies which are | ||
| 72 | completely orthogonal to each other isn't necessary. What usually is | ||
| 73 | called for is the ability to have differing levels of granularity | ||
| 74 | depending on the specific controller. In other words, hierarchy may | ||
| 75 | be collapsed from leaf towards root when viewed from specific | ||
| 76 | controllers. For example, a given configuration might not care about | ||
| 77 | how memory is distributed beyond a certain level while still wanting | ||
| 78 | to control how CPU cycles are distributed. | ||
| 79 | |||
| 80 | Unified hierarchy is the next version of cgroup interface. It aims to | ||
| 81 | address the aforementioned issues by having more structure while | ||
| 82 | retaining enough flexibility for most use cases. Various other | ||
| 83 | general and controller-specific interface issues are also addressed in | ||
| 84 | the process. | ||
| 85 | |||
| 86 | |||
| 87 | 2. Basic Operation | ||
| 88 | |||
| 89 | 2-1. Mounting | ||
| 90 | |||
| 91 | Currently, unified hierarchy can be mounted with the following mount | ||
| 92 | command. Note that this is still under development and scheduled to | ||
| 93 | change soon. | ||
| 94 | |||
| 95 | mount -t cgroup -o __DEVEL__sane_behavior cgroup $MOUNT_POINT | ||
| 96 | |||
| 97 | All controllers which are not bound to other hierarchies are | ||
| 98 | automatically bound to unified hierarchy and show up at the root of | ||
| 99 | it. Controllers which are enabled only in the root of unified | ||
| 100 | hierarchy can be bound to other hierarchies at any time. This allows | ||
| 101 | mixing unified hierarchy with the traditional multiple hierarchies in | ||
| 102 | a fully backward compatible way. | ||
| 103 | |||
| 104 | |||
| 105 | 2-2. cgroup.subtree_control | ||
| 106 | |||
| 107 | All cgroups on unified hierarchy have a "cgroup.subtree_control" file | ||
| 108 | which governs which controllers are enabled on the children of the | ||
| 109 | cgroup. Let's assume a hierarchy like the following. | ||
| 110 | |||
| 111 | root - A - B - C | ||
| 112 | \ D | ||
| 113 | |||
| 114 | root's "cgroup.subtree_control" file determines which controllers are | ||
| 115 | enabled on A. A's on B. B's on C and D. This coincides with the | ||
| 116 | fact that controllers on the immediate sub-level are used to | ||
| 117 | distribute the resources of the parent. In fact, it's natural to | ||
| 118 | assume that resource control knobs of a child belong to its parent. | ||
| 119 | Enabling a controller in a "cgroup.subtree_control" file declares that | ||
| 120 | distribution of the respective resources of the cgroup will be | ||
| 121 | controlled. Note that this means that controller enable states are | ||
| 122 | shared among siblings. | ||
| 123 | |||
| 124 | When read, the file contains a space-separated list of currently | ||
| 125 | enabled controllers. A write to the file should contain a | ||
| 126 | space-separated list of controllers with '+' or '-' prefixed (without | ||
| 127 | the quotes). Controllers prefixed with '+' are enabled and '-' | ||
| 128 | disabled. If a controller is listed multiple times, the last entry | ||
| 129 | wins. The specific operations are executed atomically - either all | ||
| 130 | succeed or fail. | ||
| 131 | |||
| 132 | |||
| 133 | 2-3. cgroup.controllers | ||
| 134 | |||
| 135 | Read-only "cgroup.controllers" file contains a space-separated list of | ||
| 136 | controllers which can be enabled in the cgroup's | ||
| 137 | "cgroup.subtree_control" file. | ||
| 138 | |||
| 139 | In the root cgroup, this lists controllers which are not bound to | ||
| 140 | other hierarchies and the content changes as controllers are bound to | ||
| 141 | and unbound from other hierarchies. | ||
| 142 | |||
| 143 | In non-root cgroups, the content of this file equals that of the | ||
| 144 | parent's "cgroup.subtree_control" file as only controllers enabled | ||
| 145 | from the parent can be used in its children. | ||
| 146 | |||
| 147 | |||
| 148 | 3. Structural Constraints | ||
| 149 | |||
| 150 | 3-1. Top-down | ||
| 151 | |||
| 152 | As it doesn't make sense to nest control of an uncontrolled resource, | ||
| 153 | all non-root "cgroup.subtree_control" files can only contain | ||
| 154 | controllers which are enabled in the parent's "cgroup.subtree_control" | ||
| 155 | file. A controller can be enabled only if the parent has the | ||
| 156 | controller enabled and a controller can't be disabled if one or more | ||
| 157 | children have it enabled. | ||
| 158 | |||
| 159 | |||
| 160 | 3-2. No internal tasks | ||
| 161 | |||
| 162 | One long-standing issue that cgroup faces is the competition between | ||
| 163 | tasks belonging to the parent cgroup and its children cgroups. This | ||
| 164 | is inherently nasty as two different types of entities compete and | ||
| 165 | there is no agreed-upon obvious way to handle it. Different | ||
| 166 | controllers are doing different things. | ||
| 167 | |||
| 168 | The cpu controller considers tasks and cgroups as equivalents and maps | ||
| 169 | nice levels to cgroup weights. This works for some cases but falls | ||
| 170 | flat when children should be allocated specific ratios of CPU cycles | ||
| 171 | and the number of internal tasks fluctuates - the ratios constantly | ||
| 172 | change as the number of competing entities fluctuates. There also are | ||
| 173 | other issues. The mapping from nice level to weight isn't obvious or | ||
| 174 | universal, and there are various other knobs which simply aren't | ||
| 175 | available for tasks. | ||
| 176 | |||
| 177 | The blkio controller implicitly creates a hidden leaf node for each | ||
| 178 | cgroup to host the tasks. The hidden leaf has its own copies of all | ||
| 179 | the knobs with "leaf_" prefixed. While this allows equivalent control | ||
| 180 | over internal tasks, it's with serious drawbacks. It always adds an | ||
| 181 | extra layer of nesting which may not be necessary, makes the interface | ||
| 182 | messy and significantly complicates the implementation. | ||
| 183 | |||
| 184 | The memory controller currently doesn't have a way to control what | ||
| 185 | happens between internal tasks and child cgroups and the behavior is | ||
| 186 | not clearly defined. There have been attempts to add ad-hoc behaviors | ||
| 187 | and knobs to tailor the behavior to specific workloads. Continuing | ||
| 188 | this direction will lead to problems which will be extremely difficult | ||
| 189 | to resolve in the long term. | ||
| 190 | |||
| 191 | Multiple controllers struggle with internal tasks and came up with | ||
| 192 | different ways to deal with it; unfortunately, all the approaches in | ||
| 193 | use now are severely flawed and, furthermore, the widely different | ||
| 194 | behaviors make cgroup as whole highly inconsistent. | ||
| 195 | |||
| 196 | It is clear that this is something which needs to be addressed from | ||
| 197 | cgroup core proper in a uniform way so that controllers don't need to | ||
| 198 | worry about it and cgroup as a whole shows a consistent and logical | ||
| 199 | behavior. To achieve that, unified hierarchy enforces the following | ||
| 200 | structural constraint: | ||
| 201 | |||
| 202 | Except for the root, only cgroups which don't contain any task may | ||
| 203 | have controllers enabled in their "cgroup.subtree_control" files. | ||
| 204 | |||
| 205 | Combined with other properties, this guarantees that, when a | ||
| 206 | controller is looking at the part of the hierarchy which has it | ||
| 207 | enabled, tasks are always only on the leaves. This rules out | ||
| 208 | situations where child cgroups compete against internal tasks of the | ||
| 209 | parent. | ||
| 210 | |||
| 211 | There are two things to note. Firstly, the root cgroup is exempt from | ||
| 212 | the restriction. Root contains tasks and anonymous resource | ||
| 213 | consumption which can't be associated with any other cgroup and | ||
| 214 | requires special treatment from most controllers. How resource | ||
| 215 | consumption in the root cgroup is governed is up to each controller. | ||
| 216 | |||
| 217 | Secondly, the restriction doesn't take effect if there is no enabled | ||
| 218 | controller in the cgroup's "cgroup.subtree_control" file. This is | ||
| 219 | important as otherwise it wouldn't be possible to create children of a | ||
| 220 | populated cgroup. To control resource distribution of a cgroup, the | ||
| 221 | cgroup must create children and transfer all its tasks to the children | ||
| 222 | before enabling controllers in its "cgroup.subtree_control" file. | ||
| 223 | |||
| 224 | |||
| 225 | 4. Other Changes | ||
| 226 | |||
| 227 | 4-1. [Un]populated Notification | ||
| 228 | |||
| 229 | cgroup users often need a way to determine when a cgroup's | ||
| 230 | subhierarchy becomes empty so that it can be cleaned up. cgroup | ||
| 231 | currently provides release_agent for it; unfortunately, this mechanism | ||
| 232 | is riddled with issues. | ||
| 233 | |||
| 234 | - It delivers events by forking and execing a userland binary | ||
| 235 | specified as the release_agent. This is a long deprecated method of | ||
| 236 | notification delivery. It's extremely heavy, slow and cumbersome to | ||
| 237 | integrate with larger infrastructure. | ||
| 238 | |||
| 239 | - There is single monitoring point at the root. There's no way to | ||
| 240 | delegate management of a subtree. | ||
| 241 | |||
| 242 | - The event isn't recursive. It triggers when a cgroup doesn't have | ||
| 243 | any tasks or child cgroups. Events for internal nodes trigger only | ||
| 244 | after all children are removed. This again makes it impossible to | ||
| 245 | delegate management of a subtree. | ||
| 246 | |||
| 247 | - Events are filtered from the kernel side. A "notify_on_release" | ||
| 248 | file is used to subscribe to or suppress release events. This is | ||
| 249 | unnecessarily complicated and probably done this way because event | ||
| 250 | delivery itself was expensive. | ||
| 251 | |||
| 252 | Unified hierarchy implements an interface file "cgroup.populated" | ||
| 253 | which can be used to monitor whether the cgroup's subhierarchy has | ||
| 254 | tasks in it or not. Its value is 0 if there is no task in the cgroup | ||
| 255 | and its descendants; otherwise, 1. poll and [id]notify events are | ||
| 256 | triggered when the value changes. | ||
| 257 | |||
| 258 | This is significantly lighter and simpler and trivially allows | ||
| 259 | delegating management of subhierarchy - subhierarchy monitoring can | ||
| 260 | block further propagation simply by putting itself or another process | ||
| 261 | in the subhierarchy and monitor events that it's interested in from | ||
| 262 | there without interfering with monitoring higher in the tree. | ||
| 263 | |||
| 264 | In unified hierarchy, the release_agent mechanism is no longer | ||
| 265 | supported and the interface files "release_agent" and | ||
| 266 | "notify_on_release" do not exist. | ||
| 267 | |||
| 268 | |||
| 269 | 4-2. Other Core Changes | ||
| 270 | |||
| 271 | - None of the mount options is allowed. | ||
| 272 | |||
| 273 | - remount is disallowed. | ||
| 274 | |||
| 275 | - rename(2) is disallowed. | ||
| 276 | |||
| 277 | - The "tasks" file is removed. Everything should at process | ||
| 278 | granularity. Use the "cgroup.procs" file instead. | ||
| 279 | |||
| 280 | - The "cgroup.procs" file is not sorted. pids will be unique unless | ||
| 281 | they got recycled in-between reads. | ||
| 282 | |||
| 283 | - The "cgroup.clone_children" file is removed. | ||
| 284 | |||
| 285 | |||
| 286 | 4-3. Per-Controller Changes | ||
| 287 | |||
| 288 | 4-3-1. blkio | ||
| 289 | |||
| 290 | - blk-throttle becomes properly hierarchical. | ||
| 291 | |||
| 292 | |||
| 293 | 4-3-2. cpuset | ||
| 294 | |||
| 295 | - Tasks are kept in empty cpusets after hotplug and take on the masks | ||
| 296 | of the nearest non-empty ancestor, instead of being moved to it. | ||
| 297 | |||
| 298 | - A task can be moved into an empty cpuset, and again it takes on the | ||
| 299 | masks of the nearest non-empty ancestor. | ||
| 300 | |||
| 301 | |||
| 302 | 4-3-3. memory | ||
| 303 | |||
| 304 | - use_hierarchy is on by default and the cgroup file for the flag is | ||
| 305 | not created. | ||
| 306 | |||
| 307 | |||
| 308 | 5. Planned Changes | ||
| 309 | |||
| 310 | 5-1. CAP for resource control | ||
| 311 | |||
| 312 | Unified hierarchy will require one of the capabilities(7), which is | ||
| 313 | yet to be decided, for all resource control related knobs. Process | ||
| 314 | organization operations - creation of sub-cgroups and migration of | ||
| 315 | processes in sub-hierarchies may be delegated by changing the | ||
| 316 | ownership and/or permissions on the cgroup directory and | ||
| 317 | "cgroup.procs" interface file; however, all operations which affect | ||
| 318 | resource control - writes to a "cgroup.subtree_control" file or any | ||
| 319 | controller-specific knobs - will require an explicit CAP privilege. | ||
| 320 | |||
| 321 | This, in part, is to prevent the cgroup interface from being | ||
| 322 | inadvertently promoted to programmable API used by non-privileged | ||
| 323 | binaries. cgroup exposes various aspects of the system in ways which | ||
| 324 | aren't properly abstracted for direct consumption by regular programs. | ||
| 325 | This is an administration interface much closer to sysctl knobs than | ||
| 326 | system calls. Even the basic access model, being filesystem path | ||
| 327 | based, isn't suitable for direct consumption. There's no way to | ||
| 328 | access "my cgroup" in a race-free way or make multiple operations | ||
| 329 | atomic against migration to another cgroup. | ||
| 330 | |||
| 331 | Another aspect is that, for better or for worse, the cgroup interface | ||
| 332 | goes through far less scrutiny than regular interfaces for | ||
| 333 | unprivileged userland. The upside is that cgroup is able to expose | ||
| 334 | useful features which may not be suitable for general consumption in a | ||
| 335 | reasonable time frame. It provides a relatively short path between | ||
| 336 | internal details and userland-visible interface. Of course, this | ||
| 337 | shortcut comes with high risk. We go through what we go through for | ||
| 338 | general kernel APIs for good reasons. It may end up leaking internal | ||
| 339 | details in a way which can exert significant pain by locking the | ||
| 340 | kernel into a contract that can't be maintained in a reasonable | ||
| 341 | manner. | ||
| 342 | |||
| 343 | Also, due to the specific nature, cgroup and its controllers don't | ||
| 344 | tend to attract attention from a wide scope of developers. cgroup's | ||
| 345 | short history is already fraught with severely mis-designed | ||
| 346 | interfaces, unnecessary commitments to and exposing of internal | ||
| 347 | details, broken and dangerous implementations of various features. | ||
| 348 | |||
| 349 | Keeping cgroup as an administration interface is both advantageous for | ||
| 350 | its role and imperative given its nature. Some of the cgroup features | ||
| 351 | may make sense for unprivileged access. If deemed justified, those | ||
| 352 | must be further abstracted and implemented as a different interface, | ||
| 353 | be it a system call or process-private filesystem, and survive through | ||
| 354 | the scrutiny that any interface for general consumption is required to | ||
| 355 | go through. | ||
| 356 | |||
| 357 | Requiring CAP is not a complete solution but should serve as a | ||
| 358 | significant deterrent against spraying cgroup usages in non-privileged | ||
| 359 | programs. | ||
diff --git a/Documentation/clk.txt b/Documentation/clk.txt index c9c399af7c08..1fee72f4d331 100644 --- a/Documentation/clk.txt +++ b/Documentation/clk.txt | |||
| @@ -68,21 +68,27 @@ the operations defined in clk.h: | |||
| 68 | int (*is_enabled)(struct clk_hw *hw); | 68 | int (*is_enabled)(struct clk_hw *hw); |
| 69 | unsigned long (*recalc_rate)(struct clk_hw *hw, | 69 | unsigned long (*recalc_rate)(struct clk_hw *hw, |
| 70 | unsigned long parent_rate); | 70 | unsigned long parent_rate); |
| 71 | long (*round_rate)(struct clk_hw *hw, unsigned long, | 71 | long (*round_rate)(struct clk_hw *hw, |
| 72 | unsigned long *); | 72 | unsigned long rate, |
| 73 | unsigned long *parent_rate); | ||
| 73 | long (*determine_rate)(struct clk_hw *hw, | 74 | long (*determine_rate)(struct clk_hw *hw, |
| 74 | unsigned long rate, | 75 | unsigned long rate, |
| 75 | unsigned long *best_parent_rate, | 76 | unsigned long *best_parent_rate, |
| 76 | struct clk **best_parent_clk); | 77 | struct clk **best_parent_clk); |
| 77 | int (*set_parent)(struct clk_hw *hw, u8 index); | 78 | int (*set_parent)(struct clk_hw *hw, u8 index); |
| 78 | u8 (*get_parent)(struct clk_hw *hw); | 79 | u8 (*get_parent)(struct clk_hw *hw); |
| 79 | int (*set_rate)(struct clk_hw *hw, unsigned long); | 80 | int (*set_rate)(struct clk_hw *hw, |
| 81 | unsigned long rate, | ||
| 82 | unsigned long parent_rate); | ||
| 80 | int (*set_rate_and_parent)(struct clk_hw *hw, | 83 | int (*set_rate_and_parent)(struct clk_hw *hw, |
| 81 | unsigned long rate, | 84 | unsigned long rate, |
| 82 | unsigned long parent_rate, u8 index); | 85 | unsigned long parent_rate, |
| 86 | u8 index); | ||
| 83 | unsigned long (*recalc_accuracy)(struct clk_hw *hw, | 87 | unsigned long (*recalc_accuracy)(struct clk_hw *hw, |
| 84 | unsigned long parent_accuracy); | 88 | unsigned long parent_accuracy); |
| 85 | void (*init)(struct clk_hw *hw); | 89 | void (*init)(struct clk_hw *hw); |
| 90 | int (*debug_init)(struct clk_hw *hw, | ||
| 91 | struct dentry *dentry); | ||
| 86 | }; | 92 | }; |
| 87 | 93 | ||
| 88 | Part 3 - hardware clk implementations | 94 | Part 3 - hardware clk implementations |
diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt index e5c5f5e6ab70..f6215f95149b 100644 --- a/Documentation/connector/connector.txt +++ b/Documentation/connector/connector.txt | |||
| @@ -24,7 +24,8 @@ netlink based networking for inter-process communication in a significantly | |||
| 24 | easier way: | 24 | easier way: |
| 25 | 25 | ||
| 26 | int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *)); | 26 | int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *)); |
| 27 | void cn_netlink_send(struct cn_msg *msg, u32 __group, int gfp_mask); | 27 | void cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __group, int gfp_mask); |
| 28 | void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int gfp_mask); | ||
| 28 | 29 | ||
| 29 | struct cb_id | 30 | struct cb_id |
| 30 | { | 31 | { |
| @@ -71,15 +72,21 @@ void cn_del_callback(struct cb_id *id); | |||
| 71 | struct cb_id *id - unique connector's user identifier. | 72 | struct cb_id *id - unique connector's user identifier. |
| 72 | 73 | ||
| 73 | 74 | ||
| 74 | int cn_netlink_send(struct cn_msg *msg, u32 __groups, int gfp_mask); | 75 | int cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __groups, int gfp_mask); |
| 76 | int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __groups, int gfp_mask); | ||
| 75 | 77 | ||
| 76 | Sends message to the specified groups. It can be safely called from | 78 | Sends message to the specified groups. It can be safely called from |
| 77 | softirq context, but may silently fail under strong memory pressure. | 79 | softirq context, but may silently fail under strong memory pressure. |
| 78 | If there are no listeners for given group -ESRCH can be returned. | 80 | If there are no listeners for given group -ESRCH can be returned. |
| 79 | 81 | ||
| 80 | struct cn_msg * - message header(with attached data). | 82 | struct cn_msg * - message header(with attached data). |
| 83 | u16 len - for *_multi multiple cn_msg messages can be sent | ||
| 84 | u32 port - destination port. | ||
| 85 | If non-zero the message will be sent to the | ||
| 86 | given port, which should be set to the | ||
| 87 | original sender. | ||
| 81 | u32 __group - destination group. | 88 | u32 __group - destination group. |
| 82 | If __group is zero, then appropriate group will | 89 | If port and __group is zero, then appropriate group will |
| 83 | be searched through all registered connector users, | 90 | be searched through all registered connector users, |
| 84 | and message will be delivered to the group which was | 91 | and message will be delivered to the group which was |
| 85 | created for user with the same ID as in msg. | 92 | created for user with the same ID as in msg. |
| @@ -111,7 +118,7 @@ acknowledge number MUST be the same + 1. | |||
| 111 | If we receive a message and its sequence number is not equal to one we | 118 | If we receive a message and its sequence number is not equal to one we |
| 112 | are expecting, then it is a new message. If we receive a message and | 119 | are expecting, then it is a new message. If we receive a message and |
| 113 | its sequence number is the same as one we are expecting, but its | 120 | its sequence number is the same as one we are expecting, but its |
| 114 | acknowledge is not equal to the acknowledge number in the original | 121 | acknowledge is not equal to the sequence number in the original |
| 115 | message + 1, then it is a new message. | 122 | message + 1, then it is a new message. |
| 116 | 123 | ||
| 117 | Obviously, the protocol header contains the above id. | 124 | Obviously, the protocol header contains the above id. |
diff --git a/Documentation/cpu-freq/core.txt b/Documentation/cpu-freq/core.txt index 0060d76b445f..70933eadc308 100644 --- a/Documentation/cpu-freq/core.txt +++ b/Documentation/cpu-freq/core.txt | |||
| @@ -20,6 +20,7 @@ Contents: | |||
| 20 | --------- | 20 | --------- |
| 21 | 1. CPUFreq core and interfaces | 21 | 1. CPUFreq core and interfaces |
| 22 | 2. CPUFreq notifiers | 22 | 2. CPUFreq notifiers |
| 23 | 3. CPUFreq Table Generation with Operating Performance Point (OPP) | ||
| 23 | 24 | ||
| 24 | 1. General Information | 25 | 1. General Information |
| 25 | ======================= | 26 | ======================= |
| @@ -92,3 +93,31 @@ values: | |||
| 92 | cpu - number of the affected CPU | 93 | cpu - number of the affected CPU |
| 93 | old - old frequency | 94 | old - old frequency |
| 94 | new - new frequency | 95 | new - new frequency |
| 96 | |||
| 97 | 3. CPUFreq Table Generation with Operating Performance Point (OPP) | ||
| 98 | ================================================================== | ||
| 99 | For details about OPP, see Documentation/power/opp.txt | ||
| 100 | |||
| 101 | dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with | ||
| 102 | cpufreq_frequency_table_cpuinfo which is provided with the list of | ||
| 103 | frequencies that are available for operation. This function provides | ||
| 104 | a ready to use conversion routine to translate the OPP layer's internal | ||
| 105 | information about the available frequencies into a format readily | ||
| 106 | providable to cpufreq. | ||
| 107 | |||
| 108 | WARNING: Do not use this function in interrupt context. | ||
| 109 | |||
| 110 | Example: | ||
| 111 | soc_pm_init() | ||
| 112 | { | ||
| 113 | /* Do things */ | ||
| 114 | r = dev_pm_opp_init_cpufreq_table(dev, &freq_table); | ||
| 115 | if (!r) | ||
| 116 | cpufreq_frequency_table_cpuinfo(policy, freq_table); | ||
| 117 | /* Do other things */ | ||
| 118 | } | ||
| 119 | |||
| 120 | NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in | ||
| 121 | addition to CONFIG_PM_OPP. | ||
| 122 | |||
| 123 | dev_pm_opp_free_cpufreq_table - Free up the table allocated by dev_pm_opp_init_cpufreq_table | ||
diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt index 48da5fdcb9f1..14f4e6336d88 100644 --- a/Documentation/cpu-freq/cpu-drivers.txt +++ b/Documentation/cpu-freq/cpu-drivers.txt | |||
| @@ -26,6 +26,7 @@ Contents: | |||
| 26 | 1.4 target/target_index or setpolicy? | 26 | 1.4 target/target_index or setpolicy? |
| 27 | 1.5 target/target_index | 27 | 1.5 target/target_index |
| 28 | 1.6 setpolicy | 28 | 1.6 setpolicy |
| 29 | 1.7 get_intermediate and target_intermediate | ||
| 29 | 2. Frequency Table Helpers | 30 | 2. Frequency Table Helpers |
| 30 | 31 | ||
| 31 | 32 | ||
| @@ -79,6 +80,10 @@ cpufreq_driver.attr - A pointer to a NULL-terminated list of | |||
| 79 | "struct freq_attr" which allow to | 80 | "struct freq_attr" which allow to |
| 80 | export values to sysfs. | 81 | export values to sysfs. |
| 81 | 82 | ||
| 83 | cpufreq_driver.get_intermediate | ||
| 84 | and target_intermediate Used to switch to stable frequency while | ||
| 85 | changing CPU frequency. | ||
| 86 | |||
| 82 | 87 | ||
| 83 | 1.2 Per-CPU Initialization | 88 | 1.2 Per-CPU Initialization |
| 84 | -------------------------- | 89 | -------------------------- |
| @@ -151,7 +156,7 @@ Some cpufreq-capable processors switch the frequency between certain | |||
| 151 | limits on their own. These shall use the ->setpolicy call | 156 | limits on their own. These shall use the ->setpolicy call |
| 152 | 157 | ||
| 153 | 158 | ||
| 154 | 1.4. target/target_index | 159 | 1.5. target/target_index |
| 155 | ------------- | 160 | ------------- |
| 156 | 161 | ||
| 157 | The target_index call has two arguments: struct cpufreq_policy *policy, | 162 | The target_index call has two arguments: struct cpufreq_policy *policy, |
| @@ -160,6 +165,9 @@ and unsigned int index (into the exposed frequency table). | |||
| 160 | The CPUfreq driver must set the new frequency when called here. The | 165 | The CPUfreq driver must set the new frequency when called here. The |
| 161 | actual frequency must be determined by freq_table[index].frequency. | 166 | actual frequency must be determined by freq_table[index].frequency. |
| 162 | 167 | ||
| 168 | It should always restore to earlier frequency (i.e. policy->restore_freq) in | ||
| 169 | case of errors, even if we switched to intermediate frequency earlier. | ||
| 170 | |||
| 163 | Deprecated: | 171 | Deprecated: |
| 164 | ---------- | 172 | ---------- |
| 165 | The target call has three arguments: struct cpufreq_policy *policy, | 173 | The target call has three arguments: struct cpufreq_policy *policy, |
| @@ -179,7 +187,7 @@ Here again the frequency table helper might assist you - see section 2 | |||
| 179 | for details. | 187 | for details. |
| 180 | 188 | ||
| 181 | 189 | ||
| 182 | 1.5 setpolicy | 190 | 1.6 setpolicy |
| 183 | --------------- | 191 | --------------- |
| 184 | 192 | ||
| 185 | The setpolicy call only takes a struct cpufreq_policy *policy as | 193 | The setpolicy call only takes a struct cpufreq_policy *policy as |
| @@ -190,6 +198,23 @@ setting when policy->policy is CPUFREQ_POLICY_PERFORMANCE, and a | |||
| 190 | powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check | 198 | powersaving-oriented setting when CPUFREQ_POLICY_POWERSAVE. Also check |
| 191 | the reference implementation in drivers/cpufreq/longrun.c | 199 | the reference implementation in drivers/cpufreq/longrun.c |
| 192 | 200 | ||
| 201 | 1.7 get_intermediate and target_intermediate | ||
| 202 | -------------------------------------------- | ||
| 203 | |||
| 204 | Only for drivers with target_index() and CPUFREQ_ASYNC_NOTIFICATION unset. | ||
| 205 | |||
| 206 | get_intermediate should return a stable intermediate frequency platform wants to | ||
| 207 | switch to, and target_intermediate() should set CPU to to that frequency, before | ||
| 208 | jumping to the frequency corresponding to 'index'. Core will take care of | ||
| 209 | sending notifications and driver doesn't have to handle them in | ||
| 210 | target_intermediate() or target_index(). | ||
| 211 | |||
| 212 | Drivers can return '0' from get_intermediate() in case they don't wish to switch | ||
| 213 | to intermediate frequency for some target frequency. In that case core will | ||
| 214 | directly call ->target_index(). | ||
| 215 | |||
| 216 | NOTE: ->target_index() should restore to policy->restore_freq in case of | ||
| 217 | failures as core would send notifications for that. | ||
| 193 | 218 | ||
| 194 | 219 | ||
| 195 | 2. Frequency Table Helpers | 220 | 2. Frequency Table Helpers |
| @@ -228,3 +253,22 @@ is the corresponding frequency table helper for the ->target | |||
| 228 | stage. Just pass the values to this function, and the unsigned int | 253 | stage. Just pass the values to this function, and the unsigned int |
| 229 | index returns the number of the frequency table entry which contains | 254 | index returns the number of the frequency table entry which contains |
| 230 | the frequency the CPU shall be set to. | 255 | the frequency the CPU shall be set to. |
| 256 | |||
| 257 | The following macros can be used as iterators over cpufreq_frequency_table: | ||
| 258 | |||
| 259 | cpufreq_for_each_entry(pos, table) - iterates over all entries of frequency | ||
| 260 | table. | ||
| 261 | |||
| 262 | cpufreq-for_each_valid_entry(pos, table) - iterates over all entries, | ||
| 263 | excluding CPUFREQ_ENTRY_INVALID frequencies. | ||
| 264 | Use arguments "pos" - a cpufreq_frequency_table * as a loop cursor and | ||
| 265 | "table" - the cpufreq_frequency_table * you want to iterate over. | ||
| 266 | |||
| 267 | For example: | ||
| 268 | |||
| 269 | struct cpufreq_frequency_table *pos, *driver_freq_table; | ||
| 270 | |||
| 271 | cpufreq_for_each_entry(pos, driver_freq_table) { | ||
| 272 | /* Do something with pos */ | ||
| 273 | pos->frequency = ... | ||
| 274 | } | ||
diff --git a/Documentation/cpu-freq/index.txt b/Documentation/cpu-freq/index.txt index 3d0b915035b9..dc024ab4054f 100644 --- a/Documentation/cpu-freq/index.txt +++ b/Documentation/cpu-freq/index.txt | |||
| @@ -35,8 +35,8 @@ Mailing List | |||
| 35 | ------------ | 35 | ------------ |
| 36 | There is a CPU frequency changing CVS commit and general list where | 36 | There is a CPU frequency changing CVS commit and general list where |
| 37 | you can report bugs, problems or submit patches. To post a message, | 37 | you can report bugs, problems or submit patches. To post a message, |
| 38 | send an email to cpufreq@vger.kernel.org, to subscribe go to | 38 | send an email to linux-pm@vger.kernel.org, to subscribe go to |
| 39 | http://vger.kernel.org/vger-lists.html#cpufreq and follow the | 39 | http://vger.kernel.org/vger-lists.html#linux-pm and follow the |
| 40 | instructions there. | 40 | instructions there. |
| 41 | 41 | ||
| 42 | Links | 42 | Links |
diff --git a/Documentation/debugging-via-ohci1394.txt b/Documentation/debugging-via-ohci1394.txt index fa0151a712f9..5c9a567b3fac 100644 --- a/Documentation/debugging-via-ohci1394.txt +++ b/Documentation/debugging-via-ohci1394.txt | |||
| @@ -25,9 +25,11 @@ using data transfer rates in the order of 10MB/s or more. | |||
| 25 | With most FireWire controllers, memory access is limited to the low 4 GB | 25 | With most FireWire controllers, memory access is limited to the low 4 GB |
| 26 | of physical address space. This can be a problem on IA64 machines where | 26 | of physical address space. This can be a problem on IA64 machines where |
| 27 | memory is located mostly above that limit, but it is rarely a problem on | 27 | memory is located mostly above that limit, but it is rarely a problem on |
| 28 | more common hardware such as x86, x86-64 and PowerPC. However, at least | 28 | more common hardware such as x86, x86-64 and PowerPC. |
| 29 | Agere/LSI FW643e and FW643e2 controllers are known to support access to | 29 | |
| 30 | physical addresses above 4 GB. | 30 | At least LSI FW643e and FW643e2 controllers are known to support access to |
| 31 | physical addresses above 4 GB, but this feature is currently not enabled by | ||
| 32 | Linux. | ||
| 31 | 33 | ||
| 32 | Together with a early initialization of the OHCI-1394 controller for debugging, | 34 | Together with a early initialization of the OHCI-1394 controller for debugging, |
| 33 | this facility proved most useful for examining long debugs logs in the printk | 35 | this facility proved most useful for examining long debugs logs in the printk |
| @@ -101,8 +103,9 @@ Step-by-step instructions for using firescope with early OHCI initialization: | |||
| 101 | compliant, they are based on TI PCILynx chips and require drivers for Win- | 103 | compliant, they are based on TI PCILynx chips and require drivers for Win- |
| 102 | dows operating systems. | 104 | dows operating systems. |
| 103 | 105 | ||
| 104 | The mentioned kernel log message contains ">4 GB phys DMA" in case of | 106 | The mentioned kernel log message contains the string "physUB" if the |
| 105 | OHCI-1394 controllers which support accesses above this limit. | 107 | controller implements a writable Physical Upper Bound register. This is |
| 108 | required for physical DMA above 4 GB (but not utilized by Linux yet). | ||
| 106 | 109 | ||
| 107 | 2) Establish a working FireWire cable connection: | 110 | 2) Establish a working FireWire cable connection: |
| 108 | 111 | ||
diff --git a/Documentation/device-mapper/thin-provisioning.txt b/Documentation/device-mapper/thin-provisioning.txt index 05a27e9442bd..2f5173500bd9 100644 --- a/Documentation/device-mapper/thin-provisioning.txt +++ b/Documentation/device-mapper/thin-provisioning.txt | |||
| @@ -309,7 +309,10 @@ ii) Status | |||
| 309 | error_if_no_space|queue_if_no_space | 309 | error_if_no_space|queue_if_no_space |
| 310 | If the pool runs out of data or metadata space, the pool will | 310 | If the pool runs out of data or metadata space, the pool will |
| 311 | either queue or error the IO destined to the data device. The | 311 | either queue or error the IO destined to the data device. The |
| 312 | default is to queue the IO until more space is added. | 312 | default is to queue the IO until more space is added or the |
| 313 | 'no_space_timeout' expires. The 'no_space_timeout' dm-thin-pool | ||
| 314 | module parameter can be used to change this timeout -- it | ||
| 315 | defaults to 60 seconds but may be disabled using a value of 0. | ||
| 313 | 316 | ||
| 314 | iii) Messages | 317 | iii) Messages |
| 315 | 318 | ||
diff --git a/Documentation/devicetree/bindings/arm/arch_timer.txt b/Documentation/devicetree/bindings/arm/arch_timer.txt index 06fc7602593a..37b2cafa4e52 100644 --- a/Documentation/devicetree/bindings/arm/arch_timer.txt +++ b/Documentation/devicetree/bindings/arm/arch_timer.txt | |||
| @@ -19,6 +19,9 @@ to deliver its interrupts via SPIs. | |||
| 19 | 19 | ||
| 20 | - clock-frequency : The frequency of the main counter, in Hz. Optional. | 20 | - clock-frequency : The frequency of the main counter, in Hz. Optional. |
| 21 | 21 | ||
| 22 | - always-on : a boolean property. If present, the timer is powered through an | ||
| 23 | always-on power domain, therefore it never loses context. | ||
| 24 | |||
| 22 | Example: | 25 | Example: |
| 23 | 26 | ||
| 24 | timer { | 27 | timer { |
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt index 926b4d6aae7e..26799ef562df 100644 --- a/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-pmsu.txt | |||
| @@ -1,20 +1,21 @@ | |||
| 1 | Power Management Service Unit(PMSU) | 1 | Power Management Service Unit(PMSU) |
| 2 | ----------------------------------- | 2 | ----------------------------------- |
| 3 | Available on Marvell SOCs: Armada 370 and Armada XP | 3 | Available on Marvell SOCs: Armada 370, Armada 38x and Armada XP |
| 4 | 4 | ||
| 5 | Required properties: | 5 | Required properties: |
| 6 | 6 | ||
| 7 | - compatible: "marvell,armada-370-xp-pmsu" | 7 | - compatible: should be one of: |
| 8 | - "marvell,armada-370-pmsu" for Armada 370 or Armada XP | ||
| 9 | - "marvell,armada-380-pmsu" for Armada 38x | ||
| 10 | - "marvell,armada-370-xp-pmsu" was used for Armada 370/XP but is now | ||
| 11 | deprecated and will be removed | ||
| 8 | 12 | ||
| 9 | - reg: Should contain PMSU registers location and length. First pair | 13 | - reg: Should contain PMSU registers location and length. |
| 10 | for the per-CPU SW Reset Control registers, second pair for the | ||
| 11 | Power Management Service Unit. | ||
| 12 | 14 | ||
| 13 | Example: | 15 | Example: |
| 14 | 16 | ||
| 15 | armada-370-xp-pmsu@d0022000 { | 17 | armada-370-xp-pmsu@22000 { |
| 16 | compatible = "marvell,armada-370-xp-pmsu"; | 18 | compatible = "marvell,armada-370-pmsu"; |
| 17 | reg = <0xd0022100 0x430>, | 19 | reg = <0x22000 0x1000>; |
| 18 | <0xd0020800 0x20>; | ||
| 19 | }; | 20 | }; |
| 20 | 21 | ||
diff --git a/Documentation/devicetree/bindings/arm/armada-cpu-reset.txt b/Documentation/devicetree/bindings/arm/armada-cpu-reset.txt new file mode 100644 index 000000000000..b63a7b6ab998 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/armada-cpu-reset.txt | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | Marvell Armada CPU reset controller | ||
| 2 | =================================== | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | |||
| 6 | - compatible: Should be "marvell,armada-370-cpu-reset". | ||
| 7 | |||
| 8 | - reg: should be register base and length as documented in the | ||
| 9 | datasheet for the CPU reset registers | ||
| 10 | |||
| 11 | cpurst: cpurst@20800 { | ||
| 12 | compatible = "marvell,armada-370-cpu-reset"; | ||
| 13 | reg = <0x20800 0x20>; | ||
| 14 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/axxia.txt b/Documentation/devicetree/bindings/arm/axxia.txt new file mode 100644 index 000000000000..7b4ef9c07696 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/axxia.txt | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | Axxia AXM55xx device tree bindings | ||
| 2 | |||
| 3 | Boards using the AXM55xx SoC need to have the following properties: | ||
| 4 | |||
| 5 | Required root node property: | ||
| 6 | |||
| 7 | - compatible = "lsi,axm5516" | ||
| 8 | |||
| 9 | Boards: | ||
| 10 | |||
| 11 | LSI AXM5516 Validation board (Amarillo) | ||
| 12 | compatible = "lsi,axm5516-amarillo", "lsi,axm5516" | ||
diff --git a/Documentation/devicetree/bindings/arm/coherency-fabric.txt b/Documentation/devicetree/bindings/arm/coherency-fabric.txt index 17d8cd107559..8dd46617c889 100644 --- a/Documentation/devicetree/bindings/arm/coherency-fabric.txt +++ b/Documentation/devicetree/bindings/arm/coherency-fabric.txt | |||
| @@ -1,16 +1,33 @@ | |||
| 1 | Coherency fabric | 1 | Coherency fabric |
| 2 | ---------------- | 2 | ---------------- |
| 3 | Available on Marvell SOCs: Armada 370 and Armada XP | 3 | Available on Marvell SOCs: Armada 370, Armada 375, Armada 38x and Armada XP |
| 4 | 4 | ||
| 5 | Required properties: | 5 | Required properties: |
| 6 | 6 | ||
| 7 | - compatible: "marvell,coherency-fabric" | 7 | - compatible: the possible values are: |
| 8 | |||
| 9 | * "marvell,coherency-fabric", to be used for the coherency fabric of | ||
| 10 | the Armada 370 and Armada XP. | ||
| 11 | |||
| 12 | * "marvell,armada-375-coherency-fabric", for the Armada 375 coherency | ||
| 13 | fabric. | ||
| 14 | |||
| 15 | * "marvell,armada-380-coherency-fabric", for the Armada 38x coherency | ||
| 16 | fabric. | ||
| 8 | 17 | ||
| 9 | - reg: Should contain coherency fabric registers location and | 18 | - reg: Should contain coherency fabric registers location and |
| 10 | length. First pair for the coherency fabric registers, second pair | 19 | length. |
| 11 | for the per-CPU fabric registers registers. | 20 | |
| 21 | * For "marvell,coherency-fabric", the first pair for the coherency | ||
| 22 | fabric registers, second pair for the per-CPU fabric registers. | ||
| 12 | 23 | ||
| 13 | Example: | 24 | * For "marvell,armada-375-coherency-fabric", only one pair is needed |
| 25 | for the per-CPU fabric registers. | ||
| 26 | |||
| 27 | * For "marvell,armada-380-coherency-fabric", only one pair is needed | ||
| 28 | for the per-CPU fabric registers. | ||
| 29 | |||
| 30 | Examples: | ||
| 14 | 31 | ||
| 15 | coherency-fabric@d0020200 { | 32 | coherency-fabric@d0020200 { |
| 16 | compatible = "marvell,coherency-fabric"; | 33 | compatible = "marvell,coherency-fabric"; |
| @@ -19,3 +36,8 @@ coherency-fabric@d0020200 { | |||
| 19 | 36 | ||
| 20 | }; | 37 | }; |
| 21 | 38 | ||
| 39 | coherency-fabric@21810 { | ||
| 40 | compatible = "marvell,armada-375-coherency-fabric"; | ||
| 41 | reg = <0x21810 0x1c>; | ||
| 42 | }; | ||
| 43 | |||
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index 333f4aea3029..1fe72a0778cd 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt | |||
| @@ -178,13 +178,19 @@ nodes to be present and contain the properties described below. | |||
| 178 | Usage and definition depend on ARM architecture version. | 178 | Usage and definition depend on ARM architecture version. |
| 179 | # On ARM v8 64-bit this property is required and must | 179 | # On ARM v8 64-bit this property is required and must |
| 180 | be one of: | 180 | be one of: |
| 181 | "spin-table" | ||
| 182 | "psci" | 181 | "psci" |
| 182 | "spin-table" | ||
| 183 | # On ARM 32-bit systems this property is optional and | 183 | # On ARM 32-bit systems this property is optional and |
| 184 | can be one of: | 184 | can be one of: |
| 185 | "allwinner,sun6i-a31" | ||
| 186 | "arm,psci" | ||
| 187 | "marvell,armada-375-smp" | ||
| 188 | "marvell,armada-380-smp" | ||
| 189 | "marvell,armada-xp-smp" | ||
| 185 | "qcom,gcc-msm8660" | 190 | "qcom,gcc-msm8660" |
| 186 | "qcom,kpss-acc-v1" | 191 | "qcom,kpss-acc-v1" |
| 187 | "qcom,kpss-acc-v2" | 192 | "qcom,kpss-acc-v2" |
| 193 | "rockchip,rk3066-smp" | ||
| 188 | 194 | ||
| 189 | - cpu-release-addr | 195 | - cpu-release-addr |
| 190 | Usage: required for systems that have an "enable-method" | 196 | Usage: required for systems that have an "enable-method" |
diff --git a/Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt b/Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt new file mode 100644 index 000000000000..4a0a4f70a0ce --- /dev/null +++ b/Documentation/devicetree/bindings/arm/exynos/smp-sysram.txt | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | Samsung Exynos SYSRAM for SMP bringup: | ||
| 2 | ------------------------------------ | ||
| 3 | |||
| 4 | Samsung SMP-capable Exynos SoCs use part of the SYSRAM for the bringup | ||
| 5 | of the secondary cores. Once the core gets powered up it executes the | ||
| 6 | code that is residing at some specific location of the SYSRAM. | ||
| 7 | |||
| 8 | Therefore reserved section sub-nodes have to be added to the mmio-sram | ||
| 9 | declaration. These nodes are of two types depending upon secure or | ||
| 10 | non-secure execution environment. | ||
| 11 | |||
| 12 | Required sub-node properties: | ||
| 13 | - compatible : depending upon boot mode, should be | ||
| 14 | "samsung,exynos4210-sysram" : for Secure SYSRAM | ||
| 15 | "samsung,exynos4210-sysram-ns" : for Non-secure SYSRAM | ||
| 16 | |||
| 17 | The rest of the properties should follow the generic mmio-sram discription | ||
| 18 | found in ../../misc/sysram.txt | ||
| 19 | |||
| 20 | Example: | ||
| 21 | |||
| 22 | sysram@02020000 { | ||
| 23 | compatible = "mmio-sram"; | ||
| 24 | reg = <0x02020000 0x54000>; | ||
| 25 | #address-cells = <1>; | ||
| 26 | #size-cells = <1>; | ||
| 27 | ranges = <0 0x02020000 0x54000>; | ||
| 28 | |||
| 29 | smp-sysram@0 { | ||
| 30 | compatible = "samsung,exynos4210-sysram"; | ||
| 31 | reg = <0x0 0x1000>; | ||
| 32 | }; | ||
| 33 | |||
| 34 | smp-sysram@53000 { | ||
| 35 | compatible = "samsung,exynos4210-sysram-ns"; | ||
| 36 | reg = <0x53000 0x1000>; | ||
| 37 | }; | ||
| 38 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/global_timer.txt b/Documentation/devicetree/bindings/arm/global_timer.txt index 1e548981eda4..bdae3a818793 100644 --- a/Documentation/devicetree/bindings/arm/global_timer.txt +++ b/Documentation/devicetree/bindings/arm/global_timer.txt | |||
| @@ -4,8 +4,11 @@ | |||
| 4 | 4 | ||
| 5 | ** Timer node required properties: | 5 | ** Timer node required properties: |
| 6 | 6 | ||
| 7 | - compatible : Should be "arm,cortex-a9-global-timer" | 7 | - compatible : should contain |
| 8 | Driver supports versions r2p0 and above. | 8 | * "arm,cortex-a5-global-timer" for Cortex-A5 global timers. |
| 9 | * "arm,cortex-a9-global-timer" for Cortex-A9 global | ||
| 10 | timers or any compatible implementation. Note: driver | ||
| 11 | supports versions r2p0 and above. | ||
| 9 | 12 | ||
| 10 | - interrupts : One interrupt to each core | 13 | - interrupts : One interrupt to each core |
| 11 | 14 | ||
diff --git a/Documentation/devicetree/bindings/arm/marvell,berlin.txt b/Documentation/devicetree/bindings/arm/marvell,berlin.txt index 737afa5f8148..94013a9a8769 100644 --- a/Documentation/devicetree/bindings/arm/marvell,berlin.txt +++ b/Documentation/devicetree/bindings/arm/marvell,berlin.txt | |||
| @@ -12,6 +12,7 @@ SoC and board used. Currently known SoC compatibles are: | |||
| 12 | "marvell,berlin2" for Marvell Armada 1500 (BG2, 88DE3100), | 12 | "marvell,berlin2" for Marvell Armada 1500 (BG2, 88DE3100), |
| 13 | "marvell,berlin2cd" for Marvell Armada 1500-mini (BG2CD, 88DE3005) | 13 | "marvell,berlin2cd" for Marvell Armada 1500-mini (BG2CD, 88DE3005) |
| 14 | "marvell,berlin2ct" for Marvell Armada ? (BG2CT, 88DE????) | 14 | "marvell,berlin2ct" for Marvell Armada ? (BG2CT, 88DE????) |
| 15 | "marvell,berlin2q" for Marvell Armada 1500-pro (BG2Q, 88DE3114) | ||
| 15 | "marvell,berlin3" for Marvell Armada ? (BG3, 88DE????) | 16 | "marvell,berlin3" for Marvell Armada ? (BG3, 88DE????) |
| 16 | 17 | ||
| 17 | * Example: | 18 | * Example: |
| @@ -22,3 +23,104 @@ SoC and board used. Currently known SoC compatibles are: | |||
| 22 | 23 | ||
| 23 | ... | 24 | ... |
| 24 | } | 25 | } |
| 26 | |||
| 27 | * Marvell Berlin2 chip control binding | ||
| 28 | |||
| 29 | Marvell Berlin SoCs have a chip control register set providing several | ||
| 30 | individual registers dealing with pinmux, padmux, clock, reset, and secondary | ||
| 31 | CPU boot address. Unfortunately, the individual registers are spread among the | ||
| 32 | chip control registers, so there should be a single DT node only providing the | ||
| 33 | different functions which are described below. | ||
| 34 | |||
| 35 | Required properties: | ||
| 36 | - compatible: shall be one of | ||
| 37 | "marvell,berlin2-chip-ctrl" for BG2 | ||
| 38 | "marvell,berlin2cd-chip-ctrl" for BG2CD | ||
| 39 | "marvell,berlin2q-chip-ctrl" for BG2Q | ||
| 40 | - reg: address and length of following register sets for | ||
| 41 | BG2/BG2CD: chip control register set | ||
| 42 | BG2Q: chip control register set and cpu pll registers | ||
| 43 | |||
| 44 | * Marvell Berlin2 system control binding | ||
| 45 | |||
| 46 | Marvell Berlin SoCs have a system control register set providing several | ||
| 47 | individual registers dealing with pinmux, padmux, and reset. | ||
| 48 | |||
| 49 | Required properties: | ||
| 50 | - compatible: should be one of | ||
| 51 | "marvell,berlin2-system-ctrl" for BG2 | ||
| 52 | "marvell,berlin2cd-system-ctrl" for BG2CD | ||
| 53 | "marvell,berlin2q-system-ctrl" for BG2Q | ||
| 54 | - reg: address and length of the system control register set | ||
| 55 | |||
| 56 | * Clock provider binding | ||
| 57 | |||
| 58 | As clock related registers are spread among the chip control registers, the | ||
| 59 | chip control node also provides the clocks. Marvell Berlin2 (BG2, BG2CD, BG2Q) | ||
| 60 | SoCs share the same IP for PLLs and clocks, with some minor differences in | ||
| 61 | features and register layout. | ||
| 62 | |||
| 63 | Required properties: | ||
| 64 | - #clock-cells: shall be set to 1 | ||
| 65 | - clocks: clock specifiers referencing the core clock input clocks | ||
| 66 | - clock-names: array of strings describing the input clock specifiers above. | ||
| 67 | Allowed clock-names for the reference clocks are | ||
| 68 | "refclk" for the SoCs osciallator input on all SoCs, | ||
| 69 | and SoC-specific input clocks for | ||
| 70 | BG2/BG2CD: "video_ext0" for the external video clock input | ||
| 71 | |||
| 72 | Clocks provided by core clocks shall be referenced by a clock specifier | ||
| 73 | indexing one of the provided clocks. Refer to dt-bindings/clock/berlin<soc>.h | ||
| 74 | for the corresponding index mapping. | ||
| 75 | |||
| 76 | * Pin controller binding | ||
| 77 | |||
| 78 | Pin control registers are part of both register sets, chip control and system | ||
| 79 | control. The pins controlled are organized in groups, so no actual pin | ||
| 80 | information is needed. | ||
| 81 | |||
| 82 | A pin-controller node should contain subnodes representing the pin group | ||
| 83 | configurations, one per function. Each subnode has the group name and the muxing | ||
| 84 | function used. | ||
| 85 | |||
| 86 | Be aware the Marvell Berlin datasheets use the keyword 'mode' for what is called | ||
| 87 | a 'function' in the pin-controller subsystem. | ||
| 88 | |||
| 89 | Required subnode-properties: | ||
| 90 | - groups: a list of strings describing the group names. | ||
| 91 | - function: a string describing the function used to mux the groups. | ||
| 92 | |||
| 93 | Example: | ||
| 94 | |||
| 95 | chip: chip-control@ea0000 { | ||
| 96 | compatible = "marvell,berlin2-chip-ctrl"; | ||
| 97 | #clock-cells = <1>; | ||
| 98 | reg = <0xea0000 0x400>; | ||
| 99 | clocks = <&refclk>, <&externaldev 0>; | ||
| 100 | clock-names = "refclk", "video_ext0"; | ||
| 101 | |||
| 102 | spi1_pmux: spi1-pmux { | ||
| 103 | groups = "G0"; | ||
| 104 | function = "spi1"; | ||
| 105 | }; | ||
| 106 | }; | ||
| 107 | |||
| 108 | sysctrl: system-controller@d000 { | ||
| 109 | compatible = "marvell,berlin2-system-ctrl"; | ||
| 110 | reg = <0xd000 0x100>; | ||
| 111 | |||
| 112 | uart0_pmux: uart0-pmux { | ||
| 113 | groups = "GSM4"; | ||
| 114 | function = "uart0"; | ||
| 115 | }; | ||
| 116 | |||
| 117 | uart1_pmux: uart1-pmux { | ||
| 118 | groups = "GSM5"; | ||
| 119 | function = "uart1"; | ||
| 120 | }; | ||
| 121 | |||
| 122 | uart2_pmux: uart2-pmux { | ||
| 123 | groups = "GSM3"; | ||
| 124 | function = "uart2"; | ||
| 125 | }; | ||
| 126 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt b/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt new file mode 100644 index 000000000000..925ecbf6e7b7 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/marvell,kirkwood.txt | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | Marvell Kirkwood SoC Family Device Tree Bindings | ||
| 2 | ------------------------------------------------ | ||
| 3 | |||
| 4 | Boards with a SoC of the Marvell Kirkwook family, eg 88f6281 | ||
| 5 | |||
| 6 | * Required root node properties: | ||
| 7 | compatible: must contain "marvell,kirkwood" | ||
| 8 | |||
| 9 | In addition, the above compatible shall be extended with the specific | ||
| 10 | SoC. Currently known SoC compatibles are: | ||
| 11 | |||
| 12 | "marvell,kirkwood-88f6192" | ||
| 13 | "marvell,kirkwood-88f6281" | ||
| 14 | "marvell,kirkwood-88f6282" | ||
| 15 | "marvell,kirkwood-88f6283" | ||
| 16 | "marvell,kirkwood-88f6702" | ||
| 17 | "marvell,kirkwood-98DX4122" | ||
| 18 | |||
| 19 | And in addition, the compatible shall be extended with the specific | ||
| 20 | board. Currently known boards are: | ||
| 21 | |||
| 22 | "buffalo,lschlv2" | ||
| 23 | "buffalo,lsxhl" | ||
| 24 | "buffalo,lsxl" | ||
| 25 | "dlink,dns-320" | ||
| 26 | "dlink,dns-320-a1" | ||
| 27 | "dlink,dns-325" | ||
| 28 | "dlink,dns-325-a1" | ||
| 29 | "dlink,dns-kirkwood" | ||
| 30 | "excito,b3" | ||
| 31 | "globalscale,dreamplug-003-ds2001" | ||
| 32 | "globalscale,guruplug" | ||
| 33 | "globalscale,guruplug-server-plus" | ||
| 34 | "globalscale,sheevaplug" | ||
| 35 | "globalscale,sheevaplug" | ||
| 36 | "globalscale,sheevaplug-esata" | ||
| 37 | "globalscale,sheevaplug-esata-rev13" | ||
| 38 | "iom,iconnect" | ||
| 39 | "iom,iconnect-1.1" | ||
| 40 | "iom,ix2-200" | ||
| 41 | "keymile,km_kirkwood" | ||
| 42 | "lacie,cloudbox" | ||
| 43 | "lacie,inetspace_v2" | ||
| 44 | "lacie,laplug" | ||
| 45 | "lacie,netspace_lite_v2" | ||
| 46 | "lacie,netspace_max_v2" | ||
| 47 | "lacie,netspace_mini_v2" | ||
| 48 | "lacie,netspace_v2" | ||
| 49 | "marvell,db-88f6281-bp" | ||
| 50 | "marvell,db-88f6282-bp" | ||
| 51 | "marvell,mv88f6281gtw-ge" | ||
| 52 | "marvell,rd88f6281" | ||
| 53 | "marvell,rd88f6281" | ||
| 54 | "marvell,rd88f6281-a0" | ||
| 55 | "marvell,rd88f6281-a1" | ||
| 56 | "mpl,cec4" | ||
| 57 | "mpl,cec4-10" | ||
| 58 | "netgear,readynas" | ||
| 59 | "netgear,readynas" | ||
| 60 | "netgear,readynas-duo-v2" | ||
| 61 | "netgear,readynas-nv+-v2" | ||
| 62 | "plathome,openblocks-a6" | ||
| 63 | "plathome,openblocks-a7" | ||
| 64 | "raidsonic,ib-nas6210" | ||
| 65 | "raidsonic,ib-nas6210-b" | ||
| 66 | "raidsonic,ib-nas6220" | ||
| 67 | "raidsonic,ib-nas6220-b" | ||
| 68 | "raidsonic,ib-nas62x0" | ||
| 69 | "seagate,dockstar" | ||
| 70 | "seagate,goflexnet" | ||
| 71 | "synology,ds109" | ||
| 72 | "synology,ds110jv10" | ||
| 73 | "synology,ds110jv20" | ||
| 74 | "synology,ds110jv30" | ||
| 75 | "synology,ds111" | ||
| 76 | "synology,ds209" | ||
| 77 | "synology,ds210jv10" | ||
| 78 | "synology,ds210jv20" | ||
| 79 | "synology,ds212" | ||
| 80 | "synology,ds212jv10" | ||
| 81 | "synology,ds212jv20" | ||
| 82 | "synology,ds212pv10" | ||
| 83 | "synology,ds409" | ||
| 84 | "synology,ds409slim" | ||
| 85 | "synology,ds410j" | ||
| 86 | "synology,ds411" | ||
| 87 | "synology,ds411j" | ||
| 88 | "synology,ds411slim" | ||
| 89 | "synology,ds413jv10" | ||
| 90 | "synology,rs212" | ||
| 91 | "synology,rs409" | ||
| 92 | "synology,rs411" | ||
| 93 | "synology,rs812" | ||
| 94 | "usi,topkick" | ||
| 95 | "usi,topkick-1281P2" | ||
| 96 | "zyxel,nsa310" | ||
| 97 | "zyxel,nsa310a" | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt index c0105de55cbd..974624ea68f6 100644 --- a/Documentation/devicetree/bindings/arm/omap/l3-noc.txt +++ b/Documentation/devicetree/bindings/arm/omap/l3-noc.txt | |||
| @@ -6,6 +6,8 @@ provided by Arteris. | |||
| 6 | Required properties: | 6 | Required properties: |
| 7 | - compatible : Should be "ti,omap3-l3-smx" for OMAP3 family | 7 | - compatible : Should be "ti,omap3-l3-smx" for OMAP3 family |
| 8 | Should be "ti,omap4-l3-noc" for OMAP4 family | 8 | Should be "ti,omap4-l3-noc" for OMAP4 family |
| 9 | Should be "ti,dra7-l3-noc" for DRA7 family | ||
| 10 | Should be "ti,am4372-l3-noc" for AM43 family | ||
| 9 | - reg: Contains L3 register address range for each noc domain. | 11 | - reg: Contains L3 register address range for each noc domain. |
| 10 | - ti,hwmods: "l3_main_1", ... One hwmod for each noc domain. | 12 | - ti,hwmods: "l3_main_1", ... One hwmod for each noc domain. |
| 11 | 13 | ||
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index 36ede19a1630..d22b216f5d23 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt | |||
| @@ -80,7 +80,10 @@ SoCs: | |||
| 80 | compatible = "ti,omap5432", "ti,omap5" | 80 | compatible = "ti,omap5432", "ti,omap5" |
| 81 | 81 | ||
| 82 | - DRA742 | 82 | - DRA742 |
| 83 | compatible = "ti,dra7xx", "ti,dra7" | 83 | compatible = "ti,dra742", "ti,dra74", "ti,dra7" |
| 84 | |||
| 85 | - DRA722 | ||
| 86 | compatible = "ti,dra722", "ti,dra72", "ti,dra7" | ||
| 84 | 87 | ||
| 85 | - AM4372 | 88 | - AM4372 |
| 86 | compatible = "ti,am4372", "ti,am43" | 89 | compatible = "ti,am4372", "ti,am43" |
| @@ -102,6 +105,12 @@ Boards: | |||
| 102 | - OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board | 105 | - OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board |
| 103 | compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4"; | 106 | compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4"; |
| 104 | 107 | ||
| 108 | - OMAP4 VAR-STK-OM44 : Commercial dev kit with VAR-OM44CustomBoard and VAR-SOM-OM44 w/WLAN | ||
| 109 | compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4"; | ||
| 110 | |||
| 111 | - OMAP4 VAR-DVK-OM44 : Commercial dev kit with VAR-OM44CustomBoard, VAR-SOM-OM44 w/WLAN and LCD touchscreen | ||
| 112 | compatible = "variscite,var-dvk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4"; | ||
| 113 | |||
| 105 | - OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x | 114 | - OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x |
| 106 | compatible = "ti,omap3-evm", "ti,omap3" | 115 | compatible = "ti,omap3-evm", "ti,omap3" |
| 107 | 116 | ||
| @@ -120,5 +129,8 @@ Boards: | |||
| 120 | - AM437x GP EVM | 129 | - AM437x GP EVM |
| 121 | compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43" | 130 | compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43" |
| 122 | 131 | ||
| 123 | - DRA7 EVM: Software Developement Board for DRA7XX | 132 | - DRA742 EVM: Software Development Board for DRA742 |
| 124 | compatible = "ti,dra7-evm", "ti,dra7" | 133 | compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7" |
| 134 | |||
| 135 | - DRA722 EVM: Software Development Board for DRA722 | ||
| 136 | compatible = "ti,dra72-evm", "ti,dra722", "ti,dra72", "ti,dra7" | ||
diff --git a/Documentation/devicetree/bindings/arm/pmu.txt b/Documentation/devicetree/bindings/arm/pmu.txt index fe5cef8976cb..75ef91d08f3b 100644 --- a/Documentation/devicetree/bindings/arm/pmu.txt +++ b/Documentation/devicetree/bindings/arm/pmu.txt | |||
| @@ -8,6 +8,7 @@ Required properties: | |||
| 8 | 8 | ||
| 9 | - compatible : should be one of | 9 | - compatible : should be one of |
| 10 | "arm,armv8-pmuv3" | 10 | "arm,armv8-pmuv3" |
| 11 | "arm,cortex-a17-pmu" | ||
| 11 | "arm,cortex-a15-pmu" | 12 | "arm,cortex-a15-pmu" |
| 12 | "arm,cortex-a12-pmu" | 13 | "arm,cortex-a12-pmu" |
| 13 | "arm,cortex-a9-pmu" | 14 | "arm,cortex-a9-pmu" |
diff --git a/Documentation/devicetree/bindings/arm/psci.txt b/Documentation/devicetree/bindings/arm/psci.txt index 433afe9cb590..b4a58f39223c 100644 --- a/Documentation/devicetree/bindings/arm/psci.txt +++ b/Documentation/devicetree/bindings/arm/psci.txt | |||
| @@ -21,7 +21,15 @@ to #0. | |||
| 21 | 21 | ||
| 22 | Main node required properties: | 22 | Main node required properties: |
| 23 | 23 | ||
| 24 | - compatible : Must be "arm,psci" | 24 | - compatible : should contain at least one of: |
| 25 | |||
| 26 | * "arm,psci" : for implementations complying to PSCI versions prior to | ||
| 27 | 0.2. For these cases function IDs must be provided. | ||
| 28 | |||
| 29 | * "arm,psci-0.2" : for implementations complying to PSCI 0.2. Function | ||
| 30 | IDs are not required and should be ignored by an OS with PSCI 0.2 | ||
| 31 | support, but are permitted to be present for compatibility with | ||
| 32 | existing software when "arm,psci" is later in the compatible list. | ||
| 25 | 33 | ||
| 26 | - method : The method of calling the PSCI firmware. Permitted | 34 | - method : The method of calling the PSCI firmware. Permitted |
| 27 | values are: | 35 | values are: |
| @@ -45,6 +53,8 @@ Main node optional properties: | |||
| 45 | 53 | ||
| 46 | Example: | 54 | Example: |
| 47 | 55 | ||
| 56 | Case 1: PSCI v0.1 only. | ||
| 57 | |||
| 48 | psci { | 58 | psci { |
| 49 | compatible = "arm,psci"; | 59 | compatible = "arm,psci"; |
| 50 | method = "smc"; | 60 | method = "smc"; |
| @@ -53,3 +63,28 @@ Example: | |||
| 53 | cpu_on = <0x95c10002>; | 63 | cpu_on = <0x95c10002>; |
| 54 | migrate = <0x95c10003>; | 64 | migrate = <0x95c10003>; |
| 55 | }; | 65 | }; |
| 66 | |||
| 67 | |||
| 68 | Case 2: PSCI v0.2 only | ||
| 69 | |||
| 70 | psci { | ||
| 71 | compatible = "arm,psci-0.2"; | ||
| 72 | method = "smc"; | ||
| 73 | }; | ||
| 74 | |||
| 75 | Case 3: PSCI v0.2 and PSCI v0.1. | ||
| 76 | |||
| 77 | A DTB may provide IDs for use by kernels without PSCI 0.2 support, | ||
| 78 | enabling firmware and hypervisors to support existing and new kernels. | ||
| 79 | These IDs will be ignored by kernels with PSCI 0.2 support, which will | ||
| 80 | use the standard PSCI 0.2 IDs exclusively. | ||
| 81 | |||
| 82 | psci { | ||
| 83 | compatible = "arm,psci-0.2", "arm,psci"; | ||
| 84 | method = "hvc"; | ||
| 85 | |||
| 86 | cpu_on = < arbitrary value >; | ||
| 87 | cpu_off = < arbitrary value >; | ||
| 88 | |||
| 89 | ... | ||
| 90 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/rockchip.txt b/Documentation/devicetree/bindings/arm/rockchip.txt new file mode 100644 index 000000000000..857f12636eb2 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/rockchip.txt | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | Rockchip platforms device tree bindings | ||
| 2 | --------------------------------------- | ||
| 3 | |||
| 4 | - bq Curie 2 tablet: | ||
| 5 | Required root node properties: | ||
| 6 | - compatible = "mundoreader,bq-curie2", "rockchip,rk3066a"; | ||
| 7 | |||
| 8 | - Radxa Rock board: | ||
| 9 | Required root node properties: | ||
| 10 | - compatible = "radxa,rock", "rockchip,rk3188"; | ||
diff --git a/Documentation/devicetree/bindings/arm/samsung/pmu.txt b/Documentation/devicetree/bindings/arm/samsung/pmu.txt index f1f155255f28..2a4ab046a8a1 100644 --- a/Documentation/devicetree/bindings/arm/samsung/pmu.txt +++ b/Documentation/devicetree/bindings/arm/samsung/pmu.txt | |||
| @@ -2,6 +2,10 @@ SAMSUNG Exynos SoC series PMU Registers | |||
| 2 | 2 | ||
| 3 | Properties: | 3 | Properties: |
| 4 | - compatible : should contain two values. First value must be one from following list: | 4 | - compatible : should contain two values. First value must be one from following list: |
| 5 | - "samsung,exynos3250-pmu" - for Exynos3250 SoC, | ||
| 6 | - "samsung,exynos4210-pmu" - for Exynos4210 SoC, | ||
| 7 | - "samsung,exynos4212-pmu" - for Exynos4212 SoC, | ||
| 8 | - "samsung,exynos4412-pmu" - for Exynos4412 SoC, | ||
| 5 | - "samsung,exynos5250-pmu" - for Exynos5250 SoC, | 9 | - "samsung,exynos5250-pmu" - for Exynos5250 SoC, |
| 6 | - "samsung,exynos5420-pmu" - for Exynos5420 SoC. | 10 | - "samsung,exynos5420-pmu" - for Exynos5420 SoC. |
| 7 | second value must be always "syscon". | 11 | second value must be always "syscon". |
diff --git a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt index 0ab3251a6ec2..4fced6e9d5e4 100644 --- a/Documentation/devicetree/bindings/arm/samsung/sysreg.txt +++ b/Documentation/devicetree/bindings/arm/samsung/sysreg.txt | |||
| @@ -1,8 +1,10 @@ | |||
| 1 | SAMSUNG S5P/Exynos SoC series System Registers (SYSREG) | 1 | SAMSUNG S5P/Exynos SoC series System Registers (SYSREG) |
| 2 | 2 | ||
| 3 | Properties: | 3 | Properties: |
| 4 | - compatible : should contain "samsung,<chip name>-sysreg", "syscon"; | 4 | - compatible : should contain two values. First value must be one from following list: |
| 5 | For Exynos4 SoC series it should be "samsung,exynos4-sysreg", "syscon"; | 5 | - "samsung,exynos4-sysreg" - for Exynos4 based SoCs, |
| 6 | - "samsung,exynos5-sysreg" - for Exynos5 based SoCs. | ||
| 7 | second value must be always "syscon". | ||
| 6 | - reg : offset and length of the register set. | 8 | - reg : offset and length of the register set. |
| 7 | 9 | ||
| 8 | Example: | 10 | Example: |
| @@ -10,3 +12,8 @@ Example: | |||
| 10 | compatible = "samsung,exynos4-sysreg", "syscon"; | 12 | compatible = "samsung,exynos4-sysreg", "syscon"; |
| 11 | reg = <0x10010000 0x400>; | 13 | reg = <0x10010000 0x400>; |
| 12 | }; | 14 | }; |
| 15 | |||
| 16 | syscon@10050000 { | ||
| 17 | compatible = "samsung,exynos5-sysreg", "syscon"; | ||
| 18 | reg = <0x10050000 0x5000>; | ||
| 19 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/sti.txt b/Documentation/devicetree/bindings/arm/sti.txt new file mode 100644 index 000000000000..92f16c78bb69 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/sti.txt | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | ST STi Platforms Device Tree Bindings | ||
| 2 | --------------------------------------- | ||
| 3 | |||
| 4 | Boards with the ST STiH415 SoC shall have the following properties: | ||
| 5 | Required root node property: | ||
| 6 | compatible = "st,stih415"; | ||
| 7 | |||
| 8 | Boards with the ST STiH416 SoC shall have the following properties: | ||
| 9 | Required root node property: | ||
| 10 | compatible = "st,stih416"; | ||
| 11 | |||
| 12 | Boards with the ST STiH407 SoC shall have the following properties: | ||
| 13 | Required root node property: | ||
| 14 | compatible = "st,stih407"; | ||
| 15 | |||
diff --git a/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt b/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt index 5580e9c4bd85..00318d083c9e 100644 --- a/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt +++ b/Documentation/devicetree/bindings/arm/vexpress-sysreg.txt | |||
| @@ -8,6 +8,8 @@ interrupt generation, MMC and NOR Flash control etc. | |||
| 8 | Required node properties: | 8 | Required node properties: |
| 9 | - compatible value : = "arm,vexpress,sysreg"; | 9 | - compatible value : = "arm,vexpress,sysreg"; |
| 10 | - reg : physical base address and the size of the registers window | 10 | - reg : physical base address and the size of the registers window |
| 11 | |||
| 12 | Deprecated properties, replaced by GPIO subnodes (see below): | ||
| 11 | - gpio-controller : specifies that the node is a GPIO controller | 13 | - gpio-controller : specifies that the node is a GPIO controller |
| 12 | - #gpio-cells : size of the GPIO specifier, should be 2: | 14 | - #gpio-cells : size of the GPIO specifier, should be 2: |
| 13 | - first cell is the pseudo-GPIO line number: | 15 | - first cell is the pseudo-GPIO line number: |
| @@ -16,35 +18,86 @@ Required node properties: | |||
| 16 | 2 - NOR FLASH WPn | 18 | 2 - NOR FLASH WPn |
| 17 | - second cell can take standard GPIO flags (currently ignored). | 19 | - second cell can take standard GPIO flags (currently ignored). |
| 18 | 20 | ||
| 21 | Control registers providing pseudo-GPIO lines must be represented | ||
| 22 | by subnodes, each of them requiring the following properties: | ||
| 23 | - compatible value : one of | ||
| 24 | "arm,vexpress-sysreg,sys_led" | ||
| 25 | "arm,vexpress-sysreg,sys_mci" | ||
| 26 | "arm,vexpress-sysreg,sys_flash" | ||
| 27 | - gpio-controller : makes the node a GPIO controller | ||
| 28 | - #gpio-cells : size of the GPIO specifier, must be 2: | ||
| 29 | - first cell is the function number: | ||
| 30 | - for sys_led : 0..7 = LED 0..7 | ||
| 31 | - for sys_mci : 0 = MMC CARDIN, 1 = MMC WPROT | ||
| 32 | - for sys_flash : 0 = NOR FLASH WPn | ||
| 33 | - second cell can take standard GPIO flags (currently ignored). | ||
| 34 | |||
| 19 | Example: | 35 | Example: |
| 20 | v2m_sysreg: sysreg@10000000 { | 36 | v2m_sysreg: sysreg@10000000 { |
| 21 | compatible = "arm,vexpress-sysreg"; | 37 | compatible = "arm,vexpress-sysreg"; |
| 22 | reg = <0x10000000 0x1000>; | 38 | reg = <0x10000000 0x1000>; |
| 23 | gpio-controller; | 39 | |
| 24 | #gpio-cells = <2>; | 40 | v2m_led_gpios: sys_led@08 { |
| 41 | compatible = "arm,vexpress-sysreg,sys_led"; | ||
| 42 | gpio-controller; | ||
| 43 | #gpio-cells = <2>; | ||
| 44 | }; | ||
| 45 | |||
| 46 | v2m_mmc_gpios: sys_mci@48 { | ||
| 47 | compatible = "arm,vexpress-sysreg,sys_mci"; | ||
| 48 | gpio-controller; | ||
| 49 | #gpio-cells = <2>; | ||
| 50 | }; | ||
| 51 | |||
| 52 | v2m_flash_gpios: sys_flash@4c { | ||
| 53 | compatible = "arm,vexpress-sysreg,sys_flash"; | ||
| 54 | gpio-controller; | ||
| 55 | #gpio-cells = <2>; | ||
| 56 | }; | ||
| 25 | }; | 57 | }; |
| 26 | 58 | ||
| 27 | This block also can also act a bridge to the platform's configuration | 59 | This block also can also act a bridge to the platform's configuration |
| 28 | bus via "system control" interface, addressing devices with site number, | 60 | bus via "system control" interface, addressing devices with site number, |
| 29 | position in the board stack, config controller, function and device | 61 | position in the board stack, config controller, function and device |
| 30 | numbers - see motherboard's TRM for more details. | 62 | numbers - see motherboard's TRM for more details. All configuration |
| 31 | 63 | controller accessible via this interface must reference the sysreg | |
| 32 | The node describing a config device must refer to the sysreg node via | 64 | node via "arm,vexpress,config-bridge" phandle and define appropriate |
| 33 | "arm,vexpress,config-bridge" phandle (can be also defined in the node's | 65 | topology properties - see main vexpress node documentation for more |
| 34 | parent) and relies on the board topology properties - see main vexpress | 66 | details. Each child of such node describes one function and must |
| 35 | node documentation for more details. It must also define the following | 67 | define the following properties: |
| 36 | property: | 68 | - compatible value : must be one of (corresponding to the TRM): |
| 37 | - arm,vexpress-sysreg,func : must contain two cells: | 69 | "arm,vexpress-amp" |
| 38 | - first cell defines function number (eg. 1 for clock generator, | 70 | "arm,vexpress-dvimode" |
| 39 | 2 for voltage regulators etc.) | 71 | "arm,vexpress-energy" |
| 40 | - device number (eg. osc 0, osc 1 etc.) | 72 | "arm,vexpress-muxfpga" |
| 73 | "arm,vexpress-osc" | ||
| 74 | "arm,vexpress-power" | ||
| 75 | "arm,vexpress-reboot" | ||
| 76 | "arm,vexpress-reset" | ||
| 77 | "arm,vexpress-scc" | ||
| 78 | "arm,vexpress-shutdown" | ||
| 79 | "arm,vexpress-temp" | ||
| 80 | "arm,vexpress-volt" | ||
| 81 | - arm,vexpress-sysreg,func : must contain a set of two cells long groups: | ||
| 82 | - first cell of each group defines the function number | ||
| 83 | (eg. 1 for clock generator, 2 for voltage regulators etc.) | ||
| 84 | - second cell of each group defines device number (eg. osc 0, | ||
| 85 | osc 1 etc.) | ||
| 86 | - some functions (eg. energy meter, with its 64 bit long counter) | ||
| 87 | are using more than one function/device number pair | ||
| 41 | 88 | ||
| 42 | Example: | 89 | Example: |
| 43 | mcc { | 90 | mcc { |
| 91 | compatible = "arm,vexpress,config-bus"; | ||
| 44 | arm,vexpress,config-bridge = <&v2m_sysreg>; | 92 | arm,vexpress,config-bridge = <&v2m_sysreg>; |
| 45 | 93 | ||
| 46 | osc@0 { | 94 | osc@0 { |
| 47 | compatible = "arm,vexpress-osc"; | 95 | compatible = "arm,vexpress-osc"; |
| 48 | arm,vexpress-sysreg,func = <1 0>; | 96 | arm,vexpress-sysreg,func = <1 0>; |
| 49 | }; | 97 | }; |
| 98 | |||
| 99 | energy@0 { | ||
| 100 | compatible = "arm,vexpress-energy"; | ||
| 101 | arm,vexpress-sysreg,func = <13 0>, <13 1>; | ||
| 102 | }; | ||
| 50 | }; | 103 | }; |
diff --git a/Documentation/devicetree/bindings/arm/vexpress.txt b/Documentation/devicetree/bindings/arm/vexpress.txt index ae49161e478a..39844cd0bcce 100644 --- a/Documentation/devicetree/bindings/arm/vexpress.txt +++ b/Documentation/devicetree/bindings/arm/vexpress.txt | |||
| @@ -80,12 +80,17 @@ but also control clock generators, voltage regulators, gather | |||
| 80 | environmental data like temperature, power consumption etc. Even | 80 | environmental data like temperature, power consumption etc. Even |
| 81 | the video output switch (FPGA) is controlled that way. | 81 | the video output switch (FPGA) is controlled that way. |
| 82 | 82 | ||
| 83 | Nodes describing devices controlled by this infrastructure should | 83 | The controllers are not mapped into normal memory address space |
| 84 | point at the bridge device node: | 84 | and must be accessed through bridges - other devices capable |
| 85 | of generating transactions on the configuration bus. | ||
| 86 | |||
| 87 | The nodes describing configuration controllers must define | ||
| 88 | the following properties: | ||
| 89 | - compatible value: | ||
| 90 | compatible = "arm,vexpress,config-bus"; | ||
| 85 | - bridge phandle: | 91 | - bridge phandle: |
| 86 | arm,vexpress,config-bridge = <phandle>; | 92 | arm,vexpress,config-bridge = <phandle>; |
| 87 | This property can be also defined in a parent node (eg. for a DCC) | 93 | and children describing available functions. |
| 88 | and is effective for all children. | ||
| 89 | 94 | ||
| 90 | 95 | ||
| 91 | Platform topology | 96 | Platform topology |
| @@ -197,7 +202,7 @@ Example of a VE tile description (simplified) | |||
| 197 | }; | 202 | }; |
| 198 | 203 | ||
| 199 | dcc { | 204 | dcc { |
| 200 | compatible = "simple-bus"; | 205 | compatible = "arm,vexpress,config-bus"; |
| 201 | arm,vexpress,config-bridge = <&v2m_sysreg>; | 206 | arm,vexpress,config-bridge = <&v2m_sysreg>; |
| 202 | 207 | ||
| 203 | osc@0 { | 208 | osc@0 { |
diff --git a/Documentation/devicetree/bindings/ata/ahci-platform.txt b/Documentation/devicetree/bindings/ata/ahci-platform.txt index 48b285ffa3a6..c96d8dcf98fd 100644 --- a/Documentation/devicetree/bindings/ata/ahci-platform.txt +++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt | |||
| @@ -4,10 +4,16 @@ SATA nodes are defined to describe on-chip Serial ATA controllers. | |||
| 4 | Each SATA controller should have its own node. | 4 | Each SATA controller should have its own node. |
| 5 | 5 | ||
| 6 | Required properties: | 6 | Required properties: |
| 7 | - compatible : compatible list, one of "snps,spear-ahci", | 7 | - compatible : compatible string, one of: |
| 8 | "snps,exynos5440-ahci", "ibm,476gtr-ahci", | 8 | - "allwinner,sun4i-a10-ahci" |
| 9 | "allwinner,sun4i-a10-ahci", "fsl,imx53-ahci" | 9 | - "fsl,imx53-ahci" |
| 10 | "fsl,imx6q-ahci" or "snps,dwc-ahci" | 10 | - "fsl,imx6q-ahci" |
| 11 | - "hisilicon,hisi-ahci" | ||
| 12 | - "ibm,476gtr-ahci" | ||
| 13 | - "marvell,armada-380-ahci" | ||
| 14 | - "snps,dwc-ahci" | ||
| 15 | - "snps,exynos5440-ahci" | ||
| 16 | - "snps,spear-ahci" | ||
| 11 | - interrupts : <interrupt mapping for SATA IRQ> | 17 | - interrupts : <interrupt mapping for SATA IRQ> |
| 12 | - reg : <registers mapping> | 18 | - reg : <registers mapping> |
| 13 | 19 | ||
diff --git a/Documentation/devicetree/bindings/ata/apm-xgene.txt b/Documentation/devicetree/bindings/ata/apm-xgene.txt index 7bcfbf59810e..a668f0e7d001 100644 --- a/Documentation/devicetree/bindings/ata/apm-xgene.txt +++ b/Documentation/devicetree/bindings/ata/apm-xgene.txt | |||
| @@ -24,6 +24,7 @@ Required properties: | |||
| 24 | * "sata-phy" for the SATA 6.0Gbps PHY | 24 | * "sata-phy" for the SATA 6.0Gbps PHY |
| 25 | 25 | ||
| 26 | Optional properties: | 26 | Optional properties: |
| 27 | - dma-coherent : Present if dma operations are coherent | ||
| 27 | - status : Shall be "ok" if enabled or "disabled" if disabled. | 28 | - status : Shall be "ok" if enabled or "disabled" if disabled. |
| 28 | Default is "ok". | 29 | Default is "ok". |
| 29 | 30 | ||
| @@ -55,6 +56,7 @@ Example: | |||
| 55 | <0x0 0x1f22e000 0x0 0x1000>, | 56 | <0x0 0x1f22e000 0x0 0x1000>, |
| 56 | <0x0 0x1f227000 0x0 0x1000>; | 57 | <0x0 0x1f227000 0x0 0x1000>; |
| 57 | interrupts = <0x0 0x87 0x4>; | 58 | interrupts = <0x0 0x87 0x4>; |
| 59 | dma-coherent; | ||
| 58 | status = "ok"; | 60 | status = "ok"; |
| 59 | clocks = <&sataclk 0>; | 61 | clocks = <&sataclk 0>; |
| 60 | phys = <&phy2 0>; | 62 | phys = <&phy2 0>; |
| @@ -69,6 +71,7 @@ Example: | |||
| 69 | <0x0 0x1f23e000 0x0 0x1000>, | 71 | <0x0 0x1f23e000 0x0 0x1000>, |
| 70 | <0x0 0x1f237000 0x0 0x1000>; | 72 | <0x0 0x1f237000 0x0 0x1000>; |
| 71 | interrupts = <0x0 0x88 0x4>; | 73 | interrupts = <0x0 0x88 0x4>; |
| 74 | dma-coherent; | ||
| 72 | status = "ok"; | 75 | status = "ok"; |
| 73 | clocks = <&sataclk 0>; | 76 | clocks = <&sataclk 0>; |
| 74 | phys = <&phy3 0>; | 77 | phys = <&phy3 0>; |
diff --git a/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt b/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt new file mode 100644 index 000000000000..e2d501d20c9a --- /dev/null +++ b/Documentation/devicetree/bindings/bus/brcm,gisb-arb.txt | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | Broadcom GISB bus Arbiter controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | |||
| 5 | - compatible: should be "brcm,gisb-arb" | ||
| 6 | - reg: specifies the base physical address and size of the registers | ||
| 7 | - interrupt-parent: specifies the phandle to the parent interrupt controller | ||
| 8 | this arbiter gets interrupt line from | ||
| 9 | - interrupts: specifies the two interrupts (timeout and TEA) to be used from | ||
| 10 | the parent interrupt controller | ||
| 11 | |||
| 12 | Optional properties: | ||
| 13 | |||
| 14 | - brcm,gisb-arb-master-mask: 32-bits wide bitmask used to specify which GISB | ||
| 15 | masters are valid at the system level | ||
| 16 | - brcm,gisb-arb-master-names: string list of the litteral name of the GISB | ||
| 17 | masters. Should match the number of bits set in brcm,gisb-master-mask and | ||
| 18 | the order in which they appear | ||
| 19 | |||
| 20 | Example: | ||
| 21 | |||
| 22 | gisb-arb@f0400000 { | ||
| 23 | compatible = "brcm,gisb-arb"; | ||
| 24 | reg = <0xf0400000 0x800>; | ||
| 25 | interrupts = <0>, <2>; | ||
| 26 | interrupt-parent = <&sun_l2_intc>; | ||
| 27 | |||
| 28 | brcm,gisb-arb-master-mask = <0x7>; | ||
| 29 | brcm,gisb-arb-master-names = "bsp_0", "scpu_0", "cpu_0"; | ||
| 30 | }; | ||
diff --git a/Documentation/devicetree/bindings/bus/mvebu-mbus.txt b/Documentation/devicetree/bindings/bus/mvebu-mbus.txt index 7586fb68c072..5fa44f52a0b8 100644 --- a/Documentation/devicetree/bindings/bus/mvebu-mbus.txt +++ b/Documentation/devicetree/bindings/bus/mvebu-mbus.txt | |||
| @@ -197,7 +197,7 @@ to be set by the operating system and that are guaranteed to be free of overlaps | |||
| 197 | with one another or with the system memory ranges. | 197 | with one another or with the system memory ranges. |
| 198 | 198 | ||
| 199 | Each entry in the property refers to exactly one window. If the operating system | 199 | Each entry in the property refers to exactly one window. If the operating system |
| 200 | choses to use a different set of mbus windows, it must ensure that any address | 200 | chooses to use a different set of mbus windows, it must ensure that any address |
| 201 | translations performed from downstream devices are adapted accordingly. | 201 | translations performed from downstream devices are adapted accordingly. |
| 202 | 202 | ||
| 203 | The operating system may insert additional mbus windows that do not conflict | 203 | The operating system may insert additional mbus windows that do not conflict |
diff --git a/Documentation/devicetree/bindings/clock/altr_socfpga.txt b/Documentation/devicetree/bindings/clock/altr_socfpga.txt index 5dfd145d3ccf..f72e80e0dade 100644 --- a/Documentation/devicetree/bindings/clock/altr_socfpga.txt +++ b/Documentation/devicetree/bindings/clock/altr_socfpga.txt | |||
| @@ -21,8 +21,8 @@ Optional properties: | |||
| 21 | - 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 | 22 | - clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register |
| 23 | and the bit index. | 23 | and the bit index. |
| 24 | - div-reg : For "socfpga-gate-clk", div-reg contains the divider register, bit shift, | 24 | - div-reg : For "socfpga-gate-clk" and "socfpga-periph-clock", div-reg contains |
| 25 | and width. | 25 | the divider register, bit shift, and width. |
| 26 | - clk-phase : For the sdmmc_clk, contains the value of the clock phase that controls | 26 | - clk-phase : For the sdmmc_clk, contains the value of the clock phase that controls |
| 27 | the SDMMC CIU clock. The first value is the clk_sample(smpsel), and the second | 27 | the SDMMC CIU clock. The first value is the clk_sample(smpsel), and the second |
| 28 | value is the cclk_in_drv(drvsel). The clk-phase is used to enable the correct | 28 | value is the cclk_in_drv(drvsel). The clk-phase is used to enable the correct |
diff --git a/Documentation/devicetree/bindings/clock/at91-clock.txt b/Documentation/devicetree/bindings/clock/at91-clock.txt index cd5e23912888..b3d544ca522a 100644 --- a/Documentation/devicetree/bindings/clock/at91-clock.txt +++ b/Documentation/devicetree/bindings/clock/at91-clock.txt | |||
| @@ -6,6 +6,16 @@ This binding uses the common clock binding[1]. | |||
| 6 | 6 | ||
| 7 | Required properties: | 7 | Required properties: |
| 8 | - compatible : shall be one of the following: | 8 | - compatible : shall be one of the following: |
| 9 | "atmel,at91sam9x5-sckc": | ||
| 10 | at91 SCKC (Slow Clock Controller) | ||
| 11 | This node contains the slow clock definitions. | ||
| 12 | |||
| 13 | "atmel,at91sam9x5-clk-slow-osc": | ||
| 14 | at91 slow oscillator | ||
| 15 | |||
| 16 | "atmel,at91sam9x5-clk-slow-rc-osc": | ||
| 17 | at91 internal slow RC oscillator | ||
| 18 | |||
| 9 | "atmel,at91rm9200-pmc" or | 19 | "atmel,at91rm9200-pmc" or |
| 10 | "atmel,at91sam9g45-pmc" or | 20 | "atmel,at91sam9g45-pmc" or |
| 11 | "atmel,at91sam9n12-pmc" or | 21 | "atmel,at91sam9n12-pmc" or |
| @@ -15,8 +25,18 @@ Required properties: | |||
| 15 | All at91 specific clocks (clocks defined below) must be child | 25 | All at91 specific clocks (clocks defined below) must be child |
| 16 | node of the PMC node. | 26 | node of the PMC node. |
| 17 | 27 | ||
| 28 | "atmel,at91sam9x5-clk-slow" (under sckc node) | ||
| 29 | or | ||
| 30 | "atmel,at91sam9260-clk-slow" (under pmc node): | ||
| 31 | at91 slow clk | ||
| 32 | |||
| 33 | "atmel,at91rm9200-clk-main-osc" | ||
| 34 | "atmel,at91sam9x5-clk-main-rc-osc" | ||
| 35 | at91 main clk sources | ||
| 36 | |||
| 37 | "atmel,at91sam9x5-clk-main" | ||
| 18 | "atmel,at91rm9200-clk-main": | 38 | "atmel,at91rm9200-clk-main": |
| 19 | at91 main oscillator | 39 | at91 main clock |
| 20 | 40 | ||
| 21 | "atmel,at91rm9200-clk-master" or | 41 | "atmel,at91rm9200-clk-master" or |
| 22 | "atmel,at91sam9x5-clk-master": | 42 | "atmel,at91sam9x5-clk-master": |
| @@ -54,6 +74,63 @@ Required properties: | |||
| 54 | "atmel,at91sam9x5-clk-utmi": | 74 | "atmel,at91sam9x5-clk-utmi": |
| 55 | at91 utmi clock | 75 | at91 utmi clock |
| 56 | 76 | ||
| 77 | Required properties for SCKC node: | ||
| 78 | - reg : defines the IO memory reserved for the SCKC. | ||
| 79 | - #size-cells : shall be 0 (reg is used to encode clk id). | ||
| 80 | - #address-cells : shall be 1 (reg is used to encode clk id). | ||
| 81 | |||
| 82 | |||
| 83 | For example: | ||
| 84 | sckc: sckc@fffffe50 { | ||
| 85 | compatible = "atmel,sama5d3-pmc"; | ||
| 86 | reg = <0xfffffe50 0x4> | ||
| 87 | #size-cells = <0>; | ||
| 88 | #address-cells = <1>; | ||
| 89 | |||
| 90 | /* put at91 slow clocks here */ | ||
| 91 | }; | ||
| 92 | |||
| 93 | |||
| 94 | Required properties for internal slow RC oscillator: | ||
| 95 | - #clock-cells : from common clock binding; shall be set to 0. | ||
| 96 | - clock-frequency : define the internal RC oscillator frequency. | ||
| 97 | |||
| 98 | Optional properties: | ||
| 99 | - clock-accuracy : define the internal RC oscillator accuracy. | ||
| 100 | |||
| 101 | For example: | ||
| 102 | slow_rc_osc: slow_rc_osc { | ||
| 103 | compatible = "atmel,at91sam9x5-clk-slow-rc-osc"; | ||
| 104 | clock-frequency = <32768>; | ||
| 105 | clock-accuracy = <50000000>; | ||
| 106 | }; | ||
| 107 | |||
| 108 | Required properties for slow oscillator: | ||
| 109 | - #clock-cells : from common clock binding; shall be set to 0. | ||
| 110 | - clocks : shall encode the main osc source clk sources (see atmel datasheet). | ||
| 111 | |||
| 112 | Optional properties: | ||
| 113 | - atmel,osc-bypass : boolean property. Set this when a clock signal is directly | ||
| 114 | provided on XIN. | ||
| 115 | |||
| 116 | For example: | ||
| 117 | slow_osc: slow_osc { | ||
| 118 | compatible = "atmel,at91rm9200-clk-slow-osc"; | ||
| 119 | #clock-cells = <0>; | ||
| 120 | clocks = <&slow_xtal>; | ||
| 121 | }; | ||
| 122 | |||
| 123 | Required properties for slow clock: | ||
| 124 | - #clock-cells : from common clock binding; shall be set to 0. | ||
| 125 | - clocks : shall encode the slow clk sources (see atmel datasheet). | ||
| 126 | |||
| 127 | For example: | ||
| 128 | clk32k: slck { | ||
| 129 | compatible = "atmel,at91sam9x5-clk-slow"; | ||
| 130 | #clock-cells = <0>; | ||
| 131 | clocks = <&slow_rc_osc &slow_osc>; | ||
| 132 | }; | ||
| 133 | |||
| 57 | Required properties for PMC node: | 134 | Required properties for PMC node: |
| 58 | - reg : defines the IO memory reserved for the PMC. | 135 | - reg : defines the IO memory reserved for the PMC. |
| 59 | - #size-cells : shall be 0 (reg is used to encode clk id). | 136 | - #size-cells : shall be 0 (reg is used to encode clk id). |
| @@ -62,7 +139,7 @@ Required properties for PMC node: | |||
| 62 | - interrupt-controller : tell that the PMC is an interrupt controller. | 139 | - interrupt-controller : tell that the PMC is an interrupt controller. |
| 63 | - #interrupt-cells : must be set to 1. The first cell encodes the interrupt id, | 140 | - #interrupt-cells : must be set to 1. The first cell encodes the interrupt id, |
| 64 | and reflect the bit position in the PMC_ER/DR/SR registers. | 141 | and reflect the bit position in the PMC_ER/DR/SR registers. |
| 65 | You can use the dt macros defined in dt-bindings/clk/at91.h. | 142 | You can use the dt macros defined in dt-bindings/clock/at91.h. |
| 66 | 0 (AT91_PMC_MOSCS) -> main oscillator ready | 143 | 0 (AT91_PMC_MOSCS) -> main oscillator ready |
| 67 | 1 (AT91_PMC_LOCKA) -> PLL A ready | 144 | 1 (AT91_PMC_LOCKA) -> PLL A ready |
| 68 | 2 (AT91_PMC_LOCKB) -> PLL B ready | 145 | 2 (AT91_PMC_LOCKB) -> PLL B ready |
| @@ -85,24 +162,57 @@ For example: | |||
| 85 | /* put at91 clocks here */ | 162 | /* put at91 clocks here */ |
| 86 | }; | 163 | }; |
| 87 | 164 | ||
| 165 | Required properties for main clock internal RC oscillator: | ||
| 166 | - interrupt-parent : must reference the PMC node. | ||
| 167 | - interrupts : shall be set to "<0>". | ||
| 168 | - clock-frequency : define the internal RC oscillator frequency. | ||
| 169 | |||
| 170 | Optional properties: | ||
| 171 | - clock-accuracy : define the internal RC oscillator accuracy. | ||
| 172 | |||
| 173 | For example: | ||
| 174 | main_rc_osc: main_rc_osc { | ||
| 175 | compatible = "atmel,at91sam9x5-clk-main-rc-osc"; | ||
| 176 | interrupt-parent = <&pmc>; | ||
| 177 | interrupts = <0>; | ||
| 178 | clock-frequency = <12000000>; | ||
| 179 | clock-accuracy = <50000000>; | ||
| 180 | }; | ||
| 181 | |||
| 182 | Required properties for main clock oscillator: | ||
| 183 | - interrupt-parent : must reference the PMC node. | ||
| 184 | - interrupts : shall be set to "<0>". | ||
| 185 | - #clock-cells : from common clock binding; shall be set to 0. | ||
| 186 | - clocks : shall encode the main osc source clk sources (see atmel datasheet). | ||
| 187 | |||
| 188 | Optional properties: | ||
| 189 | - atmel,osc-bypass : boolean property. Specified if a clock signal is provided | ||
| 190 | on XIN. | ||
| 191 | |||
| 192 | clock signal is directly provided on XIN pin. | ||
| 193 | |||
| 194 | For example: | ||
| 195 | main_osc: main_osc { | ||
| 196 | compatible = "atmel,at91rm9200-clk-main-osc"; | ||
| 197 | interrupt-parent = <&pmc>; | ||
| 198 | interrupts = <0>; | ||
| 199 | #clock-cells = <0>; | ||
| 200 | clocks = <&main_xtal>; | ||
| 201 | }; | ||
| 202 | |||
| 88 | Required properties for main clock: | 203 | Required properties for main clock: |
| 89 | - interrupt-parent : must reference the PMC node. | 204 | - interrupt-parent : must reference the PMC node. |
| 90 | - interrupts : shall be set to "<0>". | 205 | - interrupts : shall be set to "<0>". |
| 91 | - #clock-cells : from common clock binding; shall be set to 0. | 206 | - #clock-cells : from common clock binding; shall be set to 0. |
| 92 | - clocks (optional if clock-frequency is provided) : shall be the slow clock | 207 | - clocks : shall encode the main clk sources (see atmel datasheet). |
| 93 | phandle. This clock is used to calculate the main clock rate if | ||
| 94 | "clock-frequency" is not provided. | ||
| 95 | - clock-frequency : the main oscillator frequency.Prefer the use of | ||
| 96 | "clock-frequency" over automatic clock rate calculation. | ||
| 97 | 208 | ||
| 98 | For example: | 209 | For example: |
| 99 | main: mainck { | 210 | main: mainck { |
| 100 | compatible = "atmel,at91rm9200-clk-main"; | 211 | compatible = "atmel,at91sam9x5-clk-main"; |
| 101 | interrupt-parent = <&pmc>; | 212 | interrupt-parent = <&pmc>; |
| 102 | interrupts = <0>; | 213 | interrupts = <0>; |
| 103 | #clock-cells = <0>; | 214 | #clock-cells = <0>; |
| 104 | clocks = <&ck32k>; | 215 | clocks = <&main_rc_osc &main_osc>; |
| 105 | clock-frequency = <18432000>; | ||
| 106 | }; | 216 | }; |
| 107 | 217 | ||
| 108 | Required properties for master clock: | 218 | Required properties for master clock: |
diff --git a/Documentation/devicetree/bindings/clock/bcm-kona-clock.txt b/Documentation/devicetree/bindings/clock/bcm-kona-clock.txt index 56d1f4961075..5286e260fcae 100644 --- a/Documentation/devicetree/bindings/clock/bcm-kona-clock.txt +++ b/Documentation/devicetree/bindings/clock/bcm-kona-clock.txt | |||
| @@ -10,12 +10,12 @@ This binding uses the common clock binding: | |||
| 10 | 10 | ||
| 11 | Required properties: | 11 | Required properties: |
| 12 | - compatible | 12 | - compatible |
| 13 | Shall have one of the following values: | 13 | Shall have a value of the form "brcm,<model>-<which>-ccu", |
| 14 | - "brcm,bcm11351-root-ccu" | 14 | where <model> is a Broadcom SoC model number and <which> is |
| 15 | - "brcm,bcm11351-aon-ccu" | 15 | the name of a defined CCU. For example: |
| 16 | - "brcm,bcm11351-hub-ccu" | 16 | "brcm,bcm11351-root-ccu" |
| 17 | - "brcm,bcm11351-master-ccu" | 17 | The compatible strings used for each supported SoC family |
| 18 | - "brcm,bcm11351-slave-ccu" | 18 | are defined below. |
| 19 | - reg | 19 | - reg |
| 20 | Shall define the base and range of the address space | 20 | Shall define the base and range of the address space |
| 21 | containing clock control registers | 21 | containing clock control registers |
| @@ -26,12 +26,48 @@ Required properties: | |||
| 26 | Shall be an ordered list of strings defining the names of | 26 | Shall be an ordered list of strings defining the names of |
| 27 | the clocks provided by the CCU. | 27 | the clocks provided by the CCU. |
| 28 | 28 | ||
| 29 | Device tree example: | ||
| 30 | |||
| 31 | slave_ccu: slave_ccu { | ||
| 32 | compatible = "brcm,bcm11351-slave-ccu"; | ||
| 33 | reg = <0x3e011000 0x0f00>; | ||
| 34 | #clock-cells = <1>; | ||
| 35 | clock-output-names = "uartb", | ||
| 36 | "uartb2", | ||
| 37 | "uartb3", | ||
| 38 | "uartb4"; | ||
| 39 | }; | ||
| 40 | |||
| 41 | ref_crystal_clk: ref_crystal { | ||
| 42 | #clock-cells = <0>; | ||
| 43 | compatible = "fixed-clock"; | ||
| 44 | clock-frequency = <26000000>; | ||
| 45 | }; | ||
| 46 | |||
| 47 | uart@3e002000 { | ||
| 48 | compatible = "brcm,bcm11351-dw-apb-uart", "snps,dw-apb-uart"; | ||
| 49 | status = "disabled"; | ||
| 50 | reg = <0x3e002000 0x1000>; | ||
| 51 | clocks = <&slave_ccu BCM281XX_SLAVE_CCU_UARTB3>; | ||
| 52 | interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; | ||
| 53 | reg-shift = <2>; | ||
| 54 | reg-io-width = <4>; | ||
| 55 | }; | ||
| 56 | |||
| 57 | BCM281XX family | ||
| 58 | --------------- | ||
| 59 | CCU compatible string values for SoCs in the BCM281XX family are: | ||
| 60 | "brcm,bcm11351-root-ccu" | ||
| 61 | "brcm,bcm11351-aon-ccu" | ||
| 62 | "brcm,bcm11351-hub-ccu" | ||
| 63 | "brcm,bcm11351-master-ccu" | ||
| 64 | "brcm,bcm11351-slave-ccu" | ||
| 29 | 65 | ||
| 30 | BCM281XX family SoCs use Kona CCUs. The following table defines | 66 | The following table defines the set of CCUs and clock specifiers for |
| 31 | the set of CCUs and clock specifiers for BCM281XX clocks. When | 67 | BCM281XX family clocks. When a clock consumer references a clocks, |
| 32 | a clock consumer references a clocks, its symbolic specifier | 68 | its symbolic specifier (rather than its numeric index value) should |
| 33 | (rather than its numeric index value) should be used. These | 69 | be used. These specifiers are defined in: |
| 34 | specifiers are defined in "include/dt-bindings/clock/bcm281xx.h". | 70 | "include/dt-bindings/clock/bcm281xx.h" |
| 35 | 71 | ||
| 36 | CCU Clock Type Index Specifier | 72 | CCU Clock Type Index Specifier |
| 37 | --- ----- ---- ----- --------- | 73 | --- ----- ---- ----- --------- |
| @@ -64,30 +100,40 @@ specifiers are defined in "include/dt-bindings/clock/bcm281xx.h". | |||
| 64 | slave pwm peri 9 BCM281XX_SLAVE_CCU_PWM | 100 | slave pwm peri 9 BCM281XX_SLAVE_CCU_PWM |
| 65 | 101 | ||
| 66 | 102 | ||
| 67 | Device tree example: | 103 | BCM21664 family |
| 104 | --------------- | ||
| 105 | CCU compatible string values for SoCs in the BCM21664 family are: | ||
| 106 | "brcm,bcm21664-root-ccu" | ||
| 107 | "brcm,bcm21664-aon-ccu" | ||
| 108 | "brcm,bcm21664-master-ccu" | ||
| 109 | "brcm,bcm21664-slave-ccu" | ||
| 68 | 110 | ||
| 69 | slave_ccu: slave_ccu { | 111 | The following table defines the set of CCUs and clock specifiers for |
| 70 | compatible = "brcm,bcm11351-slave-ccu"; | 112 | BCM21664 family clocks. When a clock consumer references a clocks, |
| 71 | reg = <0x3e011000 0x0f00>; | 113 | its symbolic specifier (rather than its numeric index value) should |
| 72 | #clock-cells = <1>; | 114 | be used. These specifiers are defined in: |
| 73 | clock-output-names = "uartb", | 115 | "include/dt-bindings/clock/bcm21664.h" |
| 74 | "uartb2", | ||
| 75 | "uartb3", | ||
| 76 | "uartb4"; | ||
| 77 | }; | ||
| 78 | 116 | ||
| 79 | ref_crystal_clk: ref_crystal { | 117 | CCU Clock Type Index Specifier |
| 80 | #clock-cells = <0>; | 118 | --- ----- ---- ----- --------- |
| 81 | compatible = "fixed-clock"; | 119 | root frac_1m peri 0 BCM21664_ROOT_CCU_FRAC_1M |
| 82 | clock-frequency = <26000000>; | ||
| 83 | }; | ||
| 84 | 120 | ||
| 85 | uart@3e002000 { | 121 | aon hub_timer peri 0 BCM21664_AON_CCU_HUB_TIMER |
| 86 | compatible = "brcm,bcm11351-dw-apb-uart", "snps,dw-apb-uart"; | 122 | |
| 87 | status = "disabled"; | 123 | master sdio1 peri 0 BCM21664_MASTER_CCU_SDIO1 |
| 88 | reg = <0x3e002000 0x1000>; | 124 | master sdio2 peri 1 BCM21664_MASTER_CCU_SDIO2 |
| 89 | clocks = <&slave_ccu BCM281XX_SLAVE_CCU_UARTB3>; | 125 | master sdio3 peri 2 BCM21664_MASTER_CCU_SDIO3 |
| 90 | interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; | 126 | master sdio4 peri 3 BCM21664_MASTER_CCU_SDIO4 |
| 91 | reg-shift = <2>; | 127 | master sdio1_sleep peri 4 BCM21664_MASTER_CCU_SDIO1_SLEEP |
| 92 | reg-io-width = <4>; | 128 | master sdio2_sleep peri 5 BCM21664_MASTER_CCU_SDIO2_SLEEP |
| 93 | }; | 129 | master sdio3_sleep peri 6 BCM21664_MASTER_CCU_SDIO3_SLEEP |
| 130 | master sdio4_sleep peri 7 BCM21664_MASTER_CCU_SDIO4_SLEEP | ||
| 131 | |||
| 132 | slave uartb peri 0 BCM21664_SLAVE_CCU_UARTB | ||
| 133 | slave uartb2 peri 1 BCM21664_SLAVE_CCU_UARTB2 | ||
| 134 | slave uartb3 peri 2 BCM21664_SLAVE_CCU_UARTB3 | ||
| 135 | slave uartb4 peri 3 BCM21664_SLAVE_CCU_UARTB4 | ||
| 136 | slave bsc1 peri 4 BCM21664_SLAVE_CCU_BSC1 | ||
| 137 | slave bsc2 peri 5 BCM21664_SLAVE_CCU_BSC2 | ||
| 138 | slave bsc3 peri 6 BCM21664_SLAVE_CCU_BSC3 | ||
| 139 | slave bsc4 peri 7 BCM21664_SLAVE_CCU_BSC4 | ||
diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt index 700e7aac3717..f15787817d6b 100644 --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt | |||
| @@ -44,10 +44,9 @@ For example: | |||
| 44 | clocks by index. The names should reflect the clock output signal | 44 | clocks by index. The names should reflect the clock output signal |
| 45 | names for the device. | 45 | names for the device. |
| 46 | 46 | ||
| 47 | clock-indices: If the identifyng number for the clocks in the node | 47 | clock-indices: If the identifying number for the clocks in the node |
| 48 | is not linear from zero, then the this mapping allows | 48 | is not linear from zero, then this allows the mapping of |
| 49 | the mapping of identifiers into the clock-output-names | 49 | identifiers into the clock-output-names array. |
| 50 | array. | ||
| 51 | 50 | ||
| 52 | For example, if we have two clocks <&oscillator 1> and <&oscillator 3>: | 51 | For example, if we have two clocks <&oscillator 1> and <&oscillator 3>: |
| 53 | 52 | ||
| @@ -58,7 +57,7 @@ For example, if we have two clocks <&oscillator 1> and <&oscillator 3>: | |||
| 58 | clock-output-names = "clka", "clkb"; | 57 | clock-output-names = "clka", "clkb"; |
| 59 | } | 58 | } |
| 60 | 59 | ||
| 61 | This ensures we do not have any empty nodes in clock-output-names | 60 | This ensures we do not have any empty strings in clock-output-names |
| 62 | 61 | ||
| 63 | 62 | ||
| 64 | ==Clock consumers== | 63 | ==Clock consumers== |
diff --git a/Documentation/devicetree/bindings/clock/exynos3250-clock.txt b/Documentation/devicetree/bindings/clock/exynos3250-clock.txt new file mode 100644 index 000000000000..aadc9c59e2d1 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/exynos3250-clock.txt | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | * Samsung Exynos3250 Clock Controller | ||
| 2 | |||
| 3 | The Exynos3250 clock controller generates and supplies clock to various | ||
| 4 | controllers within the Exynos3250 SoC. | ||
| 5 | |||
| 6 | Required Properties: | ||
| 7 | |||
| 8 | - compatible: should be one of the following. | ||
| 9 | - "samsung,exynos3250-cmu" - controller compatible with Exynos3250 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 | Each clock is assigned an identifier and client nodes can use this identifier | ||
| 17 | to specify the clock which they consume. | ||
| 18 | |||
| 19 | All available clocks are defined as preprocessor macros in | ||
| 20 | dt-bindings/clock/exynos3250.h header and can be used in device | ||
| 21 | tree sources. | ||
| 22 | |||
| 23 | Example 1: An example of a clock controller node is listed below. | ||
| 24 | |||
| 25 | cmu: clock-controller@10030000 { | ||
| 26 | compatible = "samsung,exynos3250-cmu"; | ||
| 27 | reg = <0x10030000 0x20000>; | ||
| 28 | #clock-cells = <1>; | ||
| 29 | }; | ||
| 30 | |||
| 31 | Example 2: UART controller node that consumes the clock generated by the clock | ||
| 32 | controller. Refer to the standard clock bindings for information | ||
| 33 | about 'clocks' and 'clock-names' property. | ||
| 34 | |||
| 35 | serial@13800000 { | ||
| 36 | compatible = "samsung,exynos4210-uart"; | ||
| 37 | reg = <0x13800000 0x100>; | ||
| 38 | interrupts = <0 109 0>; | ||
| 39 | clocks = <&cmu CLK_UART0>, <&cmu CLK_SCLK_UART0>; | ||
| 40 | clock-names = "uart", "clk_uart_baud0"; | ||
| 41 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/exynos5260-clock.txt b/Documentation/devicetree/bindings/clock/exynos5260-clock.txt new file mode 100644 index 000000000000..5496b2fac483 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/exynos5260-clock.txt | |||
| @@ -0,0 +1,190 @@ | |||
| 1 | * Samsung Exynos5260 Clock Controller | ||
| 2 | |||
| 3 | Exynos5260 has 13 clock controllers which are instantiated | ||
| 4 | independently from the device-tree. These clock controllers | ||
| 5 | generate and supply clocks to various hardware blocks within | ||
| 6 | the SoC. | ||
| 7 | |||
| 8 | Each clock is assigned an identifier and client nodes can use | ||
| 9 | this identifier to specify the clock which they consume. All | ||
| 10 | available clocks are defined as preprocessor macros in | ||
| 11 | dt-bindings/clock/exynos5260-clk.h header and can be used in | ||
| 12 | device tree sources. | ||
| 13 | |||
| 14 | External clocks: | ||
| 15 | |||
| 16 | There are several clocks that are generated outside the SoC. It | ||
| 17 | is expected that they are defined using standard clock bindings | ||
| 18 | with following clock-output-names: | ||
| 19 | |||
| 20 | - "fin_pll" - PLL input clock from XXTI | ||
| 21 | - "xrtcxti" - input clock from XRTCXTI | ||
| 22 | - "ioclk_pcm_extclk" - pcm external operation clock | ||
| 23 | - "ioclk_spdif_extclk" - spdif external operation clock | ||
| 24 | - "ioclk_i2s_cdclk" - i2s0 codec clock | ||
| 25 | |||
| 26 | Phy clocks: | ||
| 27 | |||
| 28 | There are several clocks which are generated by specific PHYs. | ||
| 29 | These clocks are fed into the clock controller and then routed to | ||
| 30 | the hardware blocks. These clocks are defined as fixed clocks in the | ||
| 31 | driver with following names: | ||
| 32 | |||
| 33 | - "phyclk_dptx_phy_ch3_txd_clk" - dp phy clock for channel 3 | ||
| 34 | - "phyclk_dptx_phy_ch2_txd_clk" - dp phy clock for channel 2 | ||
| 35 | - "phyclk_dptx_phy_ch1_txd_clk" - dp phy clock for channel 1 | ||
| 36 | - "phyclk_dptx_phy_ch0_txd_clk" - dp phy clock for channel 0 | ||
| 37 | - "phyclk_hdmi_phy_tmds_clko" - hdmi phy tmds clock | ||
| 38 | - "phyclk_hdmi_phy_pixel_clko" - hdmi phy pixel clock | ||
| 39 | - "phyclk_hdmi_link_o_tmds_clkhi" - hdmi phy for hdmi link | ||
| 40 | - "phyclk_dptx_phy_o_ref_clk_24m" - dp phy reference clock | ||
| 41 | - "phyclk_dptx_phy_clk_div2" | ||
| 42 | - "phyclk_mipi_dphy_4l_m_rxclkesc0" | ||
| 43 | - "phyclk_usbhost20_phy_phyclock" - usb 2.0 phy clock | ||
| 44 | - "phyclk_usbhost20_phy_freeclk" | ||
| 45 | - "phyclk_usbhost20_phy_clk48mohci" | ||
| 46 | - "phyclk_usbdrd30_udrd30_pipe_pclk" | ||
| 47 | - "phyclk_usbdrd30_udrd30_phyclock" - usb 3.0 phy clock | ||
| 48 | |||
| 49 | Required Properties for Clock Controller: | ||
| 50 | |||
| 51 | - compatible: should be one of the following. | ||
| 52 | 1) "samsung,exynos5260-clock-top" | ||
| 53 | 2) "samsung,exynos5260-clock-peri" | ||
| 54 | 3) "samsung,exynos5260-clock-egl" | ||
| 55 | 4) "samsung,exynos5260-clock-kfc" | ||
| 56 | 5) "samsung,exynos5260-clock-g2d" | ||
| 57 | 6) "samsung,exynos5260-clock-mif" | ||
| 58 | 7) "samsung,exynos5260-clock-mfc" | ||
| 59 | 8) "samsung,exynos5260-clock-g3d" | ||
| 60 | 9) "samsung,exynos5260-clock-fsys" | ||
| 61 | 10) "samsung,exynos5260-clock-aud" | ||
| 62 | 11) "samsung,exynos5260-clock-isp" | ||
| 63 | 12) "samsung,exynos5260-clock-gscl" | ||
| 64 | 13) "samsung,exynos5260-clock-disp" | ||
| 65 | |||
| 66 | - reg: physical base address of the controller and the length of | ||
| 67 | memory mapped region. | ||
| 68 | |||
| 69 | - #clock-cells: should be 1. | ||
| 70 | |||
| 71 | - clocks: list of clock identifiers which are fed as the input to | ||
| 72 | the given clock controller. Please refer the next section to find | ||
| 73 | the input clocks for a given controller. | ||
| 74 | |||
| 75 | - clock-names: list of names of clocks which are fed as the input | ||
| 76 | to the given clock controller. | ||
| 77 | |||
| 78 | Input clocks for top clock controller: | ||
| 79 | - fin_pll | ||
| 80 | - dout_mem_pll | ||
| 81 | - dout_bus_pll | ||
| 82 | - dout_media_pll | ||
| 83 | |||
| 84 | Input clocks for peri clock controller: | ||
| 85 | - fin_pll | ||
| 86 | - ioclk_pcm_extclk | ||
| 87 | - ioclk_i2s_cdclk | ||
| 88 | - ioclk_spdif_extclk | ||
| 89 | - phyclk_hdmi_phy_ref_cko | ||
| 90 | - dout_aclk_peri_66 | ||
| 91 | - dout_sclk_peri_uart0 | ||
| 92 | - dout_sclk_peri_uart1 | ||
| 93 | - dout_sclk_peri_uart2 | ||
| 94 | - dout_sclk_peri_spi0_b | ||
| 95 | - dout_sclk_peri_spi1_b | ||
| 96 | - dout_sclk_peri_spi2_b | ||
| 97 | - dout_aclk_peri_aud | ||
| 98 | - dout_sclk_peri_spi0_b | ||
| 99 | |||
| 100 | Input clocks for egl clock controller: | ||
| 101 | - fin_pll | ||
| 102 | - dout_bus_pll | ||
| 103 | |||
| 104 | Input clocks for kfc clock controller: | ||
| 105 | - fin_pll | ||
| 106 | - dout_media_pll | ||
| 107 | |||
| 108 | Input clocks for g2d clock controller: | ||
| 109 | - fin_pll | ||
| 110 | - dout_aclk_g2d_333 | ||
| 111 | |||
| 112 | Input clocks for mif clock controller: | ||
| 113 | - fin_pll | ||
| 114 | |||
| 115 | Input clocks for mfc clock controller: | ||
| 116 | - fin_pll | ||
| 117 | - dout_aclk_mfc_333 | ||
| 118 | |||
| 119 | Input clocks for g3d clock controller: | ||
| 120 | - fin_pll | ||
| 121 | |||
| 122 | Input clocks for fsys clock controller: | ||
| 123 | - fin_pll | ||
| 124 | - phyclk_usbhost20_phy_phyclock | ||
| 125 | - phyclk_usbhost20_phy_freeclk | ||
| 126 | - phyclk_usbhost20_phy_clk48mohci | ||
| 127 | - phyclk_usbdrd30_udrd30_pipe_pclk | ||
| 128 | - phyclk_usbdrd30_udrd30_phyclock | ||
| 129 | - dout_aclk_fsys_200 | ||
| 130 | |||
| 131 | Input clocks for aud clock controller: | ||
| 132 | - fin_pll | ||
| 133 | - fout_aud_pll | ||
| 134 | - ioclk_i2s_cdclk | ||
| 135 | - ioclk_pcm_extclk | ||
| 136 | |||
| 137 | Input clocks for isp clock controller: | ||
| 138 | - fin_pll | ||
| 139 | - dout_aclk_isp1_266 | ||
| 140 | - dout_aclk_isp1_400 | ||
| 141 | - mout_aclk_isp1_266 | ||
| 142 | |||
| 143 | Input clocks for gscl clock controller: | ||
| 144 | - fin_pll | ||
| 145 | - dout_aclk_gscl_400 | ||
| 146 | - dout_aclk_gscl_333 | ||
| 147 | |||
| 148 | Input clocks for disp clock controller: | ||
| 149 | - fin_pll | ||
| 150 | - phyclk_dptx_phy_ch3_txd_clk | ||
| 151 | - phyclk_dptx_phy_ch2_txd_clk | ||
| 152 | - phyclk_dptx_phy_ch1_txd_clk | ||
| 153 | - phyclk_dptx_phy_ch0_txd_clk | ||
| 154 | - phyclk_hdmi_phy_tmds_clko | ||
| 155 | - phyclk_hdmi_phy_ref_clko | ||
| 156 | - phyclk_hdmi_phy_pixel_clko | ||
| 157 | - phyclk_hdmi_link_o_tmds_clkhi | ||
| 158 | - phyclk_mipi_dphy_4l_m_txbyte_clkhs | ||
| 159 | - phyclk_dptx_phy_o_ref_clk_24m | ||
| 160 | - phyclk_dptx_phy_clk_div2 | ||
| 161 | - phyclk_mipi_dphy_4l_m_rxclkesc0 | ||
| 162 | - phyclk_hdmi_phy_ref_cko | ||
| 163 | - ioclk_spdif_extclk | ||
| 164 | - dout_aclk_peri_aud | ||
| 165 | - dout_aclk_disp_222 | ||
| 166 | - dout_sclk_disp_pixel | ||
| 167 | - dout_aclk_disp_333 | ||
| 168 | |||
| 169 | Example 1: An example of a clock controller node is listed below. | ||
| 170 | |||
| 171 | clock_mfc: clock-controller@11090000 { | ||
| 172 | compatible = "samsung,exynos5260-clock-mfc"; | ||
| 173 | clock = <&fin_pll>, <&clock_top TOP_DOUT_ACLK_MFC_333>; | ||
| 174 | clock-names = "fin_pll", "dout_aclk_mfc_333"; | ||
| 175 | reg = <0x11090000 0x10000>; | ||
| 176 | #clock-cells = <1>; | ||
| 177 | }; | ||
| 178 | |||
| 179 | Example 2: UART controller node that consumes the clock generated by the | ||
| 180 | peri clock controller. Refer to the standard clock bindings for | ||
| 181 | information about 'clocks' and 'clock-names' property. | ||
| 182 | |||
| 183 | serial@12C00000 { | ||
| 184 | compatible = "samsung,exynos4210-uart"; | ||
| 185 | reg = <0x12C00000 0x100>; | ||
| 186 | interrupts = <0 146 0>; | ||
| 187 | clocks = <&clock_peri PERI_PCLK_UART0>, <&clock_peri PERI_SCLK_UART0>; | ||
| 188 | clock-names = "uart", "clk_uart_baud0"; | ||
| 189 | }; | ||
| 190 | |||
diff --git a/Documentation/devicetree/bindings/clock/exynos5410-clock.txt b/Documentation/devicetree/bindings/clock/exynos5410-clock.txt new file mode 100644 index 000000000000..aeab635b07b5 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/exynos5410-clock.txt | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | * Samsung Exynos5410 Clock Controller | ||
| 2 | |||
| 3 | The Exynos5410 clock controller generates and supplies clock to various | ||
| 4 | controllers within the Exynos5410 SoC. | ||
| 5 | |||
| 6 | Required Properties: | ||
| 7 | |||
| 8 | - compatible: should be "samsung,exynos5410-clock" | ||
| 9 | |||
| 10 | - reg: physical base address of the controller and length of memory mapped | ||
| 11 | region. | ||
| 12 | |||
| 13 | - #clock-cells: should be 1. | ||
| 14 | |||
| 15 | All available clocks are defined as preprocessor macros in | ||
| 16 | dt-bindings/clock/exynos5410.h header and can be used in device | ||
| 17 | tree sources. | ||
| 18 | |||
| 19 | External clock: | ||
| 20 | |||
| 21 | There is clock that is generated outside the SoC. It | ||
| 22 | is expected that it is defined using standard clock bindings | ||
| 23 | with following clock-output-name: | ||
| 24 | |||
| 25 | - "fin_pll" - PLL input clock from XXTI | ||
| 26 | |||
| 27 | Example 1: An example of a clock controller node is listed below. | ||
| 28 | |||
| 29 | clock: clock-controller@0x10010000 { | ||
| 30 | compatible = "samsung,exynos5410-clock"; | ||
| 31 | reg = <0x10010000 0x30000>; | ||
| 32 | #clock-cells = <1>; | ||
| 33 | }; | ||
| 34 | |||
| 35 | Example 2: UART controller node that consumes the clock generated by the clock | ||
| 36 | controller. Refer to the standard clock bindings for information | ||
| 37 | about 'clocks' and 'clock-names' property. | ||
| 38 | |||
| 39 | serial@12C20000 { | ||
| 40 | compatible = "samsung,exynos4210-uart"; | ||
| 41 | reg = <0x12C00000 0x100>; | ||
| 42 | interrupts = <0 51 0>; | ||
| 43 | clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>; | ||
| 44 | clock-names = "uart", "clk_uart_baud0"; | ||
| 45 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt index ca88c97a8562..d54f42cf0440 100644 --- a/Documentation/devicetree/bindings/clock/exynos5420-clock.txt +++ b/Documentation/devicetree/bindings/clock/exynos5420-clock.txt | |||
| @@ -1,12 +1,13 @@ | |||
| 1 | * Samsung Exynos5420 Clock Controller | 1 | * Samsung Exynos5420 Clock Controller |
| 2 | 2 | ||
| 3 | The Exynos5420 clock controller generates and supplies clock to various | 3 | The Exynos5420 clock controller generates and supplies clock to various |
| 4 | controllers within the Exynos5420 SoC. | 4 | controllers within the Exynos5420 SoC and for the Exynos5800 SoC. |
| 5 | 5 | ||
| 6 | Required Properties: | 6 | Required Properties: |
| 7 | 7 | ||
| 8 | - compatible: should be one of the following. | 8 | - compatible: should be one of the following. |
| 9 | - "samsung,exynos5420-clock" - controller compatible with Exynos5420 SoC. | 9 | - "samsung,exynos5420-clock" - controller compatible with Exynos5420 SoC. |
| 10 | - "samsung,exynos5800-clock" - controller compatible with Exynos5800 SoC. | ||
| 10 | 11 | ||
| 11 | - reg: physical base address of the controller and length of memory mapped | 12 | - reg: physical base address of the controller and length of memory mapped |
| 12 | region. | 13 | region. |
diff --git a/Documentation/devicetree/bindings/clock/fixed-clock.txt b/Documentation/devicetree/bindings/clock/fixed-clock.txt index 48ea0ad8ad46..0641a663ad69 100644 --- a/Documentation/devicetree/bindings/clock/fixed-clock.txt +++ b/Documentation/devicetree/bindings/clock/fixed-clock.txt | |||
| @@ -12,7 +12,6 @@ Required properties: | |||
| 12 | Optional properties: | 12 | Optional properties: |
| 13 | - clock-accuracy : accuracy of clock in ppb (parts per billion). | 13 | - clock-accuracy : accuracy of clock in ppb (parts per billion). |
| 14 | Should be a single cell. | 14 | Should be a single cell. |
| 15 | - gpios : From common gpio binding; gpio connection to clock enable pin. | ||
| 16 | - clock-output-names : From common clock binding. | 15 | - clock-output-names : From common clock binding. |
| 17 | 16 | ||
| 18 | Example: | 17 | Example: |
diff --git a/Documentation/devicetree/bindings/clock/hix5hd2-clock.txt b/Documentation/devicetree/bindings/clock/hix5hd2-clock.txt new file mode 100644 index 000000000000..7894a64887cb --- /dev/null +++ b/Documentation/devicetree/bindings/clock/hix5hd2-clock.txt | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | * Hisilicon Hix5hd2 Clock Controller | ||
| 2 | |||
| 3 | The hix5hd2 clock controller generates and supplies clock to various | ||
| 4 | controllers within the hix5hd2 SoC. | ||
| 5 | |||
| 6 | Required Properties: | ||
| 7 | |||
| 8 | - compatible: should be "hisilicon,hix5hd2-clock" | ||
| 9 | - reg: Address and length of the register set | ||
| 10 | - #clock-cells: Should be <1> | ||
| 11 | |||
| 12 | Each clock is assigned an identifier and client nodes use this identifier | ||
| 13 | to specify the clock which they consume. | ||
| 14 | |||
| 15 | All these identifier could be found in <dt-bindings/clock/hix5hd2-clock.h>. | ||
| 16 | |||
| 17 | Examples: | ||
| 18 | clock: clock@f8a22000 { | ||
| 19 | compatible = "hisilicon,hix5hd2-clock"; | ||
| 20 | reg = <0xf8a22000 0x1000>; | ||
| 21 | #clock-cells = <1>; | ||
| 22 | }; | ||
| 23 | |||
| 24 | uart0: uart@f8b00000 { | ||
| 25 | compatible = "arm,pl011", "arm,primecell"; | ||
| 26 | reg = <0xf8b00000 0x1000>; | ||
| 27 | interrupts = <0 49 4>; | ||
| 28 | clocks = <&clock HIX5HD2_FIXED_83M>; | ||
| 29 | clock-names = "apb_pclk"; | ||
| 30 | status = "disabled"; | ||
| 31 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/imx25-clock.txt b/Documentation/devicetree/bindings/clock/imx25-clock.txt index db4f2f05c4d0..ba6b312ff8a5 100644 --- a/Documentation/devicetree/bindings/clock/imx25-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx25-clock.txt | |||
| @@ -139,6 +139,9 @@ clocks and IDs. | |||
| 139 | uart5_ipg 124 | 139 | uart5_ipg 124 |
| 140 | reserved 125 | 140 | reserved 125 |
| 141 | wdt_ipg 126 | 141 | wdt_ipg 126 |
| 142 | cko_div 127 | ||
| 143 | cko_sel 128 | ||
| 144 | cko 129 | ||
| 142 | 145 | ||
| 143 | Examples: | 146 | Examples: |
| 144 | 147 | ||
diff --git a/Documentation/devicetree/bindings/clock/imx27-clock.txt b/Documentation/devicetree/bindings/clock/imx27-clock.txt index 7a2070393732..6bc9fd2c6631 100644 --- a/Documentation/devicetree/bindings/clock/imx27-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx27-clock.txt | |||
| @@ -98,7 +98,12 @@ clocks and IDs. | |||
| 98 | fpm 83 | 98 | fpm 83 |
| 99 | mpll_osc_sel 84 | 99 | mpll_osc_sel 84 |
| 100 | mpll_sel 85 | 100 | mpll_sel 85 |
| 101 | spll_gate 86 | 101 | spll_gate 86 |
| 102 | mshc_div 87 | ||
| 103 | rtic_ipg_gate 88 | ||
| 104 | mshc_ipg_gate 89 | ||
| 105 | rtic_ahb_gate 90 | ||
| 106 | mshc_baud_gate 91 | ||
| 102 | 107 | ||
| 103 | Examples: | 108 | Examples: |
| 104 | 109 | ||
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt index 6aab72bf67ea..90ec91fe5ce0 100644 --- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt | |||
| @@ -220,6 +220,7 @@ clocks and IDs. | |||
| 220 | lvds2_sel 205 | 220 | lvds2_sel 205 |
| 221 | lvds1_gate 206 | 221 | lvds1_gate 206 |
| 222 | lvds2_gate 207 | 222 | lvds2_gate 207 |
| 223 | esai_ahb 208 | ||
| 223 | 224 | ||
| 224 | Examples: | 225 | Examples: |
| 225 | 226 | ||
diff --git a/Documentation/devicetree/bindings/clock/imx6sx-clock.txt b/Documentation/devicetree/bindings/clock/imx6sx-clock.txt new file mode 100644 index 000000000000..22362b9b7ba3 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/imx6sx-clock.txt | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | * Clock bindings for Freescale i.MX6 SoloX | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "fsl,imx6sx-ccm" | ||
| 5 | - reg: Address and length of the register set | ||
| 6 | - #clock-cells: Should be <1> | ||
| 7 | - clocks: list of clock specifiers, must contain an entry for each required | ||
| 8 | entry in clock-names | ||
| 9 | - clock-names: should include entries "ckil", "osc", "ipp_di0" and "ipp_di1" | ||
| 10 | |||
| 11 | The clock consumer should specify the desired clock by having the clock | ||
| 12 | ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx6sx-clock.h | ||
| 13 | for the full list of i.MX6 SoloX clock IDs. | ||
diff --git a/Documentation/devicetree/bindings/clock/lsi,axm5516-clks.txt b/Documentation/devicetree/bindings/clock/lsi,axm5516-clks.txt new file mode 100644 index 000000000000..3ce97cfe999b --- /dev/null +++ b/Documentation/devicetree/bindings/clock/lsi,axm5516-clks.txt | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | AXM5516 clock driver bindings | ||
| 2 | ----------------------------- | ||
| 3 | |||
| 4 | Required properties : | ||
| 5 | - compatible : shall contain "lsi,axm5516-clks" | ||
| 6 | - reg : shall contain base register location and length | ||
| 7 | - #clock-cells : shall contain 1 | ||
| 8 | |||
| 9 | The consumer specifies the desired clock by having the clock ID in its "clocks" | ||
| 10 | phandle cell. See <dt-bindings/clock/lsi,axxia-clock.h> for the list of | ||
| 11 | supported clock IDs. | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | clks: clock-controller@2010020000 { | ||
| 16 | compatible = "lsi,axm5516-clks"; | ||
| 17 | #clock-cells = <1>; | ||
| 18 | reg = <0x20 0x10020000 0 0x20000>; | ||
| 19 | }; | ||
| 20 | |||
| 21 | serial0: uart@2010080000 { | ||
| 22 | compatible = "arm,pl011", "arm,primecell"; | ||
| 23 | reg = <0x20 0x10080000 0 0x1000>; | ||
| 24 | interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>; | ||
| 25 | clocks = <&clks AXXIA_CLK_PER>; | ||
| 26 | clock-names = "apb_pclk"; | ||
| 27 | }; | ||
| 28 | }; | ||
| 29 | |||
diff --git a/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt index 307a503c5db8..dc5ea5b22da9 100644 --- a/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt +++ b/Documentation/devicetree/bindings/clock/mvebu-core-clock.txt | |||
| @@ -29,6 +29,11 @@ The following is a list of provided IDs and clock names on Kirkwood and Dove: | |||
| 29 | 2 = l2clk (L2 Cache clock derived from CPU0 clock) | 29 | 2 = l2clk (L2 Cache clock derived from CPU0 clock) |
| 30 | 3 = ddrclk (DDR controller clock derived from CPU0 clock) | 30 | 3 = ddrclk (DDR controller clock derived from CPU0 clock) |
| 31 | 31 | ||
| 32 | The following is a list of provided IDs and clock names on Orion5x: | ||
| 33 | 0 = tclk (Internal Bus clock) | ||
| 34 | 1 = cpuclk (CPU0 clock) | ||
| 35 | 2 = ddrclk (DDR controller clock derived from CPU0 clock) | ||
| 36 | |||
| 32 | Required properties: | 37 | Required properties: |
| 33 | - compatible : shall be one of the following: | 38 | - compatible : shall be one of the following: |
| 34 | "marvell,armada-370-core-clock" - For Armada 370 SoC core clocks | 39 | "marvell,armada-370-core-clock" - For Armada 370 SoC core clocks |
| @@ -38,6 +43,9 @@ Required properties: | |||
| 38 | "marvell,dove-core-clock" - for Dove SoC core clocks | 43 | "marvell,dove-core-clock" - for Dove SoC core clocks |
| 39 | "marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180) | 44 | "marvell,kirkwood-core-clock" - for Kirkwood SoC (except mv88f6180) |
| 40 | "marvell,mv88f6180-core-clock" - for Kirkwood MV88f6180 SoC | 45 | "marvell,mv88f6180-core-clock" - for Kirkwood MV88f6180 SoC |
| 46 | "marvell,mv88f5182-core-clock" - for Orion MV88F5182 SoC | ||
| 47 | "marvell,mv88f5281-core-clock" - for Orion MV88F5281 SoC | ||
| 48 | "marvell,mv88f6183-core-clock" - for Orion MV88F6183 SoC | ||
| 41 | - reg : shall be the register address of the Sample-At-Reset (SAR) register | 49 | - reg : shall be the register address of the Sample-At-Reset (SAR) register |
| 42 | - #clock-cells : from common clock binding; shall be set to 1 | 50 | - #clock-cells : from common clock binding; shall be set to 1 |
| 43 | 51 | ||
diff --git a/Documentation/devicetree/bindings/clock/qcom,gcc.txt b/Documentation/devicetree/bindings/clock/qcom,gcc.txt index 767401f42871..9cfcb4f2bc97 100644 --- a/Documentation/devicetree/bindings/clock/qcom,gcc.txt +++ b/Documentation/devicetree/bindings/clock/qcom,gcc.txt | |||
| @@ -4,9 +4,12 @@ Qualcomm Global Clock & Reset Controller Binding | |||
| 4 | Required properties : | 4 | Required properties : |
| 5 | - compatible : shall contain only one of the following: | 5 | - compatible : shall contain only one of the following: |
| 6 | 6 | ||
| 7 | "qcom,gcc-apq8064" | ||
| 7 | "qcom,gcc-msm8660" | 8 | "qcom,gcc-msm8660" |
| 8 | "qcom,gcc-msm8960" | 9 | "qcom,gcc-msm8960" |
| 9 | "qcom,gcc-msm8974" | 10 | "qcom,gcc-msm8974" |
| 11 | "qcom,gcc-msm8974pro" | ||
| 12 | "qcom,gcc-msm8974pro-ac" | ||
| 10 | 13 | ||
| 11 | - reg : shall contain base register location and length | 14 | - reg : shall contain base register location and length |
| 12 | - #clock-cells : shall contain 1 | 15 | - #clock-cells : shall contain 1 |
diff --git a/Documentation/devicetree/bindings/clock/corenet-clock.txt b/Documentation/devicetree/bindings/clock/qoriq-clock.txt index 24711af48e30..5666812fc42b 100644 --- a/Documentation/devicetree/bindings/clock/corenet-clock.txt +++ b/Documentation/devicetree/bindings/clock/qoriq-clock.txt | |||
| @@ -7,6 +7,14 @@ which can then be passed to a variety of internal logic, including | |||
| 7 | cores and peripheral IP blocks. | 7 | cores and peripheral IP blocks. |
| 8 | Please refer to the Reference Manual for details. | 8 | Please refer to the Reference Manual for details. |
| 9 | 9 | ||
| 10 | All references to "1.0" and "2.0" refer to the QorIQ chassis version to | ||
| 11 | which the chip complies. | ||
| 12 | |||
| 13 | Chassis Version Example Chips | ||
| 14 | --------------- ------------- | ||
| 15 | 1.0 p4080, p5020, p5040 | ||
| 16 | 2.0 t4240, b4860, t1040 | ||
| 17 | |||
| 10 | 1. Clock Block Binding | 18 | 1. Clock Block Binding |
| 11 | 19 | ||
| 12 | Required properties: | 20 | Required properties: |
| @@ -85,7 +93,7 @@ Example for clock block and clock provider: | |||
| 85 | #clock-cells = <0>; | 93 | #clock-cells = <0>; |
| 86 | compatible = "fsl,qoriq-sysclk-1.0"; | 94 | compatible = "fsl,qoriq-sysclk-1.0"; |
| 87 | clock-output-names = "sysclk"; | 95 | clock-output-names = "sysclk"; |
| 88 | } | 96 | }; |
| 89 | 97 | ||
| 90 | pll0: pll0@800 { | 98 | pll0: pll0@800 { |
| 91 | #clock-cells = <1>; | 99 | #clock-cells = <1>; |
diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt index 5992dceec7af..8a92b5fb3540 100644 --- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | |||
| @@ -10,6 +10,8 @@ index in the group, from 0 to 31. | |||
| 10 | Required Properties: | 10 | Required Properties: |
| 11 | 11 | ||
| 12 | - compatible: Must be one of the following | 12 | - compatible: Must be one of the following |
| 13 | - "renesas,r7s72100-mstp-clocks" for R7S72100 (RZ) MSTP gate clocks | ||
| 14 | - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks | ||
| 13 | - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks | 15 | - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks |
| 14 | - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks | 16 | - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks |
| 15 | - "renesas,cpg-mstp-clock" for generic MSTP gate clocks | 17 | - "renesas,cpg-mstp-clock" for generic MSTP gate clocks |
| @@ -43,7 +45,7 @@ Example | |||
| 43 | clock-output-names = | 45 | clock-output-names = |
| 44 | "tpu0", "mmcif1", "sdhi3", "sdhi2", | 46 | "tpu0", "mmcif1", "sdhi3", "sdhi2", |
| 45 | "sdhi1", "sdhi0", "mmcif0"; | 47 | "sdhi1", "sdhi0", "mmcif0"; |
| 46 | renesas,clock-indices = < | 48 | clock-indices = < |
| 47 | R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3 | 49 | R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3 |
| 48 | R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 | 50 | R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 |
| 49 | R8A7790_CLK_MMCIF0 | 51 | R8A7790_CLK_MMCIF0 |
diff --git a/Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt new file mode 100644 index 000000000000..2c03302f86ed --- /dev/null +++ b/Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | These bindings should be considered EXPERIMENTAL for now. | ||
| 2 | |||
| 3 | * Renesas R8A7740 Clock Pulse Generator (CPG) | ||
| 4 | |||
| 5 | The CPG generates core clocks for the R8A7740 SoC. It includes three PLLs | ||
| 6 | and several fixed ratio and variable ratio dividers. | ||
| 7 | |||
| 8 | Required Properties: | ||
| 9 | |||
| 10 | - compatible: Must be "renesas,r8a7740-cpg-clocks" | ||
| 11 | |||
| 12 | - reg: Base address and length of the memory resource used by the CPG | ||
| 13 | |||
| 14 | - clocks: Reference to the three parent clocks | ||
| 15 | - #clock-cells: Must be 1 | ||
| 16 | - clock-output-names: The names of the clocks. Supported clocks are | ||
| 17 | "system", "pllc0", "pllc1", "pllc2", "r", "usb24s", "i", "zg", "b", | ||
| 18 | "m1", "hp", "hpp", "usbp", "s", "zb", "m3", and "cp". | ||
| 19 | |||
| 20 | - renesas,mode: board-specific settings of the MD_CK* bits | ||
| 21 | |||
| 22 | |||
| 23 | Example | ||
| 24 | ------- | ||
| 25 | |||
| 26 | cpg_clocks: cpg_clocks@e6150000 { | ||
| 27 | compatible = "renesas,r8a7740-cpg-clocks"; | ||
| 28 | reg = <0xe6150000 0x10000>; | ||
| 29 | clocks = <&extal1_clk>, <&extal2_clk>, <&extalr_clk>; | ||
| 30 | #clock-cells = <1>; | ||
| 31 | clock-output-names = "system", "pllc0", "pllc1", | ||
| 32 | "pllc2", "r", | ||
| 33 | "usb24s", | ||
| 34 | "i", "zg", "b", "m1", "hp", | ||
| 35 | "hpp", "usbp", "s", "zb", "m3", | ||
| 36 | "cp"; | ||
| 37 | }; | ||
| 38 | |||
| 39 | &cpg_clocks { | ||
| 40 | renesas,mode = <0x05>; | ||
| 41 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt new file mode 100644 index 000000000000..ed3c8cb12f4e --- /dev/null +++ b/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | * Renesas R8A7779 Clock Pulse Generator (CPG) | ||
| 2 | |||
| 3 | The CPG generates core clocks for the R8A7779. It includes one PLL and | ||
| 4 | several fixed ratio dividers | ||
| 5 | |||
| 6 | Required Properties: | ||
| 7 | |||
| 8 | - compatible: Must be "renesas,r8a7779-cpg-clocks" | ||
| 9 | - reg: Base address and length of the memory resource used by the CPG | ||
| 10 | |||
| 11 | - clocks: Reference to the parent clock | ||
| 12 | - #clock-cells: Must be 1 | ||
| 13 | - clock-output-names: The names of the clocks. Supported clocks are "plla", | ||
| 14 | "z", "zs", "s", "s1", "p", "b", "out". | ||
| 15 | |||
| 16 | |||
| 17 | Example | ||
| 18 | ------- | ||
| 19 | |||
| 20 | cpg_clocks: cpg_clocks@ffc80000 { | ||
| 21 | compatible = "renesas,r8a7779-cpg-clocks"; | ||
| 22 | reg = <0 0xffc80000 0 0x30>; | ||
| 23 | clocks = <&extal_clk>; | ||
| 24 | #clock-cells = <1>; | ||
| 25 | clock-output-names = "plla", "z", "zs", "s", "s1", "p", | ||
| 26 | "b", "out"; | ||
| 27 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/samsung,s3c2410-clock.txt b/Documentation/devicetree/bindings/clock/samsung,s3c2410-clock.txt new file mode 100644 index 000000000000..822505e715ae --- /dev/null +++ b/Documentation/devicetree/bindings/clock/samsung,s3c2410-clock.txt | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | * Samsung S3C2410 Clock Controller | ||
| 2 | |||
| 3 | The S3C2410 clock controller generates and supplies clock to various controllers | ||
| 4 | within the SoC. The clock binding described here is applicable to the s3c2410, | ||
| 5 | s3c2440 and s3c2442 SoCs in the s3c24x family. | ||
| 6 | |||
| 7 | Required Properties: | ||
| 8 | |||
| 9 | - compatible: should be one of the following. | ||
| 10 | - "samsung,s3c2410-clock" - controller compatible with S3C2410 SoC. | ||
| 11 | - "samsung,s3c2440-clock" - controller compatible with S3C2440 SoC. | ||
| 12 | - "samsung,s3c2442-clock" - controller compatible with S3C2442 SoC. | ||
| 13 | - reg: physical base address of the controller and length of memory mapped | ||
| 14 | region. | ||
| 15 | - #clock-cells: should be 1. | ||
| 16 | |||
| 17 | Each clock is assigned an identifier and client nodes can use this identifier | ||
| 18 | to specify the clock which they consume. Some of the clocks are available only | ||
| 19 | on a particular SoC. | ||
| 20 | |||
| 21 | All available clocks are defined as preprocessor macros in | ||
| 22 | dt-bindings/clock/s3c2410.h header and can be used in device | ||
| 23 | tree sources. | ||
| 24 | |||
| 25 | External clocks: | ||
| 26 | |||
| 27 | The xti clock used as input for the plls is generated outside the SoC. It is | ||
| 28 | expected that is are defined using standard clock bindings with a | ||
| 29 | clock-output-names value of "xti". | ||
| 30 | |||
| 31 | Example: Clock controller node: | ||
| 32 | |||
| 33 | clocks: clock-controller@4c000000 { | ||
| 34 | compatible = "samsung,s3c2410-clock"; | ||
| 35 | reg = <0x4c000000 0x20>; | ||
| 36 | #clock-cells = <1>; | ||
| 37 | }; | ||
| 38 | |||
| 39 | Example: UART controller node that consumes the clock generated by the clock | ||
| 40 | controller (refer to the standard clock bindings for information about | ||
| 41 | "clocks" and "clock-names" properties): | ||
| 42 | |||
| 43 | serial@50004000 { | ||
| 44 | compatible = "samsung,s3c2440-uart"; | ||
| 45 | reg = <0x50004000 0x4000>; | ||
| 46 | interrupts = <1 23 3 4>, <1 23 4 4>; | ||
| 47 | clock-names = "uart", "clk_uart_baud2"; | ||
| 48 | clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>; | ||
| 49 | status = "disabled"; | ||
| 50 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/samsung,s3c2412-clock.txt b/Documentation/devicetree/bindings/clock/samsung,s3c2412-clock.txt new file mode 100644 index 000000000000..2b430960ba47 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/samsung,s3c2412-clock.txt | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | * Samsung S3C2412 Clock Controller | ||
| 2 | |||
| 3 | The S3C2412 clock controller generates and supplies clock to various controllers | ||
| 4 | within the SoC. The clock binding described here is applicable to the s3c2412 | ||
| 5 | and s3c2413 SoCs in the s3c24x family. | ||
| 6 | |||
| 7 | Required Properties: | ||
| 8 | |||
| 9 | - compatible: should be "samsung,s3c2412-clock" | ||
| 10 | - reg: physical base address of the controller and length of memory mapped | ||
| 11 | region. | ||
| 12 | - #clock-cells: should be 1. | ||
| 13 | |||
| 14 | Each clock is assigned an identifier and client nodes can use this identifier | ||
| 15 | to specify the clock which they consume. Some of the clocks are available only | ||
| 16 | on a particular SoC. | ||
| 17 | |||
| 18 | All available clocks are defined as preprocessor macros in | ||
| 19 | dt-bindings/clock/s3c2412.h header and can be used in device | ||
| 20 | tree sources. | ||
| 21 | |||
| 22 | External clocks: | ||
| 23 | |||
| 24 | There are several clocks that are generated outside the SoC. It is expected | ||
| 25 | that they are defined using standard clock bindings with following | ||
| 26 | clock-output-names: | ||
| 27 | - "xti" - crystal input - required, | ||
| 28 | - "ext" - external clock source - optional, | ||
| 29 | |||
| 30 | Example: Clock controller node: | ||
| 31 | |||
| 32 | clocks: clock-controller@4c000000 { | ||
| 33 | compatible = "samsung,s3c2412-clock"; | ||
| 34 | reg = <0x4c000000 0x20>; | ||
| 35 | #clock-cells = <1>; | ||
| 36 | }; | ||
| 37 | |||
| 38 | Example: UART controller node that consumes the clock generated by the clock | ||
| 39 | controller (refer to the standard clock bindings for information about | ||
| 40 | "clocks" and "clock-names" properties): | ||
| 41 | |||
| 42 | serial@50004000 { | ||
| 43 | compatible = "samsung,s3c2412-uart"; | ||
| 44 | reg = <0x50004000 0x4000>; | ||
| 45 | interrupts = <1 23 3 4>, <1 23 4 4>; | ||
| 46 | clock-names = "uart", "clk_uart_baud2", "clk_uart_baud3"; | ||
| 47 | clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>, | ||
| 48 | <&clocks SCLK_UART>; | ||
| 49 | status = "disabled"; | ||
| 50 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/samsung,s3c2443-clock.txt b/Documentation/devicetree/bindings/clock/samsung,s3c2443-clock.txt new file mode 100644 index 000000000000..e67bb05478af --- /dev/null +++ b/Documentation/devicetree/bindings/clock/samsung,s3c2443-clock.txt | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | * Samsung S3C2443 Clock Controller | ||
| 2 | |||
| 3 | The S3C2443 clock controller generates and supplies clock to various controllers | ||
| 4 | within the SoC. The clock binding described here is applicable to all SoCs in | ||
| 5 | the s3c24x family starting with the s3c2443. | ||
| 6 | |||
| 7 | Required Properties: | ||
| 8 | |||
| 9 | - compatible: should be one of the following. | ||
| 10 | - "samsung,s3c2416-clock" - controller compatible with S3C2416 SoC. | ||
| 11 | - "samsung,s3c2443-clock" - controller compatible with S3C2443 SoC. | ||
| 12 | - "samsung,s3c2450-clock" - controller compatible with S3C2450 SoC. | ||
| 13 | - reg: physical base address of the controller and length of memory mapped | ||
| 14 | region. | ||
| 15 | - #clock-cells: should be 1. | ||
| 16 | |||
| 17 | Each clock is assigned an identifier and client nodes can use this identifier | ||
| 18 | to specify the clock which they consume. Some of the clocks are available only | ||
| 19 | on a particular SoC. | ||
| 20 | |||
| 21 | All available clocks are defined as preprocessor macros in | ||
| 22 | dt-bindings/clock/s3c2443.h header and can be used in device | ||
| 23 | tree sources. | ||
| 24 | |||
| 25 | External clocks: | ||
| 26 | |||
| 27 | There are several clocks that are generated outside the SoC. It is expected | ||
| 28 | that they are defined using standard clock bindings with following | ||
| 29 | clock-output-names: | ||
| 30 | - "xti" - crystal input - required, | ||
| 31 | - "ext" - external clock source - optional, | ||
| 32 | - "ext_i2s" - external I2S clock - optional, | ||
| 33 | - "ext_uart" - external uart clock - optional, | ||
| 34 | |||
| 35 | Example: Clock controller node: | ||
| 36 | |||
| 37 | clocks: clock-controller@4c000000 { | ||
| 38 | compatible = "samsung,s3c2416-clock"; | ||
| 39 | reg = <0x4c000000 0x40>; | ||
| 40 | #clock-cells = <1>; | ||
| 41 | }; | ||
| 42 | |||
| 43 | Example: UART controller node that consumes the clock generated by the clock | ||
| 44 | controller (refer to the standard clock bindings for information about | ||
| 45 | "clocks" and "clock-names" properties): | ||
| 46 | |||
| 47 | serial@50004000 { | ||
| 48 | compatible = "samsung,s3c2440-uart"; | ||
| 49 | reg = <0x50004000 0x4000>; | ||
| 50 | interrupts = <1 23 3 4>, <1 23 4 4>; | ||
| 51 | clock-names = "uart", "clk_uart_baud2", | ||
| 52 | "clk_uart_baud3"; | ||
| 53 | clocks = <&clocks PCLK_UART0>, <&clocks PCLK_UART0>, | ||
| 54 | <&clocks SCLK_UART>; | ||
| 55 | status = "disabled"; | ||
| 56 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt b/Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt new file mode 100644 index 000000000000..3e6a81e99804 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/ti-keystone-pllctrl.txt | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | * Device tree bindings for Texas Instruments keystone pll controller | ||
| 2 | |||
| 3 | The main pll controller used to drive theC66x CorePacs, the switch fabric, | ||
| 4 | and a majority of the peripheral clocks (all but the ARM CorePacs, DDR3 and | ||
| 5 | the NETCP modules) requires a PLL Controller to manage the various clock | ||
| 6 | divisions, gating, and synchronization. | ||
| 7 | |||
| 8 | Required properties: | ||
| 9 | |||
| 10 | - compatible: "ti,keystone-pllctrl", "syscon" | ||
| 11 | |||
| 12 | - reg: contains offset/length value for pll controller | ||
| 13 | registers space. | ||
| 14 | |||
| 15 | Example: | ||
| 16 | |||
| 17 | pllctrl: pll-controller@0x02310000 { | ||
| 18 | compatible = "ti,keystone-pllctrl", "syscon"; | ||
| 19 | reg = <0x02310000 0x200>; | ||
| 20 | }; | ||
diff --git a/Documentation/devicetree/bindings/crypto/samsung-sss.txt b/Documentation/devicetree/bindings/crypto/samsung-sss.txt new file mode 100644 index 000000000000..a6dafa83c6df --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/samsung-sss.txt | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | Samsung SoC SSS (Security SubSystem) module | ||
| 2 | |||
| 3 | The SSS module in S5PV210 SoC supports the following: | ||
| 4 | -- Feeder (FeedCtrl) | ||
| 5 | -- Advanced Encryption Standard (AES) | ||
| 6 | -- Data Encryption Standard (DES)/3DES | ||
| 7 | -- Public Key Accelerator (PKA) | ||
| 8 | -- SHA-1/SHA-256/MD5/HMAC (SHA-1/SHA-256/MD5)/PRNG | ||
| 9 | -- PRNG: Pseudo Random Number Generator | ||
| 10 | |||
| 11 | The SSS module in Exynos4 (Exynos4210) and | ||
| 12 | Exynos5 (Exynos5420 and Exynos5250) SoCs | ||
| 13 | supports the following also: | ||
| 14 | -- ARCFOUR (ARC4) | ||
| 15 | -- True Random Number Generator (TRNG) | ||
| 16 | -- Secure Key Manager | ||
| 17 | |||
| 18 | Required properties: | ||
| 19 | |||
| 20 | - compatible : Should contain entries for this and backward compatible | ||
| 21 | SSS versions: | ||
| 22 | - "samsung,s5pv210-secss" for S5PV210 SoC. | ||
| 23 | - "samsung,exynos4210-secss" for Exynos4210, Exynos4212, Exynos4412, Exynos5250, | ||
| 24 | Exynos5260 and Exynos5420 SoCs. | ||
| 25 | - reg : Offset and length of the register set for the module | ||
| 26 | - interrupts : interrupt specifiers of SSS module interrupts, should contain | ||
| 27 | following entries: | ||
| 28 | - first : feed control interrupt (required for all variants), | ||
| 29 | - second : hash interrupt (required only for samsung,s5pv210-secss). | ||
| 30 | |||
| 31 | - clocks : list of clock phandle and specifier pairs for all clocks listed in | ||
| 32 | clock-names property. | ||
| 33 | - clock-names : list of device clock input names; should contain one entry | ||
| 34 | "secss". | ||
diff --git a/Documentation/devicetree/bindings/dma/dma.txt b/Documentation/devicetree/bindings/dma/dma.txt index 8f504e6bae14..82104271e754 100644 --- a/Documentation/devicetree/bindings/dma/dma.txt +++ b/Documentation/devicetree/bindings/dma/dma.txt | |||
| @@ -14,7 +14,7 @@ Required property: | |||
| 14 | 14 | ||
| 15 | Optional properties: | 15 | Optional properties: |
| 16 | - dma-channels: Number of DMA channels supported by the controller. | 16 | - dma-channels: Number of DMA channels supported by the controller. |
| 17 | - dma-requests: Number of DMA requests signals supported by the | 17 | - dma-requests: Number of DMA request signals supported by the |
| 18 | controller. | 18 | controller. |
| 19 | 19 | ||
| 20 | Example: | 20 | Example: |
| @@ -44,7 +44,7 @@ Required property: | |||
| 44 | #dma-cells property in the node referenced by phandle | 44 | #dma-cells property in the node referenced by phandle |
| 45 | containing DMA controller specific information. This | 45 | containing DMA controller specific information. This |
| 46 | typically contains a DMA request line number or a | 46 | typically contains a DMA request line number or a |
| 47 | channel number, but can contain any data that is used | 47 | channel number, but can contain any data that is |
| 48 | required for configuring a channel. | 48 | required for configuring a channel. |
| 49 | - dma-names: Contains one identifier string for each DMA specifier in | 49 | - dma-names: Contains one identifier string for each DMA specifier in |
| 50 | the dmas property. The specific strings that can be used | 50 | the dmas property. The specific strings that can be used |
diff --git a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt index ee9be9961524..e577196a12c0 100644 --- a/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt +++ b/Documentation/devicetree/bindings/dma/fsl-imx-sdma.txt | |||
| @@ -8,7 +8,7 @@ Required properties: | |||
| 8 | "fsl,imx51-sdma" | 8 | "fsl,imx51-sdma" |
| 9 | "fsl,imx53-sdma" | 9 | "fsl,imx53-sdma" |
| 10 | "fsl,imx6q-sdma" | 10 | "fsl,imx6q-sdma" |
| 11 | The -to variants should be preferred since they allow to determnine the | 11 | The -to variants should be preferred since they allow to determine the |
| 12 | correct ROM script addresses needed for the driver to work without additional | 12 | correct ROM script addresses needed for the driver to work without additional |
| 13 | firmware. | 13 | firmware. |
| 14 | - reg : Should contain SDMA registers location and length | 14 | - reg : Should contain SDMA registers location and length |
diff --git a/Documentation/devicetree/bindings/dma/mmp-dma.txt b/Documentation/devicetree/bindings/dma/mmp-dma.txt index a4fa4efa1d83..7a802f64e5bd 100644 --- a/Documentation/devicetree/bindings/dma/mmp-dma.txt +++ b/Documentation/devicetree/bindings/dma/mmp-dma.txt | |||
| @@ -1,17 +1,20 @@ | |||
| 1 | * MARVELL MMP DMA controller | 1 | * MARVELL MMP DMA controller |
| 2 | 2 | ||
| 3 | Marvell Peripheral DMA Controller | 3 | Marvell Peripheral DMA Controller |
| 4 | Used platfroms: pxa688, pxa910, pxa3xx, etc | 4 | Used platforms: pxa688, pxa910, pxa3xx, etc |
| 5 | 5 | ||
| 6 | Required properties: | 6 | Required properties: |
| 7 | - compatible: Should be "marvell,pdma-1.0" | 7 | - compatible: Should be "marvell,pdma-1.0" |
| 8 | - reg: Should contain DMA registers location and length. | 8 | - reg: Should contain DMA registers location and length. |
| 9 | - interrupts: Either contain all of the per-channel DMA interrupts | 9 | - interrupts: Either contain all of the per-channel DMA interrupts |
| 10 | or one irq for pdma device | 10 | or one irq for pdma device |
| 11 | - #dma-channels: Number of DMA channels supported by the controller. | 11 | |
| 12 | Optional properties: | ||
| 13 | - #dma-channels: Number of DMA channels supported by the controller (defaults | ||
| 14 | to 32 when not specified) | ||
| 12 | 15 | ||
| 13 | "marvell,pdma-1.0" | 16 | "marvell,pdma-1.0" |
| 14 | Used platfroms: pxa25x, pxa27x, pxa3xx, pxa93x, pxa168, pxa910, pxa688. | 17 | Used platforms: pxa25x, pxa27x, pxa3xx, pxa93x, pxa168, pxa910, pxa688. |
| 15 | 18 | ||
| 16 | Examples: | 19 | Examples: |
| 17 | 20 | ||
| @@ -45,7 +48,7 @@ pdma: dma-controller@d4000000 { | |||
| 45 | 48 | ||
| 46 | 49 | ||
| 47 | Marvell Two Channel DMA Controller used specifically for audio | 50 | Marvell Two Channel DMA Controller used specifically for audio |
| 48 | Used platfroms: pxa688, pxa910 | 51 | Used platforms: pxa688, pxa910 |
| 49 | 52 | ||
| 50 | Required properties: | 53 | Required properties: |
| 51 | - compatible: Should be "marvell,adma-1.0" or "marvell,pxa910-squ" | 54 | - compatible: Should be "marvell,adma-1.0" or "marvell,pxa910-squ" |
diff --git a/Documentation/devicetree/bindings/dma/ti-edma.txt b/Documentation/devicetree/bindings/dma/ti-edma.txt index 9fbbdb783a72..5ba525a10035 100644 --- a/Documentation/devicetree/bindings/dma/ti-edma.txt +++ b/Documentation/devicetree/bindings/dma/ti-edma.txt | |||
| @@ -2,11 +2,8 @@ TI EDMA | |||
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible : "ti,edma3" | 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> | 5 | - #dma-cells: Should be set to <1> |
| 8 | Clients should use a single channel number per DMA request. | 6 | 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 | 7 | - reg: Memory map for accessing module |
| 11 | - interrupt-parent: Interrupt controller the interrupt is routed through | 8 | - interrupt-parent: Interrupt controller the interrupt is routed through |
| 12 | - interrupts: Exactly 3 interrupts need to be specified in the order: | 9 | - interrupts: Exactly 3 interrupts need to be specified in the order: |
| @@ -17,6 +14,13 @@ Optional properties: | |||
| 17 | - ti,hwmods: Name of the hwmods associated to the EDMA | 14 | - ti,hwmods: Name of the hwmods associated to the EDMA |
| 18 | - ti,edma-xbar-event-map: Crossbar event to channel map | 15 | - ti,edma-xbar-event-map: Crossbar event to channel map |
| 19 | 16 | ||
| 17 | Deprecated properties: | ||
| 18 | Listed here in case one wants to boot an old kernel with new DTB. These | ||
| 19 | properties might need to be added to the new DTS files. | ||
| 20 | - ti,edma-regions: Number of regions | ||
| 21 | - ti,edma-slots: Number of slots | ||
| 22 | - dma-channels: Specify total DMA channels per CC | ||
| 23 | |||
| 20 | Example: | 24 | Example: |
| 21 | 25 | ||
| 22 | edma: edma@49000000 { | 26 | edma: edma@49000000 { |
| @@ -26,9 +30,6 @@ edma: edma@49000000 { | |||
| 26 | compatible = "ti,edma3"; | 30 | compatible = "ti,edma3"; |
| 27 | ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; | 31 | ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; |
| 28 | #dma-cells = <1>; | 32 | #dma-cells = <1>; |
| 29 | dma-channels = <64>; | 33 | ti,edma-xbar-event-map = /bits/ 16 <1 12 |
| 30 | ti,edma-regions = <4>; | 34 | 2 13>; |
| 31 | ti,edma-slots = <256>; | ||
| 32 | ti,edma-xbar-event-map = <1 12 | ||
| 33 | 2 13>; | ||
| 34 | }; | 35 | }; |
diff --git a/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt new file mode 100644 index 000000000000..1405ed071bb4 --- /dev/null +++ b/Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | Xilinx AXI VDMA engine, it does transfers between memory and video devices. | ||
| 2 | It can be configured to have one channel or two channels. If configured | ||
| 3 | as two channels, one is to transmit to the video device and another is | ||
| 4 | to receive from the video device. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: Should be "xlnx,axi-vdma-1.00.a" | ||
| 8 | - #dma-cells: Should be <1>, see "dmas" property below | ||
| 9 | - reg: Should contain VDMA registers location and length. | ||
| 10 | - xlnx,num-fstores: Should be the number of framebuffers as configured in h/w. | ||
| 11 | - dma-channel child node: Should have at least one channel and can have up to | ||
| 12 | two channels per device. This node specifies the properties of each | ||
| 13 | DMA channel (see child node properties below). | ||
| 14 | |||
| 15 | Optional properties: | ||
| 16 | - xlnx,include-sg: Tells configured for Scatter-mode in | ||
| 17 | the hardware. | ||
| 18 | - xlnx,flush-fsync: Tells which channel to Flush on Frame sync. | ||
| 19 | It takes following values: | ||
| 20 | {1}, flush both channels | ||
| 21 | {2}, flush mm2s channel | ||
| 22 | {3}, flush s2mm channel | ||
| 23 | |||
| 24 | Required child node properties: | ||
| 25 | - compatible: It should be either "xlnx,axi-vdma-mm2s-channel" or | ||
| 26 | "xlnx,axi-vdma-s2mm-channel". | ||
| 27 | - interrupts: Should contain per channel VDMA interrupts. | ||
| 28 | - xlnx,data-width: Should contain the stream data width, take values | ||
| 29 | {32,64...1024}. | ||
| 30 | |||
| 31 | Optional child node properties: | ||
| 32 | - xlnx,include-dre: Tells hardware is configured for Data | ||
| 33 | Realignment Engine. | ||
| 34 | - xlnx,genlock-mode: Tells Genlock synchronization is | ||
| 35 | enabled/disabled in hardware. | ||
| 36 | |||
| 37 | Example: | ||
| 38 | ++++++++ | ||
| 39 | |||
| 40 | axi_vdma_0: axivdma@40030000 { | ||
| 41 | compatible = "xlnx,axi-vdma-1.00.a"; | ||
| 42 | #dma_cells = <1>; | ||
| 43 | reg = < 0x40030000 0x10000 >; | ||
| 44 | xlnx,num-fstores = <0x8>; | ||
| 45 | xlnx,flush-fsync = <0x1>; | ||
| 46 | dma-channel@40030000 { | ||
| 47 | compatible = "xlnx,axi-vdma-mm2s-channel"; | ||
| 48 | interrupts = < 0 54 4 >; | ||
| 49 | xlnx,datawidth = <0x40>; | ||
| 50 | } ; | ||
| 51 | dma-channel@40030030 { | ||
| 52 | compatible = "xlnx,axi-vdma-s2mm-channel"; | ||
| 53 | interrupts = < 0 53 4 >; | ||
| 54 | xlnx,datawidth = <0x40>; | ||
| 55 | } ; | ||
| 56 | } ; | ||
| 57 | |||
| 58 | |||
| 59 | * DMA client | ||
| 60 | |||
| 61 | Required properties: | ||
| 62 | - dmas: a list of <[Video DMA device phandle] [Channel ID]> pairs, | ||
| 63 | where Channel ID is '0' for write/tx and '1' for read/rx | ||
| 64 | channel. | ||
| 65 | - dma-names: a list of DMA channel names, one per "dmas" entry | ||
| 66 | |||
| 67 | Example: | ||
| 68 | ++++++++ | ||
| 69 | |||
| 70 | vdmatest_0: vdmatest@0 { | ||
| 71 | compatible ="xlnx,axi-vdma-test-1.00.a"; | ||
| 72 | dmas = <&axi_vdma_0 0 | ||
| 73 | &axi_vdma_0 1>; | ||
| 74 | dma-names = "vdma0", "vdma1"; | ||
| 75 | } ; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt b/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt index 3ddc7ccfe5f3..c306a2d0f2b1 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-mcp23s08.txt | |||
| @@ -54,7 +54,7 @@ Optional device specific properties: | |||
| 54 | IO 8-15 are bank 2. These chips have two different interrupt outputs: | 54 | IO 8-15 are bank 2. These chips have two different interrupt outputs: |
| 55 | One for bank 1 and another for bank 2. If irq-mirror is set, both | 55 | One for bank 1 and another for bank 2. If irq-mirror is set, both |
| 56 | interrupts are generated regardless of the bank that an input change | 56 | interrupts are generated regardless of the bank that an input change |
| 57 | occured on. If it is not set, the interrupt are only generated for the | 57 | occurred on. If it is not set, the interrupt are only generated for the |
| 58 | bank they belong to. | 58 | bank they belong to. |
| 59 | On devices with only one interrupt output this property is useless. | 59 | On devices with only one interrupt output this property is useless. |
| 60 | 60 | ||
diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt index f61cef74a212..941a26aa4322 100644 --- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt +++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | |||
| @@ -21,6 +21,12 @@ Required Properties: | |||
| 21 | GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. | 21 | GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. |
| 22 | - gpio-ranges: Range of pins managed by the GPIO controller. | 22 | - gpio-ranges: Range of pins managed by the GPIO controller. |
| 23 | 23 | ||
| 24 | Optional properties: | ||
| 25 | |||
| 26 | - clocks: Must contain a reference to the functional clock. The property is | ||
| 27 | mandatory if the hardware implements a controllable functional clock for | ||
| 28 | the GPIO instance. | ||
| 29 | |||
| 24 | Please refer to gpio.txt in this directory for details of gpio-ranges property | 30 | Please refer to gpio.txt in this directory for details of gpio-ranges property |
| 25 | and the common GPIO bindings used by client devices. | 31 | and the common GPIO bindings used by client devices. |
| 26 | 32 | ||
diff --git a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt index efa8b8451f93..b48f4ef31d93 100644 --- a/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt +++ b/Documentation/devicetree/bindings/gpu/nvidia,tegra20-host1x.txt | |||
| @@ -136,6 +136,7 @@ of the following host1x client modules: | |||
| 136 | - compatible: "nvidia,tegra<chip>-hdmi" | 136 | - compatible: "nvidia,tegra<chip>-hdmi" |
| 137 | - reg: Physical base address and length of the controller's registers. | 137 | - reg: Physical base address and length of the controller's registers. |
| 138 | - interrupts: The interrupt outputs from the controller. | 138 | - interrupts: The interrupt outputs from the controller. |
| 139 | - hdmi-supply: supply for the +5V HDMI connector pin | ||
| 139 | - vdd-supply: regulator for supply voltage | 140 | - vdd-supply: regulator for supply voltage |
| 140 | - pll-supply: regulator for PLL | 141 | - pll-supply: regulator for PLL |
| 141 | - clocks: Must contain an entry for each entry in clock-names. | 142 | - clocks: Must contain an entry for each entry in clock-names. |
| @@ -180,6 +181,7 @@ of the following host1x client modules: | |||
| 180 | See ../reset/reset.txt for details. | 181 | See ../reset/reset.txt for details. |
| 181 | - reset-names: Must include the following entries: | 182 | - reset-names: Must include the following entries: |
| 182 | - dsi | 183 | - dsi |
| 184 | - avdd-dsi-supply: phandle of a supply that powers the DSI controller | ||
| 183 | - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying | 185 | - nvidia,mipi-calibrate: Should contain a phandle and a specifier specifying |
| 184 | which pads are used by this DSI output and need to be calibrated. See also | 186 | which pads are used by this DSI output and need to be calibrated. See also |
| 185 | ../mipi/nvidia,tegra114-mipi.txt. | 187 | ../mipi/nvidia,tegra114-mipi.txt. |
diff --git a/Documentation/devicetree/bindings/hsi/client-devices.txt b/Documentation/devicetree/bindings/hsi/client-devices.txt new file mode 100644 index 000000000000..104c9a3e57a4 --- /dev/null +++ b/Documentation/devicetree/bindings/hsi/client-devices.txt | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | Each HSI port is supposed to have one child node, which | ||
| 2 | symbols the remote device connected to the HSI port. The | ||
| 3 | following properties are standardized for HSI clients: | ||
| 4 | |||
| 5 | Required HSI configuration properties: | ||
| 6 | |||
| 7 | - hsi-channel-ids: A list of channel ids | ||
| 8 | |||
| 9 | - hsi-rx-mode: Receiver Bit transmission mode ("stream" or "frame") | ||
| 10 | - hsi-tx-mode: Transmitter Bit transmission mode ("stream" or "frame") | ||
| 11 | - hsi-mode: May be used instead hsi-rx-mode and hsi-tx-mode if | ||
| 12 | the transmission mode is the same for receiver and | ||
| 13 | transmitter | ||
| 14 | - hsi-speed-kbps: Max bit transmission speed in kbit/s | ||
| 15 | - hsi-flow: RX flow type ("synchronized" or "pipeline") | ||
| 16 | - hsi-arb-mode: Arbitration mode for TX frame ("round-robin", "priority") | ||
| 17 | |||
| 18 | Optional HSI configuration properties: | ||
| 19 | |||
| 20 | - hsi-channel-names: A list with one name per channel specified in the | ||
| 21 | hsi-channel-ids property | ||
| 22 | |||
| 23 | |||
| 24 | Device Tree node example for an HSI client: | ||
| 25 | |||
| 26 | hsi-controller { | ||
| 27 | hsi-port { | ||
| 28 | modem: hsi-client { | ||
| 29 | compatible = "nokia,n900-modem"; | ||
| 30 | |||
| 31 | hsi-channel-ids = <0>, <1>, <2>, <3>; | ||
| 32 | hsi-channel-names = "mcsaab-control", | ||
| 33 | "speech-control", | ||
| 34 | "speech-data", | ||
| 35 | "mcsaab-data"; | ||
| 36 | hsi-speed-kbps = <55000>; | ||
| 37 | hsi-mode = "frame"; | ||
| 38 | hsi-flow = "synchronized"; | ||
| 39 | hsi-arb-mode = "round-robin"; | ||
| 40 | |||
| 41 | /* more client specific properties */ | ||
| 42 | }; | ||
| 43 | }; | ||
| 44 | }; | ||
diff --git a/Documentation/devicetree/bindings/hsi/nokia-modem.txt b/Documentation/devicetree/bindings/hsi/nokia-modem.txt new file mode 100644 index 000000000000..8a979780452b --- /dev/null +++ b/Documentation/devicetree/bindings/hsi/nokia-modem.txt | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | Nokia modem client bindings | ||
| 2 | |||
| 3 | The Nokia modem HSI client follows the common HSI client binding | ||
| 4 | and inherits all required properties. The following additional | ||
| 5 | properties are needed by the Nokia modem HSI client: | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | - compatible: Should be one of | ||
| 9 | "nokia,n900-modem" | ||
| 10 | - hsi-channel-names: Should contain the following strings | ||
| 11 | "mcsaab-control" | ||
| 12 | "speech-control" | ||
| 13 | "speech-data" | ||
| 14 | "mcsaab-data" | ||
| 15 | - gpios: Should provide a GPIO handler for each GPIO listed in | ||
| 16 | gpio-names | ||
| 17 | - gpio-names: Should contain the following strings | ||
| 18 | "cmt_apeslpx" | ||
| 19 | "cmt_rst_rq" | ||
| 20 | "cmt_en" | ||
| 21 | "cmt_rst" | ||
| 22 | "cmt_bsi" | ||
| 23 | - interrupts: Should be IRQ handle for modem's reset indication | ||
| 24 | |||
| 25 | Example: | ||
| 26 | |||
| 27 | &ssi_port { | ||
| 28 | modem: hsi-client { | ||
| 29 | compatible = "nokia,n900-modem"; | ||
| 30 | |||
| 31 | pinctrl-names = "default"; | ||
| 32 | pinctrl-0 = <&modem_pins>; | ||
| 33 | |||
| 34 | hsi-channel-ids = <0>, <1>, <2>, <3>; | ||
| 35 | hsi-channel-names = "mcsaab-control", | ||
| 36 | "speech-control", | ||
| 37 | "speech-data", | ||
| 38 | "mcsaab-data"; | ||
| 39 | hsi-speed-kbps = <55000>; | ||
| 40 | hsi-mode = "frame"; | ||
| 41 | hsi-flow = "synchronized"; | ||
| 42 | hsi-arb-mode = "round-robin"; | ||
| 43 | |||
| 44 | interrupts-extended = <&gpio3 8 IRQ_TYPE_EDGE_FALLING>; /* 72 */ | ||
| 45 | |||
| 46 | gpios = <&gpio3 6 GPIO_ACTIVE_HIGH>, /* 70 */ | ||
| 47 | <&gpio3 9 GPIO_ACTIVE_HIGH>, /* 73 */ | ||
| 48 | <&gpio3 10 GPIO_ACTIVE_HIGH>, /* 74 */ | ||
| 49 | <&gpio3 11 GPIO_ACTIVE_HIGH>, /* 75 */ | ||
| 50 | <&gpio5 29 GPIO_ACTIVE_HIGH>; /* 157 */ | ||
| 51 | gpio-names = "cmt_apeslpx", | ||
| 52 | "cmt_rst_rq", | ||
| 53 | "cmt_en", | ||
| 54 | "cmt_rst", | ||
| 55 | "cmt_bsi"; | ||
| 56 | }; | ||
| 57 | }; | ||
diff --git a/Documentation/devicetree/bindings/hsi/omap-ssi.txt b/Documentation/devicetree/bindings/hsi/omap-ssi.txt new file mode 100644 index 000000000000..f26625e42693 --- /dev/null +++ b/Documentation/devicetree/bindings/hsi/omap-ssi.txt | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | OMAP SSI controller bindings | ||
| 2 | |||
| 3 | OMAP Synchronous Serial Interface (SSI) controller implements a legacy | ||
| 4 | variant of MIPI's High Speed Synchronous Serial Interface (HSI). | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: Should include "ti,omap3-ssi". | ||
| 8 | - reg-names: Contains the values "sys" and "gdd" (in this order). | ||
| 9 | - reg: Contains a matching register specifier for each entry | ||
| 10 | in reg-names. | ||
| 11 | - interrupt-names: Contains the value "gdd_mpu". | ||
| 12 | - interrupts: Contains matching interrupt information for each entry | ||
| 13 | in interrupt-names. | ||
| 14 | - ranges: Represents the bus address mapping between the main | ||
| 15 | controller node and the child nodes below. | ||
| 16 | - clock-names: Must include the following entries: | ||
| 17 | "ssi_ssr_fck": The OMAP clock of that name | ||
| 18 | "ssi_sst_fck": The OMAP clock of that name | ||
| 19 | "ssi_ick": The OMAP clock of that name | ||
| 20 | - clocks: Contains a matching clock specifier for each entry in | ||
| 21 | clock-names. | ||
| 22 | - #address-cells: Should be set to <1> | ||
| 23 | - #size-cells: Should be set to <1> | ||
| 24 | |||
| 25 | Each port is represented as a sub-node of the ti,omap3-ssi device. | ||
| 26 | |||
| 27 | Required Port sub-node properties: | ||
| 28 | - compatible: Should be set to the following value | ||
| 29 | ti,omap3-ssi-port (applicable to OMAP34xx devices) | ||
| 30 | - reg-names: Contains the values "tx" and "rx" (in this order). | ||
| 31 | - reg: Contains a matching register specifier for each entry | ||
| 32 | in reg-names. | ||
| 33 | - interrupt-parent Should be a phandle for the interrupt controller | ||
| 34 | - interrupts: Should contain interrupt specifiers for mpu interrupts | ||
| 35 | 0 and 1 (in this order). | ||
| 36 | - ti,ssi-cawake-gpio: Defines which GPIO pin is used to signify CAWAKE | ||
| 37 | events for the port. This is an optional board-specific | ||
| 38 | property. If it's missing the port will not be | ||
| 39 | enabled. | ||
| 40 | |||
| 41 | Example for Nokia N900: | ||
| 42 | |||
| 43 | ssi-controller@48058000 { | ||
| 44 | compatible = "ti,omap3-ssi"; | ||
| 45 | |||
| 46 | /* needed until hwmod is updated to use the compatible string */ | ||
| 47 | ti,hwmods = "ssi"; | ||
| 48 | |||
| 49 | reg = <0x48058000 0x1000>, | ||
| 50 | <0x48059000 0x1000>; | ||
| 51 | reg-names = "sys", | ||
| 52 | "gdd"; | ||
| 53 | |||
| 54 | interrupts = <55>; | ||
| 55 | interrupt-names = "gdd_mpu"; | ||
| 56 | |||
| 57 | clocks = <&ssi_ssr_fck>, | ||
| 58 | <&ssi_sst_fck>, | ||
| 59 | <&ssi_ick>; | ||
| 60 | clock-names = "ssi_ssr_fck", | ||
| 61 | "ssi_sst_fck", | ||
| 62 | "ssi_ick"; | ||
| 63 | |||
| 64 | #address-cells = <1>; | ||
| 65 | #size-cells = <1>; | ||
| 66 | ranges; | ||
| 67 | |||
| 68 | ssi-port@4805a000 { | ||
| 69 | compatible = "ti,omap3-ssi-port"; | ||
| 70 | |||
| 71 | reg = <0x4805a000 0x800>, | ||
| 72 | <0x4805a800 0x800>; | ||
| 73 | reg-names = "tx", | ||
| 74 | "rx"; | ||
| 75 | |||
| 76 | interrupt-parent = <&intc>; | ||
| 77 | interrupts = <67>, | ||
| 78 | <68>; | ||
| 79 | |||
| 80 | ti,ssi-cawake-gpio = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* 151 */ | ||
| 81 | } | ||
| 82 | |||
| 83 | ssi-port@4805a000 { | ||
| 84 | compatible = "ti,omap3-ssi-port"; | ||
| 85 | |||
| 86 | reg = <0x4805b000 0x800>, | ||
| 87 | <0x4805b800 0x800>; | ||
| 88 | reg-names = "tx", | ||
| 89 | "rx"; | ||
| 90 | |||
| 91 | interrupt-parent = <&intc>; | ||
| 92 | interrupts = <69>, | ||
| 93 | <70>; | ||
| 94 | |||
| 95 | status = "disabled"; /* second port is not used on N900 */ | ||
| 96 | } | ||
| 97 | } | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt b/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt index 1ac8ea8ade1d..bfeabb843941 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt | |||
| @@ -8,6 +8,12 @@ the standard I2C multi-master rules. Using GPIOs is generally useful in | |||
| 8 | the case where there is a device on the bus that has errata and/or bugs | 8 | the case where there is a device on the bus that has errata and/or bugs |
| 9 | that makes standard multimaster mode not feasible. | 9 | that makes standard multimaster mode not feasible. |
| 10 | 10 | ||
| 11 | Note that this scheme works well enough but has some downsides: | ||
| 12 | * It is nonstandard (not using standard I2C multimaster) | ||
| 13 | * Having two masters on a bus in general makes it relatively hard to debug | ||
| 14 | problems (hard to tell if i2c issues were caused by one master, another, or | ||
| 15 | some device on the bus). | ||
| 16 | |||
| 11 | 17 | ||
| 12 | Algorithm: | 18 | Algorithm: |
| 13 | 19 | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-cros-ec-tunnel.txt b/Documentation/devicetree/bindings/i2c/i2c-cros-ec-tunnel.txt new file mode 100644 index 000000000000..898f030eba62 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-cros-ec-tunnel.txt | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | I2C bus that tunnels through the ChromeOS EC (cros-ec) | ||
| 2 | ====================================================== | ||
| 3 | On some ChromeOS board designs we've got a connection to the EC (embedded | ||
| 4 | controller) but no direct connection to some devices on the other side of | ||
| 5 | the EC (like a battery and PMIC). To get access to those devices we need | ||
| 6 | to tunnel our i2c commands through the EC. | ||
| 7 | |||
| 8 | The node for this device should be under a cros-ec node like google,cros-ec-spi | ||
| 9 | or google,cros-ec-i2c. | ||
| 10 | |||
| 11 | |||
| 12 | Required properties: | ||
| 13 | - compatible: google,cros-ec-i2c-tunnel | ||
| 14 | - google,remote-bus: The EC bus we'd like to talk to. | ||
| 15 | |||
| 16 | Optional child nodes: | ||
| 17 | - One node per I2C device connected to the tunnelled I2C bus. | ||
| 18 | |||
| 19 | |||
| 20 | Example: | ||
| 21 | cros-ec@0 { | ||
| 22 | compatible = "google,cros-ec-spi"; | ||
| 23 | |||
| 24 | ... | ||
| 25 | |||
| 26 | i2c-tunnel { | ||
| 27 | compatible = "google,cros-ec-i2c-tunnel"; | ||
| 28 | #address-cells = <1>; | ||
| 29 | #size-cells = <0>; | ||
| 30 | |||
| 31 | google,remote-bus = <0>; | ||
| 32 | |||
| 33 | battery: sbs-battery@b { | ||
| 34 | compatible = "sbs,sbs-battery"; | ||
| 35 | reg = <0xb>; | ||
| 36 | sbs,poll-retry-count = <1>; | ||
| 37 | }; | ||
| 38 | }; | ||
| 39 | } | ||
diff --git a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt index 056732cfdcee..d4745e31f5c6 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-exynos5.txt | |||
| @@ -5,7 +5,14 @@ at various speeds ranging from 100khz to 3.4Mhz. | |||
| 5 | 5 | ||
| 6 | Required properties: | 6 | Required properties: |
| 7 | - compatible: value should be. | 7 | - compatible: value should be. |
| 8 | -> "samsung,exynos5-hsi2c", for i2c compatible with exynos5 hsi2c. | 8 | -> "samsung,exynos5-hsi2c", (DEPRECATED) |
| 9 | for i2c compatible with HSI2C available | ||
| 10 | on Exynos5250 and Exynos5420 SoCs. | ||
| 11 | -> "samsung,exynos5250-hsi2c", for i2c compatible with HSI2C available | ||
| 12 | on Exynos5250 and Exynos5420 SoCs. | ||
| 13 | -> "samsung,exynos5260-hsi2c", for i2c compatible with HSI2C available | ||
| 14 | on Exynos5260 SoCs. | ||
| 15 | |||
| 9 | - reg: physical base address of the controller and length of memory mapped | 16 | - reg: physical base address of the controller and length of memory mapped |
| 10 | region. | 17 | region. |
| 11 | - interrupts: interrupt number to the cpu. | 18 | - interrupts: interrupt number to the cpu. |
| @@ -26,7 +33,7 @@ Optional properties: | |||
| 26 | Example: | 33 | Example: |
| 27 | 34 | ||
| 28 | hsi2c@12ca0000 { | 35 | hsi2c@12ca0000 { |
| 29 | compatible = "samsung,exynos5-hsi2c"; | 36 | compatible = "samsung,exynos5250-hsi2c"; |
| 30 | reg = <0x12ca0000 0x100>; | 37 | reg = <0x12ca0000 0x100>; |
| 31 | interrupts = <56>; | 38 | interrupts = <56>; |
| 32 | clock-frequency = <100000>; | 39 | clock-frequency = <100000>; |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt index befd4fb4764f..5c30026921ae 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | |||
| @@ -5,7 +5,7 @@ Required properties : | |||
| 5 | 5 | ||
| 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 either: | 7 | - compatible : Should be either: |
| 8 | - "allwinner,sun4i-i2c" | 8 | - "allwinner,sun4i-a10-i2c" |
| 9 | - "allwinner,sun6i-a31-i2c" | 9 | - "allwinner,sun6i-a31-i2c" |
| 10 | - "marvell,mv64xxx-i2c" | 10 | - "marvell,mv64xxx-i2c" |
| 11 | - "marvell,mv78230-i2c" | 11 | - "marvell,mv78230-i2c" |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt index dd8b2dd1edeb..16b3e07aa98f 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt | |||
| @@ -7,6 +7,9 @@ Required properties: | |||
| 7 | "renesas,i2c-r8a7779" | 7 | "renesas,i2c-r8a7779" |
| 8 | "renesas,i2c-r8a7790" | 8 | "renesas,i2c-r8a7790" |
| 9 | "renesas,i2c-r8a7791" | 9 | "renesas,i2c-r8a7791" |
| 10 | "renesas,i2c-r8a7792" | ||
| 11 | "renesas,i2c-r8a7793" | ||
| 12 | "renesas,i2c-r8a7794" | ||
| 10 | - reg: physical base address of the controller and length of memory mapped | 13 | - reg: physical base address of the controller and length of memory mapped |
| 11 | region. | 14 | region. |
| 12 | - interrupts: interrupt specifier. | 15 | - interrupts: interrupt specifier. |
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt new file mode 100644 index 000000000000..d2153ce36fa8 --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | Device tree configuration for Renesas IIC (sh_mobile) driver | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : "renesas,iic-<soctype>". "renesas,rmobile-iic" as fallback | ||
| 5 | - reg : address start and address range size of device | ||
| 6 | - interrupts : interrupt of device | ||
| 7 | - clocks : clock for device | ||
| 8 | - #address-cells : should be <1> | ||
| 9 | - #size-cells : should be <0> | ||
| 10 | |||
| 11 | Optional properties: | ||
| 12 | - clock-frequency : frequency of bus clock in Hz. Default 100kHz if unset. | ||
| 13 | |||
| 14 | Pinctrl properties might be needed, too. See there. | ||
| 15 | |||
| 16 | Example: | ||
| 17 | |||
| 18 | iic0: i2c@e6500000 { | ||
| 19 | compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic"; | ||
| 20 | reg = <0 0xe6500000 0 0x425>; | ||
| 21 | interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>; | ||
| 22 | clocks = <&mstp3_clks R8A7790_CLK_IIC0>; | ||
| 23 | clock-frequency = <400000>; | ||
| 24 | #address-cells = <1>; | ||
| 25 | #size-cells = <0>; | ||
| 26 | }; | ||
diff --git a/Documentation/devicetree/bindings/i2c/trivial-devices.txt b/Documentation/devicetree/bindings/i2c/trivial-devices.txt index 71724d026ffa..bef86e57c388 100644 --- a/Documentation/devicetree/bindings/i2c/trivial-devices.txt +++ b/Documentation/devicetree/bindings/i2c/trivial-devices.txt | |||
| @@ -13,8 +13,22 @@ ad,ad7414 SMBus/I2C Digital Temperature Sensor in 6-Pin SOT with SMBus Alert an | |||
| 13 | ad,adm9240 ADM9240: Complete System Hardware Monitor for uProcessor-Based Systems | 13 | ad,adm9240 ADM9240: Complete System Hardware Monitor for uProcessor-Based Systems |
| 14 | adi,adt7461 +/-1C TDM Extended Temp Range I.C | 14 | adi,adt7461 +/-1C TDM Extended Temp Range I.C |
| 15 | adt7461 +/-1C TDM Extended Temp Range I.C | 15 | adt7461 +/-1C TDM Extended Temp Range I.C |
| 16 | adi,adt7473 +/-1C TDM Extended Temp Range I.C | ||
| 17 | adi,adt7475 +/-1C TDM Extended Temp Range I.C | ||
| 18 | adi,adt7476 +/-1C TDM Extended Temp Range I.C | ||
| 19 | adi,adt7490 +/-1C TDM Extended Temp Range I.C | ||
| 16 | at,24c08 i2c serial eeprom (24cxx) | 20 | at,24c08 i2c serial eeprom (24cxx) |
| 21 | atmel,24c00 i2c serial eeprom (24cxx) | ||
| 22 | atmel,24c01 i2c serial eeprom (24cxx) | ||
| 17 | atmel,24c02 i2c serial eeprom (24cxx) | 23 | atmel,24c02 i2c serial eeprom (24cxx) |
| 24 | atmel,24c04 i2c serial eeprom (24cxx) | ||
| 25 | atmel,24c16 i2c serial eeprom (24cxx) | ||
| 26 | atmel,24c32 i2c serial eeprom (24cxx) | ||
| 27 | atmel,24c64 i2c serial eeprom (24cxx) | ||
| 28 | atmel,24c128 i2c serial eeprom (24cxx) | ||
| 29 | atmel,24c256 i2c serial eeprom (24cxx) | ||
| 30 | atmel,24c512 i2c serial eeprom (24cxx) | ||
| 31 | atmel,24c1024 i2c serial eeprom (24cxx) | ||
| 18 | atmel,at97sc3204t i2c trusted platform module (TPM) | 32 | atmel,at97sc3204t i2c trusted platform module (TPM) |
| 19 | capella,cm32181 CM32181: Ambient Light Sensor | 33 | capella,cm32181 CM32181: Ambient Light Sensor |
| 20 | catalyst,24c32 i2c serial eeprom | 34 | catalyst,24c32 i2c serial eeprom |
| @@ -46,8 +60,10 @@ maxim,ds1050 5 Bit Programmable, Pulse-Width Modulator | |||
| 46 | maxim,max1237 Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs | 60 | maxim,max1237 Low-Power, 4-/12-Channel, 2-Wire Serial, 12-Bit ADCs |
| 47 | maxim,max6625 9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface | 61 | maxim,max6625 9-Bit/12-Bit Temperature Sensors with I²C-Compatible Serial Interface |
| 48 | mc,rv3029c2 Real Time Clock Module with I2C-Bus | 62 | mc,rv3029c2 Real Time Clock Module with I2C-Bus |
| 63 | national,lm63 Temperature sensor with integrated fan control | ||
| 49 | national,lm75 I2C TEMP SENSOR | 64 | national,lm75 I2C TEMP SENSOR |
| 50 | national,lm80 Serial Interface ACPI-Compatible Microprocessor System Hardware Monitor | 65 | national,lm80 Serial Interface ACPI-Compatible Microprocessor System Hardware Monitor |
| 66 | national,lm85 Temperature sensor with integrated fan control | ||
| 51 | national,lm92 ±0.33°C Accurate, 12-Bit + Sign Temperature Sensor and Thermal Window Comparator with Two-Wire Interface | 67 | national,lm92 ±0.33°C Accurate, 12-Bit + Sign Temperature Sensor and Thermal Window Comparator with Two-Wire Interface |
| 52 | nuvoton,npct501 i2c trusted platform module (TPM) | 68 | nuvoton,npct501 i2c trusted platform module (TPM) |
| 53 | nxp,pca9556 Octal SMBus and I2C registered interface | 69 | nxp,pca9556 Octal SMBus and I2C registered interface |
diff --git a/Documentation/devicetree/bindings/iio/proximity/as3935.txt b/Documentation/devicetree/bindings/iio/proximity/as3935.txt new file mode 100644 index 000000000000..ae23dd8da736 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/proximity/as3935.txt | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | Austrian Microsystems AS3935 Franklin lightning sensor device driver | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: must be "ams,as3935" | ||
| 5 | - reg: SPI chip select number for the device | ||
| 6 | - spi-cpha: SPI Mode 1. Refer to spi/spi-bus.txt for generic SPI | ||
| 7 | slave node bindings. | ||
| 8 | - interrupt-parent : should be the phandle for the interrupt controller | ||
| 9 | - interrupts : the sole interrupt generated by the device | ||
| 10 | |||
| 11 | Refer to interrupt-controller/interrupts.txt for generic | ||
| 12 | interrupt client node bindings. | ||
| 13 | |||
| 14 | Optional properties: | ||
| 15 | - ams,tuning-capacitor-pf: Calibration tuning capacitor stepping | ||
| 16 | value 0 - 120pF. This will require using the calibration data from | ||
| 17 | the manufacturer. | ||
| 18 | |||
| 19 | Example: | ||
| 20 | |||
| 21 | as3935@0 { | ||
| 22 | compatible = "ams,as3935"; | ||
| 23 | reg = <0>; | ||
| 24 | spi-cpha; | ||
| 25 | interrupt-parent = <&gpio1>; | ||
| 26 | interrupts = <16 1>; | ||
| 27 | ams,tuning-capacitor-pf = <80>; | ||
| 28 | }; | ||
diff --git a/Documentation/devicetree/bindings/gpio/gpio_keys.txt b/Documentation/devicetree/bindings/input/gpio-keys.txt index 5c2c02140a62..5c2c02140a62 100644 --- a/Documentation/devicetree/bindings/gpio/gpio_keys.txt +++ b/Documentation/devicetree/bindings/input/gpio-keys.txt | |||
diff --git a/Documentation/devicetree/bindings/input/st-keyscan.txt b/Documentation/devicetree/bindings/input/st-keyscan.txt new file mode 100644 index 000000000000..51eb428e5c85 --- /dev/null +++ b/Documentation/devicetree/bindings/input/st-keyscan.txt | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | * ST Keyscan controller Device Tree bindings | ||
| 2 | |||
| 3 | The ST keyscan controller Device Tree binding is based on the | ||
| 4 | matrix-keymap. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: "st,sti-keyscan" | ||
| 8 | |||
| 9 | - reg: Register base address and size of st-keyscan controller. | ||
| 10 | |||
| 11 | - interrupts: Interrupt number for the st-keyscan controller. | ||
| 12 | |||
| 13 | - clocks: Must contain one entry, for the module clock. | ||
| 14 | See ../clocks/clock-bindings.txt for details. | ||
| 15 | |||
| 16 | - pinctrl: Should specify pin control groups used for this controller. | ||
| 17 | See ../pinctrl/pinctrl-bindings.txt for details. | ||
| 18 | |||
| 19 | - linux,keymap: The keymap for keys as described in the binding document | ||
| 20 | devicetree/bindings/input/matrix-keymap.txt. | ||
| 21 | |||
| 22 | - keypad,num-rows: Number of row lines connected to the keypad controller. | ||
| 23 | |||
| 24 | - keypad,num-columns: Number of column lines connected to the keypad | ||
| 25 | controller. | ||
| 26 | |||
| 27 | Optional property: | ||
| 28 | - st,debounce_us: Debouncing interval time in microseconds | ||
| 29 | |||
| 30 | Example: | ||
| 31 | |||
| 32 | keyscan: keyscan@fe4b0000 { | ||
| 33 | compatible = "st,sti-keyscan"; | ||
| 34 | reg = <0xfe4b0000 0x2000>; | ||
| 35 | interrupts = <GIC_SPI 212 IRQ_TYPE_NONE>; | ||
| 36 | clocks = <&CLK_SYSIN>; | ||
| 37 | pinctrl-names = "default"; | ||
| 38 | pinctrl-0 = <&pinctrl_keyscan>; | ||
| 39 | |||
| 40 | keypad,num-rows = <4>; | ||
| 41 | keypad,num-columns = <4>; | ||
| 42 | st,debounce_us = <5000>; | ||
| 43 | |||
| 44 | linux,keymap = < MATRIX_KEY(0x00, 0x00, KEY_F13) | ||
| 45 | MATRIX_KEY(0x00, 0x01, KEY_F9) | ||
| 46 | MATRIX_KEY(0x00, 0x02, KEY_F5) | ||
| 47 | MATRIX_KEY(0x00, 0x03, KEY_F1) | ||
| 48 | MATRIX_KEY(0x01, 0x00, KEY_F14) | ||
| 49 | MATRIX_KEY(0x01, 0x01, KEY_F10) | ||
| 50 | MATRIX_KEY(0x01, 0x02, KEY_F6) | ||
| 51 | MATRIX_KEY(0x01, 0x03, KEY_F2) | ||
| 52 | MATRIX_KEY(0x02, 0x00, KEY_F15) | ||
| 53 | MATRIX_KEY(0x02, 0x01, KEY_F11) | ||
| 54 | MATRIX_KEY(0x02, 0x02, KEY_F7) | ||
| 55 | MATRIX_KEY(0x02, 0x03, KEY_F3) | ||
| 56 | MATRIX_KEY(0x03, 0x00, KEY_F16) | ||
| 57 | MATRIX_KEY(0x03, 0x01, KEY_F12) | ||
| 58 | MATRIX_KEY(0x03, 0x02, KEY_F8) | ||
| 59 | MATRIX_KEY(0x03, 0x03, KEY_F4) >; | ||
| 60 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt new file mode 100644 index 000000000000..aef57791f40b --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/sun4i.txt | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | sun4i resistive touchscreen controller | ||
| 2 | -------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible: "allwinner,sun4i-a10-ts" | ||
| 6 | - reg: mmio address range of the chip | ||
| 7 | - interrupts: interrupt to which the chip is connected | ||
| 8 | |||
| 9 | Optional properties: | ||
| 10 | - allwinner,ts-attached: boolean indicating that an actual touchscreen is | ||
| 11 | attached to the controller | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | rtp: rtp@01c25000 { | ||
| 16 | compatible = "allwinner,sun4i-a10-ts"; | ||
| 17 | reg = <0x01c25000 0x100>; | ||
| 18 | interrupts = <29>; | ||
| 19 | allwinner,ts-attached; | ||
| 20 | }; | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt new file mode 100644 index 000000000000..d8e06163c54e --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | General Touchscreen Properties: | ||
| 2 | |||
| 3 | Optional properties for Touchscreens: | ||
| 4 | - touchscreen-size-x : horizontal resolution of touchscreen | ||
| 5 | (in pixels) | ||
| 6 | - touchscreen-size-y : vertical resolution of touchscreen | ||
| 7 | (in pixels) | ||
| 8 | - touchscreen-max-pressure : maximum reported pressure (arbitrary range | ||
| 9 | dependent on the controller) | ||
| 10 | - touchscreen-fuzz-x : horizontal noise value of the absolute input | ||
| 11 | device (in pixels) | ||
| 12 | - touchscreen-fuzz-y : vertical noise value of the absolute input | ||
| 13 | device (in pixels) | ||
| 14 | - touchscreen-fuzz-pressure : pressure noise value of the absolute input | ||
| 15 | device (arbitrary range dependent on the | ||
| 16 | controller) | ||
| 17 | - touchscreen-inverted-x : X axis is inverted (boolean) | ||
| 18 | - touchscreen-inverted-y : Y axis is inverted (boolean) | ||
| 19 | |||
| 20 | Deprecated properties for Touchscreens: | ||
| 21 | - x-size : deprecated name for touchscreen-size-x | ||
| 22 | - y-size : deprecated name for touchscreen-size-y | ||
| 23 | - moving-threshold : deprecated name for a combination of | ||
| 24 | touchscreen-fuzz-x and touchscreen-fuzz-y | ||
| 25 | - contact-threshold : deprecated name for touchscreen-fuzz-pressure | ||
| 26 | - x-invert : deprecated name for touchscreen-inverted-x | ||
| 27 | - y-invert : deprecated name for touchscreen-inverted-y | ||
diff --git a/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt b/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt new file mode 100644 index 000000000000..4b641c7bf1c2 --- /dev/null +++ b/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | * Texas Instruments tsc2005 touchscreen controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : "ti,tsc2005" | ||
| 5 | - reg : SPI device address | ||
| 6 | - spi-max-frequency : Maximal SPI speed | ||
| 7 | - interrupts : IRQ specifier | ||
| 8 | - reset-gpios : GPIO specifier | ||
| 9 | - vio-supply : Regulator specifier | ||
| 10 | |||
| 11 | Optional properties: | ||
| 12 | - ti,x-plate-ohms : integer, resistance of the touchscreen's X plates | ||
| 13 | in ohm (defaults to 280) | ||
| 14 | - ti,esd-recovery-timeout-ms : integer, if the touchscreen does not respond after | ||
| 15 | the configured time (in milli seconds), the driver | ||
| 16 | will reset it. This is disabled by default. | ||
| 17 | - properties defined in touchscreen.txt | ||
| 18 | |||
| 19 | Example: | ||
| 20 | |||
| 21 | &mcspi1 { | ||
| 22 | tsc2005@0 { | ||
| 23 | compatible = "ti,tsc2005"; | ||
| 24 | spi-max-frequency = <6000000>; | ||
| 25 | reg = <0>; | ||
| 26 | |||
| 27 | vio-supply = <&vio>; | ||
| 28 | |||
| 29 | reset-gpios = <&gpio4 8 GPIO_ACTIVE_HIGH>; /* 104 */ | ||
| 30 | interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>; /* 100 */ | ||
| 31 | |||
| 32 | touchscreen-fuzz-x = <4>; | ||
| 33 | touchscreen-fuzz-y = <7>; | ||
| 34 | touchscreen-fuzz-pressure = <2>; | ||
| 35 | touchscreen-max-x = <4096>; | ||
| 36 | touchscreen-max-y = <4096>; | ||
| 37 | touchscreen-max-pressure = <2048>; | ||
| 38 | |||
| 39 | ti,x-plate-ohms = <280>; | ||
| 40 | ti,esd-recovery-timeout-ms = <8000>; | ||
| 41 | }; | ||
| 42 | } | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt b/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt new file mode 100644 index 000000000000..448273a30a11 --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,l2-intc.txt | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | Broadcom Generic Level 2 Interrupt Controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | |||
| 5 | - compatible: should be "brcm,l2-intc" | ||
| 6 | - reg: specifies the base physical address and size of the registers | ||
| 7 | - interrupt-controller: identifies the node as an interrupt controller | ||
| 8 | - #interrupt-cells: specifies the number of cells needed to encode an | ||
| 9 | interrupt source. Should be 1. | ||
| 10 | - interrupt-parent: specifies the phandle to the parent interrupt controller | ||
| 11 | this controller is cacaded from | ||
| 12 | - interrupts: specifies the interrupt line in the interrupt-parent irq space | ||
| 13 | to be used for cascading | ||
| 14 | |||
| 15 | Optional properties: | ||
| 16 | |||
| 17 | - brcm,irq-can-wake: If present, this means the L2 controller can be used as a | ||
| 18 | wakeup source for system suspend/resume. | ||
| 19 | |||
| 20 | Example: | ||
| 21 | |||
| 22 | hif_intr2_intc: interrupt-controller@f0441000 { | ||
| 23 | compatible = "brcm,l2-intc"; | ||
| 24 | reg = <0xf0441000 0x30>; | ||
| 25 | interrupt-controller; | ||
| 26 | #interrupt-cells = <1>; | ||
| 27 | interrupt-parent = <&intc>; | ||
| 28 | interrupts = <0x0 0x20 0x0>; | ||
| 29 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt b/Documentation/devicetree/bindings/interrupt-controller/marvell,armada-370-xp-mpic.txt index 5fc03134a999..5fc03134a999 100644 --- a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/marvell,armada-370-xp-mpic.txt | |||
diff --git a/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt b/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt new file mode 100644 index 000000000000..6fa4c737af23 --- /dev/null +++ b/Documentation/devicetree/bindings/iommu/samsung,sysmmu.txt | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | Samsung Exynos IOMMU H/W, System MMU (System Memory Management Unit) | ||
| 2 | |||
| 3 | Samsung's Exynos architecture contains System MMUs that enables scattered | ||
| 4 | physical memory chunks visible as a contiguous region to DMA-capable peripheral | ||
| 5 | devices like MFC, FIMC, FIMD, GScaler, FIMC-IS and so forth. | ||
| 6 | |||
| 7 | System MMU is an IOMMU and supports identical translation table format to | ||
| 8 | ARMv7 translation tables with minimum set of page properties including access | ||
| 9 | permissions, shareability and security protection. In addition, System MMU has | ||
| 10 | another capabilities like L2 TLB or block-fetch buffers to minimize translation | ||
| 11 | latency. | ||
| 12 | |||
| 13 | System MMUs are in many to one relation with peripheral devices, i.e. single | ||
| 14 | peripheral device might have multiple System MMUs (usually one for each bus | ||
| 15 | master), but one System MMU can handle transactions from only one peripheral | ||
| 16 | device. The relation between a System MMU and the peripheral device needs to be | ||
| 17 | defined in device node of the peripheral device. | ||
| 18 | |||
| 19 | MFC in all Exynos SoCs and FIMD, M2M Scalers and G2D in Exynos5420 has 2 System | ||
| 20 | MMUs. | ||
| 21 | * MFC has one System MMU on its left and right bus. | ||
| 22 | * FIMD in Exynos5420 has one System MMU for window 0 and 4, the other system MMU | ||
| 23 | for window 1, 2 and 3. | ||
| 24 | * M2M Scalers and G2D in Exynos5420 has one System MMU on the read channel and | ||
| 25 | the other System MMU on the write channel. | ||
| 26 | The drivers must consider how to handle those System MMUs. One of the idea is | ||
| 27 | to implement child devices or sub-devices which are the client devices of the | ||
| 28 | System MMU. | ||
| 29 | |||
| 30 | Note: | ||
| 31 | The current DT binding for the Exynos System MMU is incomplete. | ||
| 32 | The following properties can be removed or changed, if found incompatible with | ||
| 33 | the "Generic IOMMU Binding" support for attaching devices to the IOMMU. | ||
| 34 | |||
| 35 | Required properties: | ||
| 36 | - compatible: Should be "samsung,exynos-sysmmu" | ||
| 37 | - reg: A tuple of base address and size of System MMU registers. | ||
| 38 | - interrupt-parent: The phandle of the interrupt controller of System MMU | ||
| 39 | - interrupts: An interrupt specifier for interrupt signal of System MMU, | ||
| 40 | according to the format defined by a particular interrupt | ||
| 41 | controller. | ||
| 42 | - clock-names: Should be "sysmmu" if the System MMU is needed to gate its clock. | ||
| 43 | Optional "master" if the clock to the System MMU is gated by | ||
| 44 | another gate clock other than "sysmmu". | ||
| 45 | Exynos4 SoCs, there needs no "master" clock. | ||
| 46 | Exynos5 SoCs, some System MMUs must have "master" clocks. | ||
| 47 | - clocks: Required if the System MMU is needed to gate its clock. | ||
| 48 | - samsung,power-domain: Required if the System MMU is needed to gate its power. | ||
| 49 | Please refer to the following document: | ||
| 50 | Documentation/devicetree/bindings/arm/exynos/power_domain.txt | ||
| 51 | |||
| 52 | Examples: | ||
| 53 | gsc_0: gsc@13e00000 { | ||
| 54 | compatible = "samsung,exynos5-gsc"; | ||
| 55 | reg = <0x13e00000 0x1000>; | ||
| 56 | interrupts = <0 85 0>; | ||
| 57 | samsung,power-domain = <&pd_gsc>; | ||
| 58 | clocks = <&clock CLK_GSCL0>; | ||
| 59 | clock-names = "gscl"; | ||
| 60 | }; | ||
| 61 | |||
| 62 | sysmmu_gsc0: sysmmu@13E80000 { | ||
| 63 | compatible = "samsung,exynos-sysmmu"; | ||
| 64 | reg = <0x13E80000 0x1000>; | ||
| 65 | interrupt-parent = <&combiner>; | ||
| 66 | interrupts = <2 0>; | ||
| 67 | clock-names = "sysmmu", "master"; | ||
| 68 | clocks = <&clock CLK_SMMU_GSCL0>, <&clock CLK_GSCL0>; | ||
| 69 | samsung,power-domain = <&pd_gsc>; | ||
| 70 | }; | ||
diff --git a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt index c55b8c016a9e..1b66a413fb9d 100644 --- a/Documentation/devicetree/bindings/leds/leds-lp55xx.txt +++ b/Documentation/devicetree/bindings/leds/leds-lp55xx.txt | |||
| @@ -1,7 +1,13 @@ | |||
| 1 | Binding for TI/National Semiconductor LP55xx Led Drivers | 1 | Binding for TI/National Semiconductor LP55xx Led Drivers |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible: "national,lp5521" or "national,lp5523" or "ti,lp5562" or "ti,lp8501" | 4 | - compatible: one of |
| 5 | national,lp5521 | ||
| 6 | national,lp5523 | ||
| 7 | ti,lp55231 | ||
| 8 | ti,lp5562 | ||
| 9 | ti,lp8501 | ||
| 10 | |||
| 5 | - reg: I2C slave address | 11 | - reg: I2C slave address |
| 6 | - clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) | 12 | - clock-mode: Input clock mode, (0: automode, 1: internal, 2: external) |
| 7 | 13 | ||
diff --git a/Documentation/devicetree/bindings/leds/leds-pwm.txt b/Documentation/devicetree/bindings/leds/leds-pwm.txt index 7297107cf832..6c6583c35f2f 100644 --- a/Documentation/devicetree/bindings/leds/leds-pwm.txt +++ b/Documentation/devicetree/bindings/leds/leds-pwm.txt | |||
| @@ -13,6 +13,8 @@ LED sub-node properties: | |||
| 13 | For the pwms and pwm-names property please refer to: | 13 | For the pwms and pwm-names property please refer to: |
| 14 | Documentation/devicetree/bindings/pwm/pwm.txt | 14 | Documentation/devicetree/bindings/pwm/pwm.txt |
| 15 | - max-brightness : Maximum brightness possible for the LED | 15 | - max-brightness : Maximum brightness possible for the LED |
| 16 | - active-low : (optional) For PWMs where the LED is wired to supply | ||
| 17 | rather than ground. | ||
| 16 | - label : (optional) | 18 | - label : (optional) |
| 17 | see Documentation/devicetree/bindings/leds/common.txt | 19 | see Documentation/devicetree/bindings/leds/common.txt |
| 18 | - linux,default-trigger : (optional) | 20 | - linux,default-trigger : (optional) |
diff --git a/Documentation/devicetree/bindings/media/i2c/adv7604.txt b/Documentation/devicetree/bindings/media/i2c/adv7604.txt new file mode 100644 index 000000000000..c27cede3bd68 --- /dev/null +++ b/Documentation/devicetree/bindings/media/i2c/adv7604.txt | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | * Analog Devices ADV7604/11 video decoder with HDMI receiver | ||
| 2 | |||
| 3 | The ADV7604 and ADV7611 are multiformat video decoders with an integrated HDMI | ||
| 4 | receiver. The ADV7604 has four multiplexed HDMI inputs and one analog input, | ||
| 5 | and the ADV7611 has one HDMI input and no analog input. | ||
| 6 | |||
| 7 | These device tree bindings support the ADV7611 only at the moment. | ||
| 8 | |||
| 9 | Required Properties: | ||
| 10 | |||
| 11 | - compatible: Must contain one of the following | ||
| 12 | - "adi,adv7611" for the ADV7611 | ||
| 13 | |||
| 14 | - reg: I2C slave address | ||
| 15 | |||
| 16 | - hpd-gpios: References to the GPIOs that control the HDMI hot-plug | ||
| 17 | detection pins, one per HDMI input. The active flag indicates the GPIO | ||
| 18 | level that enables hot-plug detection. | ||
| 19 | |||
| 20 | The device node must contain one 'port' child node per device input and output | ||
| 21 | port, in accordance with the video interface bindings defined in | ||
| 22 | Documentation/devicetree/bindings/media/video-interfaces.txt. The port nodes | ||
| 23 | are numbered as follows. | ||
| 24 | |||
| 25 | Port ADV7611 | ||
| 26 | ------------------------------------------------------------ | ||
| 27 | HDMI 0 | ||
| 28 | Digital output 1 | ||
| 29 | |||
| 30 | The digital output port node must contain at least one endpoint. | ||
| 31 | |||
| 32 | Optional Properties: | ||
| 33 | |||
| 34 | - reset-gpios: Reference to the GPIO connected to the device's reset pin. | ||
| 35 | |||
| 36 | Optional Endpoint Properties: | ||
| 37 | |||
| 38 | The following three properties are defined in video-interfaces.txt and are | ||
| 39 | valid for source endpoints only. | ||
| 40 | |||
| 41 | - hsync-active: Horizontal synchronization polarity. Defaults to active low. | ||
| 42 | - vsync-active: Vertical synchronization polarity. Defaults to active low. | ||
| 43 | - pclk-sample: Pixel clock polarity. Defaults to output on the falling edge. | ||
| 44 | |||
| 45 | If none of hsync-active, vsync-active and pclk-sample is specified the | ||
| 46 | endpoint will use embedded BT.656 synchronization. | ||
| 47 | |||
| 48 | |||
| 49 | Example: | ||
| 50 | |||
| 51 | hdmi_receiver@4c { | ||
| 52 | compatible = "adi,adv7611"; | ||
| 53 | reg = <0x4c>; | ||
| 54 | |||
| 55 | reset-gpios = <&ioexp 0 GPIO_ACTIVE_LOW>; | ||
| 56 | hpd-gpios = <&ioexp 2 GPIO_ACTIVE_HIGH>; | ||
| 57 | |||
| 58 | #address-cells = <1>; | ||
| 59 | #size-cells = <0>; | ||
| 60 | |||
| 61 | port@0 { | ||
| 62 | reg = <0>; | ||
| 63 | }; | ||
| 64 | port@1 { | ||
| 65 | reg = <1>; | ||
| 66 | hdmi_in: endpoint { | ||
| 67 | remote-endpoint = <&ccdc_in>; | ||
| 68 | }; | ||
| 69 | }; | ||
| 70 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.txt b/Documentation/devicetree/bindings/media/renesas,vsp1.txt new file mode 100644 index 000000000000..87fe08abf36d --- /dev/null +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.txt | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | * Renesas VSP1 Video Processing Engine | ||
| 2 | |||
| 3 | The VSP1 is a video processing engine that supports up-/down-scaling, alpha | ||
| 4 | blending, color space conversion and various other image processing features. | ||
| 5 | It can be found in the Renesas R-Car second generation SoCs. | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | |||
| 9 | - compatible: Must contain "renesas,vsp1" | ||
| 10 | |||
| 11 | - reg: Base address and length of the registers block for the VSP1. | ||
| 12 | - interrupts: VSP1 interrupt specifier. | ||
| 13 | - clocks: A phandle + clock-specifier pair for the VSP1 functional clock. | ||
| 14 | |||
| 15 | - renesas,#rpf: Number of Read Pixel Formatter (RPF) modules in the VSP1. | ||
| 16 | - renesas,#uds: Number of Up Down Scaler (UDS) modules in the VSP1. | ||
| 17 | - renesas,#wpf: Number of Write Pixel Formatter (WPF) modules in the VSP1. | ||
| 18 | |||
| 19 | |||
| 20 | Optional properties: | ||
| 21 | |||
| 22 | - renesas,has-lif: Boolean, indicates that the LCD Interface (LIF) module is | ||
| 23 | available. | ||
| 24 | - renesas,has-lut: Boolean, indicates that the Look Up Table (LUT) module is | ||
| 25 | available. | ||
| 26 | - renesas,has-sru: Boolean, indicates that the Super Resolution Unit (SRU) | ||
| 27 | module is available. | ||
| 28 | |||
| 29 | |||
| 30 | Example: R8A7790 (R-Car H2) VSP1-S node | ||
| 31 | |||
| 32 | vsp1@fe928000 { | ||
| 33 | compatible = "renesas,vsp1"; | ||
| 34 | reg = <0 0xfe928000 0 0x8000>; | ||
| 35 | interrupts = <0 267 IRQ_TYPE_LEVEL_HIGH>; | ||
| 36 | clocks = <&mstp1_clks R8A7790_CLK_VSP1_S>; | ||
| 37 | |||
| 38 | renesas,has-lut; | ||
| 39 | renesas,has-sru; | ||
| 40 | renesas,#rpf = <5>; | ||
| 41 | renesas,#uds = <3>; | ||
| 42 | renesas,#wpf = <4>; | ||
| 43 | }; | ||
diff --git a/Documentation/devicetree/bindings/media/s5p-mfc.txt b/Documentation/devicetree/bindings/media/s5p-mfc.txt index f4181680831b..3e3c5f349570 100644 --- a/Documentation/devicetree/bindings/media/s5p-mfc.txt +++ b/Documentation/devicetree/bindings/media/s5p-mfc.txt | |||
| @@ -10,7 +10,8 @@ Required properties: | |||
| 10 | - compatible : value should be either one among the following | 10 | - compatible : value should be either one among the following |
| 11 | (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs | 11 | (a) "samsung,mfc-v5" for MFC v5 present in Exynos4 SoCs |
| 12 | (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs | 12 | (b) "samsung,mfc-v6" for MFC v6 present in Exynos5 SoCs |
| 13 | (b) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC | 13 | (c) "samsung,mfc-v7" for MFC v7 present in Exynos5420 SoC |
| 14 | (d) "samsung,mfc-v8" for MFC v8 present in Exynos5800 SoC | ||
| 14 | 15 | ||
| 15 | - reg : Physical base address of the IP registers and length of memory | 16 | - reg : Physical base address of the IP registers and length of memory |
| 16 | mapped region. | 17 | mapped region. |
diff --git a/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt b/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt index 653c90c34a71..1ee3bc09f319 100644 --- a/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt +++ b/Documentation/devicetree/bindings/memory-controllers/mvebu-devbus.txt | |||
| @@ -6,10 +6,11 @@ The actual devices are instantiated from the child nodes of a Device Bus node. | |||
| 6 | 6 | ||
| 7 | Required properties: | 7 | Required properties: |
| 8 | 8 | ||
| 9 | - compatible: Currently only Armada 370/XP SoC are supported, | 9 | - compatible: Armada 370/XP SoC are supported using the |
| 10 | with this compatible string: | 10 | "marvell,mvebu-devbus" compatible string. |
| 11 | 11 | ||
| 12 | marvell,mvebu-devbus | 12 | Orion5x SoC are supported using the |
| 13 | "marvell,orion-devbus" compatible string. | ||
| 13 | 14 | ||
| 14 | - reg: A resource specifier for the register space. | 15 | - reg: A resource specifier for the register space. |
| 15 | This is the base address of a chip select within | 16 | This is the base address of a chip select within |
| @@ -22,7 +23,14 @@ Required properties: | |||
| 22 | integer values for each chip-select line in use: | 23 | integer values for each chip-select line in use: |
| 23 | 0 <physical address of mapping> <size> | 24 | 0 <physical address of mapping> <size> |
| 24 | 25 | ||
| 25 | Mandatory timing properties for child nodes: | 26 | Optional properties: |
| 27 | |||
| 28 | - devbus,keep-config This property can optionally be used to keep | ||
| 29 | using the timing parameters set by the | ||
| 30 | bootloader. It makes all the timing properties | ||
| 31 | described below unused. | ||
| 32 | |||
| 33 | Timing properties for child nodes: | ||
| 26 | 34 | ||
| 27 | Read parameters: | 35 | Read parameters: |
| 28 | 36 | ||
| @@ -30,21 +38,26 @@ Read parameters: | |||
| 30 | drive the AD bus after the completion of a device read. | 38 | drive the AD bus after the completion of a device read. |
| 31 | This prevents contentions on the Device Bus after a read | 39 | This prevents contentions on the Device Bus after a read |
| 32 | cycle from a slow device. | 40 | cycle from a slow device. |
| 41 | Mandatory, except if devbus,keep-config is used. | ||
| 33 | 42 | ||
| 34 | - devbus,bus-width: Defines the bus width (e.g. <16>) | 43 | - devbus,bus-width: Defines the bus width, in bits (e.g. <16>). |
| 44 | Mandatory, except if devbus,keep-config is used. | ||
| 35 | 45 | ||
| 36 | - devbus,badr-skew-ps: Defines the time delay from from A[2:0] toggle, | 46 | - devbus,badr-skew-ps: Defines the time delay from from A[2:0] toggle, |
| 37 | to read data sample. This parameter is useful for | 47 | to read data sample. This parameter is useful for |
| 38 | synchronous pipelined devices, where the address | 48 | synchronous pipelined devices, where the address |
| 39 | precedes the read data by one or two cycles. | 49 | precedes the read data by one or two cycles. |
| 50 | Mandatory, except if devbus,keep-config is used. | ||
| 40 | 51 | ||
| 41 | - devbus,acc-first-ps: Defines the time delay from the negation of | 52 | - 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 | 53 | ALE[0] to the cycle that the first read data is sampled |
| 43 | by the controller. | 54 | by the controller. |
| 55 | Mandatory, except if devbus,keep-config is used. | ||
| 44 | 56 | ||
| 45 | - devbus,acc-next-ps: Defines the time delay between the cycle that | 57 | - devbus,acc-next-ps: Defines the time delay between the cycle that |
| 46 | samples data N and the cycle that samples data N+1 | 58 | samples data N and the cycle that samples data N+1 |
| 47 | (in burst accesses). | 59 | (in burst accesses). |
| 60 | Mandatory, except if devbus,keep-config is used. | ||
| 48 | 61 | ||
| 49 | - devbus,rd-setup-ps: Defines the time delay between DEV_CSn assertion to | 62 | - devbus,rd-setup-ps: Defines the time delay between DEV_CSn assertion to |
| 50 | DEV_OEn assertion. If set to 0 (default), | 63 | DEV_OEn assertion. If set to 0 (default), |
| @@ -52,6 +65,8 @@ Read parameters: | |||
| 52 | This parameter has no affect on <acc-first-ps> parameter | 65 | This parameter has no affect on <acc-first-ps> parameter |
| 53 | (no affect on first data sample). Set <rd-setup-ps> | 66 | (no affect on first data sample). Set <rd-setup-ps> |
| 54 | to a value smaller than <acc-first-ps>. | 67 | to a value smaller than <acc-first-ps>. |
| 68 | Mandatory for "marvell,mvebu-devbus" compatible string, | ||
| 69 | except if devbus,keep-config is used. | ||
| 55 | 70 | ||
| 56 | - devbus,rd-hold-ps: Defines the time between the last data sample to the | 71 | - 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), | 72 | de-assertion of DEV_CSn. If set to 0 (default), |
| @@ -62,16 +77,20 @@ Read parameters: | |||
| 62 | last data sampled. Also this parameter has no | 77 | last data sampled. Also this parameter has no |
| 63 | affect on <turn-off-ps> parameter. | 78 | affect on <turn-off-ps> parameter. |
| 64 | Set <rd-hold-ps> to a value smaller than <turn-off-ps>. | 79 | Set <rd-hold-ps> to a value smaller than <turn-off-ps>. |
| 80 | Mandatory for "marvell,mvebu-devbus" compatible string, | ||
| 81 | except if devbus,keep-config is used. | ||
| 65 | 82 | ||
| 66 | Write parameters: | 83 | Write parameters: |
| 67 | 84 | ||
| 68 | - devbus,ale-wr-ps: Defines the time delay from the ALE[0] negation cycle | 85 | - devbus,ale-wr-ps: Defines the time delay from the ALE[0] negation cycle |
| 69 | to the DEV_WEn assertion. | 86 | to the DEV_WEn assertion. |
| 87 | Mandatory. | ||
| 70 | 88 | ||
| 71 | - devbus,wr-low-ps: Defines the time during which DEV_WEn is active. | 89 | - 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 | 90 | A[2:0] and Data are kept valid as long as DEV_WEn |
| 73 | is active. This parameter defines the setup time of | 91 | is active. This parameter defines the setup time of |
| 74 | address and data to DEV_WEn rise. | 92 | address and data to DEV_WEn rise. |
| 93 | Mandatory. | ||
| 75 | 94 | ||
| 76 | - devbus,wr-high-ps: Defines the time during which DEV_WEn is kept | 95 | - devbus,wr-high-ps: Defines the time during which DEV_WEn is kept |
| 77 | inactive (high) between data beats of a burst write. | 96 | inactive (high) between data beats of a burst write. |
| @@ -79,10 +98,13 @@ Write parameters: | |||
| 79 | <wr-high-ps> - <tick> ps. | 98 | <wr-high-ps> - <tick> ps. |
| 80 | This parameter defines the hold time of address and | 99 | This parameter defines the hold time of address and |
| 81 | data after DEV_WEn rise. | 100 | data after DEV_WEn rise. |
| 101 | Mandatory. | ||
| 82 | 102 | ||
| 83 | - devbus,sync-enable: Synchronous device enable. | 103 | - devbus,sync-enable: Synchronous device enable. |
| 84 | 1: True | 104 | 1: True |
| 85 | 0: False | 105 | 0: False |
| 106 | Mandatory for "marvell,mvebu-devbus" compatible string, | ||
| 107 | except if devbus,keep-config is used. | ||
| 86 | 108 | ||
| 87 | An example for an Armada XP GP board, with a 16 MiB NOR device as child | 109 | 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 | 110 | is showed below. Note that the Device Bus driver is in charge of allocating |
diff --git a/Documentation/devicetree/bindings/mfd/bcm590xx.txt b/Documentation/devicetree/bindings/mfd/bcm590xx.txt index 1fe30e2b10da..be51a15e05f9 100644 --- a/Documentation/devicetree/bindings/mfd/bcm590xx.txt +++ b/Documentation/devicetree/bindings/mfd/bcm590xx.txt | |||
| @@ -19,7 +19,9 @@ Optional child nodes: | |||
| 19 | The valid regulator node names for BCM59056 are: | 19 | The valid regulator node names for BCM59056 are: |
| 20 | rfldo, camldo1, camldo2, simldo1, simldo2, sdldo, sdxldo, | 20 | rfldo, camldo1, camldo2, simldo1, simldo2, sdldo, sdxldo, |
| 21 | mmcldo1, mmcldo2, audldo, micldo, usbldo, vibldo, | 21 | mmcldo1, mmcldo2, audldo, micldo, usbldo, vibldo, |
| 22 | csr, iosr1, iosr2, msr, sdsr1, sdsr2, vsr | 22 | csr, iosr1, iosr2, msr, sdsr1, sdsr2, vsr, |
| 23 | gpldo1, gpldo2, gpldo3, gpldo4, gpldo5, gpldo6, | ||
| 24 | vbus | ||
| 23 | 25 | ||
| 24 | Example: | 26 | Example: |
| 25 | pmu: bcm59056@8 { | 27 | pmu: bcm59056@8 { |
diff --git a/Documentation/devicetree/bindings/mfd/bfticu.txt b/Documentation/devicetree/bindings/mfd/bfticu.txt new file mode 100644 index 000000000000..65c90776c620 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/bfticu.txt | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | KEYMILE bfticu Chassis Management FPGA | ||
| 2 | |||
| 3 | The bfticu is a multifunction device that manages the whole chassis. | ||
| 4 | Its main functionality is to collect IRQs from the whole chassis and signals | ||
| 5 | them to a single controller. | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | - compatible: "keymile,bfticu" | ||
| 9 | - interrupt-controller: the bfticu FPGA is an interrupt controller | ||
| 10 | - interrupts: the main IRQ line to signal the collected IRQs | ||
| 11 | - #interrupt-cells : is 2 and their usage is compliant to the 2 cells variant | ||
| 12 | of Documentation/devicetree/bindings/interrupt-controller/interrupts.txt | ||
| 13 | - interrupt-parent: the parent IRQ ctrl the main IRQ is connected to | ||
| 14 | - reg: access on the parent local bus (chip select, offset in chip select, size) | ||
| 15 | |||
| 16 | Example: | ||
| 17 | |||
| 18 | chassis-mgmt@3,0 { | ||
| 19 | compatible = "keymile,bfticu"; | ||
| 20 | interrupt-controller; | ||
| 21 | #interrupt-cells = <2>; | ||
| 22 | reg = <3 0 0x100>; | ||
| 23 | interrupt-parent = <&mpic>; | ||
| 24 | interrupts = <6 1 0 0>; | ||
| 25 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/mc13xxx.txt b/Documentation/devicetree/bindings/mfd/mc13xxx.txt index 1413f39912d3..8aba48821a85 100644 --- a/Documentation/devicetree/bindings/mfd/mc13xxx.txt +++ b/Documentation/devicetree/bindings/mfd/mc13xxx.txt | |||
| @@ -10,6 +10,9 @@ Optional properties: | |||
| 10 | - fsl,mc13xxx-uses-touch : Indicate the touchscreen controller is being used | 10 | - fsl,mc13xxx-uses-touch : Indicate the touchscreen controller is being used |
| 11 | 11 | ||
| 12 | Sub-nodes: | 12 | Sub-nodes: |
| 13 | - codec: Contain the Audio Codec node. | ||
| 14 | - adc-port: Contain PMIC SSI port number used for ADC. | ||
| 15 | - dac-port: Contain PMIC SSI port number used for DAC. | ||
| 13 | - leds : Contain the led nodes and initial register values in property | 16 | - leds : Contain the led nodes and initial register values in property |
| 14 | "led-control". Number of register depends of used IC, for MC13783 is 6, | 17 | "led-control". Number of register depends of used IC, for MC13783 is 6, |
| 15 | for MC13892 is 4, for MC34708 is 1. See datasheet for bits definitions of | 18 | for MC13892 is 4, for MC34708 is 1. See datasheet for bits definitions of |
diff --git a/Documentation/devicetree/bindings/mfd/qriox.txt b/Documentation/devicetree/bindings/mfd/qriox.txt new file mode 100644 index 000000000000..f301e2d4ce76 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/qriox.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | KEYMILE qrio Board Control CPLD | ||
| 2 | |||
| 3 | The qrio is a multifunction device that controls the KEYMILE boards based on | ||
| 4 | the kmp204x design. | ||
| 5 | It is consists of a reset controller, watchdog timer, LEDs, and 2 IRQ capable | ||
| 6 | GPIO blocks. | ||
| 7 | |||
| 8 | Required properties: | ||
| 9 | - compatible: "keymile,qriox" | ||
| 10 | - reg: access on the parent local bus (chip select, offset in chip select, size) | ||
| 11 | |||
| 12 | Example: | ||
| 13 | |||
| 14 | board-control@1,0 { | ||
| 15 | compatible = "keymile,qriox"; | ||
| 16 | reg = <1 0 0x80>; | ||
| 17 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt index 802e839b0829..d81ba30c0d8b 100644 --- a/Documentation/devicetree/bindings/mfd/s2mps11.txt +++ b/Documentation/devicetree/bindings/mfd/s2mps11.txt | |||
| @@ -56,6 +56,20 @@ for a particular group of BUCKs. So provide same regulator-ramp-delay<value>. | |||
| 56 | Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6], | 56 | Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6], |
| 57 | BUCK[3, 4], and BUCK[7, 8, 10] | 57 | BUCK[3, 4], and BUCK[7, 8, 10] |
| 58 | 58 | ||
| 59 | On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control | ||
| 60 | over GPIO. To turn this feature on this property must be added to the regulator | ||
| 61 | sub-node: | ||
| 62 | - samsung,ext-control-gpios: GPIO specifier for one GPIO | ||
| 63 | controlling this regulator (enable/disable); | ||
| 64 | Example: | ||
| 65 | LDO12 { | ||
| 66 | regulator-name = "V_EMMC_2.8V"; | ||
| 67 | regulator-min-microvolt = <2800000>; | ||
| 68 | regulator-max-microvolt = <2800000>; | ||
| 69 | samsung,ext-control-gpios = <&gpk0 2 0>; | ||
| 70 | }; | ||
| 71 | |||
| 72 | |||
| 59 | The regulator constraints inside the regulator nodes use the standard regulator | 73 | The regulator constraints inside the regulator nodes use the standard regulator |
| 60 | bindings which are documented elsewhere. | 74 | bindings which are documented elsewhere. |
| 61 | 75 | ||
diff --git a/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt new file mode 100644 index 000000000000..1f5a31fef907 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/sun6i-prcm.txt | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | * Allwinner PRCM (Power/Reset/Clock Management) Multi-Functional Device | ||
| 2 | |||
| 3 | PRCM is an MFD device exposing several Power Management related devices | ||
| 4 | (like clks and reset controllers). | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: "allwinner,sun6i-a31-prcm" | ||
| 8 | - reg: The PRCM registers range | ||
| 9 | |||
| 10 | The prcm node may contain several subdevices definitions: | ||
| 11 | - see Documentation/devicetree/clk/sunxi.txt for clock devices | ||
| 12 | - see Documentation/devicetree/reset/allwinner,sunxi-clock-reset.txt for reset | ||
| 13 | controller devices | ||
| 14 | |||
| 15 | |||
| 16 | Example: | ||
| 17 | |||
| 18 | prcm: prcm@01f01400 { | ||
| 19 | compatible = "allwinner,sun6i-a31-prcm"; | ||
| 20 | reg = <0x01f01400 0x200>; | ||
| 21 | |||
| 22 | /* Put subdevices here */ | ||
| 23 | ar100: ar100_clk { | ||
| 24 | compatible = "allwinner,sun6i-a31-ar100-clk"; | ||
| 25 | #clock-cells = <0>; | ||
| 26 | clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>; | ||
| 27 | }; | ||
| 28 | |||
| 29 | ahb0: ahb0_clk { | ||
| 30 | compatible = "fixed-factor-clock"; | ||
| 31 | #clock-cells = <0>; | ||
| 32 | clock-div = <1>; | ||
| 33 | clock-mult = <1>; | ||
| 34 | clocks = <&ar100_div>; | ||
| 35 | clock-output-names = "ahb0"; | ||
| 36 | }; | ||
| 37 | |||
| 38 | apb0: apb0_clk { | ||
| 39 | compatible = "allwinner,sun6i-a31-apb0-clk"; | ||
| 40 | #clock-cells = <0>; | ||
| 41 | clocks = <&ahb0>; | ||
| 42 | clock-output-names = "apb0"; | ||
| 43 | }; | ||
| 44 | |||
| 45 | apb0_gates: apb0_gates_clk { | ||
| 46 | compatible = "allwinner,sun6i-a31-apb0-gates-clk"; | ||
| 47 | #clock-cells = <1>; | ||
| 48 | clocks = <&apb0>; | ||
| 49 | clock-output-names = "apb0_pio", "apb0_ir", | ||
| 50 | "apb0_timer01", "apb0_p2wi", | ||
| 51 | "apb0_uart", "apb0_1wire", | ||
| 52 | "apb0_i2c"; | ||
| 53 | }; | ||
| 54 | |||
| 55 | apb0_rst: apb0_rst { | ||
| 56 | compatible = "allwinner,sun6i-a31-clock-reset"; | ||
| 57 | #reset-cells = <1>; | ||
| 58 | }; | ||
| 59 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt b/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt new file mode 100644 index 000000000000..20963c76b4bc --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | * Device tree bindings for Texas Instruments keystone device state control | ||
| 2 | |||
| 3 | The Keystone II devices have a set of registers that are used to control | ||
| 4 | the status of its peripherals. This node is intended to allow access to | ||
| 5 | this functionality. | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | |||
| 9 | - compatible: "ti,keystone-devctrl", "syscon" | ||
| 10 | |||
| 11 | - reg: contains offset/length value for device state control | ||
| 12 | registers space. | ||
| 13 | |||
| 14 | Example: | ||
| 15 | |||
| 16 | devctrl: device-state-control@0x02620000 { | ||
| 17 | compatible = "ti,keystone-devctrl", "syscon"; | ||
| 18 | reg = <0x02620000 0x1000>; | ||
| 19 | }; | ||
diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt index 8e15ec35ac99..b9ee7b98d3e2 100644 --- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt +++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt | |||
| @@ -5,7 +5,22 @@ to control the power resources, including power scripts. For now, the | |||
| 5 | binding only supports the complete shutdown of the system after poweroff. | 5 | binding only supports the complete shutdown of the system after poweroff. |
| 6 | 6 | ||
| 7 | Required properties: | 7 | Required properties: |
| 8 | - compatible : must be "ti,twl4030-power" | 8 | - compatible : must be one of the following |
| 9 | "ti,twl4030-power" | ||
| 10 | "ti,twl4030-power-reset" | ||
| 11 | "ti,twl4030-power-idle" | ||
| 12 | "ti,twl4030-power-idle-osc-off" | ||
| 13 | |||
| 14 | The use of ti,twl4030-power-reset is recommended at least on | ||
| 15 | 3530 that needs a special configuration for warm reset to work. | ||
| 16 | |||
| 17 | When using ti,twl4030-power-idle, the TI recommended configuration | ||
| 18 | for idle modes is loaded to the tlw4030 PMIC. | ||
| 19 | |||
| 20 | When using ti,twl4030-power-idle-osc-off, the TI recommended | ||
| 21 | configuration is used with the external oscillator being shut | ||
| 22 | down during off-idle. Note that this does not work on all boards | ||
| 23 | depending on how the external oscillator is wired. | ||
| 9 | 24 | ||
| 10 | Optional properties: | 25 | Optional properties: |
| 11 | - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or | 26 | - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or |
diff --git a/Documentation/devicetree/bindings/mfd/twl6040.txt b/Documentation/devicetree/bindings/mfd/twl6040.txt index 0f5dd709d752..a41157b5d930 100644 --- a/Documentation/devicetree/bindings/mfd/twl6040.txt +++ b/Documentation/devicetree/bindings/mfd/twl6040.txt | |||
| @@ -19,6 +19,8 @@ Required properties: | |||
| 19 | 19 | ||
| 20 | Optional properties, nodes: | 20 | Optional properties, nodes: |
| 21 | - enable-active-high: To power on the twl6040 during boot. | 21 | - enable-active-high: To power on the twl6040 during boot. |
| 22 | - clocks: phandle to the clk32k clock provider | ||
| 23 | - clock-names: Must be "clk32k" | ||
| 22 | 24 | ||
| 23 | Vibra functionality | 25 | Vibra functionality |
| 24 | Required properties: | 26 | Required properties: |
diff --git a/Documentation/devicetree/bindings/misc/arm-charlcd.txt b/Documentation/devicetree/bindings/misc/arm-charlcd.txt new file mode 100644 index 000000000000..e28e2aac47f1 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/arm-charlcd.txt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | ARM Versatile Character LCD | ||
| 2 | ----------------------------------------------------- | ||
| 3 | This binding defines the character LCD interface found on ARM Versatile AB | ||
| 4 | and PB reference platforms. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible : "arm,versatile-clcd" | ||
| 8 | - reg : Location and size of character LCD registers | ||
| 9 | |||
| 10 | Optional properties: | ||
| 11 | - interrupts - single interrupt for character LCD. The character LCD can | ||
| 12 | operate in polled mode without an interrupt. | ||
| 13 | |||
| 14 | Example: | ||
| 15 | lcd@10008000 { | ||
| 16 | compatible = "arm,versatile-lcd"; | ||
| 17 | reg = <0x10008000 0x1000>; | ||
| 18 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt index b8653ea97957..e5bc49f764d1 100644 --- a/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/k3-dw-mshc.txt | |||
| @@ -12,7 +12,7 @@ extensions to the Synopsys Designware Mobile Storage Host Controller. | |||
| 12 | Required Properties: | 12 | Required Properties: |
| 13 | 13 | ||
| 14 | * compatible: should be one of the following. | 14 | * compatible: should be one of the following. |
| 15 | - "hisilicon,hi4511-dw-mshc": for controllers with hi4511 specific extentions. | 15 | - "hisilicon,hi4511-dw-mshc": for controllers with hi4511 specific extensions. |
| 16 | 16 | ||
| 17 | Example: | 17 | Example: |
| 18 | 18 | ||
diff --git a/Documentation/devicetree/bindings/mmc/mmc.txt b/Documentation/devicetree/bindings/mmc/mmc.txt index 9dce540771fb..3c18001dfd5d 100644 --- a/Documentation/devicetree/bindings/mmc/mmc.txt +++ b/Documentation/devicetree/bindings/mmc/mmc.txt | |||
| @@ -38,6 +38,8 @@ Optional properties: | |||
| 38 | - mmc-highspeed-ddr-1_2v: eMMC high-speed DDR mode(1.2V I/O) is supported | 38 | - mmc-highspeed-ddr-1_2v: eMMC high-speed DDR mode(1.2V I/O) is supported |
| 39 | - mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported | 39 | - mmc-hs200-1_8v: eMMC HS200 mode(1.8V I/O) is supported |
| 40 | - mmc-hs200-1_2v: eMMC HS200 mode(1.2V I/O) is supported | 40 | - mmc-hs200-1_2v: eMMC HS200 mode(1.2V I/O) is supported |
| 41 | - mmc-hs400-1_8v: eMMC HS400 mode(1.8V I/O) is supported | ||
| 42 | - mmc-hs400-1_2v: eMMC HS400 mode(1.2V I/O) is supported | ||
| 41 | 43 | ||
| 42 | *NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line | 44 | *NOTE* on CD and WP polarity. To use common for all SD/MMC host controllers line |
| 43 | polarity properties, we have to fix the meaning of the "normal" and "inverted" | 45 | polarity properties, we have to fix the meaning of the "normal" and "inverted" |
diff --git a/Documentation/devicetree/bindings/mmc/mmci.txt b/Documentation/devicetree/bindings/mmc/mmci.txt index 2b584cae352a..03796cf2d3e7 100644 --- a/Documentation/devicetree/bindings/mmc/mmci.txt +++ b/Documentation/devicetree/bindings/mmc/mmci.txt | |||
| @@ -4,12 +4,58 @@ The ARM PrimeCell MMCI PL180 and PL181 provides an interface for | |||
| 4 | reading and writing to MultiMedia and SD cards alike. | 4 | reading and writing to MultiMedia and SD cards alike. |
| 5 | 5 | ||
| 6 | This file documents differences between the core properties described | 6 | This file documents differences between the core properties described |
| 7 | by mmc.txt and the properties used by the mmci driver. | 7 | by mmc.txt and the properties used by the mmci driver. Using "st" as |
| 8 | the prefix for a property, indicates support by the ST Micro variant. | ||
| 8 | 9 | ||
| 9 | Required properties: | 10 | Required properties: |
| 10 | - compatible : contains "arm,pl18x", "arm,primecell". | 11 | - compatible : contains "arm,pl18x", "arm,primecell". |
| 11 | - arm,primecell-periphid : contains the PrimeCell Peripheral ID. | 12 | - vmmc-supply : phandle to the regulator device tree node, mentioned |
| 13 | as the VCC/VDD supply in the eMMC/SD specs. | ||
| 12 | 14 | ||
| 13 | Optional properties: | 15 | Optional properties: |
| 14 | - mmc-cap-mmc-highspeed : indicates whether MMC is high speed capable | 16 | - arm,primecell-periphid : contains the PrimeCell Peripheral ID, it overrides |
| 15 | - mmc-cap-sd-highspeed : indicates whether SD is high speed capable | 17 | the ID provided by the HW |
| 18 | - vqmmc-supply : phandle to the regulator device tree node, mentioned | ||
| 19 | as the VCCQ/VDD_IO supply in the eMMC/SD specs. | ||
| 20 | - st,sig-dir-dat0 : bus signal direction pin used for DAT[0]. | ||
| 21 | - st,sig-dir-dat2 : bus signal direction pin used for DAT[2]. | ||
| 22 | - st,sig-dir-dat31 : bus signal direction pin used for DAT[3] and DAT[1]. | ||
| 23 | - st,sig-dir-dat74 : bus signal direction pin used for DAT[4] to DAT[7]. | ||
| 24 | - st,sig-dir-cmd : cmd signal direction pin used for CMD. | ||
| 25 | - st,sig-pin-fbclk : feedback clock signal pin used. | ||
| 26 | |||
| 27 | Deprecated properties: | ||
| 28 | - mmc-cap-mmc-highspeed : indicates whether MMC is high speed capable. | ||
| 29 | - mmc-cap-sd-highspeed : indicates whether SD is high speed capable. | ||
| 30 | |||
| 31 | Example: | ||
| 32 | |||
| 33 | sdi0_per1@80126000 { | ||
| 34 | compatible = "arm,pl18x", "arm,primecell"; | ||
| 35 | reg = <0x80126000 0x1000>; | ||
| 36 | interrupts = <0 60 IRQ_TYPE_LEVEL_HIGH>; | ||
| 37 | |||
| 38 | dmas = <&dma 29 0 0x2>, /* Logical - DevToMem */ | ||
| 39 | <&dma 29 0 0x0>; /* Logical - MemToDev */ | ||
| 40 | dma-names = "rx", "tx"; | ||
| 41 | |||
| 42 | clocks = <&prcc_kclk 1 5>, <&prcc_pclk 1 5>; | ||
| 43 | clock-names = "sdi", "apb_pclk"; | ||
| 44 | |||
| 45 | max-frequency = <100000000>; | ||
| 46 | bus-width = <4>; | ||
| 47 | cap-sd-highspeed; | ||
| 48 | cap-mmc-highspeed; | ||
| 49 | cd-gpios = <&gpio2 31 0x4>; // 95 | ||
| 50 | st,sig-dir-dat0; | ||
| 51 | st,sig-dir-dat2; | ||
| 52 | st,sig-dir-cmd; | ||
| 53 | st,sig-pin-fbclk; | ||
| 54 | |||
| 55 | vmmc-supply = <&ab8500_ldo_aux3_reg>; | ||
| 56 | vqmmc-supply = <&vmmci>; | ||
| 57 | |||
| 58 | pinctrl-names = "default", "sleep"; | ||
| 59 | pinctrl-0 = <&sdi0_default_mode>; | ||
| 60 | pinctrl-1 = <&sdi0_sleep_mode>; | ||
| 61 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt b/Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt new file mode 100644 index 000000000000..b63819149f22 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/moxa,moxart-mmc.txt | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | MOXA ART MMC Host Controller Interface | ||
| 2 | |||
| 3 | Inherits from mmc binding[1]. | ||
| 4 | |||
| 5 | [1] Documentation/devicetree/bindings/mmc/mmc.txt | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | |||
| 9 | - compatible : Must be "moxa,moxart-mmc" or "faraday,ftsdc010" | ||
| 10 | - reg : Should contain registers location and length | ||
| 11 | - interrupts : Should contain the interrupt number | ||
| 12 | - clocks : Should contain phandle for the clock feeding the MMC controller | ||
| 13 | |||
| 14 | Optional properties: | ||
| 15 | |||
| 16 | - dmas : Should contain two DMA channels, line request number must be 5 for | ||
| 17 | both channels | ||
| 18 | - dma-names : Must be "tx", "rx" | ||
| 19 | |||
| 20 | Example: | ||
| 21 | |||
| 22 | mmc: mmc@98e00000 { | ||
| 23 | compatible = "moxa,moxart-mmc"; | ||
| 24 | reg = <0x98e00000 0x5C>; | ||
| 25 | interrupts = <5 0>; | ||
| 26 | clocks = <&clk_apb>; | ||
| 27 | dmas = <&dma 5>, | ||
| 28 | <&dma 5>; | ||
| 29 | dma-names = "tx", "rx"; | ||
| 30 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt b/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt index 328e990d2546..42e0a9afa100 100644 --- a/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt +++ b/Documentation/devicetree/bindings/mmc/samsung-sdhci.txt | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | Samsung's SDHCI controller is used as a connectivity interface with external | 3 | Samsung's SDHCI controller is used as a connectivity interface with external |
| 4 | MMC, SD and eMMC storage mediums. This file documents differences between the | 4 | MMC, SD and eMMC storage mediums. This file documents differences between the |
| 5 | core mmc properties described by mmc.txt and the properties used by the | 5 | core mmc properties described by mmc.txt and the properties used by the |
| 6 | Samsung implmentation of the SDHCI controller. | 6 | Samsung implementation of the SDHCI controller. |
| 7 | 7 | ||
| 8 | Required SoC Specific Properties: | 8 | Required SoC Specific Properties: |
| 9 | - compatible: should be one of the following | 9 | - compatible: should be one of the following |
diff --git a/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt new file mode 100644 index 000000000000..91b3a3467150 --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/sunxi-mmc.txt | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | * Allwinner sunxi MMC controller | ||
| 2 | |||
| 3 | The highspeed MMC host controller on Allwinner SoCs provides an interface | ||
| 4 | for MMC, SD and SDIO types of memory cards. | ||
| 5 | |||
| 6 | Supported maximum speeds are the ones of the eMMC standard 4.5 as well | ||
| 7 | as the speed of SD standard 3.0. | ||
| 8 | Absolute maximum transfer rate is 200MB/s | ||
| 9 | |||
| 10 | Required properties: | ||
| 11 | - compatible : "allwinner,sun4i-a10-mmc" or "allwinner,sun5i-a13-mmc" | ||
| 12 | - reg : mmc controller base registers | ||
| 13 | - clocks : a list with 2 phandle + clock specifier pairs | ||
| 14 | - clock-names : must contain "ahb" and "mmc" | ||
| 15 | - interrupts : mmc controller interrupt | ||
| 16 | |||
| 17 | Optional properties: | ||
| 18 | - resets : phandle + reset specifier pair | ||
| 19 | - reset-names : must contain "ahb" | ||
| 20 | - for cd, bus-width and additional generic mmc parameters | ||
| 21 | please refer to mmc.txt within this directory | ||
| 22 | |||
| 23 | Examples: | ||
| 24 | - Within .dtsi: | ||
| 25 | mmc0: mmc@01c0f000 { | ||
| 26 | compatible = "allwinner,sun5i-a13-mmc"; | ||
| 27 | reg = <0x01c0f000 0x1000>; | ||
| 28 | clocks = <&ahb_gates 8>, <&mmc0_clk>; | ||
| 29 | clock-names = "ahb", "mod"; | ||
| 30 | interrupts = <0 32 4>; | ||
| 31 | status = "disabled"; | ||
| 32 | }; | ||
| 33 | |||
| 34 | - Within dts: | ||
| 35 | mmc0: mmc@01c0f000 { | ||
| 36 | pinctrl-names = "default", "default"; | ||
| 37 | pinctrl-0 = <&mmc0_pins_a>; | ||
| 38 | pinctrl-1 = <&mmc0_cd_pin_reference_design>; | ||
| 39 | bus-width = <4>; | ||
| 40 | cd-gpios = <&pio 7 1 0>; /* PH1 */ | ||
| 41 | cd-inverted; | ||
| 42 | status = "okay"; | ||
| 43 | }; | ||
diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt index 8f3f13315358..2d4a7258a10d 100644 --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | |||
| @@ -69,10 +69,6 @@ Optional properties: | |||
| 69 | 69 | ||
| 70 | * supports-highspeed: Enables support for high speed cards (up to 50MHz) | 70 | * supports-highspeed: Enables support for high speed cards (up to 50MHz) |
| 71 | 71 | ||
| 72 | * caps2-mmc-hs200-1_8v: Supports mmc HS200 SDR 1.8V mode | ||
| 73 | |||
| 74 | * caps2-mmc-hs200-1_2v: Supports mmc HS200 SDR 1.2V mode | ||
| 75 | |||
| 76 | * broken-cd: as documented in mmc core bindings. | 72 | * broken-cd: as documented in mmc core bindings. |
| 77 | 73 | ||
| 78 | * vmmc-supply: The phandle to the regulator to use for vmmc. If this is | 74 | * vmmc-supply: The phandle to the regulator to use for vmmc. If this is |
| @@ -103,7 +99,6 @@ board specific portions as listed below. | |||
| 103 | clock-freq-min-max = <400000 200000000>; | 99 | clock-freq-min-max = <400000 200000000>; |
| 104 | num-slots = <1>; | 100 | num-slots = <1>; |
| 105 | supports-highspeed; | 101 | supports-highspeed; |
| 106 | caps2-mmc-hs200-1_8v; | ||
| 107 | broken-cd; | 102 | broken-cd; |
| 108 | fifo-depth = <0x80>; | 103 | fifo-depth = <0x80>; |
| 109 | card-detect-delay = <200>; | 104 | card-detect-delay = <200>; |
diff --git a/Documentation/devicetree/bindings/mmc/usdhi6rol0.txt b/Documentation/devicetree/bindings/mmc/usdhi6rol0.txt new file mode 100644 index 000000000000..8babdaa8623b --- /dev/null +++ b/Documentation/devicetree/bindings/mmc/usdhi6rol0.txt | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | * Renesas usdhi6rol0 SD/SDIO host controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | |||
| 5 | - compatible: must be | ||
| 6 | "renesas,usdhi6rol0" | ||
| 7 | - interrupts: 3 interrupts, named "card detect", "data" and "SDIO" must be | ||
| 8 | specified | ||
| 9 | - clocks: a clock binding for the IMCLK input | ||
| 10 | |||
| 11 | Optional properties: | ||
| 12 | |||
| 13 | - vmmc-supply: a phandle of a regulator, supplying Vcc to the card | ||
| 14 | - vqmmc-supply: a phandle of a regulator, supplying VccQ to the card | ||
| 15 | |||
| 16 | Additionally any standard mmc bindings from mmc.txt can be used. | ||
| 17 | |||
| 18 | Example: | ||
| 19 | |||
| 20 | sd0: sd@ab000000 { | ||
| 21 | compatible = "renesas,usdhi6rol0"; | ||
| 22 | reg = <0xab000000 0x200>; | ||
| 23 | interrupts = <0 23 0x4 | ||
| 24 | 0 24 0x4 | ||
| 25 | 0 25 0x4>; | ||
| 26 | interrupt-names = "card detect", "data", "SDIO"; | ||
| 27 | bus-width = <4>; | ||
| 28 | max-frequency = <50000000>; | ||
| 29 | cap-power-off-card; | ||
| 30 | clocks = <&imclk>; | ||
| 31 | vmmc-supply = <&vcc_sd0>; | ||
| 32 | vqmmc-supply = <&vccq_sd0>; | ||
| 33 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt new file mode 100644 index 000000000000..823d13412195 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/fsl-quadspi.txt | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | * Freescale Quad Serial Peripheral Interface(QuadSPI) | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : Should be "fsl,vf610-qspi" | ||
| 5 | - reg : the first contains the register location and length, | ||
| 6 | the second contains the memory mapping address and length | ||
| 7 | - reg-names: Should contain the reg names "QuadSPI" and "QuadSPI-memory" | ||
| 8 | - interrupts : Should contain the interrupt for the device | ||
| 9 | - clocks : The clocks needed by the QuadSPI controller | ||
| 10 | - clock-names : the name of the clocks | ||
| 11 | |||
| 12 | Optional properties: | ||
| 13 | - fsl,qspi-has-second-chip: The controller has two buses, bus A and bus B. | ||
| 14 | Each bus can be connected with two NOR flashes. | ||
| 15 | Most of the time, each bus only has one NOR flash | ||
| 16 | connected, this is the default case. | ||
| 17 | But if there are two NOR flashes connected to the | ||
| 18 | bus, you should enable this property. | ||
| 19 | (Please check the board's schematic.) | ||
| 20 | |||
| 21 | Example: | ||
| 22 | |||
| 23 | qspi0: quadspi@40044000 { | ||
| 24 | compatible = "fsl,vf610-qspi"; | ||
| 25 | reg = <0x40044000 0x1000>, <0x20000000 0x10000000>; | ||
| 26 | reg-names = "QuadSPI", "QuadSPI-memory"; | ||
| 27 | interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>; | ||
| 28 | clocks = <&clks VF610_CLK_QSPI0_EN>, | ||
| 29 | <&clks VF610_CLK_QSPI0>; | ||
| 30 | clock-names = "qspi_en", "qspi"; | ||
| 31 | |||
| 32 | flash0: s25fl128s@0 { | ||
| 33 | .... | ||
| 34 | }; | ||
| 35 | }; | ||
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt index 5e1f31b5ff70..65f4f7c43136 100644 --- a/Documentation/devicetree/bindings/mtd/gpmc-nand.txt +++ b/Documentation/devicetree/bindings/mtd/gpmc-nand.txt | |||
| @@ -28,6 +28,8 @@ Optional properties: | |||
| 28 | "ham1" 1-bit Hamming ecc code | 28 | "ham1" 1-bit Hamming ecc code |
| 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 | "bch16" 16-bit BCH ECC code | ||
| 32 | Refer below "How to select correct ECC scheme for your device ?" | ||
| 31 | 33 | ||
| 32 | - ti,nand-xfer-type: A string setting the data transfer type. One of: | 34 | - ti,nand-xfer-type: A string setting the data transfer type. One of: |
| 33 | 35 | ||
| @@ -43,7 +45,7 @@ Optional properties: | |||
| 43 | ELM hardware engines should specify this device node in .dtsi | 45 | ELM hardware engines should specify this device node in .dtsi |
| 44 | Using ELM for ECC error correction frees some CPU cycles. | 46 | Using ELM for ECC error correction frees some CPU cycles. |
| 45 | 47 | ||
| 46 | For inline partiton table parsing (optional): | 48 | For inline partition table parsing (optional): |
| 47 | 49 | ||
| 48 | - #address-cells: should be set to 1 | 50 | - #address-cells: should be set to 1 |
| 49 | - #size-cells: should be set to 1 | 51 | - #size-cells: should be set to 1 |
| @@ -90,3 +92,46 @@ Example for an AM33xx board: | |||
| 90 | }; | 92 | }; |
| 91 | }; | 93 | }; |
| 92 | 94 | ||
| 95 | How to select correct ECC scheme for your device ? | ||
| 96 | -------------------------------------------------- | ||
| 97 | Higher ECC scheme usually means better protection against bit-flips and | ||
| 98 | increased system lifetime. However, selection of ECC scheme is dependent | ||
| 99 | on various other factors also like; | ||
| 100 | |||
| 101 | (1) support of built in hardware engines. | ||
| 102 | Some legacy OMAP SoC do not have ELM harware engine, so those SoC cannot | ||
| 103 | support ecc-schemes with hardware error-correction (BCHx_HW). However | ||
| 104 | such SoC can use ecc-schemes with software library for error-correction | ||
| 105 | (BCHx_HW_DETECTION_SW). The error correction capability with software | ||
| 106 | library remains equivalent to their hardware counter-part, but there is | ||
| 107 | slight CPU penalty when too many bit-flips are detected during reads. | ||
| 108 | |||
| 109 | (2) Device parameters like OOBSIZE. | ||
| 110 | Other factor which governs the selection of ecc-scheme is oob-size. | ||
| 111 | Higher ECC schemes require more OOB/Spare area to store ECC syndrome, | ||
| 112 | so the device should have enough free bytes available its OOB/Spare | ||
| 113 | area to accomodate ECC for entire page. In general following expression | ||
| 114 | helps in determining if given device can accomodate ECC syndrome: | ||
| 115 | "2 + (PAGESIZE / 512) * ECC_BYTES" >= OOBSIZE" | ||
| 116 | where | ||
| 117 | OOBSIZE number of bytes in OOB/spare area | ||
| 118 | PAGESIZE number of bytes in main-area of device page | ||
| 119 | ECC_BYTES number of ECC bytes generated to protect | ||
| 120 | 512 bytes of data, which is: | ||
| 121 | '3' for HAM1_xx ecc schemes | ||
| 122 | '7' for BCH4_xx ecc schemes | ||
| 123 | '14' for BCH8_xx ecc schemes | ||
| 124 | '26' for BCH16_xx ecc schemes | ||
| 125 | |||
| 126 | Example(a): For a device with PAGESIZE = 2048 and OOBSIZE = 64 and | ||
| 127 | trying to use BCH16 (ECC_BYTES=26) ecc-scheme. | ||
| 128 | Number of ECC bytes per page = (2 + (2048 / 512) * 26) = 106 B | ||
| 129 | which is greater than capacity of NAND device (OOBSIZE=64) | ||
| 130 | Hence, BCH16 cannot be supported on given device. But it can | ||
| 131 | probably use lower ecc-schemes like BCH8. | ||
| 132 | |||
| 133 | Example(b): For a device with PAGESIZE = 2048 and OOBSIZE = 128 and | ||
| 134 | trying to use BCH16 (ECC_BYTES=26) ecc-scheme. | ||
| 135 | Number of ECC bytes per page = (2 + (2048 / 512) * 26) = 106 B | ||
| 136 | which can be accomodate in the OOB/Spare area of this device | ||
| 137 | (OOBSIZE=128). So this device can use BCH16 ecc-scheme. | ||
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-nor.txt b/Documentation/devicetree/bindings/mtd/gpmc-nor.txt index 420b3ab18890..4828c17bb784 100644 --- a/Documentation/devicetree/bindings/mtd/gpmc-nor.txt +++ b/Documentation/devicetree/bindings/mtd/gpmc-nor.txt | |||
| @@ -30,7 +30,7 @@ Optional properties: | |||
| 30 | - gpmc,XXX Additional GPMC timings and settings parameters. See | 30 | - gpmc,XXX Additional GPMC timings and settings parameters. See |
| 31 | Documentation/devicetree/bindings/bus/ti-gpmc.txt | 31 | Documentation/devicetree/bindings/bus/ti-gpmc.txt |
| 32 | 32 | ||
| 33 | Optional properties for partiton table parsing: | 33 | Optional properties for partition table parsing: |
| 34 | - #address-cells: should be set to 1 | 34 | - #address-cells: should be set to 1 |
| 35 | - #size-cells: should be set to 1 | 35 | - #size-cells: should be set to 1 |
| 36 | 36 | ||
diff --git a/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt b/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt index b7529424ac88..5d8fa527c496 100644 --- a/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt +++ b/Documentation/devicetree/bindings/mtd/gpmc-onenand.txt | |||
| @@ -17,7 +17,7 @@ Optional properties: | |||
| 17 | 17 | ||
| 18 | - dma-channel: DMA Channel index | 18 | - dma-channel: DMA Channel index |
| 19 | 19 | ||
| 20 | For inline partiton table parsing (optional): | 20 | For inline partition table parsing (optional): |
| 21 | 21 | ||
| 22 | - #address-cells: should be set to 1 | 22 | - #address-cells: should be set to 1 |
| 23 | - #size-cells: should be set to 1 | 23 | - #size-cells: should be set to 1 |
diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt index 6d3d57609470..4611aa83531b 100644 --- a/Documentation/devicetree/bindings/mtd/m25p80.txt +++ b/Documentation/devicetree/bindings/mtd/m25p80.txt | |||
| @@ -5,8 +5,8 @@ Required properties: | |||
| 5 | representing partitions. | 5 | representing partitions. |
| 6 | - compatible : Should be the manufacturer and the name of the chip. Bear in mind | 6 | - compatible : Should be the manufacturer and the name of the chip. Bear in mind |
| 7 | the DT binding is not Linux-only, but in case of Linux, see the | 7 | the DT binding is not Linux-only, but in case of Linux, see the |
| 8 | "m25p_ids" table in drivers/mtd/devices/m25p80.c for the list of | 8 | "spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c for the list |
| 9 | supported chips. | 9 | of supported chips. |
| 10 | - reg : Chip-Select number | 10 | - reg : Chip-Select number |
| 11 | - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at | 11 | - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at |
| 12 | 12 | ||
diff --git a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt index 86e0a5601ff5..de8b517a5521 100644 --- a/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt +++ b/Documentation/devicetree/bindings/mtd/pxa3xx-nand.txt | |||
| @@ -17,6 +17,14 @@ Optional properties: | |||
| 17 | - num-cs: Number of chipselect lines to usw | 17 | - num-cs: Number of chipselect lines to usw |
| 18 | - nand-on-flash-bbt: boolean to enable on flash bbt option if | 18 | - nand-on-flash-bbt: boolean to enable on flash bbt option if |
| 19 | not present false | 19 | not present false |
| 20 | - nand-ecc-strength: number of bits to correct per ECC step | ||
| 21 | - nand-ecc-step-size: number of data bytes covered by a single ECC step | ||
| 22 | |||
| 23 | The following ECC strength and step size are currently supported: | ||
| 24 | |||
| 25 | - nand-ecc-strength = <1>, nand-ecc-step-size = <512> | ||
| 26 | - nand-ecc-strength = <4>, nand-ecc-step-size = <512> | ||
| 27 | - nand-ecc-strength = <8>, nand-ecc-step-size = <512> | ||
| 20 | 28 | ||
| 21 | Example: | 29 | Example: |
| 22 | 30 | ||
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt new file mode 100644 index 000000000000..d01ed63d3ebb --- /dev/null +++ b/Documentation/devicetree/bindings/net/amd-xgbe-phy.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | * AMD 10GbE PHY driver (amd-xgbe-phy) | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "amd,xgbe-phy-seattle-v1a" and | ||
| 5 | "ethernet-phy-ieee802.3-c45" | ||
| 6 | - reg: Address and length of the register sets for the device | ||
| 7 | - SerDes Rx/Tx registers | ||
| 8 | - SerDes integration registers (1/2) | ||
| 9 | - SerDes integration registers (2/2) | ||
| 10 | |||
| 11 | Example: | ||
| 12 | xgbe_phy@e1240800 { | ||
| 13 | compatible = "amd,xgbe-phy-seattle-v1a", "ethernet-phy-ieee802.3-c45"; | ||
| 14 | reg = <0 0xe1240800 0 0x00400>, | ||
| 15 | <0 0xe1250000 0 0x00060>, | ||
| 16 | <0 0xe1250080 0 0x00004>; | ||
| 17 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/amd-xgbe.txt b/Documentation/devicetree/bindings/net/amd-xgbe.txt new file mode 100644 index 000000000000..ea0c7908a3b8 --- /dev/null +++ b/Documentation/devicetree/bindings/net/amd-xgbe.txt | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | * AMD 10GbE driver (amd-xgbe) | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "amd,xgbe-seattle-v1a" | ||
| 5 | - reg: Address and length of the register sets for the device | ||
| 6 | - MAC registers | ||
| 7 | - PCS registers | ||
| 8 | - interrupt-parent: Should be the phandle for the interrupt controller | ||
| 9 | that services interrupts for this device | ||
| 10 | - interrupts: Should contain the amd-xgbe interrupt | ||
| 11 | - clocks: Should be the DMA clock for the amd-xgbe device (used for | ||
| 12 | calculating the correct Rx interrupt watchdog timer value on a DMA | ||
| 13 | channel for coalescing) | ||
| 14 | - clock-names: Should be the name of the DMA clock, "dma_clk" | ||
| 15 | - phy-handle: See ethernet.txt file in the same directory | ||
| 16 | - phy-mode: See ethernet.txt file in the same directory | ||
| 17 | |||
| 18 | Optional properties: | ||
| 19 | - mac-address: mac address to be assigned to the device. Can be overridden | ||
| 20 | by UEFI. | ||
| 21 | |||
| 22 | Example: | ||
| 23 | xgbe@e0700000 { | ||
| 24 | compatible = "amd,xgbe-seattle-v1a"; | ||
| 25 | reg = <0 0xe0700000 0 0x80000>, | ||
| 26 | <0 0xe0780000 0 0x80000>; | ||
| 27 | interrupt-parent = <&gic>; | ||
| 28 | interrupts = <0 325 4>; | ||
| 29 | clocks = <&xgbe_clk>; | ||
| 30 | clock-names = "dma_clk"; | ||
| 31 | phy-handle = <&phy>; | ||
| 32 | phy-mode = "xgmii"; | ||
| 33 | mac-address = [ 02 a1 a2 a3 a4 a5 ]; | ||
| 34 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/arc_emac.txt b/Documentation/devicetree/bindings/net/arc_emac.txt index 7fbb027218a1..a1d71eb43b20 100644 --- a/Documentation/devicetree/bindings/net/arc_emac.txt +++ b/Documentation/devicetree/bindings/net/arc_emac.txt | |||
| @@ -4,11 +4,15 @@ Required properties: | |||
| 4 | - compatible: Should be "snps,arc-emac" | 4 | - compatible: Should be "snps,arc-emac" |
| 5 | - reg: Address and length of the register set for the device | 5 | - reg: Address and length of the register set for the device |
| 6 | - interrupts: Should contain the EMAC interrupts | 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: see ethernet.txt file in the same directory. | 7 | - max-speed: see ethernet.txt file in the same directory. |
| 10 | - phy: see ethernet.txt file in the same directory. | 8 | - phy: see ethernet.txt file in the same directory. |
| 11 | 9 | ||
| 10 | Clock handling: | ||
| 11 | The clock frequency is needed to calculate and set polling period of EMAC. | ||
| 12 | It must be provided by one of: | ||
| 13 | - clock-frequency: CPU frequency. | ||
| 14 | - clocks: reference to the clock supplying the EMAC. | ||
| 15 | |||
| 12 | Child nodes of the driver are the individual PHY devices connected to the | 16 | Child nodes of the driver are the individual PHY devices connected to the |
| 13 | MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus. | 17 | MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus. |
| 14 | 18 | ||
| @@ -19,7 +23,11 @@ Examples: | |||
| 19 | reg = <0xc0fc2000 0x3c>; | 23 | reg = <0xc0fc2000 0x3c>; |
| 20 | interrupts = <6>; | 24 | interrupts = <6>; |
| 21 | mac-address = [ 00 11 22 33 44 55 ]; | 25 | mac-address = [ 00 11 22 33 44 55 ]; |
| 26 | |||
| 22 | clock-frequency = <80000000>; | 27 | clock-frequency = <80000000>; |
| 28 | /* or */ | ||
| 29 | clocks = <&emac_clock>; | ||
| 30 | |||
| 23 | max-speed = <100>; | 31 | max-speed = <100>; |
| 24 | phy = <&phy0>; | 32 | phy = <&phy0>; |
| 25 | 33 | ||
diff --git a/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt b/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt index f2febb94550e..451fef26b4df 100644 --- a/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt +++ b/Documentation/devicetree/bindings/net/broadcom-bcmgenet.txt | |||
| @@ -24,7 +24,7 @@ Optional properties: | |||
| 24 | - fixed-link: When the GENET interface is connected to a MoCA hardware block or | 24 | - fixed-link: When the GENET interface is connected to a MoCA hardware block or |
| 25 | when operating in a RGMII to RGMII type of connection, or when the MDIO bus is | 25 | when operating in a RGMII to RGMII type of connection, or when the MDIO bus is |
| 26 | voluntarily disabled, this property should be used to describe the "fixed link". | 26 | voluntarily disabled, this property should be used to describe the "fixed link". |
| 27 | See Documentation/devicetree/bindings/net/fsl-tsec-phy.txt for information on | 27 | See Documentation/devicetree/bindings/net/fixed-link.txt for information on |
| 28 | the property specifics | 28 | the property specifics |
| 29 | 29 | ||
| 30 | Required child nodes: | 30 | Required child nodes: |
diff --git a/Documentation/devicetree/bindings/net/broadcom-systemport.txt b/Documentation/devicetree/bindings/net/broadcom-systemport.txt new file mode 100644 index 000000000000..c183ea90d9bc --- /dev/null +++ b/Documentation/devicetree/bindings/net/broadcom-systemport.txt | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | * Broadcom BCM7xxx Ethernet Systemport Controller (SYSTEMPORT) | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be one of "brcm,systemport-v1.00" or "brcm,systemport" | ||
| 5 | - reg: address and length of the register set for the device. | ||
| 6 | - interrupts: interrupts for the device, first cell must be for the the rx | ||
| 7 | interrupts, and the second cell should be for the transmit queues | ||
| 8 | - local-mac-address: Ethernet MAC address (48 bits) of this adapter | ||
| 9 | - phy-mode: Should be a string describing the PHY interface to the | ||
| 10 | Ethernet switch/PHY, see Documentation/devicetree/bindings/net/ethernet.txt | ||
| 11 | - fixed-link: see Documentation/devicetree/bindings/net/fixed-link.txt for | ||
| 12 | the property specific details | ||
| 13 | |||
| 14 | Optional properties: | ||
| 15 | - systemport,num-tier2-arb: number of tier 2 arbiters, an integer | ||
| 16 | - systemport,num-tier1-arb: number of tier 1 arbiters, an integer | ||
| 17 | - systemport,num-txq: number of HW transmit queues, an integer | ||
| 18 | - systemport,num-rxq: number of HW receive queues, an integer | ||
| 19 | |||
| 20 | Example: | ||
| 21 | ethernet@f04a0000 { | ||
| 22 | compatible = "brcm,systemport-v1.00"; | ||
| 23 | reg = <0xf04a0000 0x4650>; | ||
| 24 | local-mac-address = [ 00 11 22 33 44 55 ]; | ||
| 25 | fixed-link = <0 1 1000 0 0>; | ||
| 26 | phy-mode = "gmii"; | ||
| 27 | interrupts = <0x0 0x16 0x0>, | ||
| 28 | <0x0 0x17 0x0>; | ||
| 29 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/can/xilinx_can.txt b/Documentation/devicetree/bindings/net/can/xilinx_can.txt new file mode 100644 index 000000000000..fe38847d8e26 --- /dev/null +++ b/Documentation/devicetree/bindings/net/can/xilinx_can.txt | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | Xilinx Axi CAN/Zynq CANPS controller Device Tree Bindings | ||
| 2 | --------------------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : Should be "xlnx,zynq-can-1.0" for Zynq CAN | ||
| 6 | controllers and "xlnx,axi-can-1.00.a" for Axi CAN | ||
| 7 | controllers. | ||
| 8 | - reg : Physical base address and size of the Axi CAN/Zynq | ||
| 9 | CANPS registers map. | ||
| 10 | - interrupts : Property with a value describing the interrupt | ||
| 11 | number. | ||
| 12 | - interrupt-parent : Must be core interrupt controller | ||
| 13 | - clock-names : List of input clock names - "can_clk", "pclk" | ||
| 14 | (For CANPS), "can_clk" , "s_axi_aclk"(For AXI CAN) | ||
| 15 | (See clock bindings for details). | ||
| 16 | - clocks : Clock phandles (see clock bindings for details). | ||
| 17 | - tx-fifo-depth : Can Tx fifo depth. | ||
| 18 | - rx-fifo-depth : Can Rx fifo depth. | ||
| 19 | |||
| 20 | |||
| 21 | Example: | ||
| 22 | |||
| 23 | For Zynq CANPS Dts file: | ||
| 24 | zynq_can_0: can@e0008000 { | ||
| 25 | compatible = "xlnx,zynq-can-1.0"; | ||
| 26 | clocks = <&clkc 19>, <&clkc 36>; | ||
| 27 | clock-names = "can_clk", "pclk"; | ||
| 28 | reg = <0xe0008000 0x1000>; | ||
| 29 | interrupts = <0 28 4>; | ||
| 30 | interrupt-parent = <&intc>; | ||
| 31 | tx-fifo-depth = <0x40>; | ||
| 32 | rx-fifo-depth = <0x40>; | ||
| 33 | }; | ||
| 34 | For Axi CAN Dts file: | ||
| 35 | axi_can_0: axi-can@40000000 { | ||
| 36 | compatible = "xlnx,axi-can-1.00.a"; | ||
| 37 | clocks = <&clkc 0>, <&clkc 1>; | ||
| 38 | clock-names = "can_clk","s_axi_aclk" ; | ||
| 39 | reg = <0x40000000 0x10000>; | ||
| 40 | interrupt-parent = <&intc>; | ||
| 41 | interrupts = <0 59 1>; | ||
| 42 | tx-fifo-depth = <0x40>; | ||
| 43 | rx-fifo-depth = <0x40>; | ||
| 44 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt b/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt index 7ff57a119f81..764c0c79b43d 100644 --- a/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt +++ b/Documentation/devicetree/bindings/net/cpsw-phy-sel.txt | |||
| @@ -2,7 +2,9 @@ TI CPSW Phy mode Selection Device Tree Bindings | |||
| 2 | ----------------------------------------------- | 2 | ----------------------------------------------- |
| 3 | 3 | ||
| 4 | Required properties: | 4 | Required properties: |
| 5 | - compatible : Should be "ti,am3352-cpsw-phy-sel" | 5 | - compatible : Should be "ti,am3352-cpsw-phy-sel" for am335x platform and |
| 6 | "ti,dra7xx-cpsw-phy-sel" for dra7xx platform | ||
| 7 | "ti,am43xx-cpsw-phy-sel" for am43xx platform | ||
| 6 | - reg : physical base address and size of the cpsw | 8 | - reg : physical base address and size of the cpsw |
| 7 | registers map | 9 | registers map |
| 8 | - reg-names : names of the register map given in "reg" node | 10 | - reg-names : names of the register map given in "reg" node |
diff --git a/Documentation/devicetree/bindings/net/ethernet.txt b/Documentation/devicetree/bindings/net/ethernet.txt index 9ecd43d8792c..3fc360523bc9 100644 --- a/Documentation/devicetree/bindings/net/ethernet.txt +++ b/Documentation/devicetree/bindings/net/ethernet.txt | |||
| @@ -10,7 +10,7 @@ The following properties are common to the Ethernet controllers: | |||
| 10 | - max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than | 10 | - max-frame-size: number, maximum transfer unit (IEEE defined MTU), rather than |
| 11 | the maximum frame size (there's contradiction in ePAPR). | 11 | the maximum frame size (there's contradiction in ePAPR). |
| 12 | - phy-mode: string, operation mode of the PHY interface; supported values are | 12 | - phy-mode: string, operation mode of the PHY interface; supported values are |
| 13 | "mii", "gmii", "sgmii", "tbi", "rev-mii", "rmii", "rgmii", "rgmii-id", | 13 | "mii", "gmii", "sgmii", "qsgmii", "tbi", "rev-mii", "rmii", "rgmii", "rgmii-id", |
| 14 | "rgmii-rxid", "rgmii-txid", "rtbi", "smii", "xgmii"; this is now a de-facto | 14 | "rgmii-rxid", "rgmii-txid", "rtbi", "smii", "xgmii"; this is now a de-facto |
| 15 | standard property; | 15 | standard property; |
| 16 | - phy-connection-type: the same as "phy-mode" property but described in ePAPR; | 16 | - phy-connection-type: the same as "phy-mode" property but described in ePAPR; |
diff --git a/Documentation/devicetree/bindings/net/fixed-link.txt b/Documentation/devicetree/bindings/net/fixed-link.txt new file mode 100644 index 000000000000..82bf7e0f47b6 --- /dev/null +++ b/Documentation/devicetree/bindings/net/fixed-link.txt | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | Fixed link Device Tree binding | ||
| 2 | ------------------------------ | ||
| 3 | |||
| 4 | Some Ethernet MACs have a "fixed link", and are not connected to a | ||
| 5 | normal MDIO-managed PHY device. For those situations, a Device Tree | ||
| 6 | binding allows to describe a "fixed link". | ||
| 7 | |||
| 8 | Such a fixed link situation is described by creating a 'fixed-link' | ||
| 9 | sub-node of the Ethernet MAC device node, with the following | ||
| 10 | properties: | ||
| 11 | |||
| 12 | * 'speed' (integer, mandatory), to indicate the link speed. Accepted | ||
| 13 | values are 10, 100 and 1000 | ||
| 14 | * 'full-duplex' (boolean, optional), to indicate that full duplex is | ||
| 15 | used. When absent, half duplex is assumed. | ||
| 16 | * 'pause' (boolean, optional), to indicate that pause should be | ||
| 17 | enabled. | ||
| 18 | * 'asym-pause' (boolean, optional), to indicate that asym_pause should | ||
| 19 | be enabled. | ||
| 20 | |||
| 21 | Old, deprecated 'fixed-link' binding: | ||
| 22 | |||
| 23 | * A 'fixed-link' property in the Ethernet MAC node, with 5 cells, of the | ||
| 24 | form <a b c d e> with the following accepted values: | ||
| 25 | - a: emulated PHY ID, choose any but but unique to the all specified | ||
| 26 | fixed-links, from 0 to 31 | ||
| 27 | - b: duplex configuration: 0 for half duplex, 1 for full duplex | ||
| 28 | - c: link speed in Mbits/sec, accepted values are: 10, 100 and 1000 | ||
| 29 | - d: pause configuration: 0 for no pause, 1 for pause | ||
| 30 | - e: asymmetric pause configuration: 0 for no asymmetric pause, 1 for | ||
| 31 | asymmetric pause | ||
| 32 | |||
| 33 | Example: | ||
| 34 | |||
| 35 | ethernet@0 { | ||
| 36 | ... | ||
| 37 | fixed-link { | ||
| 38 | speed = <1000>; | ||
| 39 | full-duplex; | ||
| 40 | }; | ||
| 41 | ... | ||
| 42 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt index 737cdef4f903..be6ea8960f20 100644 --- a/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt +++ b/Documentation/devicetree/bindings/net/fsl-tsec-phy.txt | |||
| @@ -42,10 +42,7 @@ Properties: | |||
| 42 | interrupt. For TSEC and eTSEC devices, the first interrupt is | 42 | interrupt. For TSEC and eTSEC devices, the first interrupt is |
| 43 | transmit, the second is receive, and the third is error. | 43 | transmit, the second is receive, and the third is error. |
| 44 | - phy-handle : See ethernet.txt file in the same directory. | 44 | - phy-handle : See ethernet.txt file in the same directory. |
| 45 | - fixed-link : <a b c d e> where a is emulated phy id - choose any, | 45 | - fixed-link : See fixed-link.txt in the same directory. |
| 46 | but unique to the all specified fixed-links, b is duplex - 0 half, | ||
| 47 | 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no | ||
| 48 | pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause. | ||
| 49 | - phy-connection-type : See ethernet.txt file in the same directory. | 46 | - phy-connection-type : See ethernet.txt file in the same directory. |
| 50 | This property is only really needed if the connection is of type | 47 | This property is only really needed if the connection is of type |
| 51 | "rgmii-id", as all other connection types are detected by hardware. | 48 | "rgmii-id", as all other connection types are detected by hardware. |
diff --git a/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt new file mode 100644 index 000000000000..75d398bb1fbb --- /dev/null +++ b/Documentation/devicetree/bindings/net/hisilicon-hix5hd2-gmac.txt | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | Hisilicon hix5hd2 gmac controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "hisilicon,hix5hd2-gmac". | ||
| 5 | - reg: specifies base physical address(s) and size of the device registers. | ||
| 6 | The first region is the MAC register base and size. | ||
| 7 | The second region is external interface control register. | ||
| 8 | - interrupts: should contain the MAC interrupt. | ||
| 9 | - #address-cells: must be <1>. | ||
| 10 | - #size-cells: must be <0>. | ||
| 11 | - phy-mode: see ethernet.txt [1]. | ||
| 12 | - phy-handle: see ethernet.txt [1]. | ||
| 13 | - mac-address: see ethernet.txt [1]. | ||
| 14 | - clocks: clock phandle and specifier pair. | ||
| 15 | |||
| 16 | - PHY subnode: inherits from phy binding [2] | ||
| 17 | |||
| 18 | [1] Documentation/devicetree/bindings/net/ethernet.txt | ||
| 19 | [2] Documentation/devicetree/bindings/net/phy.txt | ||
| 20 | |||
| 21 | Example: | ||
| 22 | gmac0: ethernet@f9840000 { | ||
| 23 | compatible = "hisilicon,hix5hd2-gmac"; | ||
| 24 | reg = <0xf9840000 0x1000>,<0xf984300c 0x4>; | ||
| 25 | interrupts = <0 71 4>; | ||
| 26 | #address-cells = <1>; | ||
| 27 | #size-cells = <0>; | ||
| 28 | phy-mode = "mii"; | ||
| 29 | phy-handle = <&phy2>; | ||
| 30 | mac-address = [00 00 00 00 00 00]; | ||
| 31 | clocks = <&clock HIX5HD2_MAC0_CLK>; | ||
| 32 | |||
| 33 | phy2: ethernet-phy@2 { | ||
| 34 | reg = <2>; | ||
| 35 | }; | ||
| 36 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt b/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt new file mode 100644 index 000000000000..d3bbdded4cbe --- /dev/null +++ b/Documentation/devicetree/bindings/net/ieee802154/at86rf230.txt | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | * AT86RF230 IEEE 802.15.4 * | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "atmel,at86rf230", "atmel,at86rf231", | ||
| 5 | "atmel,at86rf233" or "atmel,at86rf212" | ||
| 6 | - spi-max-frequency: maximal bus speed, should be set to 7500000 depends | ||
| 7 | sync or async operation mode | ||
| 8 | - reg: the chipselect index | ||
| 9 | - interrupts: the interrupt generated by the device | ||
| 10 | |||
| 11 | Optional properties: | ||
| 12 | - reset-gpio: GPIO spec for the rstn pin | ||
| 13 | - sleep-gpio: GPIO spec for the slp_tr pin | ||
| 14 | |||
| 15 | Example: | ||
| 16 | |||
| 17 | at86rf231@0 { | ||
| 18 | compatible = "atmel,at86rf231"; | ||
| 19 | spi-max-frequency = <7500000>; | ||
| 20 | reg = <0>; | ||
| 21 | interrupts = <19 1>; | ||
| 22 | interrupt-parent = <&gpio3>; | ||
| 23 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/mdio-gpio.txt b/Documentation/devicetree/bindings/net/mdio-gpio.txt index c79bab025369..8dbcf8295c6c 100644 --- a/Documentation/devicetree/bindings/net/mdio-gpio.txt +++ b/Documentation/devicetree/bindings/net/mdio-gpio.txt | |||
| @@ -14,7 +14,7 @@ node. | |||
| 14 | Example: | 14 | Example: |
| 15 | 15 | ||
| 16 | aliases { | 16 | aliases { |
| 17 | mdio-gpio0 = <&mdio0>; | 17 | mdio-gpio0 = &mdio0; |
| 18 | }; | 18 | }; |
| 19 | 19 | ||
| 20 | mdio0: mdio { | 20 | mdio0: mdio { |
diff --git a/Documentation/devicetree/bindings/net/micrel-ks8851.txt b/Documentation/devicetree/bindings/net/micrel-ks8851.txt index d54d0cc79487..bbdf9a7359a2 100644 --- a/Documentation/devicetree/bindings/net/micrel-ks8851.txt +++ b/Documentation/devicetree/bindings/net/micrel-ks8851.txt | |||
| @@ -1,9 +1,18 @@ | |||
| 1 | Micrel KS8851 Ethernet mac | 1 | Micrel KS8851 Ethernet mac (MLL) |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible = "micrel,ks8851-ml" of parallel interface | 4 | - compatible = "micrel,ks8851-mll" of parallel interface |
| 5 | - reg : 2 physical address and size of registers for data and command | 5 | - reg : 2 physical address and size of registers for data and command |
| 6 | - interrupts : interrupt connection | 6 | - interrupts : interrupt connection |
| 7 | 7 | ||
| 8 | Micrel KS8851 Ethernet mac (SPI) | ||
| 9 | |||
| 10 | Required properties: | ||
| 11 | - compatible = "micrel,ks8851" or the deprecated "ks8851" | ||
| 12 | - reg : chip select number | ||
| 13 | - interrupts : interrupt connection | ||
| 14 | |||
| 8 | Optional properties: | 15 | Optional properties: |
| 9 | - vdd-supply: supply for Ethernet mac | 16 | - vdd-supply: analog 3.3V supply for Ethernet mac |
| 17 | - vdd-io-supply: digital 1.8V IO supply for Ethernet mac | ||
| 18 | - reset-gpios: reset_n input pin | ||
diff --git a/Documentation/devicetree/bindings/net/micrel-ksz9021.txt b/Documentation/devicetree/bindings/net/micrel-ksz9021.txt deleted file mode 100644 index 997a63f1aea1..000000000000 --- a/Documentation/devicetree/bindings/net/micrel-ksz9021.txt +++ /dev/null | |||
| @@ -1,49 +0,0 @@ | |||
| 1 | Micrel KSZ9021 Gigabit Ethernet PHY | ||
| 2 | |||
| 3 | Some boards require special tuning values, particularly when it comes to | ||
| 4 | clock delays. You can specify clock delay values by adding | ||
| 5 | micrel-specific properties to an Ethernet OF device node. | ||
| 6 | |||
| 7 | All skew control options are specified in picoseconds. The minimum | ||
| 8 | value is 0, and the maximum value is 3000. | ||
| 9 | |||
| 10 | Optional properties: | ||
| 11 | - rxc-skew-ps : Skew control of RXC pad | ||
| 12 | - rxdv-skew-ps : Skew control of RX CTL pad | ||
| 13 | - txc-skew-ps : Skew control of TXC pad | ||
| 14 | - txen-skew-ps : Skew control of TX_CTL pad | ||
| 15 | - rxd0-skew-ps : Skew control of RX data 0 pad | ||
| 16 | - rxd1-skew-ps : Skew control of RX data 1 pad | ||
| 17 | - rxd2-skew-ps : Skew control of RX data 2 pad | ||
| 18 | - rxd3-skew-ps : Skew control of RX data 3 pad | ||
| 19 | - txd0-skew-ps : Skew control of TX data 0 pad | ||
| 20 | - txd1-skew-ps : Skew control of TX data 1 pad | ||
| 21 | - txd2-skew-ps : Skew control of TX data 2 pad | ||
| 22 | - txd3-skew-ps : Skew control of TX data 3 pad | ||
| 23 | |||
| 24 | Examples: | ||
| 25 | |||
| 26 | /* Attach to an Ethernet device with autodetected PHY */ | ||
| 27 | &enet { | ||
| 28 | rxc-skew-ps = <3000>; | ||
| 29 | rxdv-skew-ps = <0>; | ||
| 30 | txc-skew-ps = <3000>; | ||
| 31 | txen-skew-ps = <0>; | ||
| 32 | status = "okay"; | ||
| 33 | }; | ||
| 34 | |||
| 35 | /* Attach to an explicitly-specified PHY */ | ||
| 36 | mdio { | ||
| 37 | phy0: ethernet-phy@0 { | ||
| 38 | rxc-skew-ps = <3000>; | ||
| 39 | rxdv-skew-ps = <0>; | ||
| 40 | txc-skew-ps = <3000>; | ||
| 41 | txen-skew-ps = <0>; | ||
| 42 | reg = <0>; | ||
| 43 | }; | ||
| 44 | }; | ||
| 45 | ethernet@70000 { | ||
| 46 | status = "okay"; | ||
| 47 | phy = <&phy0>; | ||
| 48 | phy-mode = "rgmii-id"; | ||
| 49 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt b/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt new file mode 100644 index 000000000000..692076fda0e5 --- /dev/null +++ b/Documentation/devicetree/bindings/net/micrel-ksz90x1.txt | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | Micrel KSZ9021/KSZ9031 Gigabit Ethernet PHY | ||
| 2 | |||
| 3 | Some boards require special tuning values, particularly when it comes to | ||
| 4 | clock delays. You can specify clock delay values by adding | ||
| 5 | micrel-specific properties to an Ethernet OF device node. | ||
| 6 | |||
| 7 | Note that these settings are applied after any phy-specific fixup from | ||
| 8 | phy_fixup_list (see phy_init_hw() from drivers/net/phy/phy_device.c), | ||
| 9 | and therefore may overwrite them. | ||
| 10 | |||
| 11 | KSZ9021: | ||
| 12 | |||
| 13 | All skew control options are specified in picoseconds. The minimum | ||
| 14 | value is 0, the maximum value is 3000, and it is incremented by 200ps | ||
| 15 | steps. | ||
| 16 | |||
| 17 | Optional properties: | ||
| 18 | |||
| 19 | - rxc-skew-ps : Skew control of RXC pad | ||
| 20 | - rxdv-skew-ps : Skew control of RX CTL pad | ||
| 21 | - txc-skew-ps : Skew control of TXC pad | ||
| 22 | - txen-skew-ps : Skew control of TX CTL pad | ||
| 23 | - rxd0-skew-ps : Skew control of RX data 0 pad | ||
| 24 | - rxd1-skew-ps : Skew control of RX data 1 pad | ||
| 25 | - rxd2-skew-ps : Skew control of RX data 2 pad | ||
| 26 | - rxd3-skew-ps : Skew control of RX data 3 pad | ||
| 27 | - txd0-skew-ps : Skew control of TX data 0 pad | ||
| 28 | - txd1-skew-ps : Skew control of TX data 1 pad | ||
| 29 | - txd2-skew-ps : Skew control of TX data 2 pad | ||
| 30 | - txd3-skew-ps : Skew control of TX data 3 pad | ||
| 31 | |||
| 32 | KSZ9031: | ||
| 33 | |||
| 34 | All skew control options are specified in picoseconds. The minimum | ||
| 35 | value is 0, and the maximum is property-dependent. The increment | ||
| 36 | step is 60ps. | ||
| 37 | |||
| 38 | Optional properties: | ||
| 39 | |||
| 40 | Maximum value of 1860: | ||
| 41 | |||
| 42 | - rxc-skew-ps : Skew control of RX clock pad | ||
| 43 | - txc-skew-ps : Skew control of TX clock pad | ||
| 44 | |||
| 45 | Maximum value of 900: | ||
| 46 | |||
| 47 | - rxdv-skew-ps : Skew control of RX CTL pad | ||
| 48 | - txen-skew-ps : Skew control of TX CTL pad | ||
| 49 | - rxd0-skew-ps : Skew control of RX data 0 pad | ||
| 50 | - rxd1-skew-ps : Skew control of RX data 1 pad | ||
| 51 | - rxd2-skew-ps : Skew control of RX data 2 pad | ||
| 52 | - rxd3-skew-ps : Skew control of RX data 3 pad | ||
| 53 | - txd0-skew-ps : Skew control of TX data 0 pad | ||
| 54 | - txd1-skew-ps : Skew control of TX data 1 pad | ||
| 55 | - txd2-skew-ps : Skew control of TX data 2 pad | ||
| 56 | - txd3-skew-ps : Skew control of TX data 3 pad | ||
| 57 | |||
| 58 | Examples: | ||
| 59 | |||
| 60 | /* Attach to an Ethernet device with autodetected PHY */ | ||
| 61 | &enet { | ||
| 62 | rxc-skew-ps = <3000>; | ||
| 63 | rxdv-skew-ps = <0>; | ||
| 64 | txc-skew-ps = <3000>; | ||
| 65 | txen-skew-ps = <0>; | ||
| 66 | status = "okay"; | ||
| 67 | }; | ||
| 68 | |||
| 69 | /* Attach to an explicitly-specified PHY */ | ||
| 70 | mdio { | ||
| 71 | phy0: ethernet-phy@0 { | ||
| 72 | rxc-skew-ps = <3000>; | ||
| 73 | rxdv-skew-ps = <0>; | ||
| 74 | txc-skew-ps = <3000>; | ||
| 75 | txen-skew-ps = <0>; | ||
| 76 | reg = <0>; | ||
| 77 | }; | ||
| 78 | }; | ||
| 79 | ethernet@70000 { | ||
| 80 | status = "okay"; | ||
| 81 | phy = <&phy0>; | ||
| 82 | phy-mode = "rgmii-id"; | ||
| 83 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/nfc/pn544.txt b/Documentation/devicetree/bindings/net/nfc/pn544.txt new file mode 100644 index 000000000000..dab69f36167c --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/pn544.txt | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | * NXP Semiconductors PN544 NFC Controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "nxp,pn544-i2c". | ||
| 5 | - clock-frequency: IC work frequency. | ||
| 6 | - reg: address on the bus | ||
| 7 | - interrupt-parent: phandle for the interrupt gpio controller | ||
| 8 | - interrupts: GPIO interrupt to which the chip is connected | ||
| 9 | - enable-gpios: Output GPIO pin used for enabling/disabling the PN544 | ||
| 10 | - firmware-gpios: Output GPIO pin used to enter firmware download mode | ||
| 11 | |||
| 12 | Optional SoC Specific Properties: | ||
| 13 | - pinctrl-names: Contains only one value - "default". | ||
| 14 | - pintctrl-0: Specifies the pin control groups used for this controller. | ||
| 15 | |||
| 16 | Example (for ARM-based BeagleBone with PN544 on I2C2): | ||
| 17 | |||
| 18 | &i2c2 { | ||
| 19 | |||
| 20 | status = "okay"; | ||
| 21 | |||
| 22 | pn544: pn544@28 { | ||
| 23 | |||
| 24 | compatible = "nxp,pn544-i2c"; | ||
| 25 | |||
| 26 | reg = <0x28>; | ||
| 27 | clock-frequency = <400000>; | ||
| 28 | |||
| 29 | interrupt-parent = <&gpio1>; | ||
| 30 | interrupts = <17 GPIO_ACTIVE_HIGH>; | ||
| 31 | |||
| 32 | enable-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>; | ||
| 33 | firmware-gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>; | ||
| 34 | }; | ||
| 35 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/nfc/st21nfca.txt b/Documentation/devicetree/bindings/net/nfc/st21nfca.txt new file mode 100644 index 000000000000..e4faa2e8dfeb --- /dev/null +++ b/Documentation/devicetree/bindings/net/nfc/st21nfca.txt | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | * STMicroelectronics SAS. ST21NFCA NFC Controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be "st,st21nfca_i2c". | ||
| 5 | - clock-frequency: I²C work frequency. | ||
| 6 | - reg: address on the bus | ||
| 7 | - interrupt-parent: phandle for the interrupt gpio controller | ||
| 8 | - interrupts: GPIO interrupt to which the chip is connected | ||
| 9 | - enable-gpios: Output GPIO pin used for enabling/disabling the ST21NFCA | ||
| 10 | |||
| 11 | Optional SoC Specific Properties: | ||
| 12 | - pinctrl-names: Contains only one value - "default". | ||
| 13 | - pintctrl-0: Specifies the pin control groups used for this controller. | ||
| 14 | |||
| 15 | Example (for ARM-based BeagleBoard xM with ST21NFCA on I2C2): | ||
| 16 | |||
| 17 | &i2c2 { | ||
| 18 | |||
| 19 | status = "okay"; | ||
| 20 | |||
| 21 | st21nfca: st21nfca@1 { | ||
| 22 | |||
| 23 | compatible = "st,st21nfca_i2c"; | ||
| 24 | |||
| 25 | reg = <0x01>; | ||
| 26 | clock-frequency = <400000>; | ||
| 27 | |||
| 28 | interrupt-parent = <&gpio5>; | ||
| 29 | interrupts = <2 IRQ_TYPE_LEVEL_LOW>; | ||
| 30 | |||
| 31 | enable-gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; | ||
| 32 | }; | ||
| 33 | }; | ||
diff --git a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt index 8dd3ef7bc56b..1e436133685f 100644 --- a/Documentation/devicetree/bindings/net/nfc/trf7970a.txt +++ b/Documentation/devicetree/bindings/net/nfc/trf7970a.txt | |||
| @@ -12,6 +12,7 @@ Required properties: | |||
| 12 | Optional SoC Specific Properties: | 12 | Optional SoC Specific Properties: |
| 13 | - pinctrl-names: Contains only one value - "default". | 13 | - pinctrl-names: Contains only one value - "default". |
| 14 | - pintctrl-0: Specifies the pin control groups used for this controller. | 14 | - pintctrl-0: Specifies the pin control groups used for this controller. |
| 15 | - autosuspend-delay: Specify autosuspend delay in milliseconds. | ||
| 15 | 16 | ||
| 16 | Example (for ARM-based BeagleBone with TRF7970A on SPI1): | 17 | Example (for ARM-based BeagleBone with TRF7970A on SPI1): |
| 17 | 18 | ||
| @@ -29,6 +30,7 @@ Example (for ARM-based BeagleBone with TRF7970A on SPI1): | |||
| 29 | ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>, | 30 | ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>, |
| 30 | <&gpio2 5 GPIO_ACTIVE_LOW>; | 31 | <&gpio2 5 GPIO_ACTIVE_LOW>; |
| 31 | vin-supply = <&ldo3_reg>; | 32 | vin-supply = <&ldo3_reg>; |
| 33 | autosuspend-delay = <30000>; | ||
| 32 | status = "okay"; | 34 | status = "okay"; |
| 33 | }; | 35 | }; |
| 34 | }; | 36 | }; |
diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt index 636f0ac4e223..2a60cd3e8d5d 100644 --- a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt +++ b/Documentation/devicetree/bindings/net/socfpga-dwmac.txt | |||
| @@ -23,5 +23,5 @@ gmac0: ethernet@ff700000 { | |||
| 23 | interrupt-names = "macirq"; | 23 | interrupt-names = "macirq"; |
| 24 | mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ | 24 | mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ |
| 25 | clocks = <&emac_0_clk>; | 25 | clocks = <&emac_0_clk>; |
| 26 | clocks-names = "stmmaceth"; | 26 | clock-names = "stmmaceth"; |
| 27 | }; | 27 | }; |
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt index 80c1fb8bfbb8..a2acd2b26baf 100644 --- a/Documentation/devicetree/bindings/net/stmmac.txt +++ b/Documentation/devicetree/bindings/net/stmmac.txt | |||
| @@ -33,7 +33,7 @@ Optional properties: | |||
| 33 | - max-frame-size: See ethernet.txt file in the same directory | 33 | - max-frame-size: See ethernet.txt file in the same directory |
| 34 | - clocks: If present, the first clock should be the GMAC main clock, | 34 | - clocks: If present, the first clock should be the GMAC main clock, |
| 35 | further clocks may be specified in derived bindings. | 35 | further clocks may be specified in derived bindings. |
| 36 | - clocks-names: One name for each entry in the clocks property, the | 36 | - clock-names: One name for each entry in the clocks property, the |
| 37 | first one should be "stmmaceth". | 37 | first one should be "stmmaceth". |
| 38 | 38 | ||
| 39 | Examples: | 39 | Examples: |
diff --git a/Documentation/devicetree/bindings/net/via-rhine.txt b/Documentation/devicetree/bindings/net/via-rhine.txt new file mode 100644 index 000000000000..334eca2bf937 --- /dev/null +++ b/Documentation/devicetree/bindings/net/via-rhine.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | * VIA Rhine 10/100 Network Controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : Should be "via,vt8500-rhine" for integrated | ||
| 5 | Rhine controllers found in VIA VT8500, WonderMedia WM8950 | ||
| 6 | and similar. These are listed as 1106:3106 rev. 0x84 on the | ||
| 7 | virtual PCI bus under vendor-provided kernels | ||
| 8 | - reg : Address and length of the io space | ||
| 9 | - interrupts : Should contain the controller interrupt line | ||
| 10 | |||
| 11 | Examples: | ||
| 12 | |||
| 13 | ethernet@d8004000 { | ||
| 14 | compatible = "via,vt8500-rhine"; | ||
| 15 | reg = <0xd8004000 0x100>; | ||
| 16 | interrupts = <10>; | ||
| 17 | }; | ||
diff --git a/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt b/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt new file mode 100644 index 000000000000..7443b7c76769 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/auo,b133xtn01.txt | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | AU Optronics Corporation 13.3" WXGA (1366x768) TFT LCD panel | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "auo,b133xtn01" | ||
| 5 | |||
| 6 | This binding is compatible with the simple-panel binding, which is specified | ||
| 7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt b/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt new file mode 100644 index 000000000000..4903d7b1d947 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/edt,et057090dhu.txt | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | Emerging Display Technology Corp. 5.7" VGA TFT LCD panel | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "edt,et057090dhu" | ||
| 5 | |||
| 6 | This binding is compatible with the simple-panel binding, which is specified | ||
| 7 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt b/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt new file mode 100644 index 000000000000..20cb38e836e4 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/edt,et070080dh6.txt | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | Emerging Display Technology Corp. ET070080DH6 7.0" WVGA TFT LCD panel | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "edt,et070080dh6" | ||
| 5 | |||
| 6 | This panel is the same as ETM0700G0DH6 except for the touchscreen. | ||
| 7 | ET070080DH6 is the model with resistive touch. | ||
| 8 | |||
| 9 | This binding is compatible with the simple-panel binding, which is specified | ||
| 10 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt b/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt new file mode 100644 index 000000000000..ee4b18053e40 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/edt,etm0700g0dh6.txt | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | Emerging Display Technology Corp. ETM0700G0DH6 7.0" WVGA TFT LCD panel | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "edt,etm0700g0dh6" | ||
| 5 | |||
| 6 | This panel is the same as ET070080DH6 except for the touchscreen. | ||
| 7 | ETM0700G0DH6 is the model with capacitive multitouch. | ||
| 8 | |||
| 9 | This binding is compatible with the simple-panel binding, which is specified | ||
| 10 | in simple-panel.txt in this directory. | ||
diff --git a/Documentation/devicetree/bindings/pci/designware-pcie.txt b/Documentation/devicetree/bindings/pci/designware-pcie.txt index d6fae13ff062..d0d15ee42834 100644 --- a/Documentation/devicetree/bindings/pci/designware-pcie.txt +++ b/Documentation/devicetree/bindings/pci/designware-pcie.txt | |||
| @@ -1,15 +1,7 @@ | |||
| 1 | * Synopsys Designware PCIe interface | 1 | * Synopsys Designware PCIe interface |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible: should contain "snps,dw-pcie" to identify the | 4 | - compatible: should contain "snps,dw-pcie" to identify the core. |
| 5 | core, plus an identifier for the specific instance, such | ||
| 6 | as "samsung,exynos5440-pcie" or "fsl,imx6q-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> | 5 | - #address-cells: set to <3> |
| 14 | - #size-cells: set to <2> | 6 | - #size-cells: set to <2> |
| 15 | - device_type: set to "pci" | 7 | - device_type: set to "pci" |
| @@ -19,65 +11,11 @@ Required properties: | |||
| 19 | to define the mapping of the PCIe interface to interrupt | 11 | to define the mapping of the PCIe interface to interrupt |
| 20 | numbers. | 12 | numbers. |
| 21 | - num-lanes: number of lanes to use | 13 | - num-lanes: number of lanes to use |
| 14 | - clocks: Must contain an entry for each entry in clock-names. | ||
| 15 | See ../clocks/clock-bindings.txt for details. | ||
| 16 | - clock-names: Must include the following entries: | ||
| 17 | - "pcie" | ||
| 18 | - "pcie_bus" | ||
| 22 | 19 | ||
| 23 | Optional properties: | 20 | Optional properties: |
| 24 | - reset-gpio: gpio pin number of power good signal | 21 | - reset-gpio: gpio pin number of power good signal |
| 25 | |||
| 26 | Optional properties for fsl,imx6q-pcie | ||
| 27 | - power-on-gpio: gpio pin number of power-enable signal | ||
| 28 | - wake-up-gpio: gpio pin number of incoming wakeup signal | ||
| 29 | - disable-gpio: gpio pin number of outgoing rfkill/endpoint disable signal | ||
| 30 | |||
| 31 | Example: | ||
| 32 | |||
| 33 | SoC specific DT Entry: | ||
| 34 | |||
| 35 | pcie@290000 { | ||
| 36 | compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; | ||
| 37 | reg = <0x290000 0x1000 | ||
| 38 | 0x270000 0x1000 | ||
| 39 | 0x271000 0x40>; | ||
| 40 | interrupts = <0 20 0>, <0 21 0>, <0 22 0>; | ||
| 41 | clocks = <&clock 28>, <&clock 27>; | ||
| 42 | clock-names = "pcie", "pcie_bus"; | ||
| 43 | #address-cells = <3>; | ||
| 44 | #size-cells = <2>; | ||
| 45 | device_type = "pci"; | ||
| 46 | ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */ | ||
| 47 | 0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */ | ||
| 48 | 0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */ | ||
| 49 | #interrupt-cells = <1>; | ||
| 50 | interrupt-map-mask = <0 0 0 0>; | ||
| 51 | interrupt-map = <0x0 0 &gic 53>; | ||
| 52 | num-lanes = <4>; | ||
| 53 | }; | ||
| 54 | |||
| 55 | pcie@2a0000 { | ||
| 56 | compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; | ||
| 57 | reg = <0x2a0000 0x1000 | ||
| 58 | 0x272000 0x1000 | ||
| 59 | 0x271040 0x40>; | ||
| 60 | interrupts = <0 23 0>, <0 24 0>, <0 25 0>; | ||
| 61 | clocks = <&clock 29>, <&clock 27>; | ||
| 62 | clock-names = "pcie", "pcie_bus"; | ||
| 63 | #address-cells = <3>; | ||
| 64 | #size-cells = <2>; | ||
| 65 | device_type = "pci"; | ||
| 66 | ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */ | ||
| 67 | 0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */ | ||
| 68 | 0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */ | ||
| 69 | #interrupt-cells = <1>; | ||
| 70 | interrupt-map-mask = <0 0 0 0>; | ||
| 71 | interrupt-map = <0x0 0 &gic 56>; | ||
| 72 | num-lanes = <4>; | ||
| 73 | }; | ||
| 74 | |||
| 75 | Board specific DT Entry: | ||
| 76 | |||
| 77 | pcie@290000 { | ||
| 78 | reset-gpio = <&pin_ctrl 5 0>; | ||
| 79 | }; | ||
| 80 | |||
| 81 | pcie@2a0000 { | ||
| 82 | reset-gpio = <&pin_ctrl 22 0>; | ||
| 83 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt new file mode 100644 index 000000000000..9455fd0ec830 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | * Freescale i.MX6 PCIe interface | ||
| 2 | |||
| 3 | This PCIe host controller is based on the Synopsis Designware PCIe IP | ||
| 4 | and thus inherits all the common properties defined in designware-pcie.txt. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: "fsl,imx6q-pcie" | ||
| 8 | - reg: base addresse and length of the pcie controller | ||
| 9 | - interrupts: A list of interrupt outputs of the controller. Must contain an | ||
| 10 | entry for each entry in the interrupt-names property. | ||
| 11 | - interrupt-names: Must include the following entries: | ||
| 12 | - "msi": The interrupt that is asserted when an MSI is received | ||
| 13 | - clock-names: Must include the following additional entries: | ||
| 14 | - "pcie_phy" | ||
| 15 | |||
| 16 | Example: | ||
| 17 | |||
| 18 | pcie@0x01000000 { | ||
| 19 | compatible = "fsl,imx6q-pcie", "snps,dw-pcie"; | ||
| 20 | reg = <0x01ffc000 0x4000>; | ||
| 21 | #address-cells = <3>; | ||
| 22 | #size-cells = <2>; | ||
| 23 | device_type = "pci"; | ||
| 24 | ranges = <0x00000800 0 0x01f00000 0x01f00000 0 0x00080000 | ||
| 25 | 0x81000000 0 0 0x01f80000 0 0x00010000 | ||
| 26 | 0x82000000 0 0x01000000 0x01000000 0 0x00f00000>; | ||
| 27 | num-lanes = <1>; | ||
| 28 | interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; | ||
| 29 | interrupt-names = "msi"; | ||
| 30 | #interrupt-cells = <1>; | ||
| 31 | interrupt-map-mask = <0 0 0 0x7>; | ||
| 32 | interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>, | ||
| 33 | <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>, | ||
| 34 | <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>, | ||
| 35 | <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>; | ||
| 36 | clocks = <&clks 144>, <&clks 206>, <&clks 189>; | ||
| 37 | clock-names = "pcie", "pcie_bus", "pcie_phy"; | ||
| 38 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/host-generic-pci.txt b/Documentation/devicetree/bindings/pci/host-generic-pci.txt new file mode 100644 index 000000000000..f0b0436807b4 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/host-generic-pci.txt | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | * Generic PCI host controller | ||
| 2 | |||
| 3 | Firmware-initialised PCI host controllers and PCI emulations, such as the | ||
| 4 | virtio-pci implementations found in kvmtool and other para-virtualised | ||
| 5 | systems, do not require driver support for complexities such as regulator | ||
| 6 | and clock management. In fact, the controller may not even require the | ||
| 7 | configuration of a control interface by the operating system, instead | ||
| 8 | presenting a set of fixed windows describing a subset of IO, Memory and | ||
| 9 | Configuration Spaces. | ||
| 10 | |||
| 11 | Such a controller can be described purely in terms of the standardized device | ||
| 12 | tree bindings communicated in pci.txt: | ||
| 13 | |||
| 14 | |||
| 15 | Properties of the host controller node: | ||
| 16 | |||
| 17 | - compatible : Must be "pci-host-cam-generic" or "pci-host-ecam-generic" | ||
| 18 | depending on the layout of configuration space (CAM vs | ||
| 19 | ECAM respectively). | ||
| 20 | |||
| 21 | - device_type : Must be "pci". | ||
| 22 | |||
| 23 | - ranges : As described in IEEE Std 1275-1994, but must provide | ||
| 24 | at least a definition of non-prefetchable memory. One | ||
| 25 | or both of prefetchable Memory and IO Space may also | ||
| 26 | be provided. | ||
| 27 | |||
| 28 | - bus-range : Optional property (also described in IEEE Std 1275-1994) | ||
| 29 | to indicate the range of bus numbers for this controller. | ||
| 30 | If absent, defaults to <0 255> (i.e. all buses). | ||
| 31 | |||
| 32 | - #address-cells : Must be 3. | ||
| 33 | |||
| 34 | - #size-cells : Must be 2. | ||
| 35 | |||
| 36 | - reg : The Configuration Space base address and size, as accessed | ||
| 37 | from the parent bus. | ||
| 38 | |||
| 39 | |||
| 40 | Properties of the /chosen node: | ||
| 41 | |||
| 42 | - linux,pci-probe-only | ||
| 43 | : Optional property which takes a single-cell argument. | ||
| 44 | If '0', then Linux will assign devices in its usual manner, | ||
| 45 | otherwise it will not try to assign devices and instead use | ||
| 46 | them as they are configured already. | ||
| 47 | |||
| 48 | Configuration Space is assumed to be memory-mapped (as opposed to being | ||
| 49 | accessed via an ioport) and laid out with a direct correspondence to the | ||
| 50 | geography of a PCI bus address by concatenating the various components to | ||
| 51 | form an offset. | ||
| 52 | |||
| 53 | For CAM, this 24-bit offset is: | ||
| 54 | |||
| 55 | cfg_offset(bus, device, function, register) = | ||
| 56 | bus << 16 | device << 11 | function << 8 | register | ||
| 57 | |||
| 58 | Whilst ECAM extends this by 4 bits to accomodate 4k of function space: | ||
| 59 | |||
| 60 | cfg_offset(bus, device, function, register) = | ||
| 61 | bus << 20 | device << 15 | function << 12 | register | ||
| 62 | |||
| 63 | Interrupt mapping is exactly as described in `Open Firmware Recommended | ||
| 64 | Practice: Interrupt Mapping' and requires the following properties: | ||
| 65 | |||
| 66 | - #interrupt-cells : Must be 1 | ||
| 67 | |||
| 68 | - interrupt-map : <see aforementioned specification> | ||
| 69 | |||
| 70 | - interrupt-map-mask : <see aforementioned specification> | ||
| 71 | |||
| 72 | |||
| 73 | Example: | ||
| 74 | |||
| 75 | pci { | ||
| 76 | compatible = "pci-host-cam-generic" | ||
| 77 | device_type = "pci"; | ||
| 78 | #address-cells = <3>; | ||
| 79 | #size-cells = <2>; | ||
| 80 | bus-range = <0x0 0x1>; | ||
| 81 | |||
| 82 | // CPU_PHYSICAL(2) SIZE(2) | ||
| 83 | reg = <0x0 0x40000000 0x0 0x1000000>; | ||
| 84 | |||
| 85 | // BUS_ADDRESS(3) CPU_PHYSICAL(2) SIZE(2) | ||
| 86 | ranges = <0x01000000 0x0 0x01000000 0x0 0x01000000 0x0 0x00010000>, | ||
| 87 | <0x02000000 0x0 0x41000000 0x0 0x41000000 0x0 0x3f000000>; | ||
| 88 | |||
| 89 | |||
| 90 | #interrupt-cells = <0x1>; | ||
| 91 | |||
| 92 | // PCI_DEVICE(3) INT#(1) CONTROLLER(PHANDLE) CONTROLLER_DATA(3) | ||
| 93 | interrupt-map = < 0x0 0x0 0x0 0x1 &gic 0x0 0x4 0x1 | ||
| 94 | 0x800 0x0 0x0 0x1 &gic 0x0 0x5 0x1 | ||
| 95 | 0x1000 0x0 0x0 0x1 &gic 0x0 0x6 0x1 | ||
| 96 | 0x1800 0x0 0x0 0x1 &gic 0x0 0x7 0x1>; | ||
| 97 | |||
| 98 | // PCI_DEVICE(3) INT#(1) | ||
| 99 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | ||
| 100 | } | ||
diff --git a/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt b/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt new file mode 100644 index 000000000000..d8ef5bf50f11 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/pci-rcar-gen2.txt | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | Renesas AHB to PCI bridge | ||
| 2 | ------------------------- | ||
| 3 | |||
| 4 | This is the bridge used internally to connect the USB controllers to the | ||
| 5 | AHB. There is one bridge instance per USB port connected to the internal | ||
| 6 | OHCI and EHCI controllers. | ||
| 7 | |||
| 8 | Required properties: | ||
| 9 | - compatible: "renesas,pci-r8a7790" for the R8A7790 SoC; | ||
| 10 | "renesas,pci-r8a7791" for the R8A7791 SoC. | ||
| 11 | - reg: A list of physical regions to access the device: the first is | ||
| 12 | the operational registers for the OHCI/EHCI controllers and the | ||
| 13 | second is for the bridge configuration and control registers. | ||
| 14 | - interrupts: interrupt for the device. | ||
| 15 | - clocks: The reference to the device clock. | ||
| 16 | - bus-range: The PCI bus number range; as this is a single bus, the range | ||
| 17 | should be specified as the same value twice. | ||
| 18 | - #address-cells: must be 3. | ||
| 19 | - #size-cells: must be 2. | ||
| 20 | - #interrupt-cells: must be 1. | ||
| 21 | - interrupt-map: standard property used to define the mapping of the PCI | ||
| 22 | interrupts to the GIC interrupts. | ||
| 23 | - interrupt-map-mask: standard property that helps to define the interrupt | ||
| 24 | mapping. | ||
| 25 | |||
| 26 | Example SoC configuration: | ||
| 27 | |||
| 28 | pci0: pci@ee090000 { | ||
| 29 | compatible = "renesas,pci-r8a7790"; | ||
| 30 | clocks = <&mstp7_clks R8A7790_CLK_EHCI>; | ||
| 31 | reg = <0x0 0xee090000 0x0 0xc00>, | ||
| 32 | <0x0 0xee080000 0x0 0x1100>; | ||
| 33 | interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>; | ||
| 34 | status = "disabled"; | ||
| 35 | |||
| 36 | bus-range = <0 0>; | ||
| 37 | #address-cells = <3>; | ||
| 38 | #size-cells = <2>; | ||
| 39 | #interrupt-cells = <1>; | ||
| 40 | interrupt-map-mask = <0xff00 0 0 0x7>; | ||
| 41 | interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH | ||
| 42 | 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH | ||
| 43 | 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>; | ||
| 44 | |||
| 45 | pci@0,1 { | ||
| 46 | reg = <0x800 0 0 0 0>; | ||
| 47 | device_type = "pci"; | ||
| 48 | phys = <&usbphy 0 0>; | ||
| 49 | phy-names = "usb"; | ||
| 50 | }; | ||
| 51 | |||
| 52 | pci@0,2 { | ||
| 53 | reg = <0x1000 0 0 0 0>; | ||
| 54 | device_type = "pci"; | ||
| 55 | phys = <&usbphy 0 0>; | ||
| 56 | phy-names = "usb"; | ||
| 57 | }; | ||
| 58 | }; | ||
| 59 | |||
| 60 | Example board setup: | ||
| 61 | |||
| 62 | &pci0 { | ||
| 63 | status = "okay"; | ||
| 64 | pinctrl-0 = <&usb0_pins>; | ||
| 65 | pinctrl-names = "default"; | ||
| 66 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/rcar-pci.txt b/Documentation/devicetree/bindings/pci/rcar-pci.txt new file mode 100644 index 000000000000..29d3b989d3b0 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/rcar-pci.txt | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | * Renesas RCar PCIe interface | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should contain one of the following | ||
| 5 | "renesas,pcie-r8a7779", "renesas,pcie-r8a7790", "renesas,pcie-r8a7791" | ||
| 6 | - reg: base address and length of the pcie controller registers. | ||
| 7 | - #address-cells: set to <3> | ||
| 8 | - #size-cells: set to <2> | ||
| 9 | - bus-range: PCI bus numbers covered | ||
| 10 | - device_type: set to "pci" | ||
| 11 | - ranges: ranges for the PCI memory and I/O regions. | ||
| 12 | - dma-ranges: ranges for the inbound memory regions. | ||
| 13 | - interrupts: two interrupt sources for MSI interrupts, followed by interrupt | ||
| 14 | source for hardware related interrupts (e.g. link speed change). | ||
| 15 | - #interrupt-cells: set to <1> | ||
| 16 | - interrupt-map-mask and interrupt-map: standard PCI properties | ||
| 17 | to define the mapping of the PCIe interface to interrupt | ||
| 18 | numbers. | ||
| 19 | - clocks: from common clock binding: clock specifiers for the PCIe controller | ||
| 20 | and PCIe bus clocks. | ||
| 21 | - clock-names: from common clock binding: should be "pcie" and "pcie_bus". | ||
| 22 | |||
| 23 | Example: | ||
| 24 | |||
| 25 | SoC specific DT Entry: | ||
| 26 | |||
| 27 | pcie: pcie@fe000000 { | ||
| 28 | compatible = "renesas,pcie-r8a7791"; | ||
| 29 | reg = <0 0xfe000000 0 0x80000>; | ||
| 30 | #address-cells = <3>; | ||
| 31 | #size-cells = <2>; | ||
| 32 | bus-range = <0x00 0xff>; | ||
| 33 | device_type = "pci"; | ||
| 34 | ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000 | ||
| 35 | 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000 | ||
| 36 | 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000 | ||
| 37 | 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>; | ||
| 38 | dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000 | ||
| 39 | 0x42000000 2 0x00000000 2 0x00000000 0 0x40000000>; | ||
| 40 | interrupts = <0 116 4>, <0 117 4>, <0 118 4>; | ||
| 41 | #interrupt-cells = <1>; | ||
| 42 | interrupt-map-mask = <0 0 0 0>; | ||
| 43 | interrupt-map = <0 0 0 0 &gic 0 116 4>; | ||
| 44 | clocks = <&mstp3_clks R8A7791_CLK_PCIE>, <&pcie_bus_clk>; | ||
| 45 | clock-names = "pcie", "pcie_bus"; | ||
| 46 | status = "disabled"; | ||
| 47 | }; | ||
diff --git a/Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt b/Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt new file mode 100644 index 000000000000..4f9d23d2ed67 --- /dev/null +++ b/Documentation/devicetree/bindings/pci/samsung,exynos5440-pcie.txt | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | * Samsung Exynos 5440 PCIe interface | ||
| 2 | |||
| 3 | This PCIe host controller is based on the Synopsis Designware PCIe IP | ||
| 4 | and thus inherits all the common properties defined in designware-pcie.txt. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: "samsung,exynos5440-pcie" | ||
| 8 | - reg: base addresses and lengths of the pcie controller, | ||
| 9 | the phy controller, additional register for the phy controller. | ||
| 10 | - interrupts: A list of interrupt outputs for level interrupt, | ||
| 11 | pulse interrupt, special interrupt. | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | SoC specific DT Entry: | ||
| 16 | |||
| 17 | pcie@290000 { | ||
| 18 | compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; | ||
| 19 | reg = <0x290000 0x1000 | ||
| 20 | 0x270000 0x1000 | ||
| 21 | 0x271000 0x40>; | ||
| 22 | interrupts = <0 20 0>, <0 21 0>, <0 22 0>; | ||
| 23 | clocks = <&clock 28>, <&clock 27>; | ||
| 24 | clock-names = "pcie", "pcie_bus"; | ||
| 25 | #address-cells = <3>; | ||
| 26 | #size-cells = <2>; | ||
| 27 | device_type = "pci"; | ||
| 28 | ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */ | ||
| 29 | 0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */ | ||
| 30 | 0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */ | ||
| 31 | #interrupt-cells = <1>; | ||
| 32 | interrupt-map-mask = <0 0 0 0>; | ||
| 33 | interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>; | ||
| 34 | num-lanes = <4>; | ||
| 35 | }; | ||
| 36 | |||
| 37 | pcie@2a0000 { | ||
| 38 | compatible = "samsung,exynos5440-pcie", "snps,dw-pcie"; | ||
| 39 | reg = <0x2a0000 0x1000 | ||
| 40 | 0x272000 0x1000 | ||
| 41 | 0x271040 0x40>; | ||
| 42 | interrupts = <0 23 0>, <0 24 0>, <0 25 0>; | ||
| 43 | clocks = <&clock 29>, <&clock 27>; | ||
| 44 | clock-names = "pcie", "pcie_bus"; | ||
| 45 | #address-cells = <3>; | ||
| 46 | #size-cells = <2>; | ||
| 47 | device_type = "pci"; | ||
| 48 | ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */ | ||
| 49 | 0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */ | ||
| 50 | 0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */ | ||
| 51 | #interrupt-cells = <1>; | ||
| 52 | interrupt-map-mask = <0 0 0 0>; | ||
| 53 | interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; | ||
| 54 | num-lanes = <4>; | ||
| 55 | }; | ||
| 56 | |||
| 57 | Board specific DT Entry: | ||
| 58 | |||
| 59 | pcie@290000 { | ||
| 60 | reset-gpio = <&pin_ctrl 5 0>; | ||
| 61 | }; | ||
| 62 | |||
| 63 | pcie@2a0000 { | ||
| 64 | reset-gpio = <&pin_ctrl 22 0>; | ||
| 65 | }; | ||
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt index b422e38946d7..2049261d8c31 100644 --- a/Documentation/devicetree/bindings/phy/samsung-phy.txt +++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt | |||
| @@ -114,3 +114,50 @@ Example: | |||
| 114 | compatible = "samsung,exynos-sataphy-i2c"; | 114 | compatible = "samsung,exynos-sataphy-i2c"; |
| 115 | reg = <0x38>; | 115 | reg = <0x38>; |
| 116 | }; | 116 | }; |
| 117 | |||
| 118 | Samsung Exynos5 SoC series USB DRD PHY controller | ||
| 119 | -------------------------------------------------- | ||
| 120 | |||
| 121 | Required properties: | ||
| 122 | - compatible : Should be set to one of the following supported values: | ||
| 123 | - "samsung,exynos5250-usbdrd-phy" - for exynos5250 SoC, | ||
| 124 | - "samsung,exynos5420-usbdrd-phy" - for exynos5420 SoC. | ||
| 125 | - reg : Register offset and length of USB DRD PHY register set; | ||
| 126 | - clocks: Clock IDs array as required by the controller | ||
| 127 | - clock-names: names of clocks correseponding to IDs in the clock property; | ||
| 128 | Required clocks: | ||
| 129 | - phy: main PHY clock (same as USB DRD controller i.e. DWC3 IP clock), | ||
| 130 | used for register access. | ||
| 131 | - ref: PHY's reference clock (usually crystal clock), used for | ||
| 132 | PHY operations, associated by phy name. It is used to | ||
| 133 | determine bit values for clock settings register. | ||
| 134 | For Exynos5420 this is given as 'sclk_usbphy30' in CMU. | ||
| 135 | - samsung,pmu-syscon: phandle for PMU system controller interface, used to | ||
| 136 | control pmu registers for power isolation. | ||
| 137 | - #phy-cells : from the generic PHY bindings, must be 1; | ||
| 138 | |||
| 139 | For "samsung,exynos5250-usbdrd-phy" and "samsung,exynos5420-usbdrd-phy" | ||
| 140 | compatible PHYs, the second cell in the PHY specifier identifies the | ||
| 141 | PHY id, which is interpreted as follows: | ||
| 142 | 0 - UTMI+ type phy, | ||
| 143 | 1 - PIPE3 type phy, | ||
| 144 | |||
| 145 | Example: | ||
| 146 | usbdrd_phy: usbphy@12100000 { | ||
| 147 | compatible = "samsung,exynos5250-usbdrd-phy"; | ||
| 148 | reg = <0x12100000 0x100>; | ||
| 149 | clocks = <&clock 286>, <&clock 1>; | ||
| 150 | clock-names = "phy", "ref"; | ||
| 151 | samsung,pmu-syscon = <&pmu_system_controller>; | ||
| 152 | #phy-cells = <1>; | ||
| 153 | }; | ||
| 154 | |||
| 155 | - aliases: For SoCs like Exynos5420 having multiple USB 3.0 DRD PHY controllers, | ||
| 156 | 'usbdrd_phy' nodes should have numbered alias in the aliases node, | ||
| 157 | in the form of usbdrdphyN, N = 0, 1... (depending on number of | ||
| 158 | controllers). | ||
| 159 | Example: | ||
| 160 | aliases { | ||
| 161 | usbdrdphy0 = &usb3_phy0; | ||
| 162 | usbdrdphy1 = &usb3_phy1; | ||
| 163 | }; | ||
diff --git a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt index a82361b62015..16528b9eb561 100644 --- a/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt +++ b/Documentation/devicetree/bindings/phy/sun4i-usb-phy.txt | |||
| @@ -2,15 +2,26 @@ Allwinner sun4i USB PHY | |||
| 2 | ----------------------- | 2 | ----------------------- |
| 3 | 3 | ||
| 4 | Required properties: | 4 | Required properties: |
| 5 | - compatible : should be one of "allwinner,sun4i-a10-usb-phy", | 5 | - compatible : should be one of |
| 6 | "allwinner,sun5i-a13-usb-phy" or "allwinner,sun7i-a20-usb-phy" | 6 | * allwinner,sun4i-a10-usb-phy |
| 7 | * allwinner,sun5i-a13-usb-phy | ||
| 8 | * allwinner,sun6i-a31-usb-phy | ||
| 9 | * allwinner,sun7i-a20-usb-phy | ||
| 7 | - reg : a list of offset + length pairs | 10 | - reg : a list of offset + length pairs |
| 8 | - reg-names : "phy_ctrl", "pmu1" and for sun4i or sun7i "pmu2" | 11 | - reg-names : |
| 12 | * "phy_ctrl" | ||
| 13 | * "pmu1" | ||
| 14 | * "pmu2" for sun4i, sun6i or sun7i | ||
| 9 | - #phy-cells : from the generic phy bindings, must be 1 | 15 | - #phy-cells : from the generic phy bindings, must be 1 |
| 10 | - clocks : phandle + clock specifier for the phy clock | 16 | - clocks : phandle + clock specifier for the phy clocks |
| 11 | - clock-names : "usb_phy" | 17 | - clock-names : |
| 18 | * "usb_phy" for sun4i, sun5i or sun7i | ||
| 19 | * "usb0_phy", "usb1_phy" and "usb2_phy" for sun6i | ||
| 12 | - resets : a list of phandle + reset specifier pairs | 20 | - resets : a list of phandle + reset specifier pairs |
| 13 | - reset-names : "usb0_reset", "usb1_reset" and for sun4i or sun7i "usb2_reset" | 21 | - reset-names : |
| 22 | * "usb0_reset" | ||
| 23 | * "usb1_reset" | ||
| 24 | * "usb2_reset" for sun4i, sun6i or sun7i | ||
| 14 | 25 | ||
| 15 | Example: | 26 | Example: |
| 16 | usbphy: phy@0x01c13400 { | 27 | usbphy: phy@0x01c13400 { |
diff --git a/Documentation/devicetree/bindings/phy/ti-phy.txt b/Documentation/devicetree/bindings/phy/ti-phy.txt index 788fb0fa3762..9ce458f32945 100644 --- a/Documentation/devicetree/bindings/phy/ti-phy.txt +++ b/Documentation/devicetree/bindings/phy/ti-phy.txt | |||
| @@ -32,6 +32,11 @@ Required properties: | |||
| 32 | - reg : Address and length of the register set for the device. | 32 | - reg : Address and length of the register set for the device. |
| 33 | - #phy-cells: determine the number of cells that should be given in the | 33 | - #phy-cells: determine the number of cells that should be given in the |
| 34 | phandle while referencing this phy. | 34 | phandle while referencing this phy. |
| 35 | - clocks: a list of phandles and clock-specifier pairs, one for each entry in | ||
| 36 | clock-names. | ||
| 37 | - clock-names: should include: | ||
| 38 | * "wkupclk" - wakeup clock. | ||
| 39 | * "refclk" - reference clock (optional). | ||
| 35 | 40 | ||
| 36 | Optional properties: | 41 | Optional properties: |
| 37 | - ctrl-module : phandle of the control module used by PHY driver to power on | 42 | - ctrl-module : phandle of the control module used by PHY driver to power on |
| @@ -44,6 +49,8 @@ usb2phy@4a0ad080 { | |||
| 44 | reg = <0x4a0ad080 0x58>; | 49 | reg = <0x4a0ad080 0x58>; |
| 45 | ctrl-module = <&omap_control_usb>; | 50 | ctrl-module = <&omap_control_usb>; |
| 46 | #phy-cells = <0>; | 51 | #phy-cells = <0>; |
| 52 | clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>; | ||
| 53 | clock-names = "wkupclk", "refclk"; | ||
| 47 | }; | 54 | }; |
| 48 | 55 | ||
| 49 | TI PIPE3 PHY | 56 | TI PIPE3 PHY |
diff --git a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt index dff0e5f995e2..d8d065608ec0 100644 --- a/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/allwinner,sunxi-pinctrl.txt | |||
| @@ -6,8 +6,13 @@ the first two functions being GPIO in and out. The configuration on | |||
| 6 | the pins includes drive strength and pull-up. | 6 | the pins includes drive strength and pull-up. |
| 7 | 7 | ||
| 8 | Required properties: | 8 | Required properties: |
| 9 | - compatible: "allwinner,<soc>-pinctrl". Supported SoCs for now are: | 9 | - compatible: Should be one of the followings (depending on you SoC): |
| 10 | sun5i-a13. | 10 | "allwinner,sun4i-a10-pinctrl" |
| 11 | "allwinner,sun5i-a10s-pinctrl" | ||
| 12 | "allwinner,sun5i-a13-pinctrl" | ||
| 13 | "allwinner,sun6i-a31-pinctrl" | ||
| 14 | "allwinner,sun6i-a31-r-pinctrl" | ||
| 15 | "allwinner,sun7i-a20-pinctrl" | ||
| 11 | - reg: Should contain the register physical address and length for the | 16 | - reg: Should contain the register physical address and length for the |
| 12 | pin controller. | 17 | pin controller. |
| 13 | 18 | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt index c119debe6bab..4eaae32821ae 100644 --- a/Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm11351-pinctrl.txt | |||
| @@ -73,9 +73,9 @@ Optional Properties (for standard pins): | |||
| 73 | Otherwise: | 73 | Otherwise: |
| 74 | 0: fast slew rate | 74 | 0: fast slew rate |
| 75 | 1: normal slew rate | 75 | 1: normal slew rate |
| 76 | - input-enable: No arguements. Enable input (does not affect | 76 | - input-enable: No arguments. Enable input (does not affect |
| 77 | output.) | 77 | output.) |
| 78 | - input-disable: No arguements. Disable input (does not affect | 78 | - input-disable: No arguments. Disable input (does not affect |
| 79 | output.) | 79 | output.) |
| 80 | - drive-strength: Integer. Drive strength in mA. Valid values are | 80 | - drive-strength: Integer. Drive strength in mA. Valid values are |
| 81 | 2, 4, 6, 8, 10, 12, 14, 16 mA. | 81 | 2, 4, 6, 8, 10, 12, 14, 16 mA. |
| @@ -99,9 +99,9 @@ Optional Properties (for I2C pins): | |||
| 99 | Otherwise: | 99 | Otherwise: |
| 100 | 0: fast slew rate | 100 | 0: fast slew rate |
| 101 | 1: normal slew rate | 101 | 1: normal slew rate |
| 102 | - input-enable: No arguements. Enable input (does not affect | 102 | - input-enable: No arguments. Enable input (does not affect |
| 103 | output.) | 103 | output.) |
| 104 | - input-disable: No arguements. Disable input (does not affect | 104 | - input-disable: No arguments. Disable input (does not affect |
| 105 | output.) | 105 | output.) |
| 106 | 106 | ||
| 107 | Optional Properties (for HDMI pins): | 107 | Optional Properties (for HDMI pins): |
| @@ -111,15 +111,15 @@ Optional Properties (for HDMI pins): | |||
| 111 | - slew-rate: Integer. Controls slew rate. | 111 | - slew-rate: Integer. Controls slew rate. |
| 112 | 0: Standard(100kbps)& Fast(400kbps) mode | 112 | 0: Standard(100kbps)& Fast(400kbps) mode |
| 113 | 1: Highspeed (3.4Mbps) mode | 113 | 1: Highspeed (3.4Mbps) mode |
| 114 | - input-enable: No arguements. Enable input (does not affect | 114 | - input-enable: No arguments. Enable input (does not affect |
| 115 | output.) | 115 | output.) |
| 116 | - input-disable: No arguements. Disable input (does not affect | 116 | - input-disable: No arguments. Disable input (does not affect |
| 117 | output.) | 117 | output.) |
| 118 | 118 | ||
| 119 | Example: | 119 | Example: |
| 120 | // pin controller node | 120 | // pin controller node |
| 121 | pinctrl@35004800 { | 121 | pinctrl@35004800 { |
| 122 | compatible = "brcmbcm11351-pinctrl"; | 122 | compatible = "brcm,bcm11351-pinctrl"; |
| 123 | reg = <0x35004800 0x430>; | 123 | reg = <0x35004800 0x430>; |
| 124 | 124 | ||
| 125 | // pin configuration node | 125 | // pin configuration node |
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,imx6sx-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,imx6sx-pinctrl.txt new file mode 100644 index 000000000000..b1b595220f1b --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/fsl,imx6sx-pinctrl.txt | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | * Freescale i.MX6 SoloX 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,imx6sx-iomuxc" | ||
| 8 | - fsl,pins: each entry consists of 6 integers and represents the mux and config | ||
| 9 | setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val | ||
| 10 | input_val> are specified using a PIN_FUNC_ID macro, which can be found in | ||
| 11 | imx6sx-pinfunc.h under device tree source folder. The last integer CONFIG is | ||
| 12 | the pad setting value like pull-up on this pin. Please refer to i.MX6 SoloX | ||
| 13 | Reference Manual for detailed CONFIG settings. | ||
| 14 | |||
| 15 | CONFIG bits definition: | ||
| 16 | PAD_CTL_HYS (1 << 16) | ||
| 17 | PAD_CTL_PUS_100K_DOWN (0 << 14) | ||
| 18 | PAD_CTL_PUS_47K_UP (1 << 14) | ||
| 19 | PAD_CTL_PUS_100K_UP (2 << 14) | ||
| 20 | PAD_CTL_PUS_22K_UP (3 << 14) | ||
| 21 | PAD_CTL_PUE (1 << 13) | ||
| 22 | PAD_CTL_PKE (1 << 12) | ||
| 23 | PAD_CTL_ODE (1 << 11) | ||
| 24 | PAD_CTL_SPEED_LOW (0 << 6) | ||
| 25 | PAD_CTL_SPEED_MED (1 << 6) | ||
| 26 | PAD_CTL_SPEED_HIGH (3 << 6) | ||
| 27 | PAD_CTL_DSE_DISABLE (0 << 3) | ||
| 28 | PAD_CTL_DSE_260ohm (1 << 3) | ||
| 29 | PAD_CTL_DSE_130ohm (2 << 3) | ||
| 30 | PAD_CTL_DSE_87ohm (3 << 3) | ||
| 31 | PAD_CTL_DSE_65ohm (4 << 3) | ||
| 32 | PAD_CTL_DSE_52ohm (5 << 3) | ||
| 33 | PAD_CTL_DSE_43ohm (6 << 3) | ||
| 34 | PAD_CTL_DSE_37ohm (7 << 3) | ||
| 35 | PAD_CTL_SRE_FAST (1 << 0) | ||
| 36 | PAD_CTL_SRE_SLOW (0 << 0) | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/marvell,orion-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/marvell,orion-pinctrl.txt new file mode 100644 index 000000000000..27570a3a1741 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/marvell,orion-pinctrl.txt | |||
| @@ -0,0 +1,91 @@ | |||
| 1 | * Marvell Orion SoC pinctrl driver for mpp | ||
| 2 | |||
| 3 | Please refer to marvell,mvebu-pinctrl.txt in this directory for common binding | ||
| 4 | part and usage. | ||
| 5 | |||
| 6 | Required properties: | ||
| 7 | - compatible: "marvell,88f5181l-pinctrl", "marvell,88f5182-pinctrl", | ||
| 8 | "marvell,88f5281-pinctrl" | ||
| 9 | |||
| 10 | - reg: two register areas, the first one describing the first two | ||
| 11 | contiguous MPP registers, and the second one describing the single | ||
| 12 | final MPP register, separated from the previous one. | ||
| 13 | |||
| 14 | Available mpp pins/groups and functions: | ||
| 15 | Note: brackets (x) are not part of the mpp name for marvell,function and given | ||
| 16 | only for more detailed description in this document. | ||
| 17 | |||
| 18 | * Marvell Orion 88f5181l | ||
| 19 | |||
| 20 | name pins functions | ||
| 21 | ================================================================================ | ||
| 22 | mpp0 0 pcie(rstout), pci(req2), gpio | ||
| 23 | mpp1 1 gpio, pci(gnt2) | ||
| 24 | mpp2 2 gpio, pci(req3), pci-1(pme) | ||
| 25 | mpp3 3 gpio, pci(gnt3) | ||
| 26 | mpp4 4 gpio, pci(req4) | ||
| 27 | mpp5 5 gpio, pci(gnt4) | ||
| 28 | mpp6 6 gpio, pci(req5), pci-1(clk) | ||
| 29 | mpp7 7 gpio, pci(gnt5), pci-1(clk) | ||
| 30 | mpp8 8 gpio, ge(col) | ||
| 31 | mpp9 9 gpio, ge(rxerr) | ||
| 32 | mpp10 10 gpio, ge(crs) | ||
| 33 | mpp11 11 gpio, ge(txerr) | ||
| 34 | mpp12 12 gpio, ge(txd4) | ||
| 35 | mpp13 13 gpio, ge(txd5) | ||
| 36 | mpp14 14 gpio, ge(txd6) | ||
| 37 | mpp15 15 gpio, ge(txd7) | ||
| 38 | mpp16 16 ge(rxd4) | ||
| 39 | mpp17 17 ge(rxd5) | ||
| 40 | mpp18 18 ge(rxd6) | ||
| 41 | mpp19 19 ge(rxd7) | ||
| 42 | |||
| 43 | * Marvell Orion 88f5182 | ||
| 44 | |||
| 45 | name pins functions | ||
| 46 | ================================================================================ | ||
| 47 | mpp0 0 pcie(rstout), pci(req2), gpio | ||
| 48 | mpp1 1 gpio, pci(gnt2) | ||
| 49 | mpp2 2 gpio, pci(req3), pci-1(pme) | ||
| 50 | mpp3 3 gpio, pci(gnt3) | ||
| 51 | mpp4 4 gpio, pci(req4), bootnand(re), sata0(prsnt) | ||
| 52 | mpp5 5 gpio, pci(gnt4), bootnand(we), sata1(prsnt) | ||
| 53 | mpp6 6 gpio, pci(req5), nand(re0), sata0(act) | ||
| 54 | mpp7 7 gpio, pci(gnt5), nand(we0), sata1(act) | ||
| 55 | mpp8 8 gpio, ge(col) | ||
| 56 | mpp9 9 gpio, ge(rxerr) | ||
| 57 | mpp10 10 gpio, ge(crs) | ||
| 58 | mpp11 11 gpio, ge(txerr) | ||
| 59 | mpp12 12 gpio, ge(txd4), nand(re1), sata0(ledprsnt) | ||
| 60 | mpp13 13 gpio, ge(txd5), nand(we1), sata1(ledprsnt) | ||
| 61 | mpp14 14 gpio, ge(txd6), nand(re2), sata0(ledact) | ||
| 62 | mpp15 15 gpio, ge(txd7), nand(we2), sata1(ledact) | ||
| 63 | mpp16 16 uart1(rxd), ge(rxd4), gpio | ||
| 64 | mpp17 17 uart1(txd), ge(rxd5), gpio | ||
| 65 | mpp18 18 uart1(cts), ge(rxd6), gpio | ||
| 66 | mpp19 19 uart1(rts), ge(rxd7), gpio | ||
| 67 | |||
| 68 | * Marvell Orion 88f5281 | ||
| 69 | |||
| 70 | name pins functions | ||
| 71 | ================================================================================ | ||
| 72 | mpp0 0 pcie(rstout), pci(req2), gpio | ||
| 73 | mpp1 1 gpio, pci(gnt2) | ||
| 74 | mpp2 2 gpio, pci(req3), pci(pme) | ||
| 75 | mpp3 3 gpio, pci(gnt3) | ||
| 76 | mpp4 4 gpio, pci(req4), bootnand(re) | ||
| 77 | mpp5 5 gpio, pci(gnt4), bootnand(we) | ||
| 78 | mpp6 6 gpio, pci(req5), nand(re0) | ||
| 79 | mpp7 7 gpio, pci(gnt5), nand(we0) | ||
| 80 | mpp8 8 gpio, ge(col) | ||
| 81 | mpp9 9 gpio, ge(rxerr) | ||
| 82 | mpp10 10 gpio, ge(crs) | ||
| 83 | mpp11 11 gpio, ge(txerr) | ||
| 84 | mpp12 12 gpio, ge(txd4), nand(re1) | ||
| 85 | mpp13 13 gpio, ge(txd5), nand(we1) | ||
| 86 | mpp14 14 gpio, ge(txd6), nand(re2) | ||
| 87 | mpp15 15 gpio, ge(txd7), nand(we2) | ||
| 88 | mpp16 16 uart1(rxd), ge(rxd4) | ||
| 89 | mpp17 17 uart1(txd), ge(rxd5) | ||
| 90 | mpp18 18 uart1(cts), ge(rxd6) | ||
| 91 | mpp19 19 uart1(rts), ge(rxd7) | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt index 4414163e76d2..fa40a177164c 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | |||
| @@ -156,6 +156,7 @@ input-disable - disable input on pin (no effect on output) | |||
| 156 | input-schmitt-enable - enable schmitt-trigger mode | 156 | input-schmitt-enable - enable schmitt-trigger mode |
| 157 | input-schmitt-disable - disable schmitt-trigger mode | 157 | input-schmitt-disable - disable schmitt-trigger mode |
| 158 | input-debounce - debounce mode with debound time X | 158 | input-debounce - debounce mode with debound time X |
| 159 | power-source - select between different power supplies | ||
| 159 | low-power-enable - enable low power mode | 160 | low-power-enable - enable low power mode |
| 160 | low-power-disable - disable low power mode | 161 | low-power-disable - disable low power mode |
| 161 | output-low - set the pin to output mode with low level | 162 | output-low - set the pin to output mode with low level |
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt index 4bd5be0e5e7d..26bcb18f4e60 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-st.txt | |||
| @@ -83,7 +83,7 @@ Example: | |||
| 83 | reg = <0xfe61f080 0x4>; | 83 | reg = <0xfe61f080 0x4>; |
| 84 | reg-names = "irqmux"; | 84 | reg-names = "irqmux"; |
| 85 | interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>; | 85 | interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>; |
| 86 | interrupts-names = "irqmux"; | 86 | interrupt-names = "irqmux"; |
| 87 | ranges = <0 0xfe610000 0x5000>; | 87 | ranges = <0 0xfe610000 0x5000>; |
| 88 | 88 | ||
| 89 | PIO0: gpio@fe610000 { | 89 | PIO0: gpio@fe610000 { |
| @@ -165,7 +165,7 @@ sdhci0:sdhci@fe810000{ | |||
| 165 | interrupt-parent = <&PIO3>; | 165 | interrupt-parent = <&PIO3>; |
| 166 | #interrupt-cells = <2>; | 166 | #interrupt-cells = <2>; |
| 167 | interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; /* Interrupt line via PIO3-3 */ | 167 | interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; /* Interrupt line via PIO3-3 */ |
| 168 | interrupts-names = "card-detect"; | 168 | interrupt-names = "card-detect"; |
| 169 | pinctrl-names = "default"; | 169 | pinctrl-names = "default"; |
| 170 | pinctrl-0 = <&pinctrl_mmc>; | 170 | pinctrl-0 = <&pinctrl_mmc>; |
| 171 | }; | 171 | }; |
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt new file mode 100644 index 000000000000..7181f925acaa --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/qcom,apq8064-pinctrl.txt | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | Qualcomm APQ8064 TLMM block | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: "qcom,apq8064-pinctrl" | ||
| 5 | - reg: Should be the base address and length of the TLMM block. | ||
| 6 | - interrupts: Should be the parent IRQ of the TLMM block. | ||
| 7 | - interrupt-controller: Marks the device node as an interrupt controller. | ||
| 8 | - #interrupt-cells: Should be two. | ||
| 9 | - gpio-controller: Marks the device node as a GPIO controller. | ||
| 10 | - #gpio-cells : Should be two. | ||
| 11 | The first cell is the gpio pin number and the | ||
| 12 | second cell is used for optional parameters. | ||
| 13 | |||
| 14 | Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for | ||
| 15 | a general description of GPIO and interrupt bindings. | ||
| 16 | |||
| 17 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
| 18 | common pinctrl bindings used by client devices, including the meaning of the | ||
| 19 | phrase "pin configuration node". | ||
| 20 | |||
| 21 | Qualcomm's pin configuration nodes act as a container for an abitrary number of | ||
| 22 | subnodes. Each of these subnodes represents some desired configuration for a | ||
| 23 | pin, a group, or a list of pins or groups. This configuration can include the | ||
| 24 | mux function to select on those pin(s)/group(s), and various pin configuration | ||
| 25 | parameters, such as pull-up, drive strength, etc. | ||
| 26 | |||
| 27 | The name of each subnode is not important; all subnodes should be enumerated | ||
| 28 | and processed purely based on their content. | ||
| 29 | |||
| 30 | Each subnode only affects those parameters that are explicitly listed. In | ||
| 31 | other words, a subnode that lists a mux function but no pin configuration | ||
| 32 | parameters implies no information about any pin configuration parameters. | ||
| 33 | Similarly, a pin subnode that describes a pullup parameter implies no | ||
| 34 | information about e.g. the mux function. | ||
| 35 | |||
| 36 | |||
| 37 | The following generic properties as defined in pinctrl-bindings.txt are valid | ||
| 38 | to specify in a pin configuration subnode: | ||
| 39 | |||
| 40 | pins, function, bias-disable, bias-pull-down, bias-pull,up, drive-strength, | ||
| 41 | output-low, output-high. | ||
| 42 | |||
| 43 | Non-empty subnodes must specify the 'pins' property. | ||
| 44 | |||
| 45 | Valid values for pins are: | ||
| 46 | gpio0-gpio89 | ||
| 47 | |||
| 48 | Valid values for function are: | ||
| 49 | cam_mclk, codec_mic_i2s, codec_spkr_i2s, gsbi1, gsbi2, gsbi3, gsbi4, | ||
| 50 | gsbi4_cam_i2c, gsbi5, gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, | ||
| 51 | gsbi6_spi_cs1, gsbi6_spi_cs2, gsbi6_spi_cs3, gsbi7, gsbi7_spi_cs1, | ||
| 52 | gsbi7_spi_cs2, gsbi7_spi_cs3, gsbi_cam_i2c, hdmi, mi2s, riva_bt, riva_fm, | ||
| 53 | riva_wlan, sdc2, sdc4, slimbus, spkr_i2s, tsif1, tsif2, usb2_hsic, | ||
| 54 | |||
| 55 | Example: | ||
| 56 | |||
| 57 | msmgpio: pinctrl@800000 { | ||
| 58 | compatible = "qcom,apq8064-pinctrl"; | ||
| 59 | reg = <0x800000 0x4000>; | ||
| 60 | |||
| 61 | gpio-controller; | ||
| 62 | #gpio-cells = <2>; | ||
| 63 | interrupt-controller; | ||
| 64 | #interrupt-cells = <2>; | ||
| 65 | interrupts = <0 32 0x4>; | ||
| 66 | |||
| 67 | pinctrl-names = "default"; | ||
| 68 | pinctrl-0 = <&gsbi5_uart_default>; | ||
| 69 | |||
| 70 | gsbi5_uart_default: gsbi5_uart_default { | ||
| 71 | mux { | ||
| 72 | pins = "gpio51", "gpio52"; | ||
| 73 | function = "gsbi5"; | ||
| 74 | }; | ||
| 75 | |||
| 76 | tx { | ||
| 77 | pins = "gpio51"; | ||
| 78 | drive-strength = <4>; | ||
| 79 | bias-disable; | ||
| 80 | }; | ||
| 81 | |||
| 82 | rx { | ||
| 83 | pins = "gpio52"; | ||
| 84 | drive-strength = <2>; | ||
| 85 | bias-pull-up; | ||
| 86 | }; | ||
| 87 | }; | ||
| 88 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt new file mode 100644 index 000000000000..e0d35a40981b --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/qcom,ipq8064-pinctrl.txt | |||
| @@ -0,0 +1,95 @@ | |||
| 1 | Qualcomm IPQ8064 TLMM block | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: "qcom,ipq8064-pinctrl" | ||
| 5 | - reg: Should be the base address and length of the TLMM block. | ||
| 6 | - interrupts: Should be the parent IRQ of the TLMM block. | ||
| 7 | - interrupt-controller: Marks the device node as an interrupt controller. | ||
| 8 | - #interrupt-cells: Should be two. | ||
| 9 | - gpio-controller: Marks the device node as a GPIO controller. | ||
| 10 | - #gpio-cells : Should be two. | ||
| 11 | The first cell is the gpio pin number and the | ||
| 12 | second cell is used for optional parameters. | ||
| 13 | |||
| 14 | Please refer to ../gpio/gpio.txt and ../interrupt-controller/interrupts.txt for | ||
| 15 | a general description of GPIO and interrupt bindings. | ||
| 16 | |||
| 17 | Please refer to pinctrl-bindings.txt in this directory for details of the | ||
| 18 | common pinctrl bindings used by client devices, including the meaning of the | ||
| 19 | phrase "pin configuration node". | ||
| 20 | |||
| 21 | Qualcomm's pin configuration nodes act as a container for an abitrary number of | ||
| 22 | subnodes. Each of these subnodes represents some desired configuration for a | ||
| 23 | pin, a group, or a list of pins or groups. This configuration can include the | ||
| 24 | mux function to select on those pin(s)/group(s), and various pin configuration | ||
| 25 | parameters, such as pull-up, drive strength, etc. | ||
| 26 | |||
| 27 | The name of each subnode is not important; all subnodes should be enumerated | ||
| 28 | and processed purely based on their content. | ||
| 29 | |||
| 30 | Each subnode only affects those parameters that are explicitly listed. In | ||
| 31 | other words, a subnode that lists a mux function but no pin configuration | ||
| 32 | parameters implies no information about any pin configuration parameters. | ||
| 33 | Similarly, a pin subnode that describes a pullup parameter implies no | ||
| 34 | information about e.g. the mux function. | ||
| 35 | |||
| 36 | |||
| 37 | The following generic properties as defined in pinctrl-bindings.txt are valid | ||
| 38 | to specify in a pin configuration subnode: | ||
| 39 | |||
| 40 | pins, function, bias-disable, bias-pull-down, bias-pull,up, drive-strength, | ||
| 41 | output-low, output-high. | ||
| 42 | |||
| 43 | Non-empty subnodes must specify the 'pins' property. | ||
| 44 | |||
| 45 | Valid values for qcom,pins are: | ||
| 46 | gpio0-gpio68 | ||
| 47 | Supports mux, bias, and drive-strength | ||
| 48 | |||
| 49 | sdc3_clk, sdc3_cmd, sdc3_data | ||
| 50 | Supports bias and drive-strength | ||
| 51 | |||
| 52 | |||
| 53 | Valid values for function are: | ||
| 54 | mdio, mi2s, pdm, ssbi, spmi, audio_pcm, gsbi1, gsbi2, gsbi4, gsbi5, | ||
| 55 | gsbi5_spi_cs1, gsbi5_spi_cs2, gsbi5_spi_cs3, gsbi6, gsbi7, nss_spi, sdc1, | ||
| 56 | spdif, nand, tsif1, tsif2, usb_fs_n, usb_fs, usb2_hsic, rgmii2, sata, | ||
| 57 | pcie1_rst, pcie1_prsnt, pcie1_pwren_n, pcie1_pwren, pcie1_pwrflt, | ||
| 58 | pcie1_clk_req, pcie2_rst, pcie2_prsnt, pcie2_pwren_n, pcie2_pwren, | ||
| 59 | pcie2_pwrflt, pcie2_clk_req, pcie3_rst, pcie3_prsnt, pcie3_pwren_n, | ||
| 60 | pcie3_pwren, pcie3_pwrflt, pcie3_clk_req, ps_hold | ||
| 61 | |||
| 62 | Example: | ||
| 63 | |||
| 64 | pinmux: pinctrl@800000 { | ||
| 65 | compatible = "qcom,ipq8064-pinctrl"; | ||
| 66 | reg = <0x800000 0x4000>; | ||
| 67 | |||
| 68 | gpio-controller; | ||
| 69 | #gpio-cells = <2>; | ||
| 70 | interrupt-controller; | ||
| 71 | #interrupt-cells = <2>; | ||
| 72 | interrupts = <0 32 0x4>; | ||
| 73 | |||
| 74 | pinctrl-names = "default"; | ||
| 75 | pinctrl-0 = <&gsbi5_uart_default>; | ||
| 76 | |||
| 77 | gsbi5_uart_default: gsbi5_uart_default { | ||
| 78 | mux { | ||
| 79 | pins = "gpio18", "gpio19"; | ||
| 80 | function = "gsbi5"; | ||
| 81 | }; | ||
| 82 | |||
| 83 | tx { | ||
| 84 | pins = "gpio18"; | ||
| 85 | drive-strength = <4>; | ||
| 86 | bias-disable; | ||
| 87 | }; | ||
| 88 | |||
| 89 | rx { | ||
| 90 | pins = "gpio19"; | ||
| 91 | drive-strength = <2>; | ||
| 92 | bias-pull-up; | ||
| 93 | }; | ||
| 94 | }; | ||
| 95 | }; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt index 9fb89e3f61ea..73262b575dfc 100644 --- a/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/qcom,msm8974-pinctrl.txt | |||
| @@ -50,7 +50,27 @@ Valid values for pins are: | |||
| 50 | Supports bias and drive-strength | 50 | Supports bias and drive-strength |
| 51 | 51 | ||
| 52 | Valid values for function are: | 52 | Valid values for function are: |
| 53 | blsp_i2c2, blsp_i2c6, blsp_i2c11, blsp_spi1, blsp_uart2, blsp_uart8, slimbus | 53 | cci_i2c0, cci_i2c1, uim1, uim2, uim_batt_alarm, |
| 54 | blsp_uim1, blsp_uart1, blsp_i2c1, blsp_spi1, | ||
| 55 | blsp_uim2, blsp_uart2, blsp_i2c2, blsp_spi2, | ||
| 56 | blsp_uim3, blsp_uart3, blsp_i2c3, blsp_spi3, | ||
| 57 | blsp_uim4, blsp_uart4, blsp_i2c4, blsp_spi4, | ||
| 58 | blsp_uim5, blsp_uart5, blsp_i2c5, blsp_spi5, | ||
| 59 | blsp_uim6, blsp_uart6, blsp_i2c6, blsp_spi6, | ||
| 60 | blsp_uim7, blsp_uart7, blsp_i2c7, blsp_spi7, | ||
| 61 | blsp_uim8, blsp_uart8, blsp_i2c8, blsp_spi8, | ||
| 62 | blsp_uim9, blsp_uart9, blsp_i2c9, blsp_spi9, | ||
| 63 | blsp_uim10, blsp_uart10, blsp_i2c10, blsp_spi10, | ||
| 64 | blsp_uim11, blsp_uart11, blsp_i2c11, blsp_spi11, | ||
| 65 | blsp_uim12, blsp_uart12, blsp_i2c12, blsp_spi12, | ||
| 66 | blsp_spi1_cs1, blsp_spi2_cs2, blsp_spi_cs3, blsp_spi2_cs1, blsp_spi2_cs2 | ||
| 67 | blsp_spi2_cs3, blsp_spi10_cs1, blsp_spi10_cs2, blsp_spi10_cs3, | ||
| 68 | sdc3, sdc4, gcc_gp_clk1, gcc_gp_clk2, gcc_gp_clk3, cci_timer0, cci_timer1, | ||
| 69 | cci_timer2, cci_timer3, cci_async_in0, cci_async_in1, cci_async_in2, | ||
| 70 | cam_mckl0, cam_mclk1, cam_mclk2, cam_mclk3, mdp_vsync, hdmi_cec, hdmi_ddc, | ||
| 71 | hdmi_hpd, edp_hpd, gp_pdm0, gp_pdm1, gp_pdm2, gp_pdm3, gp0_clk, gp1_clk, | ||
| 72 | gp_mn, tsif1, tsif2, hsic, grfc, audio_ref_clk, qua_mi2s, pri_mi2s, spkr_mi2s, | ||
| 73 | ter_mi2s, sec_mi2s, bt, fm, wlan, slimbus | ||
| 54 | 74 | ||
| 55 | (Note that this is not yet the complete list of functions) | 75 | (Note that this is not yet the complete list of functions) |
| 56 | 76 | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt index f378d342aae4..cefef741a40b 100644 --- a/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/rockchip,pinctrl.txt | |||
| @@ -21,13 +21,23 @@ defined as gpio sub-nodes of the pinmux controller. | |||
| 21 | Required properties for iomux controller: | 21 | Required properties for iomux controller: |
| 22 | - compatible: one of "rockchip,rk2928-pinctrl", "rockchip,rk3066a-pinctrl" | 22 | - compatible: one of "rockchip,rk2928-pinctrl", "rockchip,rk3066a-pinctrl" |
| 23 | "rockchip,rk3066b-pinctrl", "rockchip,rk3188-pinctrl" | 23 | "rockchip,rk3066b-pinctrl", "rockchip,rk3188-pinctrl" |
| 24 | - rockchip,grf: phandle referencing a syscon providing the | ||
| 25 | "general register files" | ||
| 26 | |||
| 27 | Optional properties for iomux controller: | ||
| 28 | - rockchip,pmu: phandle referencing a syscon providing the pmu registers | ||
| 29 | as some SoCs carry parts of the iomux controller registers there. | ||
| 30 | Required for at least rk3188 and rk3288. | ||
| 31 | |||
| 32 | Deprecated properties for iomux controller: | ||
| 24 | - reg: first element is the general register space of the iomux controller | 33 | - reg: first element is the general register space of the iomux controller |
| 25 | second element is the separate pull register space of the rk3188 | 34 | It should be large enough to contain also separate pull registers. |
| 35 | second element is the separate pull register space of the rk3188. | ||
| 36 | Use rockchip,grf and rockchip,pmu described above instead. | ||
| 26 | 37 | ||
| 27 | Required properties for gpio sub nodes: | 38 | Required properties for gpio sub nodes: |
| 28 | - compatible: "rockchip,gpio-bank", "rockchip,rk3188-gpio-bank0" | 39 | - compatible: "rockchip,gpio-bank", "rockchip,rk3188-gpio-bank0" |
| 29 | - reg: register of the gpio bank (different than the iomux registerset) | 40 | - reg: register of the gpio bank (different than the iomux registerset) |
| 30 | second element: separate pull register for rk3188 bank0 | ||
| 31 | - interrupts: base interrupt of the gpio bank in the interrupt controller | 41 | - interrupts: base interrupt of the gpio bank in the interrupt controller |
| 32 | - clocks: clock that drives this bank | 42 | - clocks: clock that drives this bank |
| 33 | - gpio-controller: identifies the node as a gpio controller and pin bank. | 43 | - gpio-controller: identifies the node as a gpio controller and pin bank. |
| @@ -39,6 +49,10 @@ Required properties for gpio sub nodes: | |||
| 39 | cells should use the standard two-cell scheme described in | 49 | cells should use the standard two-cell scheme described in |
| 40 | bindings/interrupt-controller/interrupts.txt | 50 | bindings/interrupt-controller/interrupts.txt |
| 41 | 51 | ||
| 52 | Deprecated properties for gpio sub nodes: | ||
| 53 | - reg: second element: separate pull register for rk3188 bank0, use | ||
| 54 | rockchip,pmu described above instead | ||
| 55 | |||
| 42 | Required properties for pin configuration node: | 56 | Required properties for pin configuration node: |
| 43 | - rockchip,pins: 3 integers array, represents a group of pins mux and config | 57 | - rockchip,pins: 3 integers array, represents a group of pins mux and config |
| 44 | setting. The format is rockchip,pins = <PIN_BANK PIN_BANK_IDX MUX &phandle>. | 58 | setting. The format is rockchip,pins = <PIN_BANK PIN_BANK_IDX MUX &phandle>. |
| @@ -54,7 +68,8 @@ Examples: | |||
| 54 | 68 | ||
| 55 | pinctrl@20008000 { | 69 | pinctrl@20008000 { |
| 56 | compatible = "rockchip,rk3066a-pinctrl"; | 70 | compatible = "rockchip,rk3066a-pinctrl"; |
| 57 | reg = <0x20008000 0x150>; | 71 | rockchip,grf = <&grf>; |
| 72 | |||
| 58 | #address-cells = <1>; | 73 | #address-cells = <1>; |
| 59 | #size-cells = <1>; | 74 | #size-cells = <1>; |
| 60 | ranges; | 75 | ranges; |
| @@ -103,16 +118,15 @@ Example for rk3188: | |||
| 103 | 118 | ||
| 104 | pinctrl@20008000 { | 119 | pinctrl@20008000 { |
| 105 | compatible = "rockchip,rk3188-pinctrl"; | 120 | compatible = "rockchip,rk3188-pinctrl"; |
| 106 | reg = <0x20008000 0xa0>, | 121 | rockchip,grf = <&grf>; |
| 107 | <0x20008164 0x1a0>; | 122 | rockchip,pmu = <&pmu>; |
| 108 | #address-cells = <1>; | 123 | #address-cells = <1>; |
| 109 | #size-cells = <1>; | 124 | #size-cells = <1>; |
| 110 | ranges; | 125 | ranges; |
| 111 | 126 | ||
| 112 | gpio0: gpio0@0x2000a000 { | 127 | gpio0: gpio0@0x2000a000 { |
| 113 | compatible = "rockchip,rk3188-gpio-bank0"; | 128 | compatible = "rockchip,rk3188-gpio-bank0"; |
| 114 | reg = <0x2000a000 0x100>, | 129 | reg = <0x2000a000 0x100>; |
| 115 | <0x20004064 0x8>; | ||
| 116 | interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; | 130 | interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>; |
| 117 | clocks = <&clk_gates8 9>; | 131 | clocks = <&clk_gates8 9>; |
| 118 | 132 | ||
diff --git a/Documentation/devicetree/bindings/power/reset/keystone-reset.txt b/Documentation/devicetree/bindings/power/reset/keystone-reset.txt new file mode 100644 index 000000000000..c82f12e2d85c --- /dev/null +++ b/Documentation/devicetree/bindings/power/reset/keystone-reset.txt | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | * Device tree bindings for Texas Instruments keystone reset | ||
| 2 | |||
| 3 | This node is intended to allow SoC reset in case of software reset | ||
| 4 | of selected watchdogs. | ||
| 5 | |||
| 6 | The Keystone SoCs can contain up to 4 watchdog timers to reset | ||
| 7 | SoC. Each watchdog timer event input is connected to the Reset Mux | ||
| 8 | block. The Reset Mux block can be configured to cause reset or not. | ||
| 9 | |||
| 10 | Additionally soft or hard reset can be configured. | ||
| 11 | |||
| 12 | Required properties: | ||
| 13 | |||
| 14 | - compatible: ti,keystone-reset | ||
| 15 | |||
| 16 | - ti,syscon-pll: phandle/offset pair. The phandle to syscon used to | ||
| 17 | access pll controller registers and the offset to use | ||
| 18 | reset control registers. | ||
| 19 | |||
| 20 | - ti,syscon-dev: phandle/offset pair. The phandle to syscon used to | ||
| 21 | access device state control registers and the offset | ||
| 22 | in order to use mux block registers for all watchdogs. | ||
| 23 | |||
| 24 | Optional properties: | ||
| 25 | |||
| 26 | - ti,soft-reset: Boolean option indicating soft reset. | ||
| 27 | By default hard reset is used. | ||
| 28 | |||
| 29 | - ti,wdt-list: WDT list that can cause SoC reset. It's not related | ||
| 30 | to WDT driver, it's just needed to enable a SoC related | ||
| 31 | reset that's triggered by one of WDTs. The list is | ||
| 32 | in format: <0>, <2>; It can be in random order and | ||
| 33 | begins from 0 to 3, as keystone can contain up to 4 SoC | ||
| 34 | reset watchdogs and can be in random order. | ||
| 35 | |||
| 36 | Example 1: | ||
| 37 | Setup keystone reset so that in case software reset or | ||
| 38 | WDT0 is triggered it issues hard reset for SoC. | ||
| 39 | |||
| 40 | pllctrl: pll-controller@02310000 { | ||
| 41 | compatible = "ti,keystone-pllctrl", "syscon"; | ||
| 42 | reg = <0x02310000 0x200>; | ||
| 43 | }; | ||
| 44 | |||
| 45 | devctrl: device-state-control@02620000 { | ||
| 46 | compatible = "ti,keystone-devctrl", "syscon"; | ||
| 47 | reg = <0x02620000 0x1000>; | ||
| 48 | }; | ||
| 49 | |||
| 50 | rstctrl: reset-controller { | ||
| 51 | compatible = "ti,keystone-reset"; | ||
| 52 | ti,syscon-pll = <&pllctrl 0xe4>; | ||
| 53 | ti,syscon-dev = <&devctrl 0x328>; | ||
| 54 | ti,wdt-list = <0>; | ||
| 55 | }; | ||
| 56 | |||
| 57 | Example 2: | ||
| 58 | Setup keystone reset so that in case of software reset or | ||
| 59 | WDT0 or WDT2 is triggered it issues soft reset for SoC. | ||
| 60 | |||
| 61 | rstctrl: reset-controller { | ||
| 62 | compatible = "ti,keystone-reset"; | ||
| 63 | ti,syscon-pll = <&pllctrl 0xe4>; | ||
| 64 | ti,syscon-dev = <&devctrl 0x328>; | ||
| 65 | ti,wdt-list = <0>, <2>; | ||
| 66 | ti,soft-reset; | ||
| 67 | }; | ||
diff --git a/Documentation/devicetree/bindings/power_supply/axxia-reset.txt b/Documentation/devicetree/bindings/power_supply/axxia-reset.txt new file mode 100644 index 000000000000..47e720d249d2 --- /dev/null +++ b/Documentation/devicetree/bindings/power_supply/axxia-reset.txt | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | Axxia Restart Driver | ||
| 2 | |||
| 3 | This driver can do reset of the Axxia SoC. It uses the registers in the syscon | ||
| 4 | block to initiate a chip reset. | ||
| 5 | |||
| 6 | Required Properties: | ||
| 7 | -compatible: "lsi,axm55xx-reset" | ||
| 8 | -syscon: phandle to the syscon node. | ||
| 9 | |||
| 10 | Example: | ||
| 11 | |||
| 12 | syscon: syscon@2010030000 { | ||
| 13 | compatible = "lsi,axxia-syscon", "syscon"; | ||
| 14 | reg = <0x20 0x10030000 0 0x2000>; | ||
| 15 | }; | ||
| 16 | |||
| 17 | reset: reset@2010031000 { | ||
| 18 | compatible = "lsi,axm55xx-reset"; | ||
| 19 | syscon = <&syscon>; | ||
| 20 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/akebono.txt b/Documentation/devicetree/bindings/powerpc/4xx/akebono.txt new file mode 100644 index 000000000000..db939210e29d --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/4xx/akebono.txt | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | |||
| 2 | IBM Akebono board device tree | ||
| 3 | ============================= | ||
| 4 | |||
| 5 | The IBM Akebono board is a development board for the PPC476GTR SoC. | ||
| 6 | |||
| 7 | 0) The root node | ||
| 8 | |||
| 9 | Required properties: | ||
| 10 | |||
| 11 | - model : "ibm,akebono". | ||
| 12 | - compatible : "ibm,akebono" , "ibm,476gtr". | ||
| 13 | |||
| 14 | 1.a) The Secure Digital Host Controller Interface (SDHCI) node | ||
| 15 | |||
| 16 | Represent the Secure Digital Host Controller Interfaces. | ||
| 17 | |||
| 18 | Required properties: | ||
| 19 | |||
| 20 | - compatible : should be "ibm,476gtr-sdhci","generic-sdhci". | ||
| 21 | - reg : should contain the SDHCI registers location and length. | ||
| 22 | - interrupt-parent : a phandle for the interrupt controller. | ||
| 23 | - interrupts : should contain the SDHCI interrupt. | ||
| 24 | |||
| 25 | 1.b) The Advanced Host Controller Interface (AHCI) SATA node | ||
| 26 | |||
| 27 | Represents the advanced host controller SATA interface. | ||
| 28 | |||
| 29 | Required properties: | ||
| 30 | |||
| 31 | - compatible : should be "ibm,476gtr-ahci". | ||
| 32 | - reg : should contain the AHCI registers location and length. | ||
| 33 | - interrupt-parent : a phandle for the interrupt controller. | ||
| 34 | - interrupts : should contain the AHCI interrupt. | ||
| 35 | |||
| 36 | 1.c) The FPGA node | ||
| 37 | |||
| 38 | The Akebono board stores some board information such as the revision | ||
| 39 | number in an FPGA which is represented by this node. | ||
| 40 | |||
| 41 | Required properties: | ||
| 42 | |||
| 43 | - compatible : should be "ibm,akebono-fpga". | ||
| 44 | - reg : should contain the FPGA registers location and length. | ||
| 45 | |||
| 46 | 1.d) The AVR node | ||
| 47 | |||
| 48 | The Akebono board has an Atmel AVR microprocessor attached to the I2C | ||
| 49 | bus as a power controller for the board. | ||
| 50 | |||
| 51 | Required properties: | ||
| 52 | |||
| 53 | - compatible : should be "ibm,akebono-avr". | ||
| 54 | - reg : should contain the I2C bus address for the AVR. | ||
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/hsta.txt b/Documentation/devicetree/bindings/powerpc/4xx/hsta.txt new file mode 100644 index 000000000000..c737c8338705 --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/4xx/hsta.txt | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | |||
| 2 | ppc476gtr High Speed Serial Assist (HSTA) node | ||
| 3 | ============================================== | ||
| 4 | |||
| 5 | The 476gtr SoC contains a high speed serial assist module attached | ||
| 6 | between the plb4 and plb6 system buses to provide high speed data | ||
| 7 | transfer between memory and system peripherals as well as support for | ||
| 8 | PCI message signalled interrupts. | ||
| 9 | |||
| 10 | Currently only the MSI support is used by Linux using the following | ||
| 11 | device tree entries: | ||
| 12 | |||
| 13 | Require properties: | ||
| 14 | - compatible : "ibm,476gtr-hsta-msi", "ibm,hsta-msi" | ||
| 15 | - reg : register mapping for the HSTA MSI space | ||
| 16 | - interrupt-parent : parent controller for mapping interrupts | ||
| 17 | - interrupts : ordered interrupt mapping for each MSI in the register | ||
| 18 | space. The first interrupt should be associated with a | ||
| 19 | register offset of 0x00, the second to 0x10, etc. | ||
diff --git a/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt b/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt index d7217260589c..5bc63551319e 100644 --- a/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt +++ b/Documentation/devicetree/bindings/powerpc/4xx/reboot.txt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | Reboot property to control system reboot on PPC4xx systems: | 1 | Reboot property to control system reboot on PPC4xx systems: |
| 2 | 2 | ||
| 3 | By setting "reset_type" to one of the following values, the default | 3 | By setting "reset_type" to one of the following values, the default |
| 4 | software reset mechanism may be overidden. Here the possible values of | 4 | software reset mechanism may be overridden. Here the possible values of |
| 5 | "reset_type": | 5 | "reset_type": |
| 6 | 6 | ||
| 7 | 1 - PPC4xx core reset | 7 | 1 - PPC4xx core reset |
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/board.txt b/Documentation/devicetree/bindings/powerpc/fsl/board.txt index 380914e965e0..700dec4774fa 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/board.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/board.txt | |||
| @@ -67,3 +67,20 @@ Example: | |||
| 67 | gpio-controller; | 67 | gpio-controller; |
| 68 | }; | 68 | }; |
| 69 | }; | 69 | }; |
| 70 | |||
| 71 | * Freescale on-board FPGA connected on I2C bus | ||
| 72 | |||
| 73 | Some Freescale boards like BSC9132QDS have on board FPGA connected on | ||
| 74 | the i2c bus. | ||
| 75 | |||
| 76 | Required properties: | ||
| 77 | - compatible: Should be a board-specific string followed by a string | ||
| 78 | indicating the type of FPGA. Example: | ||
| 79 | "fsl,<board>-fpga", "fsl,fpga-qixis-i2c" | ||
| 80 | - reg: Should contain the address of the FPGA | ||
| 81 | |||
| 82 | Example: | ||
| 83 | fpga: fpga@66 { | ||
| 84 | compatible = "fsl,bsc9132qds-fpga", "fsl,fpga-qixis-i2c"; | ||
| 85 | reg = <0x66>; | ||
| 86 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/ccf.txt b/Documentation/devicetree/bindings/powerpc/fsl/ccf.txt new file mode 100644 index 000000000000..454da7e08acd --- /dev/null +++ b/Documentation/devicetree/bindings/powerpc/fsl/ccf.txt | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | Freescale CoreNet Coherency Fabric(CCF) Device Tree Binding | ||
| 2 | |||
| 3 | DESCRIPTION | ||
| 4 | |||
| 5 | The CoreNet coherency fabric is a fabric-oriented, connectivity infrastructure | ||
| 6 | that enables the implementation of coherent, multicore systems. | ||
| 7 | |||
| 8 | Required properties: | ||
| 9 | |||
| 10 | - compatible: <string list> | ||
| 11 | fsl,corenet1-cf - CoreNet coherency fabric version 1. | ||
| 12 | Example chips: T4240, B4860 | ||
| 13 | |||
| 14 | fsl,corenet2-cf - CoreNet coherency fabric version 2. | ||
| 15 | Example chips: P5040, P5020, P4080, P3041, P2041 | ||
| 16 | |||
| 17 | fsl,corenet-cf - Used to represent the common registers | ||
| 18 | between CCF version 1 and CCF version 2. This compatible | ||
| 19 | is retained for compatibility reasons, as it was already | ||
| 20 | used for both CCF version 1 chips and CCF version 2 | ||
| 21 | chips. It should be specified after either | ||
| 22 | "fsl,corenet1-cf" or "fsl,corenet2-cf". | ||
| 23 | |||
| 24 | - reg: <prop-encoded-array> | ||
| 25 | A standard property. Represents the CCF registers. | ||
| 26 | |||
| 27 | - interrupts: <prop-encoded-array> | ||
| 28 | Interrupt mapping for CCF error interrupt. | ||
| 29 | |||
| 30 | - fsl,ccf-num-csdids: <u32> | ||
| 31 | Specifies the number of Coherency Subdomain ID Port Mapping | ||
| 32 | Registers that are supported by the CCF. | ||
| 33 | |||
| 34 | - fsl,ccf-num-snoopids: <u32> | ||
| 35 | Specifies the number of Snoop ID Port Mapping Registers that | ||
| 36 | are supported by CCF. | ||
| 37 | |||
| 38 | Example: | ||
| 39 | |||
| 40 | corenet-cf@18000 { | ||
| 41 | compatible = "fsl,corenet2-cf", "fsl,corenet-cf"; | ||
| 42 | reg = <0x18000 0x1000>; | ||
| 43 | interrupts = <16 2 1 31>; | ||
| 44 | fsl,ccf-num-csdids = <32>; | ||
| 45 | fsl,ccf-num-snoopids = <32>; | ||
| 46 | }; | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt b/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt index 922c30ad90d1..f8cd2397aa04 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/cpus.txt | |||
| @@ -20,3 +20,14 @@ PROPERTIES | |||
| 20 | a property named fsl,eref-[CAT], where [CAT] is the abbreviated category | 20 | a property named fsl,eref-[CAT], where [CAT] is the abbreviated category |
| 21 | name with all uppercase letters converted to lowercase, indicates that | 21 | name with all uppercase letters converted to lowercase, indicates that |
| 22 | the category is supported by the implementation. | 22 | the category is supported by the implementation. |
| 23 | |||
| 24 | - fsl,portid-mapping | ||
| 25 | Usage: optional | ||
| 26 | Value type: <u32> | ||
| 27 | Definition: The Coherency Subdomain ID Port Mapping Registers and | ||
| 28 | Snoop ID Port Mapping registers, which are part of the CoreNet | ||
| 29 | Coherency fabric (CCF), provide a CoreNet Coherency Subdomain | ||
| 30 | ID/CoreNet Snoop ID to cpu mapping functions. Certain bits from | ||
| 31 | these registers should be set if the coresponding CPU should be | ||
| 32 | snooped. This property defines a bitmask which selects the bit | ||
| 33 | that should be set if this cpu should be snooped. | ||
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/dcsr.txt b/Documentation/devicetree/bindings/powerpc/fsl/dcsr.txt index 9d54eb5a295f..18a88100af94 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/dcsr.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/dcsr.txt | |||
| @@ -82,7 +82,7 @@ PROPERTIES | |||
| 82 | Which event source asserted the interrupt is captured in an EPU | 82 | Which event source asserted the interrupt is captured in an EPU |
| 83 | Interrupt Status Register (EPISR0,EPISR1). | 83 | Interrupt Status Register (EPISR0,EPISR1). |
| 84 | 84 | ||
| 85 | Interrupt numbers are lised in order (perfmon, event0, event1). | 85 | Interrupt numbers are listed in order (perfmon, event0, event1). |
| 86 | 86 | ||
| 87 | - interrupt-parent | 87 | - interrupt-parent |
| 88 | Usage: required | 88 | Usage: required |
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt b/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt index 1f5e329f756c..c2b2899885f2 100644 --- a/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt +++ b/Documentation/devicetree/bindings/powerpc/fsl/pamu.txt | |||
| @@ -34,6 +34,15 @@ Optional properties: | |||
| 34 | for legacy drivers. | 34 | for legacy drivers. |
| 35 | - interrupt-parent : <phandle> | 35 | - interrupt-parent : <phandle> |
| 36 | Phandle to interrupt controller | 36 | Phandle to interrupt controller |
| 37 | - fsl,portid-mapping : <u32> | ||
| 38 | The Coherency Subdomain ID Port Mapping Registers and | ||
| 39 | Snoop ID Port Mapping registers, which are part of the | ||
| 40 | CoreNet Coherency fabric (CCF), provide a CoreNet | ||
| 41 | Coherency Subdomain ID/CoreNet Snoop ID to pamu mapping | ||
| 42 | functions. Certain bits from these registers should be | ||
| 43 | set if PAMUs should be snooped. This property defines | ||
| 44 | a bitmask which selects the bits that should be set if | ||
| 45 | PAMUs should be snooped. | ||
| 37 | 46 | ||
| 38 | Child nodes: | 47 | Child nodes: |
| 39 | 48 | ||
| @@ -88,6 +97,7 @@ Example: | |||
| 88 | compatible = "fsl,pamu-v1.0", "fsl,pamu"; | 97 | compatible = "fsl,pamu-v1.0", "fsl,pamu"; |
| 89 | reg = <0x20000 0x5000>; | 98 | reg = <0x20000 0x5000>; |
| 90 | ranges = <0 0x20000 0x5000>; | 99 | ranges = <0 0x20000 0x5000>; |
| 100 | fsl,portid-mapping = <0xf80000>; | ||
| 91 | #address-cells = <1>; | 101 | #address-cells = <1>; |
| 92 | #size-cells = <1>; | 102 | #size-cells = <1>; |
| 93 | interrupts = < | 103 | interrupts = < |
diff --git a/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt b/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt new file mode 100644 index 000000000000..8eae9fe7841c --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/bcm-kona-pwm.txt | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | Broadcom Kona PWM controller device tree bindings | ||
| 2 | |||
| 3 | This controller has 6 channels. | ||
| 4 | |||
| 5 | Required Properties : | ||
| 6 | - compatible: should contain "brcm,kona-pwm" | ||
| 7 | - reg: physical base address and length of the controller's registers | ||
| 8 | - clocks: phandle + clock specifier pair for the external clock | ||
| 9 | - #pwm-cells: Should be 3. See pwm.txt in this directory for a | ||
| 10 | description of the cells format. | ||
| 11 | |||
| 12 | Refer to clocks/clock-bindings.txt for generic clock consumer properties. | ||
| 13 | |||
| 14 | Example: | ||
| 15 | |||
| 16 | pwm: pwm@3e01a000 { | ||
| 17 | compatible = "brcm,bcm11351-pwm", "brcm,kona-pwm"; | ||
| 18 | reg = <0x3e01a000 0xc4>; | ||
| 19 | clocks = <&pwm_clk>; | ||
| 20 | #pwm-cells = <3>; | ||
| 21 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/ltc3589.txt b/Documentation/devicetree/bindings/regulator/ltc3589.txt new file mode 100644 index 000000000000..801053036146 --- /dev/null +++ b/Documentation/devicetree/bindings/regulator/ltc3589.txt | |||
| @@ -0,0 +1,99 @@ | |||
| 1 | Linear Technology LTC3589, LTC3589-1, and LTC3589-2 8-output regulators | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: "lltc,ltc3589", "lltc,ltc3589-1" or "lltc,ltc3589-2" | ||
| 5 | - reg: I2C slave address | ||
| 6 | |||
| 7 | Required child node: | ||
| 8 | - regulators: Contains eight regulator child nodes sw1, sw2, sw3, bb-out, | ||
| 9 | ldo1, ldo2, ldo3, and ldo4, specifying the initialization data as | ||
| 10 | documented in Documentation/devicetree/bindings/regulator/regulator.txt. | ||
| 11 | |||
| 12 | Each regulator is defined using the standard binding for regulators. The | ||
| 13 | nodes for sw1, sw2, sw3, bb-out, ldo1, and ldo2 additionally need to specify | ||
| 14 | the resistor values of their external feedback voltage dividers: | ||
| 15 | |||
| 16 | Required properties (not on ldo3, ldo4): | ||
| 17 | - lltc,fb-voltage-divider: An array of two integers containing the resistor | ||
| 18 | values R1 and R2 of the feedback voltage divider in ohms. | ||
| 19 | |||
| 20 | Regulators sw1, sw2, sw3, and ldo2 can regulate the feedback reference from | ||
| 21 | 0.3625 V to 0.75 V in 12.5 mV steps. The output voltage thus ranges between | ||
| 22 | 0.3625 * (1 + R1/R2) V and 0.75 * (1 + R1/R2) V. Regulators bb-out and ldo1 | ||
| 23 | have a fixed 0.8 V reference and thus output 0.8 * (1 + R1/R2) V. The ldo3 | ||
| 24 | regulator is fixed to 1.8 V on LTC3589 and to 2.8 V on LTC3589-1,2. The ldo4 | ||
| 25 | regulator can output between 1.8 V and 3.3 V on LTC3589 and between 1.2 V | ||
| 26 | and 3.2 V on LTC3589-1,2 in four steps. The ldo1 standby regulator can not | ||
| 27 | be disabled and thus should have the regulator-always-on property set. | ||
| 28 | |||
| 29 | Example: | ||
| 30 | |||
| 31 | ltc3589: pmic@34 { | ||
| 32 | compatible = "lltc,ltc3589-1"; | ||
| 33 | reg = <0x34>; | ||
| 34 | |||
| 35 | regulators { | ||
| 36 | sw1_reg: sw1 { | ||
| 37 | regulator-min-microvolt = <591930>; | ||
| 38 | regulator-max-microvolt = <1224671>; | ||
| 39 | lltc,fb-voltage-divider = <100000 158000>; | ||
| 40 | regulator-ramp-delay = <7000>; | ||
| 41 | regulator-boot-on; | ||
| 42 | regulator-always-on; | ||
| 43 | }; | ||
| 44 | |||
| 45 | sw2_reg: sw2 { | ||
| 46 | regulator-min-microvolt = <704123>; | ||
| 47 | regulator-max-microvolt = <1456803>; | ||
| 48 | lltc,fb-voltage-divider = <180000 191000>; | ||
| 49 | regulator-ramp-delay = <7000>; | ||
| 50 | regulator-boot-on; | ||
| 51 | regulator-always-on; | ||
| 52 | }; | ||
| 53 | |||
| 54 | sw3_reg: sw3 { | ||
| 55 | regulator-min-microvolt = <1341250>; | ||
| 56 | regulator-max-microvolt = <2775000>; | ||
| 57 | lltc,fb-voltage-divider = <270000 100000>; | ||
| 58 | regulator-ramp-delay = <7000>; | ||
| 59 | regulator-boot-on; | ||
| 60 | regulator-always-on; | ||
| 61 | }; | ||
| 62 | |||
| 63 | bb_out_reg: bb-out { | ||
| 64 | regulator-min-microvolt = <3387341>; | ||
| 65 | regulator-max-microvolt = <3387341>; | ||
| 66 | lltc,fb-voltage-divider = <511000 158000>; | ||
| 67 | regulator-boot-on; | ||
| 68 | regulator-always-on; | ||
| 69 | }; | ||
| 70 | |||
| 71 | ldo1_reg: ldo1 { | ||
| 72 | regulator-min-microvolt = <1306329>; | ||
| 73 | regulator-max-microvolt = <1306329>; | ||
| 74 | lltc,fb-voltage-divider = <100000 158000>; | ||
| 75 | regulator-boot-on; | ||
| 76 | regulator-always-on; | ||
| 77 | }; | ||
| 78 | |||
| 79 | ldo2_reg: ldo2 { | ||
| 80 | regulator-min-microvolt = <704123>; | ||
| 81 | regulator-max-microvolt = <1456806>; | ||
| 82 | lltc,fb-voltage-divider = <180000 191000>; | ||
| 83 | regulator-ramp-delay = <7000>; | ||
| 84 | regulator-boot-on; | ||
| 85 | regulator-always-on; | ||
| 86 | }; | ||
| 87 | |||
| 88 | ldo3_reg: ldo3 { | ||
| 89 | regulator-min-microvolt = <2800000>; | ||
| 90 | regulator-max-microvolt = <2800000>; | ||
| 91 | regulator-boot-on; | ||
| 92 | }; | ||
| 93 | |||
| 94 | ldo4_reg: ldo4 { | ||
| 95 | regulator-min-microvolt = <1200000>; | ||
| 96 | regulator-max-microvolt = <3200000>; | ||
| 97 | }; | ||
| 98 | }; | ||
| 99 | }; | ||
diff --git a/Documentation/devicetree/bindings/regulator/regulator.txt b/Documentation/devicetree/bindings/regulator/regulator.txt index e2c7f1e7251a..86074334e342 100644 --- a/Documentation/devicetree/bindings/regulator/regulator.txt +++ b/Documentation/devicetree/bindings/regulator/regulator.txt | |||
| @@ -12,7 +12,7 @@ Optional properties: | |||
| 12 | - regulator-allow-bypass: allow the regulator to go into bypass mode | 12 | - regulator-allow-bypass: allow the regulator to go into bypass mode |
| 13 | - <name>-supply: phandle to the parent supply/regulator node | 13 | - <name>-supply: phandle to the parent supply/regulator node |
| 14 | - regulator-ramp-delay: ramp delay for regulator(in uV/uS) | 14 | - regulator-ramp-delay: ramp delay for regulator(in uV/uS) |
| 15 | For hardwares which support disabling ramp rate, it should be explicitly | 15 | For hardware which supports disabling ramp rate, it should be explicitly |
| 16 | intialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay. | 16 | intialised to zero (regulator-ramp-delay = <0>) for disabling ramp delay. |
| 17 | - regulator-enable-ramp-delay: The time taken, in microseconds, for the supply | 17 | - regulator-enable-ramp-delay: The time taken, in microseconds, for the supply |
| 18 | rail to reach the target voltage, plus/minus whatever tolerance the board | 18 | rail to reach the target voltage, plus/minus whatever tolerance the board |
diff --git a/Documentation/devicetree/bindings/regulator/tps65090.txt b/Documentation/devicetree/bindings/regulator/tps65090.txt index 313a60ba61d8..340980239ea9 100644 --- a/Documentation/devicetree/bindings/regulator/tps65090.txt +++ b/Documentation/devicetree/bindings/regulator/tps65090.txt | |||
| @@ -21,6 +21,10 @@ Optional properties: | |||
| 21 | number should be provided. If it is externally controlled and no GPIO | 21 | number should be provided. If it is externally controlled and no GPIO |
| 22 | entry then driver will just configure this rails as external control | 22 | entry then driver will just configure this rails as external control |
| 23 | and will not provide any enable/disable APIs. | 23 | and will not provide any enable/disable APIs. |
| 24 | - ti,overcurrent-wait: This is applicable to FET registers, which have a | ||
| 25 | poorly defined "overcurrent wait" field. If this property is present it | ||
| 26 | should be between 0 - 3. If this property isn't present we won't touch the | ||
| 27 | "overcurrent wait" field and we'll leave it to the BIOS/EC to deal with. | ||
| 24 | 28 | ||
| 25 | Each regulator is defined using the standard binding for regulators. | 29 | Each regulator is defined using the standard binding for regulators. |
| 26 | 30 | ||
diff --git a/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt b/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt new file mode 100644 index 000000000000..c8f775714887 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/allwinner,sunxi-clock-reset.txt | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | Allwinner sunxi Peripheral Reset Controller | ||
| 2 | =========================================== | ||
| 3 | |||
| 4 | Please also refer to reset.txt in this directory for common reset | ||
| 5 | controller binding usage. | ||
| 6 | |||
| 7 | Required properties: | ||
| 8 | - compatible: Should be one of the following: | ||
| 9 | "allwinner,sun6i-a31-ahb1-reset" | ||
| 10 | "allwinner,sun6i-a31-clock-reset" | ||
| 11 | - reg: should be register base and length as documented in the | ||
| 12 | datasheet | ||
| 13 | - #reset-cells: 1, see below | ||
| 14 | |||
| 15 | example: | ||
| 16 | |||
| 17 | ahb1_rst: reset@01c202c0 { | ||
| 18 | #reset-cells = <1>; | ||
| 19 | compatible = "allwinner,sun6i-a31-ahb1-reset"; | ||
| 20 | reg = <0x01c202c0 0xc>; | ||
| 21 | }; | ||
diff --git a/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt b/Documentation/devicetree/bindings/reset/socfpga-reset.txt index ecdb57d69dbf..32c1c8bfd5dc 100644 --- a/Documentation/devicetree/bindings/arm/altera/socfpga-reset.txt +++ b/Documentation/devicetree/bindings/reset/socfpga-reset.txt | |||
| @@ -3,9 +3,11 @@ Altera SOCFPGA Reset Manager | |||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible : "altr,rst-mgr" | 4 | - compatible : "altr,rst-mgr" |
| 5 | - reg : Should contain 1 register ranges(address and length) | 5 | - reg : Should contain 1 register ranges(address and length) |
| 6 | - #reset-cells: 1 | ||
| 6 | 7 | ||
| 7 | Example: | 8 | Example: |
| 8 | rstmgr@ffd05000 { | 9 | rstmgr@ffd05000 { |
| 10 | #reset-cells = <1>; | ||
| 9 | compatible = "altr,rst-mgr"; | 11 | compatible = "altr,rst-mgr"; |
| 10 | reg = <0xffd05000 0x1000>; | 12 | reg = <0xffd05000 0x1000>; |
| 11 | }; | 13 | }; |
diff --git a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt index 31406fd4a43e..5c199ee044cb 100644 --- a/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt +++ b/Documentation/devicetree/bindings/rtc/haoyu,hym8563.txt | |||
| @@ -9,6 +9,9 @@ Required properties: | |||
| 9 | - interrupts: rtc alarm/event interrupt | 9 | - interrupts: rtc alarm/event interrupt |
| 10 | - #clock-cells: the value should be 0 | 10 | - #clock-cells: the value should be 0 |
| 11 | 11 | ||
| 12 | Optional properties: | ||
| 13 | - clock-output-names: From common clock binding | ||
| 14 | |||
| 12 | Example: | 15 | Example: |
| 13 | 16 | ||
| 14 | hym8563: hym8563@51 { | 17 | hym8563: hym8563@51 { |
diff --git a/Documentation/devicetree/bindings/rtc/xgene-rtc.txt b/Documentation/devicetree/bindings/rtc/xgene-rtc.txt new file mode 100644 index 000000000000..fd195c358446 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/xgene-rtc.txt | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | * APM X-Gene Real Time Clock | ||
| 2 | |||
| 3 | RTC controller for the APM X-Gene Real Time Clock | ||
| 4 | |||
| 5 | Required properties: | ||
| 6 | - compatible : Should be "apm,xgene-rtc" | ||
| 7 | - reg: physical base address of the controller and length of memory mapped | ||
| 8 | region. | ||
| 9 | - interrupts: IRQ line for the RTC. | ||
| 10 | - #clock-cells: Should be 1. | ||
| 11 | - clocks: Reference to the clock entry. | ||
| 12 | |||
| 13 | Example: | ||
| 14 | |||
| 15 | rtcclk: rtcclk { | ||
| 16 | compatible = "fixed-clock"; | ||
| 17 | #clock-cells = <1>; | ||
| 18 | clock-frequency = <100000000>; | ||
| 19 | clock-output-names = "rtcclk"; | ||
| 20 | }; | ||
| 21 | |||
| 22 | rtc: rtc@10510000 { | ||
| 23 | compatible = "apm,xgene-rtc"; | ||
| 24 | reg = <0x0 0x10510000 0x0 0x400>; | ||
| 25 | interrupts = <0x0 0x46 0x4>; | ||
| 26 | #clock-cells = <1>; | ||
| 27 | clocks = <&rtcclk 0>; | ||
| 28 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/atmel-usart.txt b/Documentation/devicetree/bindings/serial/atmel-usart.txt index 17c1042b2df8..a6391e70a8fd 100644 --- a/Documentation/devicetree/bindings/serial/atmel-usart.txt +++ b/Documentation/devicetree/bindings/serial/atmel-usart.txt | |||
| @@ -13,8 +13,9 @@ Required properties: | |||
| 13 | Optional properties: | 13 | Optional properties: |
| 14 | - atmel,use-dma-rx: use of PDC or DMA for receiving data | 14 | - atmel,use-dma-rx: use of PDC or DMA for receiving data |
| 15 | - atmel,use-dma-tx: use of PDC or DMA for transmitting data | 15 | - atmel,use-dma-tx: use of PDC or DMA for transmitting data |
| 16 | - rts-gpios: specify a GPIO for RTS line. It will use specified PIO instead of the peripheral | 16 | - {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD line respectively. |
| 17 | function pin for the USART RTS feature. If unsure, don't specify this property. | 17 | It will use specified PIO instead of the peripheral function pin for the USART feature. |
| 18 | If unsure, don't specify this property. | ||
| 18 | - add dma bindings for dma transfer: | 19 | - add dma bindings for dma transfer: |
| 19 | - dmas: DMA specifier, consisting of a phandle to DMA controller node, | 20 | - dmas: DMA specifier, consisting of a phandle to DMA controller node, |
| 20 | memory peripheral interface and USART DMA channel ID, FIFO configuration. | 21 | memory peripheral interface and USART DMA channel ID, FIFO configuration. |
| @@ -35,7 +36,12 @@ Example: | |||
| 35 | clock-names = "usart"; | 36 | clock-names = "usart"; |
| 36 | atmel,use-dma-rx; | 37 | atmel,use-dma-rx; |
| 37 | atmel,use-dma-tx; | 38 | atmel,use-dma-tx; |
| 38 | rts-gpios = <&pioD 15 0>; | 39 | rts-gpios = <&pioD 15 GPIO_ACTIVE_LOW>; |
| 40 | cts-gpios = <&pioD 16 GPIO_ACTIVE_LOW>; | ||
| 41 | dtr-gpios = <&pioD 17 GPIO_ACTIVE_LOW>; | ||
| 42 | dsr-gpios = <&pioD 18 GPIO_ACTIVE_LOW>; | ||
| 43 | dcd-gpios = <&pioD 20 GPIO_ACTIVE_LOW>; | ||
| 44 | rng-gpios = <&pioD 19 GPIO_ACTIVE_LOW>; | ||
| 39 | }; | 45 | }; |
| 40 | 46 | ||
| 41 | - use DMA: | 47 | - use DMA: |
diff --git a/Documentation/devicetree/bindings/serial/efm32-uart.txt b/Documentation/devicetree/bindings/serial/efm32-uart.txt index 1984bdfbd545..3ca01336b837 100644 --- a/Documentation/devicetree/bindings/serial/efm32-uart.txt +++ b/Documentation/devicetree/bindings/serial/efm32-uart.txt | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | * Energymicro efm32 UART | 1 | * Energymicro efm32 UART |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible : Should be "efm32,uart" | 4 | - compatible : Should be "energymicro,efm32-uart" |
| 5 | - reg : Address and length of the register set | 5 | - reg : Address and length of the register set |
| 6 | - interrupts : Should contain uart interrupt | 6 | - interrupts : Should contain uart interrupt |
| 7 | 7 | ||
| @@ -13,7 +13,7 @@ Optional properties: | |||
| 13 | Example: | 13 | Example: |
| 14 | 14 | ||
| 15 | uart@0x4000c400 { | 15 | uart@0x4000c400 { |
| 16 | compatible = "efm32,uart"; | 16 | compatible = "energymicro,efm32-uart"; |
| 17 | reg = <0x4000c400 0x400>; | 17 | reg = <0x4000c400 0x400>; |
| 18 | interrupts = <15>; | 18 | interrupts = <15>; |
| 19 | efm32,location = <0>; | 19 | efm32,location = <0>; |
diff --git a/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt b/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt new file mode 100644 index 000000000000..246c795668dc --- /dev/null +++ b/Documentation/devicetree/bindings/serial/nxp,sc16is7xx.txt | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | * NXP SC16IS7xx advanced Universal Asynchronous Receiver-Transmitter (UART) | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should be one of the following: | ||
| 5 | - "nxp,sc16is740" for NXP SC16IS740, | ||
| 6 | - "nxp,sc16is741" for NXP SC16IS741, | ||
| 7 | - "nxp,sc16is750" for NXP SC16IS750, | ||
| 8 | - "nxp,sc16is752" for NXP SC16IS752, | ||
| 9 | - "nxp,sc16is760" for NXP SC16IS760, | ||
| 10 | - "nxp,sc16is762" for NXP SC16IS762. | ||
| 11 | - reg: I2C address of the SC16IS7xx device. | ||
| 12 | - interrupt-parent: The phandle for the interrupt controller that | ||
| 13 | services interrupts for this IC. | ||
| 14 | - interrupts: Should contain the UART interrupt | ||
| 15 | - clocks: Reference to the IC source clock. | ||
| 16 | |||
| 17 | Optional properties: | ||
| 18 | - gpio-controller: Marks the device node as a GPIO controller. | ||
| 19 | - #gpio-cells: Should be two. The first cell is the GPIO number and | ||
| 20 | the second cell is used to specify the GPIO polarity: | ||
| 21 | 0 = active high, | ||
| 22 | 1 = active low. | ||
| 23 | |||
| 24 | Example: | ||
| 25 | sc16is750: sc16is750@51 { | ||
| 26 | compatible = "nxp,sc16is750"; | ||
| 27 | reg = <0x51>; | ||
| 28 | clocks = <&clk20m>; | ||
| 29 | interrupt-parent = <&gpio3>; | ||
| 30 | interrupts = <7 IRQ_TYPE_EDGE_FALLING>; | ||
| 31 | gpio-controller; | ||
| 32 | #gpio-cells = <2>; | ||
| 33 | }; | ||
diff --git a/Documentation/devicetree/bindings/serial/of-serial.txt b/Documentation/devicetree/bindings/serial/of-serial.txt index 1928a3e83cd0..77054772a8f4 100644 --- a/Documentation/devicetree/bindings/serial/of-serial.txt +++ b/Documentation/devicetree/bindings/serial/of-serial.txt | |||
| @@ -37,6 +37,7 @@ Optional properties: | |||
| 37 | - auto-flow-control: one way to enable automatic flow control support. The | 37 | - auto-flow-control: one way to enable automatic flow control support. The |
| 38 | driver is allowed to detect support for the capability even without this | 38 | driver is allowed to detect support for the capability even without this |
| 39 | property. | 39 | property. |
| 40 | - has-hw-flow-control: the hardware has flow control capability. | ||
| 40 | 41 | ||
| 41 | Example: | 42 | Example: |
| 42 | 43 | ||
diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt index 53e6c175db6c..64fd7dec1bbc 100644 --- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | |||
| @@ -4,6 +4,7 @@ Required properties: | |||
| 4 | 4 | ||
| 5 | - compatible: Must contain one of the following: | 5 | - compatible: Must contain one of the following: |
| 6 | 6 | ||
| 7 | - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART. | ||
| 7 | - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART. | 8 | - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART. |
| 8 | - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART. | 9 | - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART. |
| 9 | - "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible UART. | 10 | - "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible UART. |
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.txt new file mode 100644 index 000000000000..4ce24d425bf1 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,gsbi.txt | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | QCOM GSBI (General Serial Bus Interface) Driver | ||
| 2 | |||
| 3 | The GSBI controller is modeled as a node with zero or more child nodes, each | ||
| 4 | representing a serial sub-node device that is mux'd as part of the GSBI | ||
| 5 | configuration settings. The mode setting will govern the input/output mode of | ||
| 6 | the 4 GSBI IOs. | ||
| 7 | |||
| 8 | Required properties: | ||
| 9 | - compatible: must contain "qcom,gsbi-v1.0.0" for APQ8064/IPQ8064 | ||
| 10 | - reg: Address range for GSBI registers | ||
| 11 | - clocks: required clock | ||
| 12 | - clock-names: must contain "iface" entry | ||
| 13 | - qcom,mode : indicates MUX value for configuration of the serial interface. | ||
| 14 | Please reference dt-bindings/soc/qcom,gsbi.h for valid mux values. | ||
| 15 | |||
| 16 | Optional properties: | ||
| 17 | - qcom,crci : indicates CRCI MUX value for QUP CRCI ports. Please reference | ||
| 18 | dt-bindings/soc/qcom,gsbi.h for valid CRCI mux values. | ||
| 19 | |||
| 20 | Required properties if child node exists: | ||
| 21 | - #address-cells: Must be 1 | ||
| 22 | - #size-cells: Must be 1 | ||
| 23 | - ranges: Must be present | ||
| 24 | |||
| 25 | Properties for children: | ||
| 26 | |||
| 27 | A GSBI controller node can contain 0 or more child nodes representing serial | ||
| 28 | devices. These serial devices can be a QCOM UART, I2C controller, spi | ||
| 29 | controller, or some combination of aforementioned devices. | ||
| 30 | |||
| 31 | See the following for child node definitions: | ||
| 32 | Documentation/devicetree/bindings/i2c/qcom,i2c-qup.txt | ||
| 33 | Documentation/devicetree/bindings/spi/qcom,spi-qup.txt | ||
| 34 | Documentation/devicetree/bindings/serial/qcom,msm-uartdm.txt | ||
| 35 | |||
| 36 | Example for APQ8064: | ||
| 37 | |||
| 38 | #include <dt-bindings/soc/qcom,gsbi.h> | ||
| 39 | |||
| 40 | gsbi4@16300000 { | ||
| 41 | compatible = "qcom,gsbi-v1.0.0"; | ||
| 42 | reg = <0x16300000 0x100>; | ||
| 43 | clocks = <&gcc GSBI4_H_CLK>; | ||
| 44 | clock-names = "iface"; | ||
| 45 | #address-cells = <1>; | ||
| 46 | #size-cells = <1>; | ||
| 47 | ranges; | ||
| 48 | qcom,mode = <GSBI_PROT_I2C_UART>; | ||
| 49 | qcom,crci = <GSBI_CRCI_QUP>; | ||
| 50 | |||
| 51 | /* child nodes go under here */ | ||
| 52 | |||
| 53 | i2c_qup4: i2c@16380000 { | ||
| 54 | compatible = "qcom,i2c-qup-v1.1.1"; | ||
| 55 | reg = <0x16380000 0x1000>; | ||
| 56 | interrupts = <0 153 0>; | ||
| 57 | |||
| 58 | clocks = <&gcc GSBI4_QUP_CLK>, <&gcc GSBI4_H_CLK>; | ||
| 59 | clock-names = "core", "iface"; | ||
| 60 | |||
| 61 | clock-frequency = <200000>; | ||
| 62 | |||
| 63 | #address-cells = <1>; | ||
| 64 | #size-cells = <0>; | ||
| 65 | |||
| 66 | }; | ||
| 67 | |||
| 68 | uart4: serial@16340000 { | ||
| 69 | compatible = "qcom,msm-uartdm-v1.3", "qcom,msm-uartdm"; | ||
| 70 | reg = <0x16340000 0x1000>, | ||
| 71 | <0x16300000 0x1000>; | ||
| 72 | interrupts = <0 152 0x0>; | ||
| 73 | clocks = <&gcc GSBI4_UART_CLK>, <&gcc GSBI4_H_CLK>; | ||
| 74 | clock-names = "core", "iface"; | ||
| 75 | status = "ok"; | ||
| 76 | }; | ||
| 77 | }; | ||
| 78 | |||
diff --git a/Documentation/devicetree/bindings/sound/ak4104.txt b/Documentation/devicetree/bindings/sound/ak4104.txt index b902ee39cf89..deca5e18f304 100644 --- a/Documentation/devicetree/bindings/sound/ak4104.txt +++ b/Documentation/devicetree/bindings/sound/ak4104.txt | |||
| @@ -8,6 +8,8 @@ Required properties: | |||
| 8 | 8 | ||
| 9 | - reg : The chip select number on the SPI bus | 9 | - reg : The chip select number on the SPI bus |
| 10 | 10 | ||
| 11 | - vdd-supply : A regulator node, providing 2.7V - 3.6V | ||
| 12 | |||
| 11 | Optional properties: | 13 | Optional properties: |
| 12 | 14 | ||
| 13 | - reset-gpio : a GPIO spec for the reset pin. If specified, it will be | 15 | - reset-gpio : a GPIO spec for the reset pin. If specified, it will be |
| @@ -19,4 +21,5 @@ spdif: ak4104@0 { | |||
| 19 | compatible = "asahi-kasei,ak4104"; | 21 | compatible = "asahi-kasei,ak4104"; |
| 20 | reg = <0>; | 22 | reg = <0>; |
| 21 | spi-max-frequency = <5000000>; | 23 | spi-max-frequency = <5000000>; |
| 24 | vdd-supply = <&vdd_3v3_reg>; | ||
| 22 | }; | 25 | }; |
diff --git a/Documentation/devicetree/bindings/sound/alc5623.txt b/Documentation/devicetree/bindings/sound/alc5623.txt new file mode 100644 index 000000000000..26c86c98d671 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/alc5623.txt | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | ALC5621/ALC5622/ALC5623 audio Codec | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | |||
| 5 | - compatible: "realtek,alc5623" | ||
| 6 | - reg: the I2C address of the device. | ||
| 7 | |||
| 8 | Optional properties: | ||
| 9 | |||
| 10 | - add-ctrl: Default register value for Reg-40h, Additional Control | ||
| 11 | Register. If absent or has the value of 0, the | ||
| 12 | register is untouched. | ||
| 13 | |||
| 14 | - jack-det-ctrl: Default register value for Reg-5Ah, Jack Detect | ||
| 15 | Control Register. If absent or has value 0, the | ||
| 16 | register is untouched. | ||
| 17 | |||
| 18 | Example: | ||
| 19 | |||
| 20 | alc5621: alc5621@1a { | ||
| 21 | compatible = "alc5621"; | ||
| 22 | reg = <0x1a>; | ||
| 23 | add-ctrl = <0x3700>; | ||
| 24 | jack-det-ctrl = <0x4810>; | ||
| 25 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/cs42l56.txt b/Documentation/devicetree/bindings/sound/cs42l56.txt new file mode 100644 index 000000000000..4feb0eb27ea4 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/cs42l56.txt | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | CS42L52 audio CODEC | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | |||
| 5 | - compatible : "cirrus,cs42l56" | ||
| 6 | |||
| 7 | - reg : the I2C address of the device for I2C | ||
| 8 | |||
| 9 | - VA-supply, VCP-supply, VLDO-supply : power supplies for the device, | ||
| 10 | as covered in Documentation/devicetree/bindings/regulator/regulator.txt. | ||
| 11 | |||
| 12 | Optional properties: | ||
| 13 | |||
| 14 | - cirrus,gpio-nreset : GPIO controller's phandle and the number | ||
| 15 | of the GPIO used to reset the codec. | ||
| 16 | |||
| 17 | - cirrus,chgfreq-divisor : Values used to set the Charge Pump Frequency. | ||
| 18 | Allowable values of 0x00 through 0x0F. These are raw values written to the | ||
| 19 | register, not the actual frequency. The frequency is determined by the following. | ||
| 20 | Frequency = MCLK / 4 * (N+2) | ||
| 21 | N = chgfreq_val | ||
| 22 | MCLK = Where MCLK is the frequency of the mclk signal after the MCLKDIV2 circuit. | ||
| 23 | |||
| 24 | - cirrus,ain1a-ref-cfg, ain1b-ref-cfg : boolean, If present, AIN1A or AIN1B are configured | ||
| 25 | as a pseudo-differential input referenced to AIN1REF/AIN3A. | ||
| 26 | |||
| 27 | - cirrus,ain2a-ref-cfg, ain2b-ref-cfg : boolean, If present, AIN2A or AIN2B are configured | ||
| 28 | as a pseudo-differential input referenced to AIN2REF/AIN3B. | ||
| 29 | |||
| 30 | - cirrus,micbias-lvl: Set the output voltage level on the MICBIAS Pin. | ||
| 31 | 0 = 0.5 x VA | ||
| 32 | 1 = 0.6 x VA | ||
| 33 | 2 = 0.7 x VA | ||
| 34 | 3 = 0.8 x VA | ||
| 35 | 4 = 0.83 x VA | ||
| 36 | 5 = 0.91 x VA | ||
| 37 | |||
| 38 | - cirrus,adaptive-pwr-cfg : Configures how the power to the Headphone and Lineout | ||
| 39 | Amplifiers adapt to the output signal levels. | ||
| 40 | 0 = Adapt to Volume Mode. Voltage level determined by the sum of the relevant volume settings. | ||
| 41 | 1 = Fixed - Headphone and Line Amp supply = + or - VCP/2. | ||
| 42 | 2 = Fixed - Headphone and Line Amp supply = + or - VCP. | ||
| 43 | 3 = Adapted to Signal; Voltage level is dynamically determined by the output signal. | ||
| 44 | |||
| 45 | - cirrus,hpf-left-freq, hpf-right-freq : Sets the corner frequency (-3dB point) for the internal High-Pass | ||
| 46 | Filter. | ||
| 47 | 0 = 1.8Hz | ||
| 48 | 1 = 119Hz | ||
| 49 | 2 = 236Hz | ||
| 50 | 3 = 464Hz | ||
| 51 | |||
| 52 | |||
| 53 | Example: | ||
| 54 | |||
| 55 | codec: codec@4b { | ||
| 56 | compatible = "cirrus,cs42l56"; | ||
| 57 | reg = <0x4b>; | ||
| 58 | gpio-reset = <&gpio 10 0>; | ||
| 59 | cirrus,chgfreq-divisor = <0x05>; | ||
| 60 | cirrus.ain1_ref_cfg; | ||
| 61 | cirrus,micbias-lvl = <5>; | ||
| 62 | VA-supply = <®_audio>; | ||
| 63 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt index 569b26c4a81e..60ca07996458 100644 --- a/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt +++ b/Documentation/devicetree/bindings/sound/davinci-mcasp-audio.txt | |||
| @@ -47,7 +47,7 @@ mcasp0: mcasp0@1d00000 { | |||
| 47 | reg = <0x100000 0x3000>; | 47 | reg = <0x100000 0x3000>; |
| 48 | reg-names "mpu"; | 48 | reg-names "mpu"; |
| 49 | interrupts = <82>, <83>; | 49 | interrupts = <82>, <83>; |
| 50 | interrupts-names = "tx", "rx"; | 50 | interrupt-names = "tx", "rx"; |
| 51 | op-mode = <0>; /* MCASP_IIS_MODE */ | 51 | op-mode = <0>; /* MCASP_IIS_MODE */ |
| 52 | tdm-slots = <2>; | 52 | tdm-slots = <2>; |
| 53 | serial-dir = < | 53 | serial-dir = < |
diff --git a/Documentation/devicetree/bindings/sound/fsl-sai.txt b/Documentation/devicetree/bindings/sound/fsl-sai.txt index 98611a6761c0..0f4e23828190 100644 --- a/Documentation/devicetree/bindings/sound/fsl-sai.txt +++ b/Documentation/devicetree/bindings/sound/fsl-sai.txt | |||
| @@ -7,10 +7,11 @@ codec/DSP interfaces. | |||
| 7 | 7 | ||
| 8 | 8 | ||
| 9 | Required properties: | 9 | Required properties: |
| 10 | - compatible: Compatible list, contains "fsl,vf610-sai". | 10 | - compatible: Compatible list, contains "fsl,vf610-sai" or "fsl,imx6sx-sai". |
| 11 | - reg: Offset and length of the register set for the device. | 11 | - reg: Offset and length of the register set for the device. |
| 12 | - clocks: Must contain an entry for each entry in clock-names. | 12 | - clocks: Must contain an entry for each entry in clock-names. |
| 13 | - clock-names : Must include the "sai" entry. | 13 | - clock-names : Must include the "bus" for register access and "mclk1" "mclk2" |
| 14 | "mclk3" for bit clock and frame clock providing. | ||
| 14 | - dmas : Generic dma devicetree binding as described in | 15 | - dmas : Generic dma devicetree binding as described in |
| 15 | Documentation/devicetree/bindings/dma/dma.txt. | 16 | Documentation/devicetree/bindings/dma/dma.txt. |
| 16 | - dma-names : Two dmas have to be defined, "tx" and "rx". | 17 | - dma-names : Two dmas have to be defined, "tx" and "rx". |
| @@ -30,8 +31,10 @@ sai2: sai@40031000 { | |||
| 30 | reg = <0x40031000 0x1000>; | 31 | reg = <0x40031000 0x1000>; |
| 31 | pinctrl-names = "default"; | 32 | pinctrl-names = "default"; |
| 32 | pinctrl-0 = <&pinctrl_sai2_1>; | 33 | pinctrl-0 = <&pinctrl_sai2_1>; |
| 33 | clocks = <&clks VF610_CLK_SAI2>; | 34 | clocks = <&clks VF610_CLK_PLATFORM_BUS>, |
| 34 | clock-names = "sai"; | 35 | <&clks VF610_CLK_SAI2>, |
| 36 | <&clks 0>, <&clks 0>; | ||
| 37 | clock-names = "bus", "mclk1", "mclk2", "mclk3"; | ||
| 35 | dma-names = "tx", "rx"; | 38 | dma-names = "tx", "rx"; |
| 36 | dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>, | 39 | dmas = <&edma0 0 VF610_EDMA_MUXID0_SAI2_TX>, |
| 37 | <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>; | 40 | <&edma0 0 VF610_EDMA_MUXID0_SAI2_RX>; |
diff --git a/Documentation/devicetree/bindings/sound/max98090.txt b/Documentation/devicetree/bindings/sound/max98090.txt index e4c8b36dcf89..a5e63fa47dc5 100644 --- a/Documentation/devicetree/bindings/sound/max98090.txt +++ b/Documentation/devicetree/bindings/sound/max98090.txt | |||
| @@ -10,6 +10,12 @@ Required properties: | |||
| 10 | 10 | ||
| 11 | - interrupts : The CODEC's interrupt output. | 11 | - interrupts : The CODEC's interrupt output. |
| 12 | 12 | ||
| 13 | Optional properties: | ||
| 14 | |||
| 15 | - clocks: The phandle of the master clock to the CODEC | ||
| 16 | |||
| 17 | - clock-names: Should be "mclk" | ||
| 18 | |||
| 13 | Pins on the device (for linking into audio routes): | 19 | Pins on the device (for linking into audio routes): |
| 14 | 20 | ||
| 15 | * MIC1 | 21 | * MIC1 |
diff --git a/Documentation/devicetree/bindings/sound/max98095.txt b/Documentation/devicetree/bindings/sound/max98095.txt new file mode 100644 index 000000000000..318a4c82f17f --- /dev/null +++ b/Documentation/devicetree/bindings/sound/max98095.txt | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | MAX98095 audio CODEC | ||
| 2 | |||
| 3 | This device supports I2C only. | ||
| 4 | |||
| 5 | Required properties: | ||
| 6 | |||
| 7 | - compatible : "maxim,max98095". | ||
| 8 | |||
| 9 | - reg : The I2C address of the device. | ||
| 10 | |||
| 11 | Optional properties: | ||
| 12 | |||
| 13 | - clocks: The phandle of the master clock to the CODEC | ||
| 14 | |||
| 15 | - clock-names: Should be "mclk" | ||
| 16 | |||
| 17 | Example: | ||
| 18 | |||
| 19 | max98095: codec@11 { | ||
| 20 | compatible = "maxim,max98095"; | ||
| 21 | reg = <0x11>; | ||
| 22 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/nokia,rx51.txt b/Documentation/devicetree/bindings/sound/nokia,rx51.txt new file mode 100644 index 000000000000..72f93d996273 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nokia,rx51.txt | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | * Nokia N900 audio setup | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: Should contain "nokia,n900-audio" | ||
| 5 | - nokia,cpu-dai: phandle for the McBSP node | ||
| 6 | - nokia,audio-codec: phandles for the main TLV320AIC3X node and the | ||
| 7 | auxiliary TLV320AIC3X node (in this order) | ||
| 8 | - nokia,headphone-amplifier: phandle for the TPA6130A2 node | ||
| 9 | - tvout-selection-gpios: GPIO for tvout selection | ||
| 10 | - jack-detection-gpios: GPIO for jack detection | ||
| 11 | - eci-switch-gpios: GPIO for ECI (Enhancement Control Interface) switch | ||
| 12 | - speaker-amplifier-gpios: GPIO for speaker amplifier | ||
| 13 | |||
| 14 | Example: | ||
| 15 | |||
| 16 | sound { | ||
| 17 | compatible = "nokia,n900-audio"; | ||
| 18 | |||
| 19 | nokia,cpu-dai = <&mcbsp2>; | ||
| 20 | nokia,audio-codec = <&tlv320aic3x>, <&tlv320aic3x_aux>; | ||
| 21 | nokia,headphone-amplifier = <&tpa6130a2>; | ||
| 22 | |||
| 23 | tvout-selection-gpios = <&gpio2 8 GPIO_ACTIVE_HIGH>; /* 40 */ | ||
| 24 | jack-detection-gpios = <&gpio6 17 GPIO_ACTIVE_HIGH>; /* 177 */ | ||
| 25 | eci-switch-gpios = <&gpio6 22 GPIO_ACTIVE_HIGH>; /* 182 */ | ||
| 26 | speaker-amplifier-gpios = <&twl_gpio 7 GPIO_ACTIVE_HIGH>; | ||
| 27 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt new file mode 100644 index 000000000000..b4730c2822bc --- /dev/null +++ b/Documentation/devicetree/bindings/sound/nvidia,tegra30-hda.txt | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | NVIDIA Tegra30 HDA controller | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : "nvidia,tegra30-hda" | ||
| 5 | - reg : Should contain the HDA registers location and length. | ||
| 6 | - interrupts : The interrupt from the HDA controller. | ||
| 7 | - clocks : Must contain an entry for each required entry in clock-names. | ||
| 8 | See ../clocks/clock-bindings.txt for details. | ||
| 9 | - clock-names : Must include the following entries: hda, hdacodec_2x, hda2hdmi | ||
| 10 | - resets : Must contain an entry for each entry in reset-names. | ||
| 11 | See ../reset/reset.txt for details. | ||
| 12 | - reset-names : Must include the following entries: hda, hdacodec_2x, hda2hdmi | ||
| 13 | |||
| 14 | Example: | ||
| 15 | |||
| 16 | hda@0,70030000 { | ||
| 17 | compatible = "nvidia,tegra124-hda", "nvidia,tegra30-hda"; | ||
| 18 | reg = <0x0 0x70030000 0x0 0x10000>; | ||
| 19 | interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; | ||
| 20 | clocks = <&tegra_car TEGRA124_CLK_HDA>, | ||
| 21 | <&tegra_car TEGRA124_CLK_HDA2HDMI>, | ||
| 22 | <&tegra_car TEGRA124_CLK_HDA2CODEC_2X>; | ||
| 23 | clock-names = "hda", "hda2hdmi", "hda2codec_2x"; | ||
| 24 | resets = <&tegra_car 125>, /* hda */ | ||
| 25 | <&tegra_car 128>; /* hda2hdmi */ | ||
| 26 | <&tegra_car 111>, /* hda2codec_2x */ | ||
| 27 | reset-names = "hda", "hda2hdmi", "hda2codec_2x"; | ||
| 28 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt index a44e9179faf5..8346cab046cd 100644 --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt | |||
| @@ -20,6 +20,7 @@ Required properties: | |||
| 20 | SSI subnode properties: | 20 | SSI subnode properties: |
| 21 | - interrupts : Should contain SSI interrupt for PIO transfer | 21 | - interrupts : Should contain SSI interrupt for PIO transfer |
| 22 | - shared-pin : if shared clock pin | 22 | - shared-pin : if shared clock pin |
| 23 | - pio-transfer : use PIO transfer mode | ||
| 23 | 24 | ||
| 24 | SRC subnode properties: | 25 | SRC subnode properties: |
| 25 | no properties at this point | 26 | no properties at this point |
diff --git a/Documentation/devicetree/bindings/sound/rt5640.txt b/Documentation/devicetree/bindings/sound/rt5640.txt index 068a1141b06f..bac4d9ac1edc 100644 --- a/Documentation/devicetree/bindings/sound/rt5640.txt +++ b/Documentation/devicetree/bindings/sound/rt5640.txt | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | RT5640 audio CODEC | 1 | RT5640/RT5639 audio CODEC |
| 2 | 2 | ||
| 3 | This device supports I2C only. | 3 | This device supports I2C only. |
| 4 | 4 | ||
| 5 | Required properties: | 5 | Required properties: |
| 6 | 6 | ||
| 7 | - compatible : "realtek,rt5640". | 7 | - compatible : One of "realtek,rt5640" or "realtek,rt5639". |
| 8 | 8 | ||
| 9 | - reg : The I2C address of the device. | 9 | - reg : The I2C address of the device. |
| 10 | 10 | ||
| @@ -18,7 +18,7 @@ Optional properties: | |||
| 18 | 18 | ||
| 19 | - realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. | 19 | - realtek,ldo1-en-gpios : The GPIO that controls the CODEC's LDO1_EN pin. |
| 20 | 20 | ||
| 21 | Pins on the device (for linking into audio routes): | 21 | Pins on the device (for linking into audio routes) for RT5639/RT5640: |
| 22 | 22 | ||
| 23 | * DMIC1 | 23 | * DMIC1 |
| 24 | * DMIC2 | 24 | * DMIC2 |
| @@ -31,13 +31,16 @@ Pins on the device (for linking into audio routes): | |||
| 31 | * HPOR | 31 | * HPOR |
| 32 | * LOUTL | 32 | * LOUTL |
| 33 | * LOUTR | 33 | * LOUTR |
| 34 | * MONOP | ||
| 35 | * MONON | ||
| 36 | * SPOLP | 34 | * SPOLP |
| 37 | * SPOLN | 35 | * SPOLN |
| 38 | * SPORP | 36 | * SPORP |
| 39 | * SPORN | 37 | * SPORN |
| 40 | 38 | ||
| 39 | Additional pins on the device for RT5640: | ||
| 40 | |||
| 41 | * MONOP | ||
| 42 | * MONON | ||
| 43 | |||
| 41 | Example: | 44 | Example: |
| 42 | 45 | ||
| 43 | rt5640 { | 46 | rt5640 { |
diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt index 131aa2ad7f1a..c2e9841dfce4 100644 --- a/Documentation/devicetree/bindings/sound/simple-card.txt +++ b/Documentation/devicetree/bindings/sound/simple-card.txt | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | Simple-Card: | 1 | Simple-Card: |
| 2 | 2 | ||
| 3 | Simple-Card specifies audio DAI connection of SoC <-> codec. | 3 | Simple-Card specifies audio DAI connections of SoC <-> codec. |
| 4 | 4 | ||
| 5 | Required properties: | 5 | Required properties: |
| 6 | 6 | ||
| @@ -10,26 +10,54 @@ Optional properties: | |||
| 10 | 10 | ||
| 11 | - simple-audio-card,name : User specified audio sound card name, one string | 11 | - simple-audio-card,name : User specified audio sound card name, one string |
| 12 | property. | 12 | property. |
| 13 | - simple-audio-card,format : CPU/CODEC common audio format. | ||
| 14 | "i2s", "right_j", "left_j" , "dsp_a" | ||
| 15 | "dsp_b", "ac97", "pdm", "msb", "lsb" | ||
| 16 | - simple-audio-card,widgets : Please refer to widgets.txt. | 13 | - simple-audio-card,widgets : Please refer to widgets.txt. |
| 17 | - simple-audio-card,routing : A list of the connections between audio components. | 14 | - simple-audio-card,routing : A list of the connections between audio components. |
| 18 | Each entry is a pair of strings, the first being the | 15 | Each entry is a pair of strings, the first being the |
| 19 | connection's sink, the second being the connection's | 16 | connection's sink, the second being the connection's |
| 20 | source. | 17 | source. |
| 21 | - dai-tdm-slot-num : Please refer to tdm-slot.txt. | 18 | - simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec |
| 22 | - dai-tdm-slot-width : Please refer to tdm-slot.txt. | 19 | mclk. |
| 20 | |||
| 21 | Optional subnodes: | ||
| 22 | |||
| 23 | - simple-audio-card,dai-link : Container for dai-link level | ||
| 24 | properties and the CPU and CODEC | ||
| 25 | sub-nodes. This container may be | ||
| 26 | omitted when the card has only one | ||
| 27 | DAI link. See the examples and the | ||
| 28 | section bellow. | ||
| 29 | |||
| 30 | Dai-link subnode properties and subnodes: | ||
| 31 | |||
| 32 | If dai-link subnode is omitted and the subnode properties are directly | ||
| 33 | under "sound"-node the subnode property and subnode names have to be | ||
| 34 | prefixed with "simple-audio-card,"-prefix. | ||
| 23 | 35 | ||
| 24 | Required subnodes: | 36 | Required dai-link subnodes: |
| 25 | 37 | ||
| 26 | - simple-audio-card,dai-link : container for the CPU and CODEC sub-nodes | 38 | - cpu : CPU sub-node |
| 27 | This container may be omitted when the | 39 | - codec : CODEC sub-node |
| 28 | card has only one DAI link. | ||
| 29 | See the examples. | ||
| 30 | 40 | ||
| 31 | - simple-audio-card,cpu : CPU sub-node | 41 | Optional dai-link subnode properties: |
| 32 | - simple-audio-card,codec : CODEC sub-node | 42 | |
| 43 | - format : CPU/CODEC common audio format. | ||
| 44 | "i2s", "right_j", "left_j" , "dsp_a" | ||
| 45 | "dsp_b", "ac97", "pdm", "msb", "lsb" | ||
| 46 | - frame-master : Indicates dai-link frame master. | ||
| 47 | phandle to a cpu or codec subnode. | ||
| 48 | - bitclock-master : Indicates dai-link bit clock master. | ||
| 49 | phandle to a cpu or codec subnode. | ||
| 50 | - bitclock-inversion : bool property. Add this if the | ||
| 51 | dai-link uses bit clock inversion. | ||
| 52 | - frame-inversion : bool property. Add this if the | ||
| 53 | dai-link uses frame clock inversion. | ||
| 54 | |||
| 55 | For backward compatibility the frame-master and bitclock-master | ||
| 56 | properties can be used as booleans in codec subnode to indicate if the | ||
| 57 | codec is the dai-link frame or bit clock master. In this case there | ||
| 58 | should be no dai-link node, the same properties should not be present | ||
| 59 | at sound-node level, and the bitclock-inversion and frame-inversion | ||
| 60 | properties should also be placed in the codec node if needed. | ||
| 33 | 61 | ||
| 34 | Required CPU/CODEC subnodes properties: | 62 | Required CPU/CODEC subnodes properties: |
| 35 | 63 | ||
| @@ -37,29 +65,21 @@ Required CPU/CODEC subnodes properties: | |||
| 37 | 65 | ||
| 38 | Optional CPU/CODEC subnodes properties: | 66 | Optional CPU/CODEC subnodes properties: |
| 39 | 67 | ||
| 40 | - format : CPU/CODEC specific audio format if needed. | 68 | - dai-tdm-slot-num : Please refer to tdm-slot.txt. |
| 41 | see simple-audio-card,format | 69 | - dai-tdm-slot-width : Please refer to tdm-slot.txt. |
| 42 | - frame-master : bool property. add this if subnode is frame master | ||
| 43 | - bitclock-master : bool property. add this if subnode is bitclock master | ||
| 44 | - bitclock-inversion : bool property. add this if subnode has clock inversion | ||
| 45 | - frame-inversion : bool property. add this if subnode has frame inversion | ||
| 46 | - clocks / system-clock-frequency : specify subnode's clock if needed. | 70 | - clocks / system-clock-frequency : specify subnode's clock if needed. |
| 47 | it can be specified via "clocks" if system has | 71 | it can be specified via "clocks" if system has |
| 48 | clock node (= common clock), or "system-clock-frequency" | 72 | clock node (= common clock), or "system-clock-frequency" |
| 49 | (if system doens't support common clock) | 73 | (if system doens't support common clock) |
| 50 | 74 | ||
| 51 | Note: | ||
| 52 | * For 'format', 'frame-master', 'bitclock-master', 'bitclock-inversion' and | ||
| 53 | 'frame-inversion', the simple card will use the settings of CODEC for both | ||
| 54 | CPU and CODEC sides as we need to keep the settings identical for both ends | ||
| 55 | of the link. | ||
| 56 | |||
| 57 | Example 1 - single DAI link: | 75 | Example 1 - single DAI link: |
| 58 | 76 | ||
| 59 | sound { | 77 | sound { |
| 60 | compatible = "simple-audio-card"; | 78 | compatible = "simple-audio-card"; |
| 61 | simple-audio-card,name = "VF610-Tower-Sound-Card"; | 79 | simple-audio-card,name = "VF610-Tower-Sound-Card"; |
| 62 | simple-audio-card,format = "left_j"; | 80 | simple-audio-card,format = "left_j"; |
| 81 | simple-audio-card,bitclock-master = <&dailink0_master>; | ||
| 82 | simple-audio-card,frame-master = <&dailink0_master>; | ||
| 63 | simple-audio-card,widgets = | 83 | simple-audio-card,widgets = |
| 64 | "Microphone", "Microphone Jack", | 84 | "Microphone", "Microphone Jack", |
| 65 | "Headphone", "Headphone Jack", | 85 | "Headphone", "Headphone Jack", |
| @@ -69,17 +89,12 @@ sound { | |||
| 69 | "Headphone Jack", "HP_OUT", | 89 | "Headphone Jack", "HP_OUT", |
| 70 | "External Speaker", "LINE_OUT"; | 90 | "External Speaker", "LINE_OUT"; |
| 71 | 91 | ||
| 72 | dai-tdm-slot-num = <2>; | ||
| 73 | dai-tdm-slot-width = <8>; | ||
| 74 | |||
| 75 | simple-audio-card,cpu { | 92 | simple-audio-card,cpu { |
| 76 | sound-dai = <&sh_fsi2 0>; | 93 | sound-dai = <&sh_fsi2 0>; |
| 77 | }; | 94 | }; |
| 78 | 95 | ||
| 79 | simple-audio-card,codec { | 96 | dailink0_master: simple-audio-card,codec { |
| 80 | sound-dai = <&ak4648>; | 97 | sound-dai = <&ak4648>; |
| 81 | bitclock-master; | ||
| 82 | frame-master; | ||
| 83 | clocks = <&osc>; | 98 | clocks = <&osc>; |
| 84 | }; | 99 | }; |
| 85 | }; | 100 | }; |
| @@ -105,31 +120,31 @@ Example 2 - many DAI links: | |||
| 105 | sound { | 120 | sound { |
| 106 | compatible = "simple-audio-card"; | 121 | compatible = "simple-audio-card"; |
| 107 | simple-audio-card,name = "Cubox Audio"; | 122 | simple-audio-card,name = "Cubox Audio"; |
| 108 | simple-audio-card,format = "i2s"; | ||
| 109 | 123 | ||
| 110 | simple-audio-card,dai-link@0 { /* I2S - HDMI */ | 124 | simple-audio-card,dai-link@0 { /* I2S - HDMI */ |
| 111 | simple-audio-card,cpu { | 125 | format = "i2s"; |
| 126 | cpu { | ||
| 112 | sound-dai = <&audio1 0>; | 127 | sound-dai = <&audio1 0>; |
| 113 | }; | 128 | }; |
| 114 | simple-audio-card,codec { | 129 | codec { |
| 115 | sound-dai = <&tda998x 0>; | 130 | sound-dai = <&tda998x 0>; |
| 116 | }; | 131 | }; |
| 117 | }; | 132 | }; |
| 118 | 133 | ||
| 119 | simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */ | 134 | simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */ |
| 120 | simple-audio-card,cpu { | 135 | cpu { |
| 121 | sound-dai = <&audio1 1>; | 136 | sound-dai = <&audio1 1>; |
| 122 | }; | 137 | }; |
| 123 | simple-audio-card,codec { | 138 | codec { |
| 124 | sound-dai = <&tda998x 1>; | 139 | sound-dai = <&tda998x 1>; |
| 125 | }; | 140 | }; |
| 126 | }; | 141 | }; |
| 127 | 142 | ||
| 128 | simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */ | 143 | simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */ |
| 129 | simple-audio-card,cpu { | 144 | cpu { |
| 130 | sound-dai = <&audio1 1>; | 145 | sound-dai = <&audio1 1>; |
| 131 | }; | 146 | }; |
| 132 | simple-audio-card,codec { | 147 | codec { |
| 133 | sound-dai = <&spdif_codec>; | 148 | sound-dai = <&spdif_codec>; |
| 134 | }; | 149 | }; |
| 135 | }; | 150 | }; |
diff --git a/Documentation/devicetree/bindings/sound/snow.txt b/Documentation/devicetree/bindings/sound/snow.txt new file mode 100644 index 000000000000..678b191c37b8 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/snow.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | Audio Binding for Snow boards | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible : Can be one of the following, | ||
| 5 | "google,snow-audio-max98090" or | ||
| 6 | "google,snow-audio-max98095" | ||
| 7 | - samsung,i2s-controller: The phandle of the Samsung I2S controller | ||
| 8 | - samsung,audio-codec: The phandle of the audio codec | ||
| 9 | |||
| 10 | Example: | ||
| 11 | |||
| 12 | sound { | ||
| 13 | compatible = "google,snow-audio-max98095"; | ||
| 14 | |||
| 15 | samsung,i2s-controller = <&i2s0>; | ||
| 16 | samsung,audio-codec = <&max98095>; | ||
| 17 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/st,sta350.txt b/Documentation/devicetree/bindings/sound/st,sta350.txt new file mode 100644 index 000000000000..b7e71bf5caf4 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/st,sta350.txt | |||
| @@ -0,0 +1,131 @@ | |||
| 1 | STA350 audio CODEC | ||
| 2 | |||
| 3 | The driver for this device only supports I2C. | ||
| 4 | |||
| 5 | Required properties: | ||
| 6 | |||
| 7 | - compatible: "st,sta350" | ||
| 8 | - reg: the I2C address of the device for I2C | ||
| 9 | - reset-gpios: a GPIO spec for the reset pin. If specified, it will be | ||
| 10 | deasserted before communication to the codec starts. | ||
| 11 | |||
| 12 | - power-down-gpios: a GPIO spec for the power down pin. If specified, | ||
| 13 | it will be deasserted before communication to the codec | ||
| 14 | starts. | ||
| 15 | |||
| 16 | - vdd-dig-supply: regulator spec, providing 3.3V | ||
| 17 | - vdd-pll-supply: regulator spec, providing 3.3V | ||
| 18 | - vcc-supply: regulator spec, providing 5V - 26V | ||
| 19 | |||
| 20 | Optional properties: | ||
| 21 | |||
| 22 | - st,output-conf: number, Selects the output configuration: | ||
| 23 | 0: 2-channel (full-bridge) power, 2-channel data-out | ||
| 24 | 1: 2 (half-bridge). 1 (full-bridge) on-board power | ||
| 25 | 2: 2 Channel (Full-Bridge) Power, 1 Channel FFX | ||
| 26 | 3: 1 Channel Mono-Parallel | ||
| 27 | If parameter is missing, mode 0 will be enabled. | ||
| 28 | This property has to be specified as '/bits/ 8' value. | ||
| 29 | |||
| 30 | - st,ch1-output-mapping: Channel 1 output mapping | ||
| 31 | - st,ch2-output-mapping: Channel 2 output mapping | ||
| 32 | - st,ch3-output-mapping: Channel 3 output mapping | ||
| 33 | 0: Channel 1 | ||
| 34 | 1: Channel 2 | ||
| 35 | 2: Channel 3 | ||
| 36 | If parameter is missing, channel 1 is choosen. | ||
| 37 | This properties have to be specified as '/bits/ 8' values. | ||
| 38 | |||
| 39 | - st,thermal-warning-recover: | ||
| 40 | If present, thermal warning recovery is enabled. | ||
| 41 | |||
| 42 | - st,thermal-warning-adjustment: | ||
| 43 | If present, thermal warning adjustment is enabled. | ||
| 44 | |||
| 45 | - st,fault-detect-recovery: | ||
| 46 | If present, then fault recovery will be enabled. | ||
| 47 | |||
| 48 | - st,ffx-power-output-mode: string | ||
| 49 | The FFX power output mode selects how the FFX output timing is | ||
| 50 | configured. Must be one of these values: | ||
| 51 | - "drop-compensation" | ||
| 52 | - "tapered-compensation" | ||
| 53 | - "full-power-mode" | ||
| 54 | - "variable-drop-compensation" (default) | ||
| 55 | |||
| 56 | - st,drop-compensation-ns: number | ||
| 57 | Only required for "st,ffx-power-output-mode" == | ||
| 58 | "variable-drop-compensation". | ||
| 59 | Specifies the drop compensation in nanoseconds. | ||
| 60 | The value must be in the range of 0..300, and only | ||
| 61 | multiples of 20 are allowed. Default is 140ns. | ||
| 62 | |||
| 63 | - st,overcurrent-warning-adjustment: | ||
| 64 | If present, overcurrent warning adjustment is enabled. | ||
| 65 | |||
| 66 | - st,max-power-use-mpcc: | ||
| 67 | If present, then MPCC bits are used for MPC coefficients, | ||
| 68 | otherwise standard MPC coefficients are used. | ||
| 69 | |||
| 70 | - st,max-power-corr: | ||
| 71 | If present, power bridge correction for THD reduction near maximum | ||
| 72 | power output is enabled. | ||
| 73 | |||
| 74 | - st,am-reduction-mode: | ||
| 75 | If present, FFX mode runs in AM reduction mode, otherwise normal | ||
| 76 | FFX mode is used. | ||
| 77 | |||
| 78 | - st,odd-pwm-speed-mode: | ||
| 79 | If present, PWM speed mode run on odd speed mode (341.3 kHz) on all | ||
| 80 | channels. If not present, normal PWM spped mode (384 kHz) will be used. | ||
| 81 | |||
| 82 | - st,distortion-compensation: | ||
| 83 | If present, distortion compensation variable uses DCC coefficient. | ||
| 84 | If not present, preset DC coefficient is used. | ||
| 85 | |||
| 86 | - st,invalid-input-detect-mute: | ||
| 87 | If present, automatic invalid input detect mute is enabled. | ||
| 88 | |||
| 89 | - st,activate-mute-output: | ||
| 90 | If present, a mute output will be activated in ase the volume will | ||
| 91 | reach a value lower than -76 dBFS. | ||
| 92 | |||
| 93 | - st,bridge-immediate-off: | ||
| 94 | If present, the bridge will be switched off immediately after the | ||
| 95 | power-down-gpio goes low. Otherwise, the bridge will wait for 13 | ||
| 96 | million clock cycles to pass before shutting down. | ||
| 97 | |||
| 98 | - st,noise-shape-dc-cut: | ||
| 99 | If present, the noise-shaping technique on the DC cutoff filter are | ||
| 100 | enabled. | ||
| 101 | |||
| 102 | - st,powerdown-master-volume: | ||
| 103 | If present, the power-down pin and I2C power-down functions will | ||
| 104 | act on the master volume. Otherwise, the functions will act on the | ||
| 105 | mute commands. | ||
| 106 | |||
| 107 | - st,powerdown-delay-divider: | ||
| 108 | If present, the bridge power-down time will be divided by the provided | ||
| 109 | value. If not specified, a divider of 1 will be used. Allowed values | ||
| 110 | are 1, 2, 4, 8, 16, 32, 64 and 128. | ||
| 111 | This property has to be specified as '/bits/ 8' value. | ||
| 112 | |||
| 113 | Example: | ||
| 114 | |||
| 115 | codec: sta350@38 { | ||
| 116 | compatible = "st,sta350"; | ||
| 117 | reg = <0x1c>; | ||
| 118 | reset-gpios = <&gpio1 19 0>; | ||
| 119 | power-down-gpios = <&gpio1 16 0>; | ||
| 120 | st,output-conf = /bits/ 8 <0x3>; // set output to 2-channel | ||
| 121 | // (full-bridge) power, | ||
| 122 | // 2-channel data-out | ||
| 123 | st,ch1-output-mapping = /bits/ 8 <0>; // set channel 1 output ch 1 | ||
| 124 | st,ch2-output-mapping = /bits/ 8 <0>; // set channel 2 output ch 1 | ||
| 125 | st,ch3-output-mapping = /bits/ 8 <0>; // set channel 3 output ch 1 | ||
| 126 | st,max-power-correction; // enables power bridge | ||
| 127 | // correction for THD reduction | ||
| 128 | // near maximum power output | ||
| 129 | st,invalid-input-detect-mute; // mute if no valid digital | ||
| 130 | // audio signal is provided. | ||
| 131 | }; | ||
diff --git a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt index 74c66dee3e14..eff12be5e789 100644 --- a/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt +++ b/Documentation/devicetree/bindings/sound/tlv320aic31xx.txt | |||
| @@ -13,6 +13,9 @@ Required properties: | |||
| 13 | "ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP) | 13 | "ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP) |
| 14 | 14 | ||
| 15 | - reg - <int> - I2C slave address | 15 | - reg - <int> - I2C slave address |
| 16 | - HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply, | ||
| 17 | DVDD-supply : power supplies for the device as covered in | ||
| 18 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
| 16 | 19 | ||
| 17 | 20 | ||
| 18 | Optional properties: | 21 | Optional properties: |
| @@ -24,9 +27,6 @@ Optional properties: | |||
| 24 | 3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD | 27 | 3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD |
| 25 | If this node is not mentioned or if the value is unknown, then | 28 | If this node is not mentioned or if the value is unknown, then |
| 26 | micbias is set to 2.0V. | 29 | micbias is set to 2.0V. |
| 27 | - HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply, | ||
| 28 | DVDD-supply : power supplies for the device as covered in | ||
| 29 | Documentation/devicetree/bindings/regulator/regulator.txt | ||
| 30 | 30 | ||
| 31 | CODEC output pins: | 31 | CODEC output pins: |
| 32 | * HPL | 32 | * HPL |
diff --git a/Documentation/devicetree/bindings/spi/fsl-spi.txt b/Documentation/devicetree/bindings/spi/fsl-spi.txt index b032dd76e9d2..a2331372068c 100644 --- a/Documentation/devicetree/bindings/spi/fsl-spi.txt +++ b/Documentation/devicetree/bindings/spi/fsl-spi.txt | |||
| @@ -42,6 +42,10 @@ Required properties: | |||
| 42 | - interrupts : should contain eSPI interrupt, the device has one interrupt. | 42 | - interrupts : should contain eSPI interrupt, the device has one interrupt. |
| 43 | - fsl,espi-num-chipselects : the number of the chipselect signals. | 43 | - fsl,espi-num-chipselects : the number of the chipselect signals. |
| 44 | 44 | ||
| 45 | Optional properties: | ||
| 46 | - fsl,csbef: chip select assertion time in bits before frame starts | ||
| 47 | - fsl,csaft: chip select negation time in bits after frame ends | ||
| 48 | |||
| 45 | Example: | 49 | Example: |
| 46 | spi@110000 { | 50 | spi@110000 { |
| 47 | #address-cells = <1>; | 51 | #address-cells = <1>; |
| @@ -51,4 +55,6 @@ Example: | |||
| 51 | interrupts = <53 0x2>; | 55 | interrupts = <53 0x2>; |
| 52 | interrupt-parent = <&mpic>; | 56 | interrupt-parent = <&mpic>; |
| 53 | fsl,espi-num-chipselects = <4>; | 57 | fsl,espi-num-chipselects = <4>; |
| 58 | fsl,csbef = <1>; | ||
| 59 | fsl,csaft = <1>; | ||
| 54 | }; | 60 | }; |
diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt b/Documentation/devicetree/bindings/spi/spi-bus.txt index e5a4d1b4acfe..bbaa857dd68f 100644 --- a/Documentation/devicetree/bindings/spi/spi-bus.txt +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt | |||
| @@ -55,13 +55,15 @@ contain the following properties. | |||
| 55 | chip select active high | 55 | chip select active high |
| 56 | - spi-3wire - (optional) Empty property indicating device requires | 56 | - spi-3wire - (optional) Empty property indicating device requires |
| 57 | 3-wire mode. | 57 | 3-wire mode. |
| 58 | - spi-lsb-first - (optional) Empty property indicating device requires | ||
| 59 | LSB first mode. | ||
| 58 | - spi-tx-bus-width - (optional) The bus width(number of data wires) that | 60 | - spi-tx-bus-width - (optional) The bus width(number of data wires) that |
| 59 | used for MOSI. Defaults to 1 if not present. | 61 | used for MOSI. Defaults to 1 if not present. |
| 60 | - spi-rx-bus-width - (optional) The bus width(number of data wires) that | 62 | - spi-rx-bus-width - (optional) The bus width(number of data wires) that |
| 61 | used for MISO. Defaults to 1 if not present. | 63 | used for MISO. Defaults to 1 if not present. |
| 62 | 64 | ||
| 63 | Some SPI controllers and devices support Dual and Quad SPI transfer mode. | 65 | Some SPI controllers and devices support Dual and Quad SPI transfer mode. |
| 64 | It allows data in SPI system transfered in 2 wires(DUAL) or 4 wires(QUAD). | 66 | It allows data in the SPI system to be transferred in 2 wires(DUAL) or 4 wires(QUAD). |
| 65 | Now the value that spi-tx-bus-width and spi-rx-bus-width can receive is | 67 | Now the value that spi-tx-bus-width and spi-rx-bus-width can receive is |
| 66 | only 1(SINGLE), 2(DUAL) and 4(QUAD). | 68 | only 1(SINGLE), 2(DUAL) and 4(QUAD). |
| 67 | Dual/Quad mode is not allowed when 3-wire mode is used. | 69 | Dual/Quad mode is not allowed when 3-wire mode is used. |
diff --git a/Documentation/devicetree/bindings/spi/spi-cadence.txt b/Documentation/devicetree/bindings/spi/spi-cadence.txt new file mode 100644 index 000000000000..94f09141a4f0 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-cadence.txt | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | Cadence SPI controller Device Tree Bindings | ||
| 2 | ------------------------------------------- | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible : Should be "cdns,spi-r1p6" or "xlnx,zynq-spi-r1p6". | ||
| 6 | - reg : Physical base address and size of SPI registers map. | ||
| 7 | - interrupts : Property with a value describing the interrupt | ||
| 8 | number. | ||
| 9 | - interrupt-parent : Must be core interrupt controller | ||
| 10 | - clock-names : List of input clock names - "ref_clk", "pclk" | ||
| 11 | (See clock bindings for details). | ||
| 12 | - clocks : Clock phandles (see clock bindings for details). | ||
| 13 | |||
| 14 | Optional properties: | ||
| 15 | - num-cs : Number of chip selects used. | ||
| 16 | If a decoder is used, this will be the number of | ||
| 17 | chip selects after the decoder. | ||
| 18 | - is-decoded-cs : Flag to indicate whether decoder is used or not. | ||
| 19 | |||
| 20 | Example: | ||
| 21 | |||
| 22 | spi@e0007000 { | ||
| 23 | compatible = "xlnx,zynq-spi-r1p6"; | ||
| 24 | clock-names = "ref_clk", "pclk"; | ||
| 25 | clocks = <&clkc 26>, <&clkc 35>; | ||
| 26 | interrupt-parent = <&intc>; | ||
| 27 | interrupts = <0 49 4>; | ||
| 28 | num-cs = <4>; | ||
| 29 | is-decoded-cs = <0>; | ||
| 30 | reg = <0xe0007000 0x1000>; | ||
| 31 | } ; | ||
diff --git a/Documentation/devicetree/bindings/spi/spi-dw.txt b/Documentation/devicetree/bindings/spi/spi-dw.txt new file mode 100644 index 000000000000..7b63ed601990 --- /dev/null +++ b/Documentation/devicetree/bindings/spi/spi-dw.txt | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | Synopsys DesignWare SPI master | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should be "snps,designware-spi" | ||
| 5 | - #address-cells: see spi-bus.txt | ||
| 6 | - #size-cells: see spi-bus.txt | ||
| 7 | - reg: address and length of the spi master registers | ||
| 8 | - interrupts: should contain one interrupt | ||
| 9 | - clocks: spi clock phandle | ||
| 10 | - num-cs: see spi-bus.txt | ||
| 11 | |||
| 12 | Optional properties: | ||
| 13 | - cs-gpios: see spi-bus.txt | ||
| 14 | |||
| 15 | Example: | ||
| 16 | |||
| 17 | spi: spi@4020a000 { | ||
| 18 | compatible = "snps,designware-spi"; | ||
| 19 | interrupts = <11 1>; | ||
| 20 | reg = <0x4020a000 0x1000>; | ||
| 21 | clocks = <&pclk>; | ||
| 22 | num-cs = <2>; | ||
| 23 | cs-gpios = <&banka 0 0>; | ||
| 24 | }; | ||
diff --git a/Documentation/devicetree/bindings/spmi/spmi.txt b/Documentation/devicetree/bindings/spmi/spmi.txt index 462a42fb3a1e..4bb10d161a27 100644 --- a/Documentation/devicetree/bindings/spmi/spmi.txt +++ b/Documentation/devicetree/bindings/spmi/spmi.txt | |||
| @@ -26,7 +26,7 @@ Each child node must have one and only one 'reg' entry of type SPMI_USID. | |||
| 26 | reg = <...>; | 26 | reg = <...>; |
| 27 | 27 | ||
| 28 | #address-cells = <2>; | 28 | #address-cells = <2>; |
| 29 | #size-cells <0>; | 29 | #size-cells = <0>; |
| 30 | 30 | ||
| 31 | child@0 { | 31 | child@0 { |
| 32 | compatible = "..."; | 32 | compatible = "..."; |
diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index 3be5ce7a9654..e75f0e549fff 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt | |||
| @@ -61,6 +61,7 @@ Required properties: | |||
| 61 | Optional properties: | 61 | Optional properties: |
| 62 | - interface_pix_fmt: How this display is connected to the | 62 | - interface_pix_fmt: How this display is connected to the |
| 63 | display interface. Currently supported types: "rgb24", "rgb565", "bgr666" | 63 | display interface. Currently supported types: "rgb24", "rgb565", "bgr666" |
| 64 | and "lvds666". | ||
| 64 | - edid: verbatim EDID data block describing attached display. | 65 | - edid: verbatim EDID data block describing attached display. |
| 65 | - ddc: phandle describing the i2c bus handling the display data | 66 | - ddc: phandle describing the i2c bus handling the display data |
| 66 | channel | 67 | channel |
diff --git a/Documentation/devicetree/bindings/thermal/armada-thermal.txt b/Documentation/devicetree/bindings/thermal/armada-thermal.txt index fff93d5f92de..4cf024929a3f 100644 --- a/Documentation/devicetree/bindings/thermal/armada-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/armada-thermal.txt | |||
| @@ -1,11 +1,21 @@ | |||
| 1 | * Marvell Armada 370/XP thermal management | 1 | * Marvell Armada 370/375/380/XP thermal management |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | 4 | ||
| 5 | - compatible: Should be set to one of the following: | 5 | - compatible: Should be set to one of the following: |
| 6 | marvell,armada370-thermal | 6 | marvell,armada370-thermal |
| 7 | marvell,armada375-thermal | ||
| 8 | marvell,armada375-z1-thermal | ||
| 9 | marvell,armada380-thermal | ||
| 7 | marvell,armadaxp-thermal | 10 | marvell,armadaxp-thermal |
| 8 | 11 | ||
| 12 | Note: As the name suggests, "marvell,armada375-z1-thermal" | ||
| 13 | applies for the SoC Z1 stepping only. On such stepping | ||
| 14 | some quirks need to be done and the register offset differs | ||
| 15 | from the one in the A0 stepping. | ||
| 16 | The operating system may auto-detect the SoC stepping and | ||
| 17 | update the compatible and register offsets at runtime. | ||
| 18 | |||
| 9 | - reg: Device's register space. | 19 | - reg: Device's register space. |
| 10 | Two entries are expected, see the examples below. | 20 | Two entries are expected, see the examples below. |
| 11 | The first one is required for the sensor register; | 21 | The first one is required for the sensor register; |
diff --git a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt index 284f5300fd8b..c94909215c07 100644 --- a/Documentation/devicetree/bindings/thermal/exynos-thermal.txt +++ b/Documentation/devicetree/bindings/thermal/exynos-thermal.txt | |||
| @@ -6,16 +6,35 @@ | |||
| 6 | "samsung,exynos4412-tmu" | 6 | "samsung,exynos4412-tmu" |
| 7 | "samsung,exynos4210-tmu" | 7 | "samsung,exynos4210-tmu" |
| 8 | "samsung,exynos5250-tmu" | 8 | "samsung,exynos5250-tmu" |
| 9 | "samsung,exynos5260-tmu" | ||
| 10 | "samsung,exynos5420-tmu" for TMU channel 0, 1 on Exynos5420 | ||
| 11 | "samsung,exynos5420-tmu-ext-triminfo" for TMU channels 2, 3 and 4 | ||
| 12 | Exynos5420 (Must pass triminfo base and triminfo clock) | ||
| 9 | "samsung,exynos5440-tmu" | 13 | "samsung,exynos5440-tmu" |
| 10 | - interrupt-parent : The phandle for the interrupt controller | 14 | - interrupt-parent : The phandle for the interrupt controller |
| 11 | - reg : Address range of the thermal registers. For soc's which has multiple | 15 | - reg : Address range of the thermal registers. For soc's which has multiple |
| 12 | instances of TMU and some registers are shared across all TMU's like | 16 | instances of TMU and some registers are shared across all TMU's like |
| 13 | interrupt related then 2 set of register has to supplied. First set | 17 | interrupt related then 2 set of register has to supplied. First set |
| 14 | belongs to each instance of TMU and second set belongs to common TMU | 18 | belongs to register set of TMU instance and second set belongs to |
| 15 | registers. | 19 | registers shared with the TMU instance. |
| 20 | |||
| 21 | NOTE: On Exynos5420, the TRIMINFO register is misplaced for TMU | ||
| 22 | channels 2, 3 and 4 | ||
| 23 | Use "samsung,exynos5420-tmu-ext-triminfo" in cases, there is a misplaced | ||
| 24 | register, also provide clock to access that base. | ||
| 25 | |||
| 26 | TRIMINFO at 0x1006c000 contains data for TMU channel 3 | ||
| 27 | TRIMINFO at 0x100a0000 contains data for TMU channel 4 | ||
| 28 | TRIMINFO at 0x10068000 contains data for TMU channel 2 | ||
| 29 | |||
| 16 | - interrupts : Should contain interrupt for thermal system | 30 | - interrupts : Should contain interrupt for thermal system |
| 17 | - clocks : The main clock for TMU device | 31 | - clocks : The main clocks for TMU device |
| 32 | -- 1. operational clock for TMU channel | ||
| 33 | -- 2. optional clock to access the shared registers of TMU channel | ||
| 18 | - clock-names : Thermal system clock name | 34 | - clock-names : Thermal system clock name |
| 35 | -- "tmu_apbif" operational clock for current TMU channel | ||
| 36 | -- "tmu_triminfo_apbif" clock to access the shared triminfo register | ||
| 37 | for current TMU channel | ||
| 19 | - vtmu-supply: This entry is optional and provides the regulator node supplying | 38 | - vtmu-supply: This entry is optional and provides the regulator node supplying |
| 20 | voltage to TMU. If needed this entry can be placed inside | 39 | voltage to TMU. If needed this entry can be placed inside |
| 21 | board/platform specific dts file. | 40 | board/platform specific dts file. |
| @@ -43,6 +62,31 @@ Example 2): | |||
| 43 | clock-names = "tmu_apbif"; | 62 | clock-names = "tmu_apbif"; |
| 44 | }; | 63 | }; |
| 45 | 64 | ||
| 65 | Example 3): (In case of Exynos5420 "with misplaced TRIMINFO register") | ||
| 66 | tmu_cpu2: tmu@10068000 { | ||
| 67 | compatible = "samsung,exynos5420-tmu-ext-triminfo"; | ||
| 68 | reg = <0x10068000 0x100>, <0x1006c000 0x4>; | ||
| 69 | interrupts = <0 184 0>; | ||
| 70 | clocks = <&clock 318>, <&clock 318>; | ||
| 71 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | ||
| 72 | }; | ||
| 73 | |||
| 74 | tmu_cpu3: tmu@1006c000 { | ||
| 75 | compatible = "samsung,exynos5420-tmu-ext-triminfo"; | ||
| 76 | reg = <0x1006c000 0x100>, <0x100a0000 0x4>; | ||
| 77 | interrupts = <0 185 0>; | ||
| 78 | clocks = <&clock 318>, <&clock 319>; | ||
| 79 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | ||
| 80 | }; | ||
| 81 | |||
| 82 | tmu_gpu: tmu@100a0000 { | ||
| 83 | compatible = "samsung,exynos5420-tmu-ext-triminfo"; | ||
| 84 | reg = <0x100a0000 0x100>, <0x10068000 0x4>; | ||
| 85 | interrupts = <0 215 0>; | ||
| 86 | clocks = <&clock 319>, <&clock 318>; | ||
| 87 | clock-names = "tmu_apbif", "tmu_triminfo_apbif"; | ||
| 88 | }; | ||
| 89 | |||
| 46 | Note: For multi-instance tmu each instance should have an alias correctly | 90 | Note: For multi-instance tmu each instance should have an alias correctly |
| 47 | numbered in "aliases" node. | 91 | numbered in "aliases" node. |
| 48 | 92 | ||
diff --git a/Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt b/Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt index 7c26154b8bbb..27cfc7d7ccd7 100644 --- a/Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt +++ b/Documentation/devicetree/bindings/timer/allwinner,sun5i-a13-hstimer.txt | |||
| @@ -9,6 +9,9 @@ Required properties: | |||
| 9 | one) | 9 | one) |
| 10 | - clocks: phandle to the source clock (usually the AHB clock) | 10 | - clocks: phandle to the source clock (usually the AHB clock) |
| 11 | 11 | ||
| 12 | Optionnal properties: | ||
| 13 | - resets: phandle to a reset controller asserting the timer | ||
| 14 | |||
| 12 | Example: | 15 | Example: |
| 13 | 16 | ||
| 14 | timer@01c60000 { | 17 | timer@01c60000 { |
| @@ -19,4 +22,5 @@ timer@01c60000 { | |||
| 19 | <0 53 1>, | 22 | <0 53 1>, |
| 20 | <0 54 1>; | 23 | <0 54 1>; |
| 21 | clocks = <&ahb1_gates 19>; | 24 | clocks = <&ahb1_gates 19>; |
| 25 | resets = <&ahb1rst 19>; | ||
| 22 | }; | 26 | }; |
diff --git a/Documentation/devicetree/bindings/timer/efm32,timer.txt b/Documentation/devicetree/bindings/timer/energymicro,efm32-timer.txt index 97a568f696c9..e502c11b2211 100644 --- a/Documentation/devicetree/bindings/timer/efm32,timer.txt +++ b/Documentation/devicetree/bindings/timer/energymicro,efm32-timer.txt | |||
| @@ -6,7 +6,7 @@ channels and can be used as PWM or Quadrature Decoder. Available clock sources | |||
| 6 | are the cpu's HFPERCLK (with a 10-bit prescaler) or an external pin. | 6 | are the cpu's HFPERCLK (with a 10-bit prescaler) or an external pin. |
| 7 | 7 | ||
| 8 | Required properties: | 8 | Required properties: |
| 9 | - compatible : Should be efm32,timer | 9 | - compatible : Should be "energymicro,efm32-timer" |
| 10 | - reg : Address and length of the register set | 10 | - reg : Address and length of the register set |
| 11 | - clocks : Should contain a reference to the HFPERCLK | 11 | - clocks : Should contain a reference to the HFPERCLK |
| 12 | 12 | ||
| @@ -16,7 +16,7 @@ Optional properties: | |||
| 16 | Example: | 16 | Example: |
| 17 | 17 | ||
| 18 | timer@40010c00 { | 18 | timer@40010c00 { |
| 19 | compatible = "efm32,timer"; | 19 | compatible = "energymicro,efm32-timer"; |
| 20 | reg = <0x40010c00 0x400>; | 20 | reg = <0x40010c00 0x400>; |
| 21 | interrupts = <14>; | 21 | interrupts = <14>; |
| 22 | clocks = <&cmu clk_HFPERCLKTIMER3>; | 22 | clocks = <&cmu clk_HFPERCLKTIMER3>; |
diff --git a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt new file mode 100644 index 000000000000..aa8c40230e5e --- /dev/null +++ b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | Freescale FlexTimer Module (FTM) Timer | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | |||
| 5 | - compatible : should be "fsl,ftm-timer" | ||
| 6 | - reg : Specifies base physical address and size of the register sets for the | ||
| 7 | clock event device and clock source device. | ||
| 8 | - interrupts : Should be the clock event device interrupt. | ||
| 9 | - clocks : The clocks provided by the SoC to drive the timer, must contain an | ||
| 10 | entry for each entry in clock-names. | ||
| 11 | - clock-names : Must include the following entries: | ||
| 12 | o "ftm-evt" | ||
| 13 | o "ftm-src" | ||
| 14 | o "ftm-evt-counter-en" | ||
| 15 | o "ftm-src-counter-en" | ||
| 16 | - big-endian: One boolean property, the big endian mode will be in use if it is | ||
| 17 | present, or the little endian mode will be in use for all the device registers. | ||
| 18 | |||
| 19 | Example: | ||
| 20 | ftm: ftm@400b8000 { | ||
| 21 | compatible = "fsl,ftm-timer"; | ||
| 22 | reg = <0x400b8000 0x1000 0x400b9000 0x1000>; | ||
| 23 | interrupts = <0 44 IRQ_TYPE_LEVEL_HIGH>; | ||
| 24 | clock-names = "ftm-evt", "ftm-src", | ||
| 25 | "ftm-evt-counter-en", "ftm-src-counter-en"; | ||
| 26 | clocks = <&clks VF610_CLK_FTM2>, | ||
| 27 | <&clks VF610_CLK_FTM3>, | ||
| 28 | <&clks VF610_CLK_FTM2_EXT_FIX_EN>, | ||
| 29 | <&clks VF610_CLK_FTM3_EXT_FIX_EN>; | ||
| 30 | big-endian; | ||
| 31 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt new file mode 100644 index 000000000000..f2899b550939 --- /dev/null +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-qcom.txt | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | Qualcomm CI13xxx (Chipidea) USB controllers | ||
| 2 | |||
| 3 | Required properties: | ||
| 4 | - compatible: should contain "qcom,ci-hdrc" | ||
| 5 | - reg: offset and length of the register set in the memory map | ||
| 6 | - interrupts: interrupt-specifier for the controller interrupt. | ||
| 7 | - usb-phy: phandle for the PHY device | ||
| 8 | - dr_mode: Should be "peripheral" | ||
| 9 | |||
| 10 | Examples: | ||
| 11 | gadget@f9a55000 { | ||
| 12 | compatible = "qcom,ci-hdrc"; | ||
| 13 | reg = <0xf9a55000 0x400>; | ||
| 14 | dr_mode = "peripheral"; | ||
| 15 | interrupts = <0 134 0>; | ||
| 16 | usb-phy = <&usbphy0>; | ||
| 17 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt index b8b6871f116f..467ddd15d40c 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.txt +++ b/Documentation/devicetree/bindings/usb/dwc2.txt | |||
| @@ -13,7 +13,7 @@ Refer to clk/clock-bindings.txt for generic clock consumer properties | |||
| 13 | 13 | ||
| 14 | Optional properties: | 14 | Optional properties: |
| 15 | - phys: phy provider specifier | 15 | - phys: phy provider specifier |
| 16 | - phy-names: shall be "device" | 16 | - phy-names: shall be "usb2-phy" |
| 17 | Refer to phy/phy-bindings.txt for generic phy consumer properties | 17 | Refer to phy/phy-bindings.txt for generic phy consumer properties |
| 18 | 18 | ||
| 19 | Example: | 19 | Example: |
diff --git a/Documentation/devicetree/bindings/usb/ehci-orion.txt b/Documentation/devicetree/bindings/usb/ehci-orion.txt index 6bc09ec14c4d..17c3bc858b86 100644 --- a/Documentation/devicetree/bindings/usb/ehci-orion.txt +++ b/Documentation/devicetree/bindings/usb/ehci-orion.txt | |||
| @@ -6,6 +6,11 @@ Required properties: | |||
| 6 | region. | 6 | region. |
| 7 | - interrupts: The EHCI interrupt | 7 | - interrupts: The EHCI interrupt |
| 8 | 8 | ||
| 9 | Optional properties: | ||
| 10 | - clocks: reference to the clock | ||
| 11 | - phys: reference to the USB PHY | ||
| 12 | - phy-names: name of the USB PHY, should be "usb" | ||
| 13 | |||
| 9 | Example: | 14 | Example: |
| 10 | 15 | ||
| 11 | ehci@50000 { | 16 | ehci@50000 { |
diff --git a/Documentation/devicetree/bindings/usb/exynos-usb.txt b/Documentation/devicetree/bindings/usb/exynos-usb.txt index d967ba16de60..a3b5990d0f2c 100644 --- a/Documentation/devicetree/bindings/usb/exynos-usb.txt +++ b/Documentation/devicetree/bindings/usb/exynos-usb.txt | |||
| @@ -12,6 +12,13 @@ Required properties: | |||
| 12 | - interrupts: interrupt number to the cpu. | 12 | - interrupts: interrupt number to the cpu. |
| 13 | - clocks: from common clock binding: handle to usb clock. | 13 | - clocks: from common clock binding: handle to usb clock. |
| 14 | - clock-names: from common clock binding: Shall be "usbhost". | 14 | - clock-names: from common clock binding: Shall be "usbhost". |
| 15 | - port: if in the SoC there are EHCI phys, they should be listed here. | ||
| 16 | One phy per port. Each port should have following entries: | ||
| 17 | - reg: port number on EHCI controller, e.g | ||
| 18 | On Exynos5250, port 0 is USB2.0 otg phy | ||
| 19 | port 1 is HSIC phy0 | ||
| 20 | port 2 is HSIC phy1 | ||
| 21 | - phys: from the *Generic PHY* bindings; specifying phy used by port. | ||
| 15 | 22 | ||
| 16 | Optional properties: | 23 | Optional properties: |
| 17 | - samsung,vbus-gpio: if present, specifies the GPIO that | 24 | - samsung,vbus-gpio: if present, specifies the GPIO that |
| @@ -27,6 +34,14 @@ Example: | |||
| 27 | 34 | ||
| 28 | clocks = <&clock 285>; | 35 | clocks = <&clock 285>; |
| 29 | clock-names = "usbhost"; | 36 | clock-names = "usbhost"; |
| 37 | |||
| 38 | #address-cells = <1>; | ||
| 39 | #size-cells = <0>; | ||
| 40 | port@0 { | ||
| 41 | reg = <0>; | ||
| 42 | phys = <&usb2phy 1>; | ||
| 43 | status = "disabled"; | ||
| 44 | }; | ||
| 30 | }; | 45 | }; |
| 31 | 46 | ||
| 32 | OHCI | 47 | OHCI |
| @@ -38,6 +53,13 @@ Required properties: | |||
| 38 | - interrupts: interrupt number to the cpu. | 53 | - interrupts: interrupt number to the cpu. |
| 39 | - clocks: from common clock binding: handle to usb clock. | 54 | - clocks: from common clock binding: handle to usb clock. |
| 40 | - clock-names: from common clock binding: Shall be "usbhost". | 55 | - clock-names: from common clock binding: Shall be "usbhost". |
| 56 | - port: if in the SoC there are OHCI phys, they should be listed here. | ||
| 57 | One phy per port. Each port should have following entries: | ||
| 58 | - reg: port number on OHCI controller, e.g | ||
| 59 | On Exynos5250, port 0 is USB2.0 otg phy | ||
| 60 | port 1 is HSIC phy0 | ||
| 61 | port 2 is HSIC phy1 | ||
| 62 | - phys: from the *Generic PHY* bindings, specifying phy used by port. | ||
| 41 | 63 | ||
| 42 | Example: | 64 | Example: |
| 43 | usb@12120000 { | 65 | usb@12120000 { |
| @@ -47,6 +69,15 @@ Example: | |||
| 47 | 69 | ||
| 48 | clocks = <&clock 285>; | 70 | clocks = <&clock 285>; |
| 49 | clock-names = "usbhost"; | 71 | clock-names = "usbhost"; |
| 72 | |||
| 73 | #address-cells = <1>; | ||
| 74 | #size-cells = <0>; | ||
| 75 | port@0 { | ||
| 76 | reg = <0>; | ||
| 77 | phys = <&usb2phy 1>; | ||
| 78 | status = "disabled"; | ||
| 79 | }; | ||
| 80 | |||
| 50 | }; | 81 | }; |
| 51 | 82 | ||
| 52 | DWC3 | 83 | DWC3 |
diff --git a/Documentation/devicetree/bindings/usb/gr-udc.txt b/Documentation/devicetree/bindings/usb/gr-udc.txt index 0c5118f7a916..e9445224fabd 100644 --- a/Documentation/devicetree/bindings/usb/gr-udc.txt +++ b/Documentation/devicetree/bindings/usb/gr-udc.txt | |||
| @@ -12,17 +12,23 @@ Required properties: | |||
| 12 | 12 | ||
| 13 | - reg : Address and length of the register set for the device | 13 | - reg : Address and length of the register set for the device |
| 14 | 14 | ||
| 15 | - interrupts : Interrupt numbers for this device | 15 | - interrupts : Interrupt numbers for this device. Either one interrupt number |
| 16 | for all interrupts, or one for status related interrupts, one for IN | ||
| 17 | endpoint related interrupts and one for OUT endpoint related interrupts. | ||
| 16 | 18 | ||
| 17 | Optional properties: | 19 | Optional properties: |
| 18 | 20 | ||
| 19 | - epobufsizes : An array of buffer sizes for OUT endpoints. If the property is | 21 | - epobufsizes : Array of buffer sizes for OUT endpoints when they differ |
| 20 | not present, or for endpoints outside of the array, 1024 is assumed by | 22 | from the default size of 1024. The array is indexed by the OUT endpoint |
| 21 | the driver. | 23 | number. If the property is present it typically contains one entry for |
| 22 | 24 | each OUT endpoint of the core. Fewer entries overrides the default sizes | |
| 23 | - epibufsizes : An array of buffer sizes for IN endpoints. If the property is | 25 | only for as many endpoints as the array contains. |
| 24 | not present, or for endpoints outside of the array, 1024 is assumed by | 26 | |
| 25 | the driver. | 27 | - epibufsizes : Array of buffer sizes for IN endpoints when they differ |
| 28 | from the default size of 1024. The array is indexed by the IN endpoint | ||
| 29 | number. If the property is present it typically contains one entry for | ||
| 30 | each IN endpoint of the core. Fewer entries overrides the default sizes | ||
| 31 | only for as many endpoints as the array contains. | ||
| 26 | 32 | ||
| 27 | For further information look in the documentation for the GLIB IP core library: | 33 | For further information look in the documentation for the GLIB IP core library: |
| 28 | http://www.gaisler.com/products/grlib/grip.pdf | 34 | http://www.gaisler.com/products/grlib/grip.pdf |
diff --git a/Documentation/devicetree/bindings/usb/msm-hsusb.txt b/Documentation/devicetree/bindings/usb/msm-hsusb.txt index 5ea26c631e3a..2826f2af503a 100644 --- a/Documentation/devicetree/bindings/usb/msm-hsusb.txt +++ b/Documentation/devicetree/bindings/usb/msm-hsusb.txt | |||
| @@ -15,3 +15,81 @@ Example EHCI controller device node: | |||
| 15 | usb-phy = <&usb_otg>; | 15 | usb-phy = <&usb_otg>; |
| 16 | }; | 16 | }; |
| 17 | 17 | ||
| 18 | USB PHY with optional OTG: | ||
| 19 | |||
| 20 | Required properties: | ||
| 21 | - compatible: Should contain: | ||
| 22 | "qcom,usb-otg-ci" for chipsets with ChipIdea 45nm PHY | ||
| 23 | "qcom,usb-otg-snps" for chipsets with Synopsys 28nm PHY | ||
| 24 | |||
| 25 | - regs: Offset and length of the register set in the memory map | ||
| 26 | - interrupts: interrupt-specifier for the OTG interrupt. | ||
| 27 | |||
| 28 | - clocks: A list of phandle + clock-specifier pairs for the | ||
| 29 | clocks listed in clock-names | ||
| 30 | - clock-names: Should contain the following: | ||
| 31 | "phy" USB PHY reference clock | ||
| 32 | "core" Protocol engine clock | ||
| 33 | "iface" Interface bus clock | ||
| 34 | "alt_core" Protocol engine clock for targets with asynchronous | ||
| 35 | reset methodology. (optional) | ||
| 36 | |||
| 37 | - vdccx-supply: phandle to the regulator for the vdd supply for | ||
| 38 | digital circuit operation. | ||
| 39 | - v1p8-supply: phandle to the regulator for the 1.8V supply | ||
| 40 | - v3p3-supply: phandle to the regulator for the 3.3V supply | ||
| 41 | |||
| 42 | - resets: A list of phandle + reset-specifier pairs for the | ||
| 43 | resets listed in reset-names | ||
| 44 | - reset-names: Should contain the following: | ||
| 45 | "phy" USB PHY controller reset | ||
| 46 | "link" USB LINK controller reset | ||
| 47 | |||
| 48 | - qcom,otg-control: OTG control (VBUS and ID notifications) can be one of | ||
| 49 | 1 - PHY control | ||
| 50 | 2 - PMIC control | ||
| 51 | |||
| 52 | Optional properties: | ||
| 53 | - dr_mode: One of "host", "peripheral" or "otg". Defaults to "otg" | ||
| 54 | |||
| 55 | - qcom,phy-init-sequence: PHY configuration sequence values. This is related to Device | ||
| 56 | Mode Eye Diagram test. Start address at which these values will be | ||
| 57 | written is ULPI_EXT_VENDOR_SPECIFIC. Value of -1 is reserved as | ||
| 58 | "do not overwrite default value at this address". | ||
| 59 | For example: qcom,phy-init-sequence = < -1 0x63 >; | ||
| 60 | Will update only value at address ULPI_EXT_VENDOR_SPECIFIC + 1. | ||
| 61 | |||
| 62 | - qcom,phy-num: Select number of pyco-phy to use, can be one of | ||
| 63 | 0 - PHY one, default | ||
| 64 | 1 - Second PHY | ||
| 65 | Some platforms may have configuration to allow USB | ||
| 66 | controller work with any of the two HSPHYs present. | ||
| 67 | |||
| 68 | - qcom,vdd-levels: This property must be a list of three integer values | ||
| 69 | (no, min, max) where each value represents either a voltage | ||
| 70 | in microvolts or a value corresponding to voltage corner. | ||
| 71 | |||
| 72 | Example HSUSB OTG controller device node: | ||
| 73 | |||
| 74 | usb@f9a55000 { | ||
| 75 | compatible = "qcom,usb-otg-snps"; | ||
| 76 | reg = <0xf9a55000 0x400>; | ||
| 77 | interrupts = <0 134 0>; | ||
| 78 | dr_mode = "peripheral"; | ||
| 79 | |||
| 80 | clocks = <&gcc GCC_XO_CLK>, <&gcc GCC_USB_HS_SYSTEM_CLK>, | ||
| 81 | <&gcc GCC_USB_HS_AHB_CLK>; | ||
| 82 | |||
| 83 | clock-names = "phy", "core", "iface"; | ||
| 84 | |||
| 85 | vddcx-supply = <&pm8841_s2_corner>; | ||
| 86 | v1p8-supply = <&pm8941_l6>; | ||
| 87 | v3p3-supply = <&pm8941_l24>; | ||
| 88 | |||
| 89 | resets = <&gcc GCC_USB2A_PHY_BCR>, <&gcc GCC_USB_HS_BCR>; | ||
| 90 | reset-names = "phy", "link"; | ||
| 91 | |||
| 92 | qcom,otg-control = <1>; | ||
| 93 | qcom,phy-init-sequence = < -1 0x63 >; | ||
| 94 | qcom,vdd-levels = <1 5 7>; | ||
| 95 | }; | ||
diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt index 38b2faec4199..38d9bb8507cf 100644 --- a/Documentation/devicetree/bindings/usb/omap-usb.txt +++ b/Documentation/devicetree/bindings/usb/omap-usb.txt | |||
| @@ -44,7 +44,9 @@ Board specific device node entry | |||
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | OMAP DWC3 GLUE | 46 | OMAP DWC3 GLUE |
| 47 | - compatible : Should be "ti,dwc3" | 47 | - compatible : Should be |
| 48 | * "ti,dwc3" for OMAP5 and DRA7 | ||
| 49 | * "ti,am437x-dwc3" for AM437x | ||
| 48 | - ti,hwmods : Should be "usb_otg_ss" | 50 | - ti,hwmods : Should be "usb_otg_ss" |
| 49 | - reg : Address and length of the register set for the device. | 51 | - reg : Address and length of the register set for the device. |
| 50 | - interrupts : The irq number of this device that is used to interrupt the | 52 | - interrupts : The irq number of this device that is used to interrupt the |
diff --git a/Documentation/devicetree/bindings/usb/usb-ehci.txt b/Documentation/devicetree/bindings/usb/usb-ehci.txt index ff151ec084c4..43c1a4e06767 100644 --- a/Documentation/devicetree/bindings/usb/usb-ehci.txt +++ b/Documentation/devicetree/bindings/usb/usb-ehci.txt | |||
| @@ -15,6 +15,7 @@ Optional properties: | |||
| 15 | - clocks : a list of phandle + clock specifier pairs | 15 | - clocks : a list of phandle + clock specifier pairs |
| 16 | - phys : phandle + phy specifier pair | 16 | - phys : phandle + phy specifier pair |
| 17 | - phy-names : "usb" | 17 | - phy-names : "usb" |
| 18 | - resets : phandle + reset specifier pair | ||
| 18 | 19 | ||
| 19 | Example (Sequoia 440EPx): | 20 | Example (Sequoia 440EPx): |
| 20 | ehci@e0000300 { | 21 | ehci@e0000300 { |
diff --git a/Documentation/devicetree/bindings/usb/usb-ohci.txt b/Documentation/devicetree/bindings/usb/usb-ohci.txt index 45f67d91e888..b968a1aea995 100644 --- a/Documentation/devicetree/bindings/usb/usb-ohci.txt +++ b/Documentation/devicetree/bindings/usb/usb-ohci.txt | |||
| @@ -12,6 +12,7 @@ Optional properties: | |||
| 12 | - clocks : a list of phandle + clock specifier pairs | 12 | - clocks : a list of phandle + clock specifier pairs |
| 13 | - phys : phandle + phy specifier pair | 13 | - phys : phandle + phy specifier pair |
| 14 | - phy-names : "usb" | 14 | - phy-names : "usb" |
| 15 | - resets : phandle + reset specifier pair | ||
| 15 | 16 | ||
| 16 | Example: | 17 | Example: |
| 17 | 18 | ||
diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt index 90f8f607d125..5a79377c6a96 100644 --- a/Documentation/devicetree/bindings/usb/usb-xhci.txt +++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt | |||
| @@ -1,11 +1,17 @@ | |||
| 1 | USB xHCI controllers | 1 | USB xHCI controllers |
| 2 | 2 | ||
| 3 | Required properties: | 3 | Required properties: |
| 4 | - compatible: should be "generic-xhci" (deprecated: "xhci-platform"). | 4 | - compatible: should be one of "generic-xhci", |
| 5 | "marvell,armada-375-xhci", "marvell,armada-380-xhci", | ||
| 6 | "renesas,xhci-r8a7790", "renesas,xhci-r8a7791" (deprecated: | ||
| 7 | "xhci-platform"). | ||
| 5 | - reg: should contain address and length of the standard XHCI | 8 | - reg: should contain address and length of the standard XHCI |
| 6 | register set for the device. | 9 | register set for the device. |
| 7 | - interrupts: one XHCI interrupt should be described here. | 10 | - interrupts: one XHCI interrupt should be described here. |
| 8 | 11 | ||
| 12 | Optional property: | ||
| 13 | - clocks: reference to a clock | ||
| 14 | |||
| 9 | Example: | 15 | Example: |
| 10 | usb@f0931000 { | 16 | usb@f0931000 { |
| 11 | compatible = "generic-xhci"; | 17 | compatible = "generic-xhci"; |
diff --git a/Documentation/devicetree/bindings/usb/usb3503.txt b/Documentation/devicetree/bindings/usb/usb3503.txt index a018da4a7ad7..221ac0dbc678 100644 --- a/Documentation/devicetree/bindings/usb/usb3503.txt +++ b/Documentation/devicetree/bindings/usb/usb3503.txt | |||
| @@ -15,6 +15,14 @@ Optional properties: | |||
| 15 | - reset-gpios: Should specify GPIO for reset. | 15 | - reset-gpios: Should specify GPIO for reset. |
| 16 | - initial-mode: Should specify initial mode. | 16 | - initial-mode: Should specify initial mode. |
| 17 | (1 for HUB mode, 2 for STANDBY mode) | 17 | (1 for HUB mode, 2 for STANDBY mode) |
| 18 | - refclk: Clock used for driving REFCLK signal (optional, if not provided | ||
| 19 | the driver assumes that clock signal is always available, its | ||
| 20 | rate is specified by REF_SEL pins and a value from the primary | ||
| 21 | reference clock frequencies table is used) | ||
| 22 | - refclk-frequency: Frequency of the REFCLK signal as defined by REF_SEL | ||
| 23 | pins (optional, if not provided, driver will not set rate of the | ||
| 24 | REFCLK signal and assume that a value from the primary reference | ||
| 25 | clock frequencies table is used) | ||
| 18 | 26 | ||
| 19 | Examples: | 27 | Examples: |
| 20 | usb3503@08 { | 28 | usb3503@08 { |
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 0f01c9bf19c8..4d7f3758d1b4 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
| @@ -13,6 +13,7 @@ allwinner Allwinner Technology Co., Ltd. | |||
| 13 | altr Altera Corp. | 13 | altr Altera Corp. |
| 14 | amcc Applied Micro Circuits Corporation (APM, formally AMCC) | 14 | amcc Applied Micro Circuits Corporation (APM, formally AMCC) |
| 15 | amd Advanced Micro Devices (AMD), Inc. | 15 | amd Advanced Micro Devices (AMD), Inc. |
| 16 | ams AMS AG | ||
| 16 | amstaos AMS-Taos Inc. | 17 | amstaos AMS-Taos Inc. |
| 17 | apm Applied Micro Circuits Corporation (APM) | 18 | apm Applied Micro Circuits Corporation (APM) |
| 18 | arm ARM Ltd. | 19 | arm ARM Ltd. |
| @@ -22,6 +23,7 @@ auo AU Optronics Corporation | |||
| 22 | avago Avago Technologies | 23 | avago Avago Technologies |
| 23 | bosch Bosch Sensortec GmbH | 24 | bosch Bosch Sensortec GmbH |
| 24 | brcm Broadcom Corporation | 25 | brcm Broadcom Corporation |
| 26 | buffalo Buffalo, Inc. | ||
| 25 | calxeda Calxeda | 27 | calxeda Calxeda |
| 26 | capella Capella Microsystems, Inc | 28 | capella Capella Microsystems, Inc |
| 27 | cavium Cavium, Inc. | 29 | cavium Cavium, Inc. |
| @@ -33,15 +35,18 @@ cortina Cortina Systems, Inc. | |||
| 33 | crystalfontz Crystalfontz America, Inc. | 35 | crystalfontz Crystalfontz America, Inc. |
| 34 | dallas Maxim Integrated Products (formerly Dallas Semiconductor) | 36 | dallas Maxim Integrated Products (formerly Dallas Semiconductor) |
| 35 | davicom DAVICOM Semiconductor, Inc. | 37 | davicom DAVICOM Semiconductor, Inc. |
| 36 | dlink D-Link Systems, Inc. | ||
| 37 | denx Denx Software Engineering | 38 | denx Denx Software Engineering |
| 39 | digi Digi International Inc. | ||
| 40 | dlink D-Link Corporation | ||
| 38 | dmo Data Modul AG | 41 | dmo Data Modul AG |
| 42 | ebv EBV Elektronik | ||
| 39 | edt Emerging Display Technologies | 43 | edt Emerging Display Technologies |
| 40 | emmicro EM Microelectronic | 44 | emmicro EM Microelectronic |
| 41 | epfl Ecole Polytechnique Fédérale de Lausanne | 45 | epfl Ecole Polytechnique Fédérale de Lausanne |
| 42 | epson Seiko Epson Corp. | 46 | epson Seiko Epson Corp. |
| 43 | est ESTeem Wireless Modems | 47 | est ESTeem Wireless Modems |
| 44 | eukrea Eukréa Electromatique | 48 | eukrea Eukréa Electromatique |
| 49 | excito Excito | ||
| 45 | fsl Freescale Semiconductor | 50 | fsl Freescale Semiconductor |
| 46 | GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. | 51 | GEFanuc GE Fanuc Intelligent Platforms Embedded Systems, Inc. |
| 47 | gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. | 52 | gef GE Fanuc Intelligent Platforms Embedded Systems, Inc. |
| @@ -53,26 +58,36 @@ haoyu Haoyu Microelectronic Co. Ltd. | |||
| 53 | hisilicon Hisilicon Limited. | 58 | hisilicon Hisilicon Limited. |
| 54 | honeywell Honeywell | 59 | honeywell Honeywell |
| 55 | hp Hewlett Packard | 60 | hp Hewlett Packard |
| 61 | i2se I2SE GmbH | ||
| 56 | ibm International Business Machines (IBM) | 62 | ibm International Business Machines (IBM) |
| 57 | idt Integrated Device Technologies, Inc. | 63 | idt Integrated Device Technologies, Inc. |
| 64 | iom Iomega Corporation | ||
| 58 | img Imagination Technologies Ltd. | 65 | img Imagination Technologies Ltd. |
| 59 | intel Intel Corporation | 66 | intel Intel Corporation |
| 60 | intercontrol Inter Control Group | 67 | intercontrol Inter Control Group |
| 68 | isee ISEE 2007 S.L. | ||
| 61 | isl Intersil | 69 | isl Intersil |
| 62 | karo Ka-Ro electronics GmbH | 70 | karo Ka-Ro electronics GmbH |
| 71 | keymile Keymile GmbH | ||
| 63 | lacie LaCie | 72 | lacie LaCie |
| 64 | lantiq Lantiq Semiconductor | 73 | lantiq Lantiq Semiconductor |
| 65 | lg LG Corporation | 74 | lg LG Corporation |
| 66 | linux Linux-specific binding | 75 | linux Linux-specific binding |
| 67 | lsi LSI Corp. (LSI Logic) | 76 | lsi LSI Corp. (LSI Logic) |
| 77 | lltc Linear Technology Corporation | ||
| 68 | marvell Marvell Technology Group Ltd. | 78 | marvell Marvell Technology Group Ltd. |
| 69 | maxim Maxim Integrated Products | 79 | maxim Maxim Integrated Products |
| 80 | micrel Micrel Inc. | ||
| 70 | microchip Microchip Technology Inc. | 81 | microchip Microchip Technology Inc. |
| 71 | mosaixtech Mosaix Technologies, Inc. | 82 | mosaixtech Mosaix Technologies, Inc. |
| 72 | moxa Moxa | 83 | moxa Moxa |
| 84 | mpl MPL AG | ||
| 85 | mundoreader Mundo Reader S.L. | ||
| 86 | mxicy Macronix International Co., Ltd. | ||
| 73 | national National Semiconductor | 87 | national National Semiconductor |
| 74 | neonode Neonode Inc. | 88 | neonode Neonode Inc. |
| 75 | netgear NETGEAR | 89 | netgear NETGEAR |
| 90 | newhaven Newhaven Display International | ||
| 76 | nintendo Nintendo | 91 | nintendo Nintendo |
| 77 | nokia Nokia | 92 | nokia Nokia |
| 78 | nvidia NVIDIA | 93 | nvidia NVIDIA |
| @@ -82,10 +97,13 @@ opencores OpenCores.org | |||
| 82 | panasonic Panasonic Corporation | 97 | panasonic Panasonic Corporation |
| 83 | phytec PHYTEC Messtechnik GmbH | 98 | phytec PHYTEC Messtechnik GmbH |
| 84 | picochip Picochip Ltd | 99 | picochip Picochip Ltd |
| 100 | plathome Plat'Home Co., Ltd. | ||
| 85 | powervr PowerVR (deprecated, use img) | 101 | powervr PowerVR (deprecated, use img) |
| 86 | qca Qualcomm Atheros, Inc. | 102 | qca Qualcomm Atheros, Inc. |
| 87 | qcom Qualcomm Technologies, Inc | 103 | qcom Qualcomm Technologies, Inc |
| 88 | qnap QNAP Systems, Inc. | 104 | qnap QNAP Systems, Inc. |
| 105 | radxa Radxa | ||
| 106 | raidsonic RaidSonic Technology GmbH | ||
| 89 | ralink Mediatek/Ralink Technology Corp. | 107 | ralink Mediatek/Ralink Technology Corp. |
| 90 | ramtron Ramtron International | 108 | ramtron Ramtron International |
| 91 | realtek Realtek Semiconductor Corp. | 109 | realtek Realtek Semiconductor Corp. |
| @@ -95,6 +113,7 @@ rockchip Fuzhou Rockchip Electronics Co., Ltd | |||
| 95 | samsung Samsung Semiconductor | 113 | samsung Samsung Semiconductor |
| 96 | sbs Smart Battery System | 114 | sbs Smart Battery System |
| 97 | schindler Schindler | 115 | schindler Schindler |
| 116 | seagate Seagate Technology PLC | ||
| 98 | sil Silicon Image | 117 | sil Silicon Image |
| 99 | silabs Silicon Laboratories | 118 | silabs Silicon Laboratories |
| 100 | simtek | 119 | simtek |
| @@ -109,9 +128,12 @@ stericsson ST-Ericsson | |||
| 109 | synology Synology, Inc. | 128 | synology Synology, Inc. |
| 110 | ti Texas Instruments | 129 | ti Texas Instruments |
| 111 | tlm Trusted Logic Mobility | 130 | tlm Trusted Logic Mobility |
| 131 | toradex Toradex AG | ||
| 112 | toshiba Toshiba Corporation | 132 | toshiba Toshiba Corporation |
| 113 | toumaz Toumaz | 133 | toumaz Toumaz |
| 134 | usi Universal Scientifc Industrial Co., Ltd. | ||
| 114 | v3 V3 Semiconductor | 135 | v3 V3 Semiconductor |
| 136 | variscite Variscite Ltd. | ||
| 115 | via VIA Technologies, Inc. | 137 | via VIA Technologies, Inc. |
| 116 | voipac Voipac Technologies s.r.o. | 138 | voipac Voipac Technologies s.r.o. |
| 117 | winbond Winbond Electronics corp. | 139 | winbond Winbond Electronics corp. |
| @@ -119,3 +141,5 @@ wlf Wolfson Microelectronics | |||
| 119 | wm Wondermedia Technologies, Inc. | 141 | wm Wondermedia Technologies, Inc. |
| 120 | xes Extreme Engineering Solutions (X-ES) | 142 | xes Extreme Engineering Solutions (X-ES) |
| 121 | xlnx Xilinx | 143 | xlnx Xilinx |
| 144 | zyxel ZyXEL Communications Corp. | ||
| 145 | zarlink Zarlink Semiconductor | ||
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt index 57ccdde02c3a..53dbccfa80ca 100644 --- a/Documentation/devicetree/bindings/video/exynos_dp.txt +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt | |||
| @@ -62,6 +62,10 @@ Optional properties for dp-controller: | |||
| 62 | -hsync-active-high: | 62 | -hsync-active-high: |
| 63 | HSYNC polarity configuration. | 63 | HSYNC polarity configuration. |
| 64 | High if defined, Low if not defined | 64 | High if defined, Low if not defined |
| 65 | -samsung,hpd-gpio: | ||
| 66 | Hotplug detect GPIO. | ||
| 67 | Indicates which GPIO should be used for hotplug | ||
| 68 | detection | ||
| 65 | 69 | ||
| 66 | Example: | 70 | Example: |
| 67 | 71 | ||
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index f9187a259259..1fd8cf9cbfac 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt | |||
| @@ -5,6 +5,7 @@ Required properties: | |||
| 5 | 1) "samsung,exynos5-hdmi" <DEPRECATED> | 5 | 1) "samsung,exynos5-hdmi" <DEPRECATED> |
| 6 | 2) "samsung,exynos4210-hdmi" | 6 | 2) "samsung,exynos4210-hdmi" |
| 7 | 3) "samsung,exynos4212-hdmi" | 7 | 3) "samsung,exynos4212-hdmi" |
| 8 | 4) "samsung,exynos5420-hdmi" | ||
| 8 | - reg: physical base address of the hdmi and length of memory mapped | 9 | - reg: physical base address of the hdmi and length of memory mapped |
| 9 | region. | 10 | region. |
| 10 | - interrupts: interrupt number to the cpu. | 11 | - interrupts: interrupt number to the cpu. |
| @@ -27,6 +28,7 @@ Required properties: | |||
| 27 | "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy" and "mout_hdmi". | 28 | "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy" and "mout_hdmi". |
| 28 | - ddc: phandle to the hdmi ddc node | 29 | - ddc: phandle to the hdmi ddc node |
| 29 | - phy: phandle to the hdmi phy node | 30 | - phy: phandle to the hdmi phy node |
| 31 | - samsung,syscon-phandle: phandle for system controller node for PMU. | ||
| 30 | 32 | ||
| 31 | Example: | 33 | Example: |
| 32 | 34 | ||
| @@ -37,4 +39,5 @@ Example: | |||
| 37 | hpd-gpio = <&gpx3 7 1>; | 39 | hpd-gpio = <&gpx3 7 1>; |
| 38 | ddc = <&hdmi_ddc_node>; | 40 | ddc = <&hdmi_ddc_node>; |
| 39 | phy = <&hdmi_phy_node>; | 41 | phy = <&hdmi_phy_node>; |
| 42 | samsung,syscon-phandle = <&pmu_system_controller>; | ||
| 40 | }; | 43 | }; |
diff --git a/Documentation/devicetree/bindings/video/hdmi-connector.txt b/Documentation/devicetree/bindings/video/hdmi-connector.txt index ccccc19e2573..acd5668b1ce1 100644 --- a/Documentation/devicetree/bindings/video/hdmi-connector.txt +++ b/Documentation/devicetree/bindings/video/hdmi-connector.txt | |||
| @@ -7,6 +7,7 @@ Required properties: | |||
| 7 | 7 | ||
| 8 | Optional properties: | 8 | Optional properties: |
| 9 | - label: a symbolic name for the connector | 9 | - label: a symbolic name for the connector |
| 10 | - hpd-gpios: HPD GPIO number | ||
| 10 | 11 | ||
| 11 | Required nodes: | 12 | Required nodes: |
| 12 | - Video port for HDMI input | 13 | - Video port for HDMI input |
diff --git a/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt b/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt new file mode 100644 index 000000000000..1a1e653e5407 --- /dev/null +++ b/Documentation/devicetree/bindings/video/lgphilips,lb035q02.txt | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | LG.Philips LB035Q02 Panel | ||
| 2 | ========================= | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible: "lgphilips,lb035q02" | ||
| 6 | - enable-gpios: panel enable gpio | ||
| 7 | |||
| 8 | Optional properties: | ||
| 9 | - label: a symbolic name for the panel | ||
| 10 | |||
| 11 | Required nodes: | ||
| 12 | - Video port for DPI input | ||
| 13 | |||
| 14 | Example | ||
| 15 | ------- | ||
| 16 | |||
| 17 | lcd-panel: panel@0 { | ||
| 18 | compatible = "lgphilips,lb035q02"; | ||
| 19 | reg = <0>; | ||
| 20 | spi-max-frequency = <100000>; | ||
| 21 | spi-cpol; | ||
| 22 | spi-cpha; | ||
| 23 | |||
| 24 | label = "lcd"; | ||
| 25 | |||
| 26 | enable-gpios = <&gpio7 7 0>; | ||
| 27 | |||
| 28 | port { | ||
| 29 | lcd_in: endpoint { | ||
| 30 | remote-endpoint = <&dpi_out>; | ||
| 31 | }; | ||
| 32 | }; | ||
| 33 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/panel-dpi.txt b/Documentation/devicetree/bindings/video/panel-dpi.txt new file mode 100644 index 000000000000..a40180b05bab --- /dev/null +++ b/Documentation/devicetree/bindings/video/panel-dpi.txt | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | Generic MIPI DPI Panel | ||
| 2 | ====================== | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible: "panel-dpi" | ||
| 6 | |||
| 7 | Optional properties: | ||
| 8 | - label: a symbolic name for the panel | ||
| 9 | - enable-gpios: panel enable gpio | ||
| 10 | |||
| 11 | Required nodes: | ||
| 12 | - "panel-timing" containing video timings | ||
| 13 | (Documentation/devicetree/bindings/video/display-timing.txt) | ||
| 14 | - Video port for DPI input | ||
| 15 | |||
| 16 | Example | ||
| 17 | ------- | ||
| 18 | |||
| 19 | lcd0: display@0 { | ||
| 20 | compatible = "samsung,lte430wq-f0c", "panel-dpi"; | ||
| 21 | label = "lcd"; | ||
| 22 | |||
| 23 | port { | ||
| 24 | lcd_in: endpoint { | ||
| 25 | remote-endpoint = <&dpi_out>; | ||
| 26 | }; | ||
| 27 | }; | ||
| 28 | |||
| 29 | panel-timing { | ||
| 30 | clock-frequency = <9200000>; | ||
| 31 | hactive = <480>; | ||
| 32 | vactive = <272>; | ||
| 33 | hfront-porch = <8>; | ||
| 34 | hback-porch = <4>; | ||
| 35 | hsync-len = <41>; | ||
| 36 | vback-porch = <2>; | ||
| 37 | vfront-porch = <4>; | ||
| 38 | vsync-len = <10>; | ||
| 39 | |||
| 40 | hsync-active = <0>; | ||
| 41 | vsync-active = <0>; | ||
| 42 | de-active = <1>; | ||
| 43 | pixelclk-active = <1>; | ||
| 44 | }; | ||
| 45 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt b/Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt new file mode 100644 index 000000000000..0cc8981e9d49 --- /dev/null +++ b/Documentation/devicetree/bindings/video/sharp,ls037v7dw01.txt | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | SHARP LS037V7DW01 TFT-LCD panel | ||
| 2 | =================================== | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible: "sharp,ls037v7dw01" | ||
| 6 | |||
| 7 | Optional properties: | ||
| 8 | - label: a symbolic name for the panel | ||
| 9 | - enable-gpios: a GPIO spec for the optional enable pin. | ||
| 10 | This pin is the INI pin as specified in the LS037V7DW01.pdf file. | ||
| 11 | - reset-gpios: a GPIO spec for the optional reset pin. | ||
| 12 | This pin is the RESB pin as specified in the LS037V7DW01.pdf file. | ||
| 13 | - mode-gpios: a GPIO | ||
| 14 | ordered MO, LR, and UD as specified in the LS037V7DW01.pdf file. | ||
| 15 | |||
| 16 | Required nodes: | ||
| 17 | - Video port for DPI input | ||
| 18 | |||
| 19 | This panel can have zero to five GPIOs to configure to change configuration | ||
| 20 | between QVGA and VGA mode and the scan direction. As these pins can be also | ||
| 21 | configured with external pulls, all the GPIOs are considered optional with holes | ||
| 22 | in the array. | ||
| 23 | |||
| 24 | Example | ||
| 25 | ------- | ||
| 26 | |||
| 27 | Example when connected to a omap2+ based device: | ||
| 28 | |||
| 29 | lcd0: display { | ||
| 30 | compatible = "sharp,ls037v7dw01"; | ||
| 31 | power-supply = <&lcd_3v3>; | ||
| 32 | enable-gpios = <&gpio5 24 GPIO_ACTIVE_HIGH>; /* gpio152, lcd INI */ | ||
| 33 | reset-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>; /* gpio155, lcd RESB */ | ||
| 34 | mode-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH /* gpio154, lcd MO */ | ||
| 35 | &gpio1 2 GPIO_ACTIVE_HIGH /* gpio2, lcd LR */ | ||
| 36 | &gpio1 3 GPIO_ACTIVE_HIGH>; /* gpio3, lcd UD */ | ||
| 37 | |||
| 38 | port { | ||
| 39 | lcd_in: endpoint { | ||
| 40 | remote-endpoint = <&dpi_out>; | ||
| 41 | }; | ||
| 42 | }; | ||
| 43 | }; | ||
diff --git a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt index f85d6fcfa705..b8c29fbd1fbb 100644 --- a/Documentation/devicetree/bindings/video/ti,omap4-dss.txt +++ b/Documentation/devicetree/bindings/video/ti,omap4-dss.txt | |||
| @@ -109,3 +109,7 @@ Required properties: | |||
| 109 | 109 | ||
| 110 | Optional nodes: | 110 | Optional nodes: |
| 111 | - Video port for HDMI output | 111 | - Video port for HDMI output |
| 112 | |||
| 113 | HDMI Endpoint optional properties: | ||
| 114 | - lanes: list of 8 pin numbers for the HDMI lanes: CLK+, CLK-, D0+, D0-, | ||
| 115 | D1+, D1-, D2+, D2-. (default: 0,1,2,3,4,5,6,7) | ||
diff --git a/Documentation/devicetree/bindings/video/ti,omap5-dss.txt b/Documentation/devicetree/bindings/video/ti,omap5-dss.txt new file mode 100644 index 000000000000..38ffc8fcd816 --- /dev/null +++ b/Documentation/devicetree/bindings/video/ti,omap5-dss.txt | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | Texas Instruments OMAP5 Display Subsystem | ||
| 2 | ========================================= | ||
| 3 | |||
| 4 | See Documentation/devicetree/bindings/video/ti,omap-dss.txt for generic | ||
| 5 | description about OMAP Display Subsystem bindings. | ||
| 6 | |||
| 7 | DSS Core | ||
| 8 | -------- | ||
| 9 | |||
| 10 | Required properties: | ||
| 11 | - compatible: "ti,omap5-dss" | ||
| 12 | - reg: address and length of the register space | ||
| 13 | - ti,hwmods: "dss_core" | ||
| 14 | - clocks: handle to fclk | ||
| 15 | - clock-names: "fck" | ||
| 16 | |||
| 17 | Required nodes: | ||
| 18 | - DISPC | ||
| 19 | |||
| 20 | Optional nodes: | ||
| 21 | - DSS Submodules: RFBI, DSI, HDMI | ||
| 22 | - Video port for DPI output | ||
| 23 | |||
| 24 | DPI Endpoint required properties: | ||
| 25 | - data-lines: number of lines used | ||
| 26 | |||
| 27 | |||
| 28 | DISPC | ||
| 29 | ----- | ||
| 30 | |||
| 31 | Required properties: | ||
| 32 | - compatible: "ti,omap5-dispc" | ||
| 33 | - reg: address and length of the register space | ||
| 34 | - ti,hwmods: "dss_dispc" | ||
| 35 | - interrupts: the DISPC interrupt | ||
| 36 | - clocks: handle to fclk | ||
| 37 | - clock-names: "fck" | ||
| 38 | |||
| 39 | |||
| 40 | RFBI | ||
| 41 | ---- | ||
| 42 | |||
| 43 | Required properties: | ||
| 44 | - compatible: "ti,omap5-rfbi" | ||
| 45 | - reg: address and length of the register space | ||
| 46 | - ti,hwmods: "dss_rfbi" | ||
| 47 | - clocks: handles to fclk and iclk | ||
| 48 | - clock-names: "fck", "ick" | ||
| 49 | |||
| 50 | Optional nodes: | ||
| 51 | - Video port for RFBI output | ||
| 52 | - RFBI controlled peripherals | ||
| 53 | |||
| 54 | |||
| 55 | DSI | ||
| 56 | --- | ||
| 57 | |||
| 58 | Required properties: | ||
| 59 | - compatible: "ti,omap5-dsi" | ||
| 60 | - reg: addresses and lengths of the register spaces for 'proto', 'phy' and 'pll' | ||
| 61 | - reg-names: "proto", "phy", "pll" | ||
| 62 | - interrupts: the DSI interrupt line | ||
| 63 | - ti,hwmods: "dss_dsi1" or "dss_dsi2" | ||
| 64 | - vdd-supply: power supply for DSI | ||
| 65 | - clocks: handles to fclk and pll clock | ||
| 66 | - clock-names: "fck", "sys_clk" | ||
| 67 | |||
| 68 | Optional nodes: | ||
| 69 | - Video port for DSI output | ||
| 70 | - DSI controlled peripherals | ||
| 71 | |||
| 72 | DSI Endpoint required properties: | ||
| 73 | - lanes: list of pin numbers for the DSI lanes: CLK+, CLK-, DATA0+, DATA0-, | ||
| 74 | DATA1+, DATA1-, ... | ||
| 75 | |||
| 76 | |||
| 77 | HDMI | ||
| 78 | ---- | ||
| 79 | |||
| 80 | Required properties: | ||
| 81 | - compatible: "ti,omap5-hdmi" | ||
| 82 | - reg: addresses and lengths of the register spaces for 'wp', 'pll', 'phy', | ||
| 83 | 'core' | ||
| 84 | - reg-names: "wp", "pll", "phy", "core" | ||
| 85 | - interrupts: the HDMI interrupt line | ||
| 86 | - ti,hwmods: "dss_hdmi" | ||
| 87 | - vdda-supply: vdda power supply | ||
| 88 | - clocks: handles to fclk and pll clock | ||
| 89 | - clock-names: "fck", "sys_clk" | ||
| 90 | |||
| 91 | Optional nodes: | ||
| 92 | - Video port for HDMI output | ||
| 93 | |||
| 94 | HDMI Endpoint optional properties: | ||
| 95 | - lanes: list of 8 pin numbers for the HDMI lanes: CLK+, CLK-, D0+, D0-, | ||
| 96 | D1+, D1-, D2+, D2-. (default: 0,1,2,3,4,5,6,7) | ||
diff --git a/Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt b/Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt new file mode 100644 index 000000000000..7175dc3740ac --- /dev/null +++ b/Documentation/devicetree/bindings/video/toppoly,td028ttec1.txt | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | Toppoly TD028TTEC1 Panel | ||
| 2 | ======================== | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible: "toppoly,td028ttec1" | ||
| 6 | |||
| 7 | Optional properties: | ||
| 8 | - label: a symbolic name for the panel | ||
| 9 | |||
| 10 | Required nodes: | ||
| 11 | - Video port for DPI input | ||
| 12 | |||
| 13 | Example | ||
| 14 | ------- | ||
| 15 | |||
| 16 | lcd-panel: td028ttec1@0 { | ||
| 17 | compatible = "toppoly,td028ttec1"; | ||
| 18 | reg = <0>; | ||
| 19 | spi-max-frequency = <100000>; | ||
| 20 | spi-cpol; | ||
| 21 | spi-cpha; | ||
| 22 | |||
| 23 | label = "lcd"; | ||
| 24 | port { | ||
| 25 | lcd_in: endpoint { | ||
| 26 | remote-endpoint = <&dpi_out>; | ||
| 27 | }; | ||
| 28 | }; | ||
| 29 | }; | ||
| 30 | |||
diff --git a/Documentation/devicetree/bindings/video/tpo,td043mtea1.txt b/Documentation/devicetree/bindings/video/tpo,td043mtea1.txt new file mode 100644 index 000000000000..ec6d62975162 --- /dev/null +++ b/Documentation/devicetree/bindings/video/tpo,td043mtea1.txt | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | TPO TD043MTEA1 Panel | ||
| 2 | ==================== | ||
| 3 | |||
| 4 | Required properties: | ||
| 5 | - compatible: "tpo,td043mtea1" | ||
| 6 | - reset-gpios: panel reset gpio | ||
| 7 | |||
| 8 | Optional properties: | ||
| 9 | - label: a symbolic name for the panel | ||
| 10 | |||
| 11 | Required nodes: | ||
| 12 | - Video port for DPI input | ||
| 13 | |||
| 14 | Example | ||
| 15 | ------- | ||
| 16 | |||
| 17 | lcd-panel: panel@0 { | ||
| 18 | compatible = "tpo,td043mtea1"; | ||
| 19 | reg = <0>; | ||
| 20 | spi-max-frequency = <100000>; | ||
| 21 | spi-cpol; | ||
| 22 | spi-cpha; | ||
| 23 | |||
| 24 | label = "lcd"; | ||
| 25 | |||
| 26 | reset-gpios = <&gpio7 7 0>; | ||
| 27 | |||
| 28 | port { | ||
| 29 | lcd_in: endpoint { | ||
| 30 | remote-endpoint = <&dpi_out>; | ||
| 31 | }; | ||
| 32 | }; | ||
| 33 | }; | ||
diff --git a/Documentation/devicetree/bindings/watchdog/marvel.txt b/Documentation/devicetree/bindings/watchdog/marvel.txt index de11eb4c121f..97223fddb7bd 100644 --- a/Documentation/devicetree/bindings/watchdog/marvel.txt +++ b/Documentation/devicetree/bindings/watchdog/marvel.txt | |||
| @@ -5,11 +5,18 @@ Required Properties: | |||
| 5 | - Compatibility : "marvell,orion-wdt" | 5 | - Compatibility : "marvell,orion-wdt" |
| 6 | "marvell,armada-370-wdt" | 6 | "marvell,armada-370-wdt" |
| 7 | "marvell,armada-xp-wdt" | 7 | "marvell,armada-xp-wdt" |
| 8 | "marvell,armada-375-wdt" | ||
| 9 | "marvell,armada-380-wdt" | ||
| 8 | 10 | ||
| 9 | - reg : Should contain two entries: first one with the | 11 | - reg : Should contain two entries: first one with the |
| 10 | timer control address, second one with the | 12 | timer control address, second one with the |
| 11 | rstout enable address. | 13 | rstout enable address. |
| 12 | 14 | ||
| 15 | For "marvell,armada-375-wdt" and "marvell,armada-380-wdt": | ||
| 16 | |||
| 17 | - reg : A third entry is mandatory and should contain the | ||
| 18 | shared mask/unmask RSTOUT address. | ||
| 19 | |||
| 13 | Optional properties: | 20 | Optional properties: |
| 14 | 21 | ||
| 15 | - interrupts : Contains the IRQ for watchdog expiration | 22 | - interrupts : Contains the IRQ for watchdog expiration |
diff --git a/Documentation/dma-buf-sharing.txt b/Documentation/dma-buf-sharing.txt index 505e71172ae7..67a4087d53f9 100644 --- a/Documentation/dma-buf-sharing.txt +++ b/Documentation/dma-buf-sharing.txt | |||
| @@ -66,7 +66,7 @@ The dma_buf buffer sharing API usage contains the following steps: | |||
| 66 | 66 | ||
| 67 | Exporting modules which do not wish to provide any specific name may use the | 67 | Exporting modules which do not wish to provide any specific name may use the |
| 68 | helper define 'dma_buf_export()', with the same arguments as above, but | 68 | helper define 'dma_buf_export()', with the same arguments as above, but |
| 69 | without the last argument; a __FILE__ pre-processor directive will be | 69 | without the last argument; a KBUILD_MODNAME pre-processor directive will be |
| 70 | inserted in place of 'exp_name' instead. | 70 | inserted in place of 'exp_name' instead. |
| 71 | 71 | ||
| 72 | 2. Userspace gets a handle to pass around to potential buffer-users | 72 | 2. Userspace gets a handle to pass around to potential buffer-users |
| @@ -217,7 +217,7 @@ NOTES: | |||
| 217 | and then allow further {map,unmap}_dma_buf operations from any buffer-user | 217 | and then allow further {map,unmap}_dma_buf operations from any buffer-user |
| 218 | from the migrated backing-storage. | 218 | from the migrated backing-storage. |
| 219 | 219 | ||
| 220 | If the exporter cannot fulfil the backing-storage constraints of the new | 220 | If the exporter cannot fulfill the backing-storage constraints of the new |
| 221 | buffer-user device as requested, dma_buf_attach() would return an error to | 221 | buffer-user device as requested, dma_buf_attach() would return an error to |
| 222 | denote non-compatibility of the new buffer-sharing request with the current | 222 | denote non-compatibility of the new buffer-sharing request with the current |
| 223 | buffer. | 223 | buffer. |
| @@ -352,7 +352,7 @@ Being able to mmap an export dma-buf buffer object has 2 main use-cases: | |||
| 352 | 352 | ||
| 353 | No special interfaces, userspace simply calls mmap on the dma-buf fd. | 353 | No special interfaces, userspace simply calls mmap on the dma-buf fd. |
| 354 | 354 | ||
| 355 | 2. Supporting existing mmap interfaces in exporters | 355 | 2. Supporting existing mmap interfaces in importers |
| 356 | 356 | ||
| 357 | Similar to the motivation for kernel cpu access it is again important that | 357 | Similar to the motivation for kernel cpu access it is again important that |
| 358 | the userspace code of a given importing subsystem can use the same interfaces | 358 | the userspace code of a given importing subsystem can use the same interfaces |
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index 4f7897e99cba..1525e30483fd 100644 --- a/Documentation/driver-model/devres.txt +++ b/Documentation/driver-model/devres.txt | |||
| @@ -236,6 +236,9 @@ certainly invest a bit more effort into libata core layer). | |||
| 236 | MEM | 236 | MEM |
| 237 | devm_kzalloc() | 237 | devm_kzalloc() |
| 238 | devm_kfree() | 238 | devm_kfree() |
| 239 | devm_kmemdup() | ||
| 240 | devm_get_free_pages() | ||
| 241 | devm_free_pages() | ||
| 239 | 242 | ||
| 240 | IIO | 243 | IIO |
| 241 | devm_iio_device_alloc() | 244 | devm_iio_device_alloc() |
| @@ -308,3 +311,15 @@ SLAVE DMA ENGINE | |||
| 308 | 311 | ||
| 309 | SPI | 312 | SPI |
| 310 | devm_spi_register_master() | 313 | devm_spi_register_master() |
| 314 | |||
| 315 | GPIO | ||
| 316 | devm_gpiod_get() | ||
| 317 | devm_gpiod_get_index() | ||
| 318 | devm_gpiod_get_optional() | ||
| 319 | devm_gpiod_get_index_optional() | ||
| 320 | devm_gpiod_put() | ||
| 321 | |||
| 322 | MDIO | ||
| 323 | devm_mdiobus_alloc() | ||
| 324 | devm_mdiobus_alloc_size() | ||
| 325 | devm_mdiobus_free() | ||
diff --git a/Documentation/dynamic-debug-howto.txt b/Documentation/dynamic-debug-howto.txt index 46325eb2ea76..9417871b8758 100644 --- a/Documentation/dynamic-debug-howto.txt +++ b/Documentation/dynamic-debug-howto.txt | |||
| @@ -321,7 +321,7 @@ nullarbor:~ # echo -n 'func svc_process -p' > | |||
| 321 | nullarbor:~ # echo -n 'format "nfsd: READ" +p' > | 321 | nullarbor:~ # echo -n 'format "nfsd: READ" +p' > |
| 322 | <debugfs>/dynamic_debug/control | 322 | <debugfs>/dynamic_debug/control |
| 323 | 323 | ||
| 324 | // enable messages in files of which the pathes include string "usb" | 324 | // enable messages in files of which the paths include string "usb" |
| 325 | nullarbor:~ # echo -n '*usb* +p' > <debugfs>/dynamic_debug/control | 325 | nullarbor:~ # echo -n '*usb* +p' > <debugfs>/dynamic_debug/control |
| 326 | 326 | ||
| 327 | // enable all messages | 327 | // enable all messages |
diff --git a/Documentation/edac.txt b/Documentation/edac.txt index cb4c2cefd45a..73fff13e848f 100644 --- a/Documentation/edac.txt +++ b/Documentation/edac.txt | |||
| @@ -550,7 +550,7 @@ installs itself as: | |||
| 550 | /sys/devices/systm/edac/test-instance | 550 | /sys/devices/systm/edac/test-instance |
| 551 | 551 | ||
| 552 | in this directory are various controls, a symlink and one or more 'instance' | 552 | in this directory are various controls, a symlink and one or more 'instance' |
| 553 | directorys. | 553 | directories. |
| 554 | 554 | ||
| 555 | The standard default controls are: | 555 | The standard default controls are: |
| 556 | 556 | ||
diff --git a/Documentation/efi-stub.txt b/Documentation/efi-stub.txt index c628788d5b47..7747024d3bb7 100644 --- a/Documentation/efi-stub.txt +++ b/Documentation/efi-stub.txt | |||
| @@ -1,13 +1,21 @@ | |||
| 1 | The EFI Boot Stub | 1 | The EFI Boot Stub |
| 2 | --------------------------- | 2 | --------------------------- |
| 3 | 3 | ||
| 4 | On the x86 platform, a bzImage can masquerade as a PE/COFF image, | 4 | On the x86 and ARM platforms, a kernel zImage/bzImage can masquerade |
| 5 | thereby convincing EFI firmware loaders to load it as an EFI | 5 | as a PE/COFF image, thereby convincing EFI firmware loaders to load |
| 6 | executable. The code that modifies the bzImage header, along with the | 6 | it as an EFI executable. The code that modifies the bzImage header, |
| 7 | EFI-specific entry point that the firmware loader jumps to are | 7 | along with the EFI-specific entry point that the firmware loader |
| 8 | collectively known as the "EFI boot stub", and live in | 8 | jumps to are collectively known as the "EFI boot stub", and live in |
| 9 | arch/x86/boot/header.S and arch/x86/boot/compressed/eboot.c, | 9 | arch/x86/boot/header.S and arch/x86/boot/compressed/eboot.c, |
| 10 | respectively. | 10 | respectively. For ARM the EFI stub is implemented in |
| 11 | arch/arm/boot/compressed/efi-header.S and | ||
| 12 | arch/arm/boot/compressed/efi-stub.c. EFI stub code that is shared | ||
| 13 | between architectures is in drivers/firmware/efi/efi-stub-helper.c. | ||
| 14 | |||
| 15 | For arm64, there is no compressed kernel support, so the Image itself | ||
| 16 | masquerades as a PE/COFF image and the EFI stub is linked into the | ||
| 17 | kernel. The arm64 EFI stub lives in arch/arm64/kernel/efi-entry.S | ||
| 18 | and arch/arm64/kernel/efi-stub.c. | ||
| 11 | 19 | ||
| 12 | By using the EFI boot stub it's possible to boot a Linux kernel | 20 | By using the EFI boot stub it's possible to boot a Linux kernel |
| 13 | without the use of a conventional EFI boot loader, such as grub or | 21 | without the use of a conventional EFI boot loader, such as grub or |
| @@ -23,7 +31,10 @@ The bzImage located in arch/x86/boot/bzImage must be copied to the EFI | |||
| 23 | System Partition (ESP) and renamed with the extension ".efi". Without | 31 | System Partition (ESP) and renamed with the extension ".efi". Without |
| 24 | the extension the EFI firmware loader will refuse to execute it. It's | 32 | the extension the EFI firmware loader will refuse to execute it. It's |
| 25 | not possible to execute bzImage.efi from the usual Linux file systems | 33 | not possible to execute bzImage.efi from the usual Linux file systems |
| 26 | because EFI firmware doesn't have support for them. | 34 | because EFI firmware doesn't have support for them. For ARM the |
| 35 | arch/arm/boot/zImage should be copied to the system partition, and it | ||
| 36 | may not need to be renamed. Similarly for arm64, arch/arm64/boot/Image | ||
| 37 | should be copied but not necessarily renamed. | ||
| 27 | 38 | ||
| 28 | 39 | ||
| 29 | **** Passing kernel parameters from the EFI shell | 40 | **** Passing kernel parameters from the EFI shell |
| @@ -63,3 +74,11 @@ Notice how bzImage.efi can be specified with a relative path. That's | |||
| 63 | because the image we're executing is interpreted by the EFI shell, | 74 | because the image we're executing is interpreted by the EFI shell, |
| 64 | which understands relative paths, whereas the rest of the command line | 75 | which understands relative paths, whereas the rest of the command line |
| 65 | is passed to bzImage.efi. | 76 | is passed to bzImage.efi. |
| 77 | |||
| 78 | |||
| 79 | **** The "dtb=" option | ||
| 80 | |||
| 81 | For the ARM and arm64 architectures, we also need to be able to provide a | ||
| 82 | device tree to the kernel. This is done with the "dtb=" command line option, | ||
| 83 | and is processed in the same manner as the "initrd=" option that is | ||
| 84 | described above. | ||
diff --git a/Documentation/email-clients.txt b/Documentation/email-clients.txt index e9f5daccbd02..4e30ebaa9e5b 100644 --- a/Documentation/email-clients.txt +++ b/Documentation/email-clients.txt | |||
| @@ -201,20 +201,15 @@ To beat some sense out of the internal editor, do this: | |||
| 201 | 201 | ||
| 202 | - Edit your Thunderbird config settings so that it won't use format=flowed. | 202 | - Edit your Thunderbird config settings so that it won't use format=flowed. |
| 203 | Go to "edit->preferences->advanced->config editor" to bring up the | 203 | Go to "edit->preferences->advanced->config editor" to bring up the |
| 204 | thunderbird's registry editor, and set "mailnews.send_plaintext_flowed" to | 204 | thunderbird's registry editor. |
| 205 | "false". | ||
| 206 | 205 | ||
| 207 | - Disable HTML Format: Set "mail.identity.id1.compose_html" to "false". | 206 | - Set "mailnews.send_plaintext_flowed" to "false" |
| 208 | 207 | ||
| 209 | - Enable "preformat" mode: Set "editor.quotesPreformatted" to "true". | 208 | - Set "mailnews.wraplength" from "72" to "0" |
| 210 | 209 | ||
| 211 | - Enable UTF8: Set "prefs.converted-to-utf8" to "true". | 210 | - "View" > "Message Body As" > "Plain Text" |
| 212 | 211 | ||
| 213 | - Install the "toggle wordwrap" extension. Download the file from: | 212 | - "View" > "Character Encoding" > "Unicode (UTF-8)" |
| 214 | https://addons.mozilla.org/thunderbird/addon/2351/ | ||
| 215 | Then go to "tools->add ons", select "install" at the bottom of the screen, | ||
| 216 | and browse to where you saved the .xul file. This adds an "Enable | ||
| 217 | Wordwrap" entry under the Options menu of the message composer. | ||
| 218 | 213 | ||
| 219 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 214 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 220 | TkRat (GUI) | 215 | TkRat (GUI) |
diff --git a/Documentation/fb/sm501.txt b/Documentation/fb/sm501.txt index 8d17aebd2648..187f3b3ccb6c 100644 --- a/Documentation/fb/sm501.txt +++ b/Documentation/fb/sm501.txt | |||
| @@ -3,7 +3,7 @@ Configuration: | |||
| 3 | You can pass the following kernel command line options to sm501 videoframebuffer: | 3 | You can pass the following kernel command line options to sm501 videoframebuffer: |
| 4 | 4 | ||
| 5 | sm501fb.bpp= SM501 Display driver: | 5 | sm501fb.bpp= SM501 Display driver: |
| 6 | Specifiy bits-per-pixel if not specified by 'mode' | 6 | Specify bits-per-pixel if not specified by 'mode' |
| 7 | 7 | ||
| 8 | sm501fb.mode= SM501 Display driver: | 8 | sm501fb.mode= SM501 Display driver: |
| 9 | Specify resolution as | 9 | Specify resolution as |
diff --git a/Documentation/fb/sstfb.txt b/Documentation/fb/sstfb.txt index 550ca775a4cb..13db1075e4a5 100644 --- a/Documentation/fb/sstfb.txt +++ b/Documentation/fb/sstfb.txt | |||
| @@ -10,7 +10,7 @@ Introduction | |||
| 10 | The main page is located at <http://sstfb.sourceforge.net>, and if | 10 | The main page is located at <http://sstfb.sourceforge.net>, and if |
| 11 | you want the latest version, check out the CVS, as the driver is a work | 11 | you want the latest version, check out the CVS, as the driver is a work |
| 12 | in progress, I feel uncomfortable with releasing tarballs of something | 12 | in progress, I feel uncomfortable with releasing tarballs of something |
| 13 | not completely working...Don't worry, it's still more than useable | 13 | not completely working...Don't worry, it's still more than usable |
| 14 | (I eat my own dog food) | 14 | (I eat my own dog food) |
| 15 | 15 | ||
| 16 | Please read the Bug section, and report any success or failure to me | 16 | Please read the Bug section, and report any success or failure to me |
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index eba790134253..b18dd1779029 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
| @@ -196,8 +196,7 @@ prototypes: | |||
| 196 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); | 196 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
| 197 | int (*releasepage) (struct page *, int); | 197 | int (*releasepage) (struct page *, int); |
| 198 | void (*freepage)(struct page *); | 198 | void (*freepage)(struct page *); |
| 199 | int (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 199 | int (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset); |
| 200 | loff_t offset, unsigned long nr_segs); | ||
| 201 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **, | 200 | int (*get_xip_mem)(struct address_space *, pgoff_t, int, void **, |
| 202 | unsigned long *); | 201 | unsigned long *); |
| 203 | int (*migratepage)(struct address_space *, struct page *, struct page *); | 202 | int (*migratepage)(struct address_space *, struct page *, struct page *); |
| @@ -431,6 +430,8 @@ prototypes: | |||
| 431 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | 430 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); |
| 432 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 431 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
| 433 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 432 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
| 433 | ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); | ||
| 434 | ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); | ||
| 434 | int (*iterate) (struct file *, struct dir_context *); | 435 | int (*iterate) (struct file *, struct dir_context *); |
| 435 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | 436 | unsigned int (*poll) (struct file *, struct poll_table_struct *); |
| 436 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); | 437 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); |
diff --git a/Documentation/filesystems/f2fs.txt b/Documentation/filesystems/f2fs.txt index 25311e113e75..51afba17bbae 100644 --- a/Documentation/filesystems/f2fs.txt +++ b/Documentation/filesystems/f2fs.txt | |||
| @@ -461,11 +461,11 @@ The number of blocks and buckets are determined by, | |||
| 461 | # of blocks in level #n = | | 461 | # of blocks in level #n = | |
| 462 | `- 4, Otherwise | 462 | `- 4, Otherwise |
| 463 | 463 | ||
| 464 | ,- 2^ (n + dir_level), | 464 | ,- 2^(n + dir_level), |
| 465 | | if n < MAX_DIR_HASH_DEPTH / 2, | 465 | | if n + dir_level < MAX_DIR_HASH_DEPTH / 2, |
| 466 | # of buckets in level #n = | | 466 | # of buckets in level #n = | |
| 467 | `- 2^((MAX_DIR_HASH_DEPTH / 2 + dir_level) - 1), | 467 | `- 2^((MAX_DIR_HASH_DEPTH / 2) - 1), |
| 468 | Otherwise | 468 | Otherwise |
| 469 | 469 | ||
| 470 | When F2FS finds a file name in a directory, at first a hash value of the file | 470 | When F2FS finds a file name in a directory, at first a hash value of the file |
| 471 | name is calculated. Then, F2FS scans the hash table in level #0 to find the | 471 | name is calculated. Then, F2FS scans the hash table in level #0 to find the |
diff --git a/Documentation/filesystems/nfs/nfs41-server.txt b/Documentation/filesystems/nfs/nfs41-server.txt index b930ad087780..c49cd7e796e7 100644 --- a/Documentation/filesystems/nfs/nfs41-server.txt +++ b/Documentation/filesystems/nfs/nfs41-server.txt | |||
| @@ -176,7 +176,5 @@ Nonstandard compound limitations: | |||
| 176 | ca_maxrequestsize request and a ca_maxresponsesize reply, so we may | 176 | ca_maxrequestsize request and a ca_maxresponsesize reply, so we may |
| 177 | fail to live up to the promise we made in CREATE_SESSION fore channel | 177 | fail to live up to the promise we made in CREATE_SESSION fore channel |
| 178 | negotiation. | 178 | negotiation. |
| 179 | * No more than one read-like operation allowed per compound; encoding | ||
| 180 | replies that cross page boundaries (except for read data) not handled. | ||
| 181 | 179 | ||
| 182 | See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. | 180 | See also http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues. |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 8b9cd8eb3f91..ddc531a74d04 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
| @@ -234,7 +234,7 @@ Table 1-2: Contents of the status files (as of 2.6.30-rc7) | |||
| 234 | ShdPnd bitmap of shared pending signals for the process | 234 | ShdPnd bitmap of shared pending signals for the process |
| 235 | SigBlk bitmap of blocked signals | 235 | SigBlk bitmap of blocked signals |
| 236 | SigIgn bitmap of ignored signals | 236 | SigIgn bitmap of ignored signals |
| 237 | SigCgt bitmap of catched signals | 237 | SigCgt bitmap of caught signals |
| 238 | CapInh bitmap of inheritable capabilities | 238 | CapInh bitmap of inheritable capabilities |
| 239 | CapPrm bitmap of permitted capabilities | 239 | CapPrm bitmap of permitted capabilities |
| 240 | CapEff bitmap of effective capabilities | 240 | CapEff bitmap of effective capabilities |
| @@ -300,7 +300,7 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7) | |||
| 300 | pending bitmap of pending signals | 300 | pending bitmap of pending signals |
| 301 | blocked bitmap of blocked signals | 301 | blocked bitmap of blocked signals |
| 302 | sigign bitmap of ignored signals | 302 | sigign bitmap of ignored signals |
| 303 | sigcatch bitmap of catched signals | 303 | sigcatch bitmap of caught signals |
| 304 | wchan address where process went to sleep | 304 | wchan address where process went to sleep |
| 305 | 0 (place holder) | 305 | 0 (place holder) |
| 306 | 0 (place holder) | 306 | 0 (place holder) |
| @@ -854,7 +854,8 @@ WritebackTmp: Memory used by FUSE for temporary writeback buffers | |||
| 854 | if strict overcommit accounting is enabled (mode 2 in | 854 | if strict overcommit accounting is enabled (mode 2 in |
| 855 | 'vm.overcommit_memory'). | 855 | 'vm.overcommit_memory'). |
| 856 | The CommitLimit is calculated with the following formula: | 856 | The CommitLimit is calculated with the following formula: |
| 857 | CommitLimit = ('vm.overcommit_ratio' * Physical RAM) + Swap | 857 | CommitLimit = ([total RAM pages] - [total huge TLB pages]) * |
| 858 | overcommit_ratio / 100 + [total swap pages] | ||
| 858 | For example, on a system with 1G of physical RAM and 7G | 859 | For example, on a system with 1G of physical RAM and 7G |
| 859 | of swap with a `vm.overcommit_ratio` of 30 it would | 860 | of swap with a `vm.overcommit_ratio` of 30 it would |
| 860 | yield a CommitLimit of 7.3G. | 861 | yield a CommitLimit of 7.3G. |
| @@ -1245,8 +1246,9 @@ second). The meanings of the columns are as follows, from left to right: | |||
| 1245 | 1246 | ||
| 1246 | The "intr" line gives counts of interrupts serviced since boot time, for each | 1247 | The "intr" line gives counts of interrupts serviced since boot time, for each |
| 1247 | of the possible system interrupts. The first column is the total of all | 1248 | of the possible system interrupts. The first column is the total of all |
| 1248 | interrupts serviced; each subsequent column is the total for that particular | 1249 | interrupts serviced including unnumbered architecture specific interrupts; |
| 1249 | interrupt. | 1250 | each subsequent column is the total for that particular numbered interrupt. |
| 1251 | Unnumbered interrupts are not shown, only summed into the total. | ||
| 1250 | 1252 | ||
| 1251 | The "ctxt" line gives the total number of context switches across all CPUs. | 1253 | The "ctxt" line gives the total number of context switches across all CPUs. |
| 1252 | 1254 | ||
diff --git a/Documentation/filesystems/seq_file.txt b/Documentation/filesystems/seq_file.txt index a1e2e0dda907..1fe0ccb1af55 100644 --- a/Documentation/filesystems/seq_file.txt +++ b/Documentation/filesystems/seq_file.txt | |||
| @@ -54,6 +54,15 @@ how the mechanism works without getting lost in other details. (Those | |||
| 54 | wanting to see the full source for this module can find it at | 54 | wanting to see the full source for this module can find it at |
| 55 | http://lwn.net/Articles/22359/). | 55 | http://lwn.net/Articles/22359/). |
| 56 | 56 | ||
| 57 | Deprecated create_proc_entry | ||
| 58 | |||
| 59 | Note that the above article uses create_proc_entry which was removed in | ||
| 60 | kernel 3.10. Current versions require the following update | ||
| 61 | |||
| 62 | - entry = create_proc_entry("sequence", 0, NULL); | ||
| 63 | - if (entry) | ||
| 64 | - entry->proc_fops = &ct_file_ops; | ||
| 65 | + entry = proc_create("sequence", 0, NULL, &ct_file_ops); | ||
| 57 | 66 | ||
| 58 | The iterator interface | 67 | The iterator interface |
| 59 | 68 | ||
diff --git a/Documentation/filesystems/sharedsubtree.txt b/Documentation/filesystems/sharedsubtree.txt index 4ede421c9687..32a173dd3158 100644 --- a/Documentation/filesystems/sharedsubtree.txt +++ b/Documentation/filesystems/sharedsubtree.txt | |||
| @@ -727,7 +727,7 @@ replicas continue to be exactly same. | |||
| 727 | mkdir -p /tmp/m3 | 727 | mkdir -p /tmp/m3 |
| 728 | mount --rbind /root /tmp/m3 | 728 | mount --rbind /root /tmp/m3 |
| 729 | 729 | ||
| 730 | I wont' draw the tree..but it has 24 vfsmounts | 730 | I won't draw the tree..but it has 24 vfsmounts |
| 731 | 731 | ||
| 732 | 732 | ||
| 733 | at step i the number of vfsmounts is V[i] = i*V[i-1]. | 733 | at step i the number of vfsmounts is V[i] = i*V[i-1]. |
diff --git a/Documentation/filesystems/vfat.txt b/Documentation/filesystems/vfat.txt index 4a93e98b290a..ce1126aceed8 100644 --- a/Documentation/filesystems/vfat.txt +++ b/Documentation/filesystems/vfat.txt | |||
| @@ -172,6 +172,11 @@ nfs=stale_rw|nostale_ro | |||
| 172 | To maintain backward compatibility, '-o nfs' is also accepted, | 172 | To maintain backward compatibility, '-o nfs' is also accepted, |
| 173 | defaulting to stale_rw | 173 | defaulting to stale_rw |
| 174 | 174 | ||
| 175 | dos1xfloppy -- If set, use a fallback default BIOS Parameter Block | ||
| 176 | configuration, determined by backing device size. These static | ||
| 177 | parameters match defaults assumed by DOS 1.x for 160 kiB, | ||
| 178 | 180 kiB, 320 kiB, and 360 kiB floppies and floppy images. | ||
| 179 | |||
| 175 | 180 | ||
| 176 | <bool>: 0,1,yes,no,true,false | 181 | <bool>: 0,1,yes,no,true,false |
| 177 | 182 | ||
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 617f6d70c077..a1d0d7a30165 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
| @@ -589,8 +589,7 @@ struct address_space_operations { | |||
| 589 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); | 589 | void (*invalidatepage) (struct page *, unsigned int, unsigned int); |
| 590 | int (*releasepage) (struct page *, int); | 590 | int (*releasepage) (struct page *, int); |
| 591 | void (*freepage)(struct page *); | 591 | void (*freepage)(struct page *); |
| 592 | ssize_t (*direct_IO)(int, struct kiocb *, const struct iovec *iov, | 592 | ssize_t (*direct_IO)(int, struct kiocb *, struct iov_iter *iter, loff_t offset); |
| 593 | loff_t offset, unsigned long nr_segs); | ||
| 594 | struct page* (*get_xip_page)(struct address_space *, sector_t, | 593 | struct page* (*get_xip_page)(struct address_space *, sector_t, |
| 595 | int); | 594 | int); |
| 596 | /* migrate the contents of a page to the specified target */ | 595 | /* migrate the contents of a page to the specified target */ |
| @@ -807,6 +806,8 @@ struct file_operations { | |||
| 807 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); | 806 | ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *); |
| 808 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 807 | ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
| 809 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); | 808 | ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t); |
| 809 | ssize_t (*read_iter) (struct kiocb *, struct iov_iter *); | ||
| 810 | ssize_t (*write_iter) (struct kiocb *, struct iov_iter *); | ||
| 810 | int (*iterate) (struct file *, struct dir_context *); | 811 | int (*iterate) (struct file *, struct dir_context *); |
| 811 | unsigned int (*poll) (struct file *, struct poll_table_struct *); | 812 | unsigned int (*poll) (struct file *, struct poll_table_struct *); |
| 812 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); | 813 | long (*unlocked_ioctl) (struct file *, unsigned int, unsigned long); |
| @@ -837,11 +838,15 @@ otherwise noted. | |||
| 837 | 838 | ||
| 838 | read: called by read(2) and related system calls | 839 | read: called by read(2) and related system calls |
| 839 | 840 | ||
| 840 | aio_read: called by io_submit(2) and other asynchronous I/O operations | 841 | aio_read: vectored, possibly asynchronous read |
| 842 | |||
| 843 | read_iter: possibly asynchronous read with iov_iter as destination | ||
| 841 | 844 | ||
| 842 | write: called by write(2) and related system calls | 845 | write: called by write(2) and related system calls |
| 843 | 846 | ||
| 844 | aio_write: called by io_submit(2) and other asynchronous I/O operations | 847 | aio_write: vectored, possibly asynchronous write |
| 848 | |||
| 849 | write_iter: possibly asynchronous write with iov_iter as source | ||
| 845 | 850 | ||
| 846 | iterate: called when the VFS needs to read the directory contents | 851 | iterate: called when the VFS needs to read the directory contents |
| 847 | 852 | ||
diff --git a/Documentation/gpio/consumer.txt b/Documentation/gpio/consumer.txt index 09854fe59307..d8abfc31abbe 100644 --- a/Documentation/gpio/consumer.txt +++ b/Documentation/gpio/consumer.txt | |||
| @@ -41,7 +41,7 @@ Both functions return either a valid GPIO descriptor, or an error code checkable | |||
| 41 | with IS_ERR() (they will never return a NULL pointer). -ENOENT will be returned | 41 | with IS_ERR() (they will never return a NULL pointer). -ENOENT will be returned |
| 42 | if and only if no GPIO has been assigned to the device/function/index triplet, | 42 | if and only if no GPIO has been assigned to the device/function/index triplet, |
| 43 | other error codes are used for cases where a GPIO has been assigned but an error | 43 | other error codes are used for cases where a GPIO has been assigned but an error |
| 44 | occured while trying to acquire it. This is useful to discriminate between mere | 44 | occurred while trying to acquire it. This is useful to discriminate between mere |
| 45 | errors and an absence of GPIO for optional GPIO parameters. | 45 | errors and an absence of GPIO for optional GPIO parameters. |
| 46 | 46 | ||
| 47 | Device-managed variants of these functions are also defined: | 47 | Device-managed variants of these functions are also defined: |
diff --git a/Documentation/gpio/driver.txt b/Documentation/gpio/driver.txt index f73cc7b5dc85..fa9a0a8b3734 100644 --- a/Documentation/gpio/driver.txt +++ b/Documentation/gpio/driver.txt | |||
| @@ -73,6 +73,65 @@ The IRQ portions of the GPIO block are implemented using an irqchip, using | |||
| 73 | the header <linux/irq.h>. So basically such a driver is utilizing two sub- | 73 | the header <linux/irq.h>. So basically such a driver is utilizing two sub- |
| 74 | systems simultaneously: gpio and irq. | 74 | systems simultaneously: gpio and irq. |
| 75 | 75 | ||
| 76 | GPIO irqchips usually fall in one of two categories: | ||
| 77 | |||
| 78 | * CHAINED GPIO irqchips: these are usually the type that is embedded on | ||
| 79 | an SoC. This means that there is a fast IRQ handler for the GPIOs that | ||
| 80 | gets called in a chain from the parent IRQ handler, most typically the | ||
| 81 | system interrupt controller. This means the GPIO irqchip is registered | ||
| 82 | using irq_set_chained_handler() or the corresponding | ||
| 83 | gpiochip_set_chained_irqchip() helper function, and the GPIO irqchip | ||
| 84 | handler will be called immediately from the parent irqchip, while | ||
| 85 | holding the IRQs disabled. The GPIO irqchip will then end up calling | ||
| 86 | something like this sequence in its interrupt handler: | ||
| 87 | |||
| 88 | static irqreturn_t tc3589x_gpio_irq(int irq, void *data) | ||
| 89 | chained_irq_enter(...); | ||
| 90 | generic_handle_irq(...); | ||
| 91 | chained_irq_exit(...); | ||
| 92 | |||
| 93 | Chained GPIO irqchips typically can NOT set the .can_sleep flag on | ||
| 94 | struct gpio_chip, as everything happens directly in the callbacks. | ||
| 95 | |||
| 96 | * NESTED THREADED GPIO irqchips: these are off-chip GPIO expanders and any | ||
| 97 | other GPIO irqchip residing on the other side of a sleeping bus. Of course | ||
| 98 | such drivers that need slow bus traffic to read out IRQ status and similar, | ||
| 99 | traffic which may in turn incur other IRQs to happen, cannot be handled | ||
| 100 | in a quick IRQ handler with IRQs disabled. Instead they need to spawn a | ||
| 101 | thread and then mask the parent IRQ line until the interrupt is handled | ||
| 102 | by the driver. The hallmark of this driver is to call something like | ||
| 103 | this in its interrupt handler: | ||
| 104 | |||
| 105 | static irqreturn_t tc3589x_gpio_irq(int irq, void *data) | ||
| 106 | ... | ||
| 107 | handle_nested_irq(irq); | ||
| 108 | |||
| 109 | The hallmark of threaded GPIO irqchips is that they set the .can_sleep | ||
| 110 | flag on struct gpio_chip to true, indicating that this chip may sleep | ||
| 111 | when accessing the GPIOs. | ||
| 112 | |||
| 113 | To help out in handling the set-up and management of GPIO irqchips and the | ||
| 114 | associated irqdomain and resource allocation callbacks, the gpiolib has | ||
| 115 | some helpers that can be enabled by selecting the GPIOLIB_IRQCHIP Kconfig | ||
| 116 | symbol: | ||
| 117 | |||
| 118 | * gpiochip_irqchip_add(): adds an irqchip to a gpiochip. It will pass | ||
| 119 | the struct gpio_chip* for the chip to all IRQ callbacks, so the callbacks | ||
| 120 | need to embed the gpio_chip in its state container and obtain a pointer | ||
| 121 | to the container using container_of(). | ||
| 122 | (See Documentation/driver-model/design-patterns.txt) | ||
| 123 | |||
| 124 | * gpiochip_set_chained_irqchip(): sets up a chained irq handler for a | ||
| 125 | gpio_chip from a parent IRQ and passes the struct gpio_chip* as handler | ||
| 126 | data. (Notice handler data, since the irqchip data is likely used by the | ||
| 127 | parent irqchip!) This is for the chained type of chip. | ||
| 128 | |||
| 129 | To use the helpers please keep the following in mind: | ||
| 130 | |||
| 131 | - Make sure to assign all relevant members of the struct gpio_chip so that | ||
| 132 | the irqchip can initialize. E.g. .dev and .can_sleep shall be set up | ||
| 133 | properly. | ||
| 134 | |||
| 76 | It is legal for any IRQ consumer to request an IRQ from any irqchip no matter | 135 | It is legal for any IRQ consumer to request an IRQ from any irqchip no matter |
| 77 | if that is a combined GPIO+IRQ driver. The basic premise is that gpio_chip and | 136 | if that is a combined GPIO+IRQ driver. The basic premise is that gpio_chip and |
| 78 | irq_chip are orthogonal, and offering their services independent of each | 137 | irq_chip are orthogonal, and offering their services independent of each |
diff --git a/Documentation/hid/uhid.txt b/Documentation/hid/uhid.txt index ee6593608c8e..54c8f9706a95 100644 --- a/Documentation/hid/uhid.txt +++ b/Documentation/hid/uhid.txt | |||
| @@ -125,7 +125,7 @@ the request was handled successfully. | |||
| 125 | 125 | ||
| 126 | read() | 126 | read() |
| 127 | ------ | 127 | ------ |
| 128 | read() will return a queued ouput report. These output reports can be of type | 128 | read() will return a queued output report. These output reports can be of type |
| 129 | UHID_START, UHID_STOP, UHID_OPEN, UHID_CLOSE, UHID_OUTPUT or UHID_OUTPUT_EV. No | 129 | UHID_START, UHID_STOP, UHID_OPEN, UHID_CLOSE, UHID_OUTPUT or UHID_OUTPUT_EV. No |
| 130 | reaction is required to any of them but you should handle them according to your | 130 | reaction is required to any of them but you should handle them according to your |
| 131 | needs. Only UHID_OUTPUT and UHID_OUTPUT_EV have payloads. | 131 | needs. Only UHID_OUTPUT and UHID_OUTPUT_EV have payloads. |
diff --git a/Documentation/hsi.txt b/Documentation/hsi.txt new file mode 100644 index 000000000000..6ac6cd51852a --- /dev/null +++ b/Documentation/hsi.txt | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | HSI - High-speed Synchronous Serial Interface | ||
| 2 | |||
| 3 | 1. Introduction | ||
| 4 | ~~~~~~~~~~~~~~~ | ||
| 5 | |||
| 6 | High Speed Syncronous Interface (HSI) is a fullduplex, low latency protocol, | ||
| 7 | that is optimized for die-level interconnect between an Application Processor | ||
| 8 | and a Baseband chipset. It has been specified by the MIPI alliance in 2003 and | ||
| 9 | implemented by multiple vendors since then. | ||
| 10 | |||
| 11 | The HSI interface supports full duplex communication over multiple channels | ||
| 12 | (typically 8) and is capable of reaching speeds up to 200 Mbit/s. | ||
| 13 | |||
| 14 | The serial protocol uses two signals, DATA and FLAG as combined data and clock | ||
| 15 | signals and an additional READY signal for flow control. An additional WAKE | ||
| 16 | signal can be used to wakeup the chips from standby modes. The signals are | ||
| 17 | commonly prefixed by AC for signals going from the application die to the | ||
| 18 | cellular die and CA for signals going the other way around. | ||
| 19 | |||
| 20 | +------------+ +---------------+ | ||
| 21 | | Cellular | | Application | | ||
| 22 | | Die | | Die | | ||
| 23 | | | - - - - - - CAWAKE - - - - - - >| | | ||
| 24 | | T|------------ CADATA ------------>|R | | ||
| 25 | | X|------------ CAFLAG ------------>|X | | ||
| 26 | | |<----------- ACREADY ------------| | | ||
| 27 | | | | | | ||
| 28 | | | | | | ||
| 29 | | |< - - - - - ACWAKE - - - - - - -| | | ||
| 30 | | R|<----------- ACDATA -------------|T | | ||
| 31 | | X|<----------- ACFLAG -------------|X | | ||
| 32 | | |------------ CAREADY ----------->| | | ||
| 33 | | | | | | ||
| 34 | | | | | | ||
| 35 | +------------+ +---------------+ | ||
| 36 | |||
| 37 | 2. HSI Subsystem in Linux | ||
| 38 | ~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 39 | |||
| 40 | In the Linux kernel the hsi subsystem is supposed to be used for HSI devices. | ||
| 41 | The hsi subsystem contains drivers for hsi controllers including support for | ||
| 42 | multi-port controllers and provides a generic API for using the HSI ports. | ||
| 43 | |||
| 44 | It also contains HSI client drivers, which make use of the generic API to | ||
| 45 | implement a protocol used on the HSI interface. These client drivers can | ||
| 46 | use an arbitrary number of channels. | ||
| 47 | |||
| 48 | 3. hsi-char Device | ||
| 49 | ~~~~~~~~~~~~~~~~~~ | ||
| 50 | |||
| 51 | Each port automatically registers a generic client driver called hsi_char, | ||
| 52 | which provides a charecter device for userspace representing the HSI port. | ||
| 53 | It can be used to communicate via HSI from userspace. Userspace may | ||
| 54 | configure the hsi_char device using the following ioctl commands: | ||
| 55 | |||
| 56 | * HSC_RESET: | ||
| 57 | - flush the HSI port | ||
| 58 | |||
| 59 | * HSC_SET_PM | ||
| 60 | - enable or disable the client. | ||
| 61 | |||
| 62 | * HSC_SEND_BREAK | ||
| 63 | - send break | ||
| 64 | |||
| 65 | * HSC_SET_RX | ||
| 66 | - set RX configuration | ||
| 67 | |||
| 68 | * HSC_GET_RX | ||
| 69 | - get RX configuration | ||
| 70 | |||
| 71 | * HSC_SET_TX | ||
| 72 | - set TX configuration | ||
| 73 | |||
| 74 | * HSC_GET_TX | ||
| 75 | - get TX configuration | ||
diff --git a/Documentation/hwmon/emc1403 b/Documentation/hwmon/emc1403 new file mode 100644 index 000000000000..a869b0ef6a9d --- /dev/null +++ b/Documentation/hwmon/emc1403 | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | Kernel driver emc1403 | ||
| 2 | ===================== | ||
| 3 | |||
| 4 | Supported chips: | ||
| 5 | * SMSC / Microchip EMC1402, EMC1412 | ||
| 6 | Addresses scanned: I2C 0x18, 0x1c, 0x29, 0x4c, 0x4d, 0x5c | ||
| 7 | Prefix: 'emc1402' | ||
| 8 | Datasheets: | ||
| 9 | http://ww1.microchip.com/downloads/en/DeviceDoc/1412.pdf | ||
| 10 | http://ww1.microchip.com/downloads/en/DeviceDoc/1402.pdf | ||
| 11 | * SMSC / Microchip EMC1403, EMC1404, EMC1413, EMC1414 | ||
| 12 | Addresses scanned: I2C 0x18, 0x29, 0x4c, 0x4d | ||
| 13 | Prefix: 'emc1403', 'emc1404' | ||
| 14 | Datasheets: | ||
| 15 | http://ww1.microchip.com/downloads/en/DeviceDoc/1403_1404.pdf | ||
| 16 | http://ww1.microchip.com/downloads/en/DeviceDoc/1413_1414.pdf | ||
| 17 | * SMSC / Microchip EMC1422 | ||
| 18 | Addresses scanned: I2C 0x4c | ||
| 19 | Prefix: 'emc1422' | ||
| 20 | Datasheet: | ||
| 21 | http://ww1.microchip.com/downloads/en/DeviceDoc/1422.pdf | ||
| 22 | * SMSC / Microchip EMC1423, EMC1424 | ||
| 23 | Addresses scanned: I2C 0x4c | ||
| 24 | Prefix: 'emc1423', 'emc1424' | ||
| 25 | Datasheet: | ||
| 26 | http://ww1.microchip.com/downloads/en/DeviceDoc/1423_1424.pdf | ||
| 27 | |||
| 28 | Author: | ||
| 29 | Kalhan Trisal <kalhan.trisal@intel.com | ||
| 30 | |||
| 31 | |||
| 32 | Description | ||
| 33 | ----------- | ||
| 34 | |||
| 35 | The Standard Microsystems Corporation (SMSC) / Microchip EMC14xx chips | ||
| 36 | contain up to four temperature sensors. EMC14x2 support two sensors | ||
| 37 | (one internal, one external). EMC14x3 support three sensors (one internal, | ||
| 38 | two external), and EMC14x4 support four sensors (one internal, three | ||
| 39 | external). | ||
| 40 | |||
| 41 | The chips implement three limits for each sensor: low (tempX_min), high | ||
| 42 | (tempX_max) and critical (tempX_crit.) The chips also implement an | ||
| 43 | hysteresis mechanism which applies to all limits. The relative difference | ||
| 44 | is stored in a single register on the chip, which means that the relative | ||
| 45 | difference between the limit and its hysteresis is always the same for | ||
| 46 | all three limits. | ||
| 47 | |||
| 48 | This implementation detail implies the following: | ||
| 49 | * When setting a limit, its hysteresis will automatically follow, the | ||
| 50 | difference staying unchanged. For example, if the old critical limit | ||
| 51 | was 80 degrees C, and the hysteresis was 75 degrees C, and you change | ||
| 52 | the critical limit to 90 degrees C, then the hysteresis will | ||
| 53 | automatically change to 85 degrees C. | ||
| 54 | * The hysteresis values can't be set independently. We decided to make | ||
| 55 | only temp1_crit_hyst writable, while all other hysteresis attributes | ||
| 56 | are read-only. Setting temp1_crit_hyst writes the difference between | ||
| 57 | temp1_crit_hyst and temp1_crit into the chip, and the same relative | ||
| 58 | hysteresis applies automatically to all other limits. | ||
| 59 | * The limits should be set before the hysteresis. | ||
diff --git a/Documentation/hwmon/hwmon-kernel-api.txt b/Documentation/hwmon/hwmon-kernel-api.txt new file mode 100644 index 000000000000..2ecdbfc85ecf --- /dev/null +++ b/Documentation/hwmon/hwmon-kernel-api.txt | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | The Linux Hardware Monitoring kernel API. | ||
| 2 | ========================================= | ||
| 3 | |||
| 4 | Guenter Roeck | ||
| 5 | |||
| 6 | Introduction | ||
| 7 | ------------ | ||
| 8 | |||
| 9 | This document describes the API that can be used by hardware monitoring | ||
| 10 | drivers that want to use the hardware monitoring framework. | ||
| 11 | |||
| 12 | This document does not describe what a hardware monitoring (hwmon) Driver or | ||
| 13 | Device is. It also does not describe the API which can be used by user space | ||
| 14 | to communicate with a hardware monitoring device. If you want to know this | ||
| 15 | then please read the following file: Documentation/hwmon/sysfs-interface. | ||
| 16 | |||
| 17 | For additional guidelines on how to write and improve hwmon drivers, please | ||
| 18 | also read Documentation/hwmon/submitting-patches. | ||
| 19 | |||
| 20 | The API | ||
| 21 | ------- | ||
| 22 | Each hardware monitoring driver must #include <linux/hwmon.h> and, in most | ||
| 23 | cases, <linux/hwmon-sysfs.h>. linux/hwmon.h declares the following | ||
| 24 | register/unregister functions: | ||
| 25 | |||
| 26 | struct device *hwmon_device_register(struct device *dev); | ||
| 27 | struct device * | ||
| 28 | hwmon_device_register_with_groups(struct device *dev, const char *name, | ||
| 29 | void *drvdata, | ||
| 30 | const struct attribute_group **groups); | ||
| 31 | |||
| 32 | struct device * | ||
| 33 | devm_hwmon_device_register_with_groups(struct device *dev, | ||
| 34 | const char *name, void *drvdata, | ||
| 35 | const struct attribute_group **groups); | ||
| 36 | |||
| 37 | void hwmon_device_unregister(struct device *dev); | ||
| 38 | void devm_hwmon_device_unregister(struct device *dev); | ||
| 39 | |||
| 40 | hwmon_device_register registers a hardware monitoring device. The parameter | ||
| 41 | of this function is a pointer to the parent device. | ||
| 42 | This function returns a pointer to the newly created hardware monitoring device | ||
| 43 | or PTR_ERR for failure. If this registration function is used, hardware | ||
| 44 | monitoring sysfs attributes are expected to have been created and attached to | ||
| 45 | the parent device prior to calling hwmon_device_register. A name attribute must | ||
| 46 | have been created by the caller. | ||
| 47 | |||
| 48 | hwmon_device_register_with_groups is similar to hwmon_device_register. However, | ||
| 49 | it has additional parameters. The name parameter is a pointer to the hwmon | ||
| 50 | device name. The registration function wil create a name sysfs attribute | ||
| 51 | pointing to this name. The drvdata parameter is the pointer to the local | ||
| 52 | driver data. hwmon_device_register_with_groups will attach this pointer | ||
| 53 | to the newly allocated hwmon device. The pointer can be retrieved by the driver | ||
| 54 | using dev_get_drvdata() on the hwmon device pointer. The groups parameter is | ||
| 55 | a pointer to a list of sysfs attribute groups. The list must be NULL terminated. | ||
| 56 | hwmon_device_register_with_groups creates the hwmon device with name attribute | ||
| 57 | as well as all sysfs attributes attached to the hwmon device. | ||
| 58 | |||
| 59 | devm_hwmon_device_register_with_groups is similar to | ||
| 60 | hwmon_device_register_with_groups. However, it is device managed, meaning the | ||
| 61 | hwmon device does not have to be removed explicitly by the removal function. | ||
| 62 | |||
| 63 | hwmon_device_unregister deregisters a registered hardware monitoring device. | ||
| 64 | The parameter of this function is the pointer to the registered hardware | ||
| 65 | monitoring device structure. This function must be called from the driver | ||
| 66 | remove function if the hardware monitoring device was registered with | ||
| 67 | hwmon_device_register or with hwmon_device_register_with_groups. | ||
| 68 | |||
| 69 | devm_hwmon_device_unregister does not normally have to be called. It is only | ||
| 70 | needed for error handling, and only needed if the driver probe fails after | ||
| 71 | the call to devm_hwmon_device_register_with_groups. | ||
| 72 | |||
| 73 | The header file linux/hwmon-sysfs.h provides a number of useful macros to | ||
| 74 | declare and use hardware monitoring sysfs attributes. | ||
| 75 | |||
| 76 | In many cases, you can use the exsting define DEVICE_ATTR to declare such | ||
| 77 | attributes. This is feasible if an attribute has no additional context. However, | ||
| 78 | in many cases there will be additional information such as a sensor index which | ||
| 79 | will need to be passed to the sysfs attribute handling function. | ||
| 80 | |||
| 81 | SENSOR_DEVICE_ATTR and SENSOR_DEVICE_ATTR_2 can be used to define attributes | ||
| 82 | which need such additional context information. SENSOR_DEVICE_ATTR requires | ||
| 83 | one additional argument, SENSOR_DEVICE_ATTR_2 requires two. | ||
| 84 | |||
| 85 | SENSOR_DEVICE_ATTR defines a struct sensor_device_attribute variable. | ||
| 86 | This structure has the following fields. | ||
| 87 | |||
| 88 | struct sensor_device_attribute { | ||
| 89 | struct device_attribute dev_attr; | ||
| 90 | int index; | ||
| 91 | }; | ||
| 92 | |||
| 93 | You can use to_sensor_dev_attr to get the pointer to this structure from the | ||
| 94 | attribute read or write function. Its parameter is the device to which the | ||
| 95 | attribute is attached. | ||
| 96 | |||
| 97 | SENSOR_DEVICE_ATTR_2 defines a struct sensor_device_attribute_2 variable, | ||
| 98 | which is defined as follows. | ||
| 99 | |||
| 100 | struct sensor_device_attribute_2 { | ||
| 101 | struct device_attribute dev_attr; | ||
| 102 | u8 index; | ||
| 103 | u8 nr; | ||
| 104 | }; | ||
| 105 | |||
| 106 | Use to_sensor_dev_attr_2 to get the pointer to this structure. Its parameter | ||
| 107 | is the device to which the attribute is attached. | ||
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42 index 868d74d6b773..f3893f7440de 100644 --- a/Documentation/hwmon/jc42 +++ b/Documentation/hwmon/jc42 | |||
| @@ -5,9 +5,12 @@ Supported chips: | |||
| 5 | * Analog Devices ADT7408 | 5 | * Analog Devices ADT7408 |
| 6 | Datasheets: | 6 | Datasheets: |
| 7 | http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf | 7 | http://www.analog.com/static/imported-files/data_sheets/ADT7408.pdf |
| 8 | * Atmel AT30TS00 | 8 | * Atmel AT30TS00, AT30TS002A/B, AT30TSE004A |
| 9 | Datasheets: | 9 | Datasheets: |
| 10 | http://www.atmel.com/Images/doc8585.pdf | 10 | http://www.atmel.com/Images/doc8585.pdf |
| 11 | http://www.atmel.com/Images/doc8711.pdf | ||
| 12 | http://www.atmel.com/Images/Atmel-8852-SEEPROM-AT30TSE002A-Datasheet.pdf | ||
| 13 | http://www.atmel.com/Images/Atmel-8868-DTS-AT30TSE004A-Datasheet.pdf | ||
| 11 | * IDT TSE2002B3, TSE2002GB2, TS3000B3, TS3000GB2 | 14 | * IDT TSE2002B3, TSE2002GB2, TS3000B3, TS3000GB2 |
| 12 | Datasheets: | 15 | Datasheets: |
| 13 | http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf | 16 | http://www.idt.com/sites/default/files/documents/IDT_TSE2002B3C_DST_20100512_120303152056.pdf |
| @@ -34,12 +37,13 @@ Supported chips: | |||
| 34 | Datasheet: | 37 | Datasheet: |
| 35 | http://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF | 38 | http://www.onsemi.com/pub_link/Collateral/CAT34TS02-D.PDF |
| 36 | http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF | 39 | http://www.onsemi.com/pub/Collateral/CAT6095-D.PDF |
| 37 | * ST Microelectronics STTS424, STTS424E02, STTS2002, STTS3000 | 40 | * ST Microelectronics STTS424, STTS424E02, STTS2002, STTS2004, STTS3000 |
| 38 | Datasheets: | 41 | Datasheets: |
| 39 | http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00157556.pdf | 42 | http://www.st.com/web/en/resource/technical/document/datasheet/CD00157556.pdf |
| 40 | http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00157558.pdf | 43 | http://www.st.com/web/en/resource/technical/document/datasheet/CD00157558.pdf |
| 41 | http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00225278.pdf | 44 | http://www.st.com/web/en/resource/technical/document/datasheet/CD00266638.pdf |
| 42 | http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATA_BRIEF/CD00270920.pdf | 45 | http://www.st.com/web/en/resource/technical/document/datasheet/CD00225278.pdf |
| 46 | http://www.st.com/web/en/resource/technical/document/datasheet/DM00076709.pdf | ||
| 43 | * JEDEC JC 42.4 compliant temperature sensor chips | 47 | * JEDEC JC 42.4 compliant temperature sensor chips |
| 44 | Datasheet: | 48 | Datasheet: |
| 45 | http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf | 49 | http://www.jedec.org/sites/default/files/docs/4_01_04R19.pdf |
diff --git a/Documentation/hwmon/lm77 b/Documentation/hwmon/lm77 index 57c3a46d6370..bfc915fe3639 100644 --- a/Documentation/hwmon/lm77 +++ b/Documentation/hwmon/lm77 | |||
| @@ -18,5 +18,21 @@ sensor incorporates a band-gap type temperature sensor, | |||
| 18 | 10-bit ADC, and a digital comparator with user-programmable upper | 18 | 10-bit ADC, and a digital comparator with user-programmable upper |
| 19 | and lower limit values. | 19 | and lower limit values. |
| 20 | 20 | ||
| 21 | Limits can be set through the Overtemperature Shutdown register and | 21 | The LM77 implements 3 limits: low (temp1_min), high (temp1_max) and |
| 22 | Hysteresis register. | 22 | critical (temp1_crit.) It also implements an hysteresis mechanism which |
| 23 | applies to all 3 limits. The relative difference is stored in a single | ||
| 24 | register on the chip, which means that the relative difference between | ||
| 25 | the limit and its hysteresis is always the same for all 3 limits. | ||
| 26 | |||
| 27 | This implementation detail implies the following: | ||
| 28 | * When setting a limit, its hysteresis will automatically follow, the | ||
| 29 | difference staying unchanged. For example, if the old critical limit | ||
| 30 | was 80 degrees C, and the hysteresis was 75 degrees C, and you change | ||
| 31 | the critical limit to 90 degrees C, then the hysteresis will | ||
| 32 | automatically change to 85 degrees C. | ||
| 33 | * All 3 hysteresis can't be set independently. We decided to make | ||
| 34 | temp1_crit_hyst writable, while temp1_min_hyst and temp1_max_hyst are | ||
| 35 | read-only. Setting temp1_crit_hyst writes the difference between | ||
| 36 | temp1_crit_hyst and temp1_crit into the chip, and the same relative | ||
| 37 | hysteresis applies automatically to the low and high limits. | ||
| 38 | * The limits should be set before the hysteresis. | ||
diff --git a/Documentation/hwmon/nct6683 b/Documentation/hwmon/nct6683 new file mode 100644 index 000000000000..c1301d4300cd --- /dev/null +++ b/Documentation/hwmon/nct6683 | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | Kernel driver nct6683 | ||
| 2 | ===================== | ||
| 3 | |||
| 4 | Supported chips: | ||
| 5 | * Nuvoton NCT6683D | ||
| 6 | Prefix: 'nct6683' | ||
| 7 | Addresses scanned: ISA address retrieved from Super I/O registers | ||
| 8 | Datasheet: Available from Nuvoton upon request | ||
| 9 | |||
| 10 | Authors: | ||
| 11 | Guenter Roeck <linux@roeck-us.net> | ||
| 12 | |||
| 13 | Description | ||
| 14 | ----------- | ||
| 15 | |||
| 16 | This driver implements support for the Nuvoton NCT6683D eSIO chip. | ||
| 17 | |||
| 18 | The chips implement up to shared 32 temperature and voltage sensors. | ||
| 19 | It supports up to 16 fan rotation sensors and up to 8 fan control engines. | ||
| 20 | |||
| 21 | Temperatures are measured in degrees Celsius. Measurement resolution is | ||
| 22 | 0.5 degrees C. | ||
| 23 | |||
| 24 | Voltage sensors (also known as IN sensors) report their values in millivolts. | ||
| 25 | |||
| 26 | Fan rotation speeds are reported in RPM (rotations per minute). | ||
| 27 | |||
| 28 | Usage Note | ||
| 29 | ---------- | ||
| 30 | |||
| 31 | Limit register locations on Intel boards with EC firmware version 1.0 | ||
| 32 | build date 04/03/13 do not match the register locations in the Nuvoton | ||
| 33 | datasheet. Nuvoton confirms that Intel uses a special firmware version | ||
| 34 | with different register addresses. The specification describing the Intel | ||
| 35 | firmware is held under NDA by Nuvoton and Intel and not available | ||
| 36 | to the public. | ||
| 37 | |||
| 38 | Some of the register locations can be reverse engineered; others are too | ||
| 39 | well hidden. Given this, writing any values from the operating system is | ||
| 40 | considered too risky with this firmware and has been disabled. All limits | ||
| 41 | must all be written from the BIOS. | ||
| 42 | |||
| 43 | The driver has only been tested with the Intel firmware, and by default | ||
| 44 | only instantiates on Intel boards. To enable it on non-Intel boards, | ||
| 45 | set the 'force' module parameter to 1. | ||
| 46 | |||
| 47 | Tested Boards and Firmware Versions | ||
| 48 | ----------------------------------- | ||
| 49 | |||
| 50 | The driver has been reported to work with the following boards and | ||
| 51 | firmware versions. | ||
| 52 | |||
| 53 | Board Firmware version | ||
| 54 | --------------------------------------------------------------- | ||
| 55 | Intel DH87RL NCT6683D EC firmware version 1.0 build 04/03/13 | ||
| 56 | Intel DH87MC NCT6683D EC firmware version 1.0 build 04/03/13 | ||
| 57 | Intel DB85FL NCT6683D EC firmware version 1.0 build 04/03/13 | ||
diff --git a/Documentation/hwmon/shtc1 b/Documentation/hwmon/shtc1 new file mode 100644 index 000000000000..6b1e05458f0f --- /dev/null +++ b/Documentation/hwmon/shtc1 | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | Kernel driver shtc1 | ||
| 2 | =================== | ||
| 3 | |||
| 4 | Supported chips: | ||
| 5 | * Sensirion SHTC1 | ||
| 6 | Prefix: 'shtc1' | ||
| 7 | Addresses scanned: none | ||
| 8 | Datasheet: http://www.sensirion.com/file/datasheet_shtc1 | ||
| 9 | |||
| 10 | * Sensirion SHTW1 | ||
| 11 | Prefix: 'shtw1' | ||
| 12 | Addresses scanned: none | ||
| 13 | Datasheet: Not publicly available | ||
| 14 | |||
| 15 | Author: | ||
| 16 | Johannes Winkelmann <johannes.winkelmann@sensirion.com> | ||
| 17 | |||
| 18 | Description | ||
| 19 | ----------- | ||
| 20 | |||
| 21 | This driver implements support for the Sensirion SHTC1 chip, a humidity and | ||
| 22 | temperature sensor. Temperature is measured in degrees celsius, relative | ||
| 23 | humidity is expressed as a percentage. Driver can be used as well for SHTW1 | ||
| 24 | chip, which has the same electrical interface. | ||
| 25 | |||
| 26 | The device communicates with the I2C protocol. All sensors are set to I2C | ||
| 27 | address 0x70. See Documentation/i2c/instantiating-devices for methods to | ||
| 28 | instantiate the device. | ||
| 29 | |||
| 30 | There are two options configurable by means of shtc1_platform_data: | ||
| 31 | 1. blocking (pull the I2C clock line down while performing the measurement) or | ||
| 32 | non-blocking mode. Blocking mode will guarantee the fastest result but | ||
| 33 | the I2C bus will be busy during that time. By default, non-blocking mode | ||
| 34 | is used. Make sure clock-stretching works properly on your device if you | ||
| 35 | want to use blocking mode. | ||
| 36 | 2. high or low accuracy. High accuracy is used by default and using it is | ||
| 37 | strongly recommended. | ||
| 38 | |||
| 39 | sysfs-Interface | ||
| 40 | --------------- | ||
| 41 | |||
| 42 | temp1_input - temperature input | ||
| 43 | humidity1_input - humidity input | ||
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface index 79f8257dd790..2cc95ad46604 100644 --- a/Documentation/hwmon/sysfs-interface +++ b/Documentation/hwmon/sysfs-interface | |||
| @@ -327,6 +327,13 @@ temp[1-*]_max_hyst | |||
| 327 | from the max value. | 327 | from the max value. |
| 328 | RW | 328 | RW |
| 329 | 329 | ||
| 330 | temp[1-*]_min_hyst | ||
| 331 | Temperature hysteresis value for min limit. | ||
| 332 | Unit: millidegree Celsius | ||
| 333 | Must be reported as an absolute temperature, NOT a delta | ||
| 334 | from the min value. | ||
| 335 | RW | ||
| 336 | |||
| 330 | temp[1-*]_input Temperature input value. | 337 | temp[1-*]_input Temperature input value. |
| 331 | Unit: millidegree Celsius | 338 | Unit: millidegree Celsius |
| 332 | RO | 339 | RO |
| @@ -362,6 +369,13 @@ temp[1-*]_lcrit Temperature critical min value, typically lower than | |||
| 362 | Unit: millidegree Celsius | 369 | Unit: millidegree Celsius |
| 363 | RW | 370 | RW |
| 364 | 371 | ||
| 372 | temp[1-*]_lcrit_hyst | ||
| 373 | Temperature hysteresis value for critical min limit. | ||
| 374 | Unit: millidegree Celsius | ||
| 375 | Must be reported as an absolute temperature, NOT a delta | ||
| 376 | from the critical min value. | ||
| 377 | RW | ||
| 378 | |||
| 365 | temp[1-*]_offset | 379 | temp[1-*]_offset |
| 366 | Temperature offset which is added to the temperature reading | 380 | Temperature offset which is added to the temperature reading |
| 367 | by the chip. | 381 | by the chip. |
diff --git a/Documentation/input/alps.txt b/Documentation/input/alps.txt index e544c7ff8cfa..90bca6f988e1 100644 --- a/Documentation/input/alps.txt +++ b/Documentation/input/alps.txt | |||
| @@ -94,7 +94,7 @@ PS/2 packet format | |||
| 94 | 94 | ||
| 95 | Note that the device never signals overflow condition. | 95 | Note that the device never signals overflow condition. |
| 96 | 96 | ||
| 97 | ALPS Absolute Mode - Protocol Verion 1 | 97 | ALPS Absolute Mode - Protocol Version 1 |
| 98 | -------------------------------------- | 98 | -------------------------------------- |
| 99 | 99 | ||
| 100 | byte 0: 1 0 0 0 1 x9 x8 x7 | 100 | byte 0: 1 0 0 0 1 x9 x8 x7 |
diff --git a/Documentation/input/elantech.txt b/Documentation/input/elantech.txt index 5602eb71ad5d..e1ae127ed099 100644 --- a/Documentation/input/elantech.txt +++ b/Documentation/input/elantech.txt | |||
| @@ -504,9 +504,12 @@ byte 5: | |||
| 504 | * reg_10 | 504 | * reg_10 |
| 505 | 505 | ||
| 506 | bit 7 6 5 4 3 2 1 0 | 506 | bit 7 6 5 4 3 2 1 0 |
| 507 | 0 0 0 0 0 0 0 A | 507 | 0 0 0 0 R F T A |
| 508 | 508 | ||
| 509 | A: 1 = enable absolute tracking | 509 | A: 1 = enable absolute tracking |
| 510 | T: 1 = enable two finger mode auto correct | ||
| 511 | F: 1 = disable ABS Position Filter | ||
| 512 | R: 1 = enable real hardware resolution | ||
| 510 | 513 | ||
| 511 | 6.2 Native absolute mode 6 byte packet format | 514 | 6.2 Native absolute mode 6 byte packet format |
| 512 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 515 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
diff --git a/Documentation/input/input.txt b/Documentation/input/input.txt index 666c06c5ab0c..0acfddbe2028 100644 --- a/Documentation/input/input.txt +++ b/Documentation/input/input.txt | |||
| @@ -226,7 +226,7 @@ And so on up to js31. | |||
| 226 | ~~~~~~~~~~~ | 226 | ~~~~~~~~~~~ |
| 227 | evdev is the generic input event interface. It passes the events | 227 | evdev is the generic input event interface. It passes the events |
| 228 | generated in the kernel straight to the program, with timestamps. The | 228 | generated in the kernel straight to the program, with timestamps. The |
| 229 | API is still evolving, but should be useable now. It's described in | 229 | API is still evolving, but should be usable now. It's described in |
| 230 | section 5. | 230 | section 5. |
| 231 | 231 | ||
| 232 | This should be the way for GPM and X to get keyboard and mouse | 232 | This should be the way for GPM and X to get keyboard and mouse |
diff --git a/Documentation/ja_JP/HOWTO b/Documentation/ja_JP/HOWTO index 0091a8215ac1..b61885c35ce1 100644 --- a/Documentation/ja_JP/HOWTO +++ b/Documentation/ja_JP/HOWTO | |||
| @@ -315,7 +315,7 @@ Andrew Morton が Linux-kernel メーリングリストにカーネルリリー | |||
| 315 | もし、3.x.y カーネルが存在しない場合には、番号が一番大きい 3.x が | 315 | もし、3.x.y カーネルが存在しない場合には、番号が一番大きい 3.x が |
| 316 | 最新の安定版カーネルです。 | 316 | 最新の安定版カーネルです。 |
| 317 | 317 | ||
| 318 | 3.x.y は "stable" チーム <stable@kernel.org> でメンテされており、必 | 318 | 3.x.y は "stable" チーム <stable@vger.kernel.org> でメンテされており、必 |
| 319 | 要に応じてリリースされます。通常のリリース期間は 2週間毎ですが、差し迫っ | 319 | 要に応じてリリースされます。通常のリリース期間は 2週間毎ですが、差し迫っ |
| 320 | た問題がなければもう少し長くなることもあります。セキュリティ関連の問題 | 320 | た問題がなければもう少し長くなることもあります。セキュリティ関連の問題 |
| 321 | の場合はこれに対してだいたいの場合、すぐにリリースがされます。 | 321 | の場合はこれに対してだいたいの場合、すぐにリリースがされます。 |
diff --git a/Documentation/ja_JP/stable_kernel_rules.txt b/Documentation/ja_JP/stable_kernel_rules.txt index 14265837c4ce..9dbda9b5d21e 100644 --- a/Documentation/ja_JP/stable_kernel_rules.txt +++ b/Documentation/ja_JP/stable_kernel_rules.txt | |||
| @@ -50,16 +50,16 @@ linux-2.6.29/Documentation/stable_kernel_rules.txt | |||
| 50 | 50 | ||
| 51 | -stable ツリーにパッチを送付する手続き- | 51 | -stable ツリーにパッチを送付する手続き- |
| 52 | 52 | ||
| 53 | - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ | 53 | - 上記の規則に従っているかを確認した後に、stable@vger.kernel.org にパッチ |
| 54 | を送る。 | 54 | を送る。 |
| 55 | - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 | 55 | - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合 |
| 56 | には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 | 56 | には NAK を受け取る。この反応は開発者たちのスケジュールによって、数 |
| 57 | 日かかる場合がある。 | 57 | 日かかる場合がある。 |
| 58 | - もし受け取られたら、パッチは他の開発者たちと関連するサブシステムの | 58 | - もし受け取られたら、パッチは他の開発者たちと関連するサブシステムの |
| 59 | メンテナーによるレビューのために -stable キューに追加される。 | 59 | メンテナーによるレビューのために -stable キューに追加される。 |
| 60 | - パッチに stable@kernel.org のアドレスが付加されているときには、それ | 60 | - パッチに stable@vger.kernel.org のアドレスが付加されているときには、それ |
| 61 | が Linus のツリーに入る時に自動的に stable チームに email される。 | 61 | が Linus のツリーに入る時に自動的に stable チームに email される。 |
| 62 | - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ | 62 | - セキュリティパッチはこのエイリアス (stable@vger.kernel.org) に送られるべ |
| 63 | きではなく、代わりに security@kernel.org のアドレスに送られる。 | 63 | きではなく、代わりに security@kernel.org のアドレスに送られる。 |
| 64 | 64 | ||
| 65 | レビューサイクル- | 65 | レビューサイクル- |
diff --git a/Documentation/java.txt b/Documentation/java.txt index e6a723281547..418020584ccc 100644 --- a/Documentation/java.txt +++ b/Documentation/java.txt | |||
| @@ -188,6 +188,9 @@ shift | |||
| 188 | #define CP_METHODREF 10 | 188 | #define CP_METHODREF 10 |
| 189 | #define CP_INTERFACEMETHODREF 11 | 189 | #define CP_INTERFACEMETHODREF 11 |
| 190 | #define CP_NAMEANDTYPE 12 | 190 | #define CP_NAMEANDTYPE 12 |
| 191 | #define CP_METHODHANDLE 15 | ||
| 192 | #define CP_METHODTYPE 16 | ||
| 193 | #define CP_INVOKEDYNAMIC 18 | ||
| 191 | 194 | ||
| 192 | /* Define some commonly used error messages */ | 195 | /* Define some commonly used error messages */ |
| 193 | 196 | ||
| @@ -242,14 +245,19 @@ void skip_constant(FILE *classfile, u_int16_t *cur) | |||
| 242 | break; | 245 | break; |
| 243 | case CP_CLASS: | 246 | case CP_CLASS: |
| 244 | case CP_STRING: | 247 | case CP_STRING: |
| 248 | case CP_METHODTYPE: | ||
| 245 | seekerr = fseek(classfile, 2, SEEK_CUR); | 249 | seekerr = fseek(classfile, 2, SEEK_CUR); |
| 246 | break; | 250 | break; |
| 251 | case CP_METHODHANDLE: | ||
| 252 | seekerr = fseek(classfile, 3, SEEK_CUR); | ||
| 253 | break; | ||
| 247 | case CP_INTEGER: | 254 | case CP_INTEGER: |
| 248 | case CP_FLOAT: | 255 | case CP_FLOAT: |
| 249 | case CP_FIELDREF: | 256 | case CP_FIELDREF: |
| 250 | case CP_METHODREF: | 257 | case CP_METHODREF: |
| 251 | case CP_INTERFACEMETHODREF: | 258 | case CP_INTERFACEMETHODREF: |
| 252 | case CP_NAMEANDTYPE: | 259 | case CP_NAMEANDTYPE: |
| 260 | case CP_INVOKEDYNAMIC: | ||
| 253 | seekerr = fseek(classfile, 4, SEEK_CUR); | 261 | seekerr = fseek(classfile, 4, SEEK_CUR); |
| 254 | break; | 262 | break; |
| 255 | case CP_LONG: | 263 | case CP_LONG: |
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt index 69372fb98cf8..3fb39e0116b4 100644 --- a/Documentation/kbuild/modules.txt +++ b/Documentation/kbuild/modules.txt | |||
| @@ -470,7 +470,7 @@ build. | |||
| 470 | 470 | ||
| 471 | Sometimes, an external module uses exported symbols from | 471 | Sometimes, an external module uses exported symbols from |
| 472 | another external module. kbuild needs to have full knowledge of | 472 | another external module. kbuild needs to have full knowledge of |
| 473 | all symbols to avoid spliitting out warnings about undefined | 473 | all symbols to avoid spitting out warnings about undefined |
| 474 | symbols. Three solutions exist for this situation. | 474 | symbols. Three solutions exist for this situation. |
| 475 | 475 | ||
| 476 | NOTE: The method with a top-level kbuild file is recommended | 476 | NOTE: The method with a top-level kbuild file is recommended |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 03e50b4883a8..6eaa9cdb7094 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -1,27 +1,37 @@ | |||
| 1 | Kernel Parameters | 1 | Kernel Parameters |
| 2 | ~~~~~~~~~~~~~~~~~ | 2 | ~~~~~~~~~~~~~~~~~ |
| 3 | 3 | ||
| 4 | The following is a consolidated list of the kernel parameters as implemented | 4 | The following is a consolidated list of the kernel parameters as |
| 5 | (mostly) by the __setup() macro and sorted into English Dictionary order | 5 | implemented by the __setup(), core_param() and module_param() macros |
| 6 | (defined as ignoring all punctuation and sorting digits before letters in a | 6 | and sorted into English Dictionary order (defined as ignoring all |
| 7 | case insensitive manner), and with descriptions where known. | 7 | punctuation and sorting digits before letters in a case insensitive |
| 8 | 8 | manner), and with descriptions where known. | |
| 9 | Module parameters for loadable modules are specified only as the | 9 | |
| 10 | parameter name with optional '=' and value as appropriate, such as: | 10 | The kernel parses parameters from the kernel command line up to "--"; |
| 11 | 11 | if it doesn't recognize a parameter and it doesn't contain a '.', the | |
| 12 | modprobe usbcore blinkenlights=1 | 12 | parameter gets passed to init: parameters with '=' go into init's |
| 13 | 13 | environment, others are passed as command line arguments to init. | |
| 14 | Module parameters for modules that are built into the kernel image | 14 | Everything after "--" is passed as an argument to init. |
| 15 | are specified on the kernel command line with the module name plus | 15 | |
| 16 | '.' plus parameter name, with '=' and value if appropriate, such as: | 16 | Module parameters can be specified in two ways: via the kernel command |
| 17 | 17 | line with a module name prefix, or via modprobe, e.g.: | |
| 18 | usbcore.blinkenlights=1 | 18 | |
| 19 | (kernel command line) usbcore.blinkenlights=1 | ||
| 20 | (modprobe command line) modprobe usbcore blinkenlights=1 | ||
| 21 | |||
| 22 | Parameters for modules which are built into the kernel need to be | ||
| 23 | specified on the kernel command line. modprobe looks through the | ||
| 24 | kernel command line (/proc/cmdline) and collects module parameters | ||
| 25 | when it loads a module, so the kernel command line can be used for | ||
| 26 | loadable modules too. | ||
| 19 | 27 | ||
| 20 | Hyphens (dashes) and underscores are equivalent in parameter names, so | 28 | Hyphens (dashes) and underscores are equivalent in parameter names, so |
| 21 | log_buf_len=1M print-fatal-signals=1 | 29 | log_buf_len=1M print-fatal-signals=1 |
| 22 | can also be entered as | 30 | can also be entered as |
| 23 | log-buf-len=1M print_fatal_signals=1 | 31 | log-buf-len=1M print_fatal_signals=1 |
| 24 | 32 | ||
| 33 | Double-quotes can be used to protect spaces in values, e.g.: | ||
| 34 | param="spaces in here" | ||
| 25 | 35 | ||
| 26 | This document may not be entirely up to date and comprehensive. The command | 36 | This document may not be entirely up to date and comprehensive. The command |
| 27 | "modinfo -p ${modulename}" shows a current list of all parameters of a loadable | 37 | "modinfo -p ${modulename}" shows a current list of all parameters of a loadable |
| @@ -214,6 +224,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 214 | unusable. The "log_buf_len" parameter may be useful | 224 | unusable. The "log_buf_len" parameter may be useful |
| 215 | if you need to capture more output. | 225 | if you need to capture more output. |
| 216 | 226 | ||
| 227 | acpi_force_table_verification [HW,ACPI] | ||
| 228 | Enable table checksum verification during early stage. | ||
| 229 | By default, this is disabled due to x86 early mapping | ||
| 230 | size limitation. | ||
| 231 | |||
| 217 | acpi_irq_balance [HW,ACPI] | 232 | acpi_irq_balance [HW,ACPI] |
| 218 | ACPI will balance active IRQs | 233 | ACPI will balance active IRQs |
| 219 | default in APIC mode | 234 | default in APIC mode |
| @@ -237,7 +252,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 237 | This feature is enabled by default. | 252 | This feature is enabled by default. |
| 238 | This option allows to turn off the feature. | 253 | This option allows to turn off the feature. |
| 239 | 254 | ||
| 240 | acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT | 255 | acpi_no_static_ssdt [HW,ACPI] |
| 256 | Disable installation of static SSDTs at early boot time | ||
| 257 | By default, SSDTs contained in the RSDT/XSDT will be | ||
| 258 | installed automatically and they will appear under | ||
| 259 | /sys/firmware/acpi/tables. | ||
| 260 | This option turns off this feature. | ||
| 261 | Note that specifying this option does not affect | ||
| 262 | dynamic table installation which will install SSDT | ||
| 263 | tables to /sys/firmware/acpi/tables/dynamic. | ||
| 241 | 264 | ||
| 242 | acpica_no_return_repair [HW, ACPI] | 265 | acpica_no_return_repair [HW, ACPI] |
| 243 | Disable AML predefined validation mechanism | 266 | Disable AML predefined validation mechanism |
| @@ -617,8 +640,11 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 617 | Also note the kernel might malfunction if you disable | 640 | Also note the kernel might malfunction if you disable |
| 618 | some critical bits. | 641 | some critical bits. |
| 619 | 642 | ||
| 620 | cma=nn[MG] [ARM,KNL] | 643 | cma=nn[MG]@[start[MG][-end[MG]]] |
| 621 | Sets the size of kernel global memory area for contiguous | 644 | [ARM,X86,KNL] |
| 645 | Sets the size of kernel global memory area for | ||
| 646 | contiguous memory allocations and optionally the | ||
| 647 | placement constraint by the physical address range of | ||
| 622 | memory allocations. For more information, see | 648 | memory allocations. For more information, see |
| 623 | include/linux/dma-contiguous.h | 649 | include/linux/dma-contiguous.h |
| 624 | 650 | ||
| @@ -804,13 +830,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 804 | dhash_entries= [KNL] | 830 | dhash_entries= [KNL] |
| 805 | Set number of hash buckets for dentry cache. | 831 | Set number of hash buckets for dentry cache. |
| 806 | 832 | ||
| 807 | digi= [HW,SERIAL] | ||
| 808 | IO parameters + enable/disable command. | ||
| 809 | |||
| 810 | digiepca= [HW,SERIAL] | ||
| 811 | See drivers/char/README.epca and | ||
| 812 | Documentation/serial/digiepca.txt. | ||
| 813 | |||
| 814 | disable= [IPV6] | 833 | disable= [IPV6] |
| 815 | See Documentation/networking/ipv6.txt. | 834 | See Documentation/networking/ipv6.txt. |
| 816 | 835 | ||
| @@ -890,6 +909,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 890 | which are not unmapped. | 909 | which are not unmapped. |
| 891 | 910 | ||
| 892 | earlycon= [KNL] Output early console device and options. | 911 | earlycon= [KNL] Output early console device and options. |
| 912 | |||
| 893 | uart[8250],io,<addr>[,options] | 913 | uart[8250],io,<addr>[,options] |
| 894 | uart[8250],mmio,<addr>[,options] | 914 | uart[8250],mmio,<addr>[,options] |
| 895 | uart[8250],mmio32,<addr>[,options] | 915 | uart[8250],mmio32,<addr>[,options] |
| @@ -899,7 +919,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 899 | (mmio) or 32-bit (mmio32). | 919 | (mmio) or 32-bit (mmio32). |
| 900 | The options are the same as for ttyS, above. | 920 | The options are the same as for ttyS, above. |
| 901 | 921 | ||
| 902 | earlyprintk= [X86,SH,BLACKFIN,ARM] | 922 | pl011,<addr> |
| 923 | Start an early, polled-mode console on a pl011 serial | ||
| 924 | port at the specified address. The pl011 serial port | ||
| 925 | must already be setup and configured. Options are not | ||
| 926 | yet supported. | ||
| 927 | |||
| 928 | smh Use ARM semihosting calls for early console. | ||
| 929 | |||
| 930 | earlyprintk= [X86,SH,BLACKFIN,ARM,M68k] | ||
| 903 | earlyprintk=vga | 931 | earlyprintk=vga |
| 904 | earlyprintk=efi | 932 | earlyprintk=efi |
| 905 | earlyprintk=xen | 933 | earlyprintk=xen |
| @@ -1294,6 +1322,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 1294 | for working out where the kernel is dying during | 1322 | for working out where the kernel is dying during |
| 1295 | startup. | 1323 | startup. |
| 1296 | 1324 | ||
| 1325 | initcall_blacklist= [KNL] Do not execute a comma-separated list of | ||
| 1326 | initcall functions. Useful for debugging built-in | ||
| 1327 | modules and initcalls. | ||
| 1328 | |||
| 1297 | initrd= [BOOT] Specify the location of the initial ramdisk | 1329 | initrd= [BOOT] Specify the location of the initial ramdisk |
| 1298 | 1330 | ||
| 1299 | inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver | 1331 | inport.irq= [HW] Inport (ATI XL and Microsoft) busmouse driver |
| @@ -2225,10 +2257,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2225 | noreplace-smp [X86-32,SMP] Don't replace SMP instructions | 2257 | noreplace-smp [X86-32,SMP] Don't replace SMP instructions |
| 2226 | with UP alternatives | 2258 | with UP alternatives |
| 2227 | 2259 | ||
| 2228 | nordrand [X86] Disable the direct use of the RDRAND | 2260 | nordrand [X86] Disable kernel use of the RDRAND and |
| 2229 | instruction even if it is supported by the | 2261 | RDSEED instructions even if they are supported |
| 2230 | processor. RDRAND is still available to user | 2262 | by the processor. RDRAND and RDSEED are still |
| 2231 | space applications. | 2263 | available to user space applications. |
| 2232 | 2264 | ||
| 2233 | noresume [SWSUSP] Disables resume and restores original swap | 2265 | noresume [SWSUSP] Disables resume and restores original swap |
| 2234 | space. | 2266 | space. |
| @@ -2339,6 +2371,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2339 | timeout < 0: reboot immediately | 2371 | timeout < 0: reboot immediately |
| 2340 | Format: <timeout> | 2372 | Format: <timeout> |
| 2341 | 2373 | ||
| 2374 | crash_kexec_post_notifiers | ||
| 2375 | Run kdump after running panic-notifiers and dumping | ||
| 2376 | kmsg. This only for the users who doubt kdump always | ||
| 2377 | succeeds in any situation. | ||
| 2378 | Note that this also increases risks of kdump failure, | ||
| 2379 | because some panic notifiers can make the crashed | ||
| 2380 | kernel more unstable. | ||
| 2381 | |||
| 2342 | parkbd.port= [HW] Parallel port number the keyboard adapter is | 2382 | parkbd.port= [HW] Parallel port number the keyboard adapter is |
| 2343 | connected to, default is 0. | 2383 | connected to, default is 0. |
| 2344 | Format: <parport#> | 2384 | Format: <parport#> |
| @@ -2896,6 +2936,13 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2896 | [KNL, SMP] Set scheduler's default relax_domain_level. | 2936 | [KNL, SMP] Set scheduler's default relax_domain_level. |
| 2897 | See Documentation/cgroups/cpusets.txt. | 2937 | See Documentation/cgroups/cpusets.txt. |
| 2898 | 2938 | ||
| 2939 | relative_sleep_states= | ||
| 2940 | [SUSPEND] Use sleep state labeling where the deepest | ||
| 2941 | state available other than hibernation is always "mem". | ||
| 2942 | Format: { "0" | "1" } | ||
| 2943 | 0 -- Traditional sleep state labels. | ||
| 2944 | 1 -- Relative sleep state labels. | ||
| 2945 | |||
| 2899 | reserve= [KNL,BUGS] Force the kernel to ignore some iomem area | 2946 | reserve= [KNL,BUGS] Force the kernel to ignore some iomem area |
| 2900 | 2947 | ||
| 2901 | reservetop= [X86-32] | 2948 | reservetop= [X86-32] |
| @@ -2939,9 +2986,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 2939 | rhash_entries= [KNL,NET] | 2986 | rhash_entries= [KNL,NET] |
| 2940 | Set number of hash buckets for route cache | 2987 | Set number of hash buckets for route cache |
| 2941 | 2988 | ||
| 2942 | riscom8= [HW,SERIAL] | ||
| 2943 | Format: <io_board1>[,<io_board2>[,...<io_boardN>]] | ||
| 2944 | |||
| 2945 | ro [KNL] Mount root device read-only on boot | 2989 | ro [KNL] Mount root device read-only on boot |
| 2946 | 2990 | ||
| 2947 | root= [KNL] Root filesystem | 2991 | root= [KNL] Root filesystem |
| @@ -3083,9 +3127,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 3083 | sonypi.*= [HW] Sony Programmable I/O Control Device driver | 3127 | sonypi.*= [HW] Sony Programmable I/O Control Device driver |
| 3084 | See Documentation/laptops/sonypi.txt | 3128 | See Documentation/laptops/sonypi.txt |
| 3085 | 3129 | ||
| 3086 | specialix= [HW,SERIAL] Specialix multi-serial port adapter | ||
| 3087 | See Documentation/serial/specialix.txt. | ||
| 3088 | |||
| 3089 | spia_io_base= [HW,MTD] | 3130 | spia_io_base= [HW,MTD] |
| 3090 | spia_fio_base= | 3131 | spia_fio_base= |
| 3091 | spia_pedr= | 3132 | spia_pedr= |
| @@ -3474,7 +3515,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
| 3474 | the allocated input device; If set to 0, video driver | 3515 | the allocated input device; If set to 0, video driver |
| 3475 | will only send out the event without touching backlight | 3516 | will only send out the event without touching backlight |
| 3476 | brightness level. | 3517 | brightness level. |
| 3477 | default: 1 | 3518 | default: 0 |
| 3478 | 3519 | ||
| 3479 | virtio_mmio.device= | 3520 | virtio_mmio.device= |
| 3480 | [VMMIO] Memory mapped virtio (platform) device. | 3521 | [VMMIO] Memory mapped virtio (platform) device. |
diff --git a/Documentation/kmemleak.txt b/Documentation/kmemleak.txt index a7563ec4ea7b..b772418bf064 100644 --- a/Documentation/kmemleak.txt +++ b/Documentation/kmemleak.txt | |||
| @@ -142,6 +142,7 @@ kmemleak_alloc_percpu - notify of a percpu memory block allocation | |||
| 142 | kmemleak_free - notify of a memory block freeing | 142 | kmemleak_free - notify of a memory block freeing |
| 143 | kmemleak_free_part - notify of a partial memory block freeing | 143 | kmemleak_free_part - notify of a partial memory block freeing |
| 144 | kmemleak_free_percpu - notify of a percpu memory block freeing | 144 | kmemleak_free_percpu - notify of a percpu memory block freeing |
| 145 | kmemleak_update_trace - update object allocation stack trace | ||
| 145 | kmemleak_not_leak - mark an object as not a leak | 146 | kmemleak_not_leak - mark an object as not a leak |
| 146 | kmemleak_ignore - do not scan or report an object as leak | 147 | kmemleak_ignore - do not scan or report an object as leak |
| 147 | kmemleak_scan_area - add scan areas inside a memory block | 148 | kmemleak_scan_area - add scan areas inside a memory block |
diff --git a/Documentation/kprobes.txt b/Documentation/kprobes.txt index 0cfb00fd86ff..4bbeca8483ed 100644 --- a/Documentation/kprobes.txt +++ b/Documentation/kprobes.txt | |||
| @@ -22,8 +22,9 @@ Appendix B: The kprobes sysctl interface | |||
| 22 | 22 | ||
| 23 | Kprobes enables you to dynamically break into any kernel routine and | 23 | Kprobes enables you to dynamically break into any kernel routine and |
| 24 | collect debugging and performance information non-disruptively. You | 24 | collect debugging and performance information non-disruptively. You |
| 25 | can trap at almost any kernel code address, specifying a handler | 25 | can trap at almost any kernel code address(*), specifying a handler |
| 26 | routine to be invoked when the breakpoint is hit. | 26 | routine to be invoked when the breakpoint is hit. |
| 27 | (*: some parts of the kernel code can not be trapped, see 1.5 Blacklist) | ||
| 27 | 28 | ||
| 28 | There are currently three types of probes: kprobes, jprobes, and | 29 | There are currently three types of probes: kprobes, jprobes, and |
| 29 | kretprobes (also called return probes). A kprobe can be inserted | 30 | kretprobes (also called return probes). A kprobe can be inserted |
| @@ -273,6 +274,19 @@ using one of the following techniques: | |||
| 273 | or | 274 | or |
| 274 | - Execute 'sysctl -w debug.kprobes_optimization=n' | 275 | - Execute 'sysctl -w debug.kprobes_optimization=n' |
| 275 | 276 | ||
| 277 | 1.5 Blacklist | ||
| 278 | |||
| 279 | Kprobes can probe most of the kernel except itself. This means | ||
| 280 | that there are some functions where kprobes cannot probe. Probing | ||
| 281 | (trapping) such functions can cause a recursive trap (e.g. double | ||
| 282 | fault) or the nested probe handler may never be called. | ||
| 283 | Kprobes manages such functions as a blacklist. | ||
| 284 | If you want to add a function into the blacklist, you just need | ||
| 285 | to (1) include linux/kprobes.h and (2) use NOKPROBE_SYMBOL() macro | ||
| 286 | to specify a blacklisted function. | ||
| 287 | Kprobes checks the given probe address against the blacklist and | ||
| 288 | rejects registering it, if the given address is in the blacklist. | ||
| 289 | |||
| 276 | 2. Architectures Supported | 290 | 2. Architectures Supported |
| 277 | 291 | ||
| 278 | Kprobes, jprobes, and return probes are implemented on the following | 292 | Kprobes, jprobes, and return probes are implemented on the following |
diff --git a/Documentation/magic-number.txt b/Documentation/magic-number.txt index 76d80a64bbe1..4c8e142db2ef 100644 --- a/Documentation/magic-number.txt +++ b/Documentation/magic-number.txt | |||
| @@ -63,8 +63,6 @@ Magic Name Number Structure File | |||
| 63 | PG_MAGIC 'P' pg_{read,write}_hdr include/linux/pg.h | 63 | PG_MAGIC 'P' pg_{read,write}_hdr include/linux/pg.h |
| 64 | CMAGIC 0x0111 user include/linux/a.out.h | 64 | CMAGIC 0x0111 user include/linux/a.out.h |
| 65 | MKISS_DRIVER_MAGIC 0x04bf mkiss_channel drivers/net/mkiss.h | 65 | MKISS_DRIVER_MAGIC 0x04bf mkiss_channel drivers/net/mkiss.h |
| 66 | RISCOM8_MAGIC 0x0907 riscom_port drivers/char/riscom8.h | ||
| 67 | SPECIALIX_MAGIC 0x0907 specialix_port drivers/char/specialix_io8.h | ||
| 68 | HDLC_MAGIC 0x239e n_hdlc drivers/char/n_hdlc.c | 66 | HDLC_MAGIC 0x239e n_hdlc drivers/char/n_hdlc.c |
| 69 | APM_BIOS_MAGIC 0x4101 apm_user arch/x86/kernel/apm_32.c | 67 | APM_BIOS_MAGIC 0x4101 apm_user arch/x86/kernel/apm_32.c |
| 70 | CYCLADES_MAGIC 0x4359 cyclades_port include/linux/cyclades.h | 68 | CYCLADES_MAGIC 0x4359 cyclades_port include/linux/cyclades.h |
| @@ -82,7 +80,6 @@ STRIP_MAGIC 0x5303 strip drivers/net/strip.c | |||
| 82 | X25_ASY_MAGIC 0x5303 x25_asy drivers/net/x25_asy.h | 80 | X25_ASY_MAGIC 0x5303 x25_asy drivers/net/x25_asy.h |
| 83 | SIXPACK_MAGIC 0x5304 sixpack drivers/net/hamradio/6pack.h | 81 | SIXPACK_MAGIC 0x5304 sixpack drivers/net/hamradio/6pack.h |
| 84 | AX25_MAGIC 0x5316 ax_disp drivers/net/mkiss.h | 82 | AX25_MAGIC 0x5316 ax_disp drivers/net/mkiss.h |
| 85 | ESP_MAGIC 0x53ee esp_struct drivers/char/esp.h | ||
| 86 | TTY_MAGIC 0x5401 tty_struct include/linux/tty.h | 83 | TTY_MAGIC 0x5401 tty_struct include/linux/tty.h |
| 87 | MGSL_MAGIC 0x5401 mgsl_info drivers/char/synclink.c | 84 | MGSL_MAGIC 0x5401 mgsl_info drivers/char/synclink.c |
| 88 | TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h | 85 | TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h |
| @@ -94,13 +91,10 @@ USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c | |||
| 94 | RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c | 91 | RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c |
| 95 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h | 92 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h |
| 96 | CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h | 93 | CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h |
| 97 | A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h | ||
| 98 | RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h | 94 | RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h |
| 99 | LSEMAGIC 0x05091998 lse drivers/fc4/fc.c | 95 | LSEMAGIC 0x05091998 lse drivers/fc4/fc.c |
| 100 | GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h | 96 | GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h |
| 101 | RIEBL_MAGIC 0x09051990 drivers/net/atarilance.c | 97 | RIEBL_MAGIC 0x09051990 drivers/net/atarilance.c |
| 102 | RIO_MAGIC 0x12345678 gs_port drivers/char/rio/rio_linux.c | ||
| 103 | SX_MAGIC 0x12345678 gs_port drivers/char/sx.h | ||
| 104 | NBD_REQUEST_MAGIC 0x12560953 nbd_request include/linux/nbd.h | 98 | NBD_REQUEST_MAGIC 0x12560953 nbd_request include/linux/nbd.h |
| 105 | RED_MAGIC2 0x170fc2a5 (any) mm/slab.c | 99 | RED_MAGIC2 0x170fc2a5 (any) mm/slab.c |
| 106 | BAYCOM_MAGIC 0x19730510 baycom_state drivers/net/baycom_epp.c | 100 | BAYCOM_MAGIC 0x19730510 baycom_state drivers/net/baycom_epp.c |
| @@ -116,7 +110,6 @@ ISDN_ASYNC_MAGIC 0x49344C01 modem_info include/linux/isdn.h | |||
| 116 | CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info drivers/s390/net/ctctty.c | 110 | CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info drivers/s390/net/ctctty.c |
| 117 | ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s drivers/isdn/i4l/isdn_net_lib.h | 111 | ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s drivers/isdn/i4l/isdn_net_lib.h |
| 118 | SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg arch/*/amiga/config.c | 112 | SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg arch/*/amiga/config.c |
| 119 | STLI_BOARDMAGIC 0x4bc6c825 stlibrd include/linux/istallion.h | ||
| 120 | CS_STATE_MAGIC 0x4c4f4749 cs_state sound/oss/cs46xx.c | 113 | CS_STATE_MAGIC 0x4c4f4749 cs_state sound/oss/cs46xx.c |
| 121 | SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c | 114 | SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c |
| 122 | COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c | 115 | COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c |
| @@ -127,10 +120,8 @@ SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h | |||
| 127 | SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c | 120 | SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c |
| 128 | GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h | 121 | GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h |
| 129 | RED_MAGIC1 0x5a2cf071 (any) mm/slab.c | 122 | RED_MAGIC1 0x5a2cf071 (any) mm/slab.c |
| 130 | STL_PORTMAGIC 0x5a7182c9 stlport include/linux/stallion.h | ||
| 131 | EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev drivers/atm/lanai.c | 123 | EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev drivers/atm/lanai.c |
| 132 | HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state include/linux/hdlcdrv.h | 124 | HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state include/linux/hdlcdrv.h |
| 133 | EPCA_MAGIC 0x5c6df104 channel include/linux/epca.h | ||
| 134 | PCXX_MAGIC 0x5c6df104 channel drivers/char/pcxx.h | 125 | PCXX_MAGIC 0x5c6df104 channel drivers/char/pcxx.h |
| 135 | KV_MAGIC 0x5f4b565f kernel_vars_s arch/mips/include/asm/sn/klkernvars.h | 126 | KV_MAGIC 0x5f4b565f kernel_vars_s arch/mips/include/asm/sn/klkernvars.h |
| 136 | I810_STATE_MAGIC 0x63657373 i810_state sound/oss/i810_audio.c | 127 | I810_STATE_MAGIC 0x63657373 i810_state sound/oss/i810_audio.c |
| @@ -142,17 +133,14 @@ SLOT_MAGIC 0x67267322 slot drivers/hotplug/acpiphp.h | |||
| 142 | LO_MAGIC 0x68797548 nbd_device include/linux/nbd.h | 133 | LO_MAGIC 0x68797548 nbd_device include/linux/nbd.h |
| 143 | OPROFILE_MAGIC 0x6f70726f super_block drivers/oprofile/oprofilefs.h | 134 | OPROFILE_MAGIC 0x6f70726f super_block drivers/oprofile/oprofilefs.h |
| 144 | M3_STATE_MAGIC 0x734d724d m3_state sound/oss/maestro3.c | 135 | M3_STATE_MAGIC 0x734d724d m3_state sound/oss/maestro3.c |
| 145 | STL_PANELMAGIC 0x7ef621a1 stlpanel include/linux/stallion.h | ||
| 146 | VMALLOC_MAGIC 0x87654320 snd_alloc_track sound/core/memory.c | 136 | VMALLOC_MAGIC 0x87654320 snd_alloc_track sound/core/memory.c |
| 147 | KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c | 137 | KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c |
| 148 | PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h | 138 | PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h |
| 149 | NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h | 139 | NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h |
| 150 | STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h | ||
| 151 | ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h | 140 | ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h |
| 152 | SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h | 141 | SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h |
| 153 | CODA_MAGIC 0xC0DAC0DA coda_file_info fs/coda/coda_fs_i.h | 142 | CODA_MAGIC 0xC0DAC0DA coda_file_info fs/coda/coda_fs_i.h |
| 154 | DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h | 143 | DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h |
| 155 | STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h | ||
| 156 | YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c | 144 | YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c |
| 157 | CCB_MAGIC 0xf2691ad2 ccb drivers/scsi/ncr53c8xx.c | 145 | CCB_MAGIC 0xf2691ad2 ccb drivers/scsi/ncr53c8xx.c |
| 158 | QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry drivers/scsi/arm/queue.c | 146 | QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry drivers/scsi/arm/queue.c |
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 556f951f8626..f1dc4a215593 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
| @@ -115,8 +115,8 @@ For example, consider the following sequence of events: | |||
| 115 | CPU 1 CPU 2 | 115 | CPU 1 CPU 2 |
| 116 | =============== =============== | 116 | =============== =============== |
| 117 | { A == 1; B == 2 } | 117 | { A == 1; B == 2 } |
| 118 | A = 3; x = A; | 118 | A = 3; x = B; |
| 119 | B = 4; y = B; | 119 | B = 4; y = A; |
| 120 | 120 | ||
| 121 | The set of accesses as seen by the memory system in the middle can be arranged | 121 | The set of accesses as seen by the memory system in the middle can be arranged |
| 122 | in 24 different combinations: | 122 | in 24 different combinations: |
| @@ -1583,20 +1583,21 @@ There are some more advanced barrier functions: | |||
| 1583 | insert anything more than a compiler barrier in a UP compilation. | 1583 | insert anything more than a compiler barrier in a UP compilation. |
| 1584 | 1584 | ||
| 1585 | 1585 | ||
| 1586 | (*) smp_mb__before_atomic_dec(); | 1586 | (*) smp_mb__before_atomic(); |
| 1587 | (*) smp_mb__after_atomic_dec(); | 1587 | (*) smp_mb__after_atomic(); |
| 1588 | (*) smp_mb__before_atomic_inc(); | ||
| 1589 | (*) smp_mb__after_atomic_inc(); | ||
| 1590 | 1588 | ||
| 1591 | These are for use with atomic add, subtract, increment and decrement | 1589 | These are for use with atomic (such as add, subtract, increment and |
| 1592 | functions that don't return a value, especially when used for reference | 1590 | decrement) functions that don't return a value, especially when used for |
| 1593 | counting. These functions do not imply memory barriers. | 1591 | reference counting. These functions do not imply memory barriers. |
| 1592 | |||
| 1593 | These are also used for atomic bitop functions that do not return a | ||
| 1594 | value (such as set_bit and clear_bit). | ||
| 1594 | 1595 | ||
| 1595 | As an example, consider a piece of code that marks an object as being dead | 1596 | As an example, consider a piece of code that marks an object as being dead |
| 1596 | and then decrements the object's reference count: | 1597 | and then decrements the object's reference count: |
| 1597 | 1598 | ||
| 1598 | obj->dead = 1; | 1599 | obj->dead = 1; |
| 1599 | smp_mb__before_atomic_dec(); | 1600 | smp_mb__before_atomic(); |
| 1600 | atomic_dec(&obj->ref_count); | 1601 | atomic_dec(&obj->ref_count); |
| 1601 | 1602 | ||
| 1602 | This makes sure that the death mark on the object is perceived to be set | 1603 | This makes sure that the death mark on the object is perceived to be set |
| @@ -1606,27 +1607,6 @@ There are some more advanced barrier functions: | |||
| 1606 | operations" subsection for information on where to use these. | 1607 | operations" subsection for information on where to use these. |
| 1607 | 1608 | ||
| 1608 | 1609 | ||
| 1609 | (*) smp_mb__before_clear_bit(void); | ||
| 1610 | (*) smp_mb__after_clear_bit(void); | ||
| 1611 | |||
| 1612 | These are for use similar to the atomic inc/dec barriers. These are | ||
| 1613 | typically used for bitwise unlocking operations, so care must be taken as | ||
| 1614 | there are no implicit memory barriers here either. | ||
| 1615 | |||
| 1616 | Consider implementing an unlock operation of some nature by clearing a | ||
| 1617 | locking bit. The clear_bit() would then need to be barriered like this: | ||
| 1618 | |||
| 1619 | smp_mb__before_clear_bit(); | ||
| 1620 | clear_bit( ... ); | ||
| 1621 | |||
| 1622 | This prevents memory operations before the clear leaking to after it. See | ||
| 1623 | the subsection on "Locking Functions" with reference to RELEASE operation | ||
| 1624 | implications. | ||
| 1625 | |||
| 1626 | See Documentation/atomic_ops.txt for more information. See the "Atomic | ||
| 1627 | operations" subsection for information on where to use these. | ||
| 1628 | |||
| 1629 | |||
| 1630 | MMIO WRITE BARRIER | 1610 | MMIO WRITE BARRIER |
| 1631 | ------------------ | 1611 | ------------------ |
| 1632 | 1612 | ||
| @@ -2283,11 +2263,11 @@ operations: | |||
| 2283 | change_bit(); | 2263 | change_bit(); |
| 2284 | 2264 | ||
| 2285 | With these the appropriate explicit memory barrier should be used if necessary | 2265 | With these the appropriate explicit memory barrier should be used if necessary |
| 2286 | (smp_mb__before_clear_bit() for instance). | 2266 | (smp_mb__before_atomic() for instance). |
| 2287 | 2267 | ||
| 2288 | 2268 | ||
| 2289 | The following also do _not_ imply memory barriers, and so may require explicit | 2269 | The following also do _not_ imply memory barriers, and so may require explicit |
| 2290 | memory barriers under some circumstances (smp_mb__before_atomic_dec() for | 2270 | memory barriers under some circumstances (smp_mb__before_atomic() for |
| 2291 | instance): | 2271 | instance): |
| 2292 | 2272 | ||
| 2293 | atomic_add(); | 2273 | atomic_add(); |
diff --git a/Documentation/memory-hotplug.txt b/Documentation/memory-hotplug.txt index 58340d50f8a6..f304edb8fbe7 100644 --- a/Documentation/memory-hotplug.txt +++ b/Documentation/memory-hotplug.txt | |||
| @@ -88,16 +88,21 @@ phase by hand. | |||
| 88 | 88 | ||
| 89 | 1.3. Unit of Memory online/offline operation | 89 | 1.3. Unit of Memory online/offline operation |
| 90 | ------------ | 90 | ------------ |
| 91 | Memory hotplug uses SPARSEMEM memory model. SPARSEMEM divides the whole memory | 91 | Memory hotplug uses SPARSEMEM memory model which allows memory to be divided |
| 92 | into chunks of the same size. The chunk is called a "section". The size of | 92 | into chunks of the same size. These chunks are called "sections". The size of |
| 93 | a section is architecture dependent. For example, power uses 16MiB, ia64 uses | 93 | a memory section is architecture dependent. For example, power uses 16MiB, ia64 |
| 94 | 1GiB. The unit of online/offline operation is "one section". (see Section 3.) | 94 | uses 1GiB. |
| 95 | 95 | ||
| 96 | To determine the size of sections, please read this file: | 96 | Memory sections are combined into chunks referred to as "memory blocks". The |
| 97 | size of a memory block is architecture dependent and represents the logical | ||
| 98 | unit upon which memory online/offline operations are to be performed. The | ||
| 99 | default size of a memory block is the same as memory section size unless an | ||
| 100 | architecture specifies otherwise. (see Section 3.) | ||
| 101 | |||
| 102 | To determine the size (in bytes) of a memory block please read this file: | ||
| 97 | 103 | ||
| 98 | /sys/devices/system/memory/block_size_bytes | 104 | /sys/devices/system/memory/block_size_bytes |
| 99 | 105 | ||
| 100 | This file shows the size of sections in byte. | ||
| 101 | 106 | ||
| 102 | ----------------------- | 107 | ----------------------- |
| 103 | 2. Kernel Configuration | 108 | 2. Kernel Configuration |
| @@ -123,42 +128,35 @@ config options. | |||
| 123 | (CONFIG_ACPI_CONTAINER). | 128 | (CONFIG_ACPI_CONTAINER). |
| 124 | This option can be kernel module too. | 129 | This option can be kernel module too. |
| 125 | 130 | ||
| 131 | |||
| 126 | -------------------------------- | 132 | -------------------------------- |
| 127 | 4 sysfs files for memory hotplug | 133 | 3 sysfs files for memory hotplug |
| 128 | -------------------------------- | 134 | -------------------------------- |
| 129 | All sections have their device information in sysfs. Each section is part of | 135 | All memory blocks have their device information in sysfs. Each memory block |
| 130 | a memory block under /sys/devices/system/memory as | 136 | is described under /sys/devices/system/memory as |
| 131 | 137 | ||
| 132 | /sys/devices/system/memory/memoryXXX | 138 | /sys/devices/system/memory/memoryXXX |
| 133 | (XXX is the section id.) | 139 | (XXX is the memory block id.) |
| 134 | 140 | ||
| 135 | Now, XXX is defined as (start_address_of_section / section_size) of the first | 141 | For the memory block covered by the sysfs directory. It is expected that all |
| 136 | section contained in the memory block. The files 'phys_index' and | ||
| 137 | 'end_phys_index' under each directory report the beginning and end section id's | ||
| 138 | for the memory block covered by the sysfs directory. It is expected that all | ||
| 139 | memory sections in this range are present and no memory holes exist in the | 142 | memory sections in this range are present and no memory holes exist in the |
| 140 | range. Currently there is no way to determine if there is a memory hole, but | 143 | range. Currently there is no way to determine if there is a memory hole, but |
| 141 | the existence of one should not affect the hotplug capabilities of the memory | 144 | the existence of one should not affect the hotplug capabilities of the memory |
| 142 | block. | 145 | block. |
| 143 | 146 | ||
| 144 | For example, assume 1GiB section size. A device for a memory starting at | 147 | For example, assume 1GiB memory block size. A device for a memory starting at |
| 145 | 0x100000000 is /sys/device/system/memory/memory4 | 148 | 0x100000000 is /sys/device/system/memory/memory4 |
| 146 | (0x100000000 / 1Gib = 4) | 149 | (0x100000000 / 1Gib = 4) |
| 147 | This device covers address range [0x100000000 ... 0x140000000) | 150 | This device covers address range [0x100000000 ... 0x140000000) |
| 148 | 151 | ||
| 149 | Under each section, you can see 4 or 5 files, the end_phys_index file being | 152 | Under each memory block, you can see 4 files: |
| 150 | a recent addition and not present on older kernels. | ||
| 151 | 153 | ||
| 152 | /sys/devices/system/memory/memoryXXX/start_phys_index | 154 | /sys/devices/system/memory/memoryXXX/phys_index |
| 153 | /sys/devices/system/memory/memoryXXX/end_phys_index | ||
| 154 | /sys/devices/system/memory/memoryXXX/phys_device | 155 | /sys/devices/system/memory/memoryXXX/phys_device |
| 155 | /sys/devices/system/memory/memoryXXX/state | 156 | /sys/devices/system/memory/memoryXXX/state |
| 156 | /sys/devices/system/memory/memoryXXX/removable | 157 | /sys/devices/system/memory/memoryXXX/removable |
| 157 | 158 | ||
| 158 | 'phys_index' : read-only and contains section id of the first section | 159 | 'phys_index' : read-only and contains memory block id, same as XXX. |
| 159 | in the memory block, same as XXX. | ||
| 160 | 'end_phys_index' : read-only and contains section id of the last section | ||
| 161 | in the memory block. | ||
| 162 | 'state' : read-write | 160 | 'state' : read-write |
| 163 | at read: contains online/offline state of memory. | 161 | at read: contains online/offline state of memory. |
| 164 | at write: user can specify "online_kernel", | 162 | at write: user can specify "online_kernel", |
| @@ -185,6 +183,7 @@ For example: | |||
| 185 | A backlink will also be created: | 183 | A backlink will also be created: |
| 186 | /sys/devices/system/memory/memory9/node0 -> ../../node/node0 | 184 | /sys/devices/system/memory/memory9/node0 -> ../../node/node0 |
| 187 | 185 | ||
| 186 | |||
| 188 | -------------------------------- | 187 | -------------------------------- |
| 189 | 4. Physical memory hot-add phase | 188 | 4. Physical memory hot-add phase |
| 190 | -------------------------------- | 189 | -------------------------------- |
| @@ -227,11 +226,10 @@ You can tell the physical address of new memory to the kernel by | |||
| 227 | 226 | ||
| 228 | % echo start_address_of_new_memory > /sys/devices/system/memory/probe | 227 | % echo start_address_of_new_memory > /sys/devices/system/memory/probe |
| 229 | 228 | ||
| 230 | Then, [start_address_of_new_memory, start_address_of_new_memory + section_size) | 229 | Then, [start_address_of_new_memory, start_address_of_new_memory + |
| 231 | memory range is hot-added. In this case, hotplug script is not called (in | 230 | memory_block_size] memory range is hot-added. In this case, hotplug script is |
| 232 | current implementation). You'll have to online memory by yourself. | 231 | not called (in current implementation). You'll have to online memory by |
| 233 | Please see "How to online memory" in this text. | 232 | yourself. Please see "How to online memory" in this text. |
| 234 | |||
| 235 | 233 | ||
| 236 | 234 | ||
| 237 | ------------------------------ | 235 | ------------------------------ |
| @@ -240,36 +238,36 @@ Please see "How to online memory" in this text. | |||
| 240 | 238 | ||
| 241 | 5.1. State of memory | 239 | 5.1. State of memory |
| 242 | ------------ | 240 | ------------ |
| 243 | To see (online/offline) state of memory section, read 'state' file. | 241 | To see (online/offline) state of a memory block, read 'state' file. |
| 244 | 242 | ||
| 245 | % cat /sys/device/system/memory/memoryXXX/state | 243 | % cat /sys/device/system/memory/memoryXXX/state |
| 246 | 244 | ||
| 247 | 245 | ||
| 248 | If the memory section is online, you'll read "online". | 246 | If the memory block is online, you'll read "online". |
| 249 | If the memory section is offline, you'll read "offline". | 247 | If the memory block is offline, you'll read "offline". |
| 250 | 248 | ||
| 251 | 249 | ||
| 252 | 5.2. How to online memory | 250 | 5.2. How to online memory |
| 253 | ------------ | 251 | ------------ |
| 254 | Even if the memory is hot-added, it is not at ready-to-use state. | 252 | Even if the memory is hot-added, it is not at ready-to-use state. |
| 255 | For using newly added memory, you have to "online" the memory section. | 253 | For using newly added memory, you have to "online" the memory block. |
| 256 | 254 | ||
| 257 | For onlining, you have to write "online" to the section's state file as: | 255 | For onlining, you have to write "online" to the memory block's state file as: |
| 258 | 256 | ||
| 259 | % echo online > /sys/devices/system/memory/memoryXXX/state | 257 | % echo online > /sys/devices/system/memory/memoryXXX/state |
| 260 | 258 | ||
| 261 | This onlining will not change the ZONE type of the target memory section, | 259 | This onlining will not change the ZONE type of the target memory block, |
| 262 | If the memory section is in ZONE_NORMAL, you can change it to ZONE_MOVABLE: | 260 | If the memory block is in ZONE_NORMAL, you can change it to ZONE_MOVABLE: |
| 263 | 261 | ||
| 264 | % echo online_movable > /sys/devices/system/memory/memoryXXX/state | 262 | % echo online_movable > /sys/devices/system/memory/memoryXXX/state |
| 265 | (NOTE: current limit: this memory section must be adjacent to ZONE_MOVABLE) | 263 | (NOTE: current limit: this memory block must be adjacent to ZONE_MOVABLE) |
| 266 | 264 | ||
| 267 | And if the memory section is in ZONE_MOVABLE, you can change it to ZONE_NORMAL: | 265 | And if the memory block is in ZONE_MOVABLE, you can change it to ZONE_NORMAL: |
| 268 | 266 | ||
| 269 | % echo online_kernel > /sys/devices/system/memory/memoryXXX/state | 267 | % echo online_kernel > /sys/devices/system/memory/memoryXXX/state |
| 270 | (NOTE: current limit: this memory section must be adjacent to ZONE_NORMAL) | 268 | (NOTE: current limit: this memory block must be adjacent to ZONE_NORMAL) |
| 271 | 269 | ||
| 272 | After this, section memoryXXX's state will be 'online' and the amount of | 270 | After this, memory block XXX's state will be 'online' and the amount of |
| 273 | available memory will be increased. | 271 | available memory will be increased. |
| 274 | 272 | ||
| 275 | Currently, newly added memory is added as ZONE_NORMAL (for powerpc, ZONE_DMA). | 273 | Currently, newly added memory is added as ZONE_NORMAL (for powerpc, ZONE_DMA). |
| @@ -284,22 +282,22 @@ This may be changed in future. | |||
| 284 | 6.1 Memory offline and ZONE_MOVABLE | 282 | 6.1 Memory offline and ZONE_MOVABLE |
| 285 | ------------ | 283 | ------------ |
| 286 | Memory offlining is more complicated than memory online. Because memory offline | 284 | Memory offlining is more complicated than memory online. Because memory offline |
| 287 | has to make the whole memory section be unused, memory offline can fail if | 285 | has to make the whole memory block be unused, memory offline can fail if |
| 288 | the section includes memory which cannot be freed. | 286 | the memory block includes memory which cannot be freed. |
| 289 | 287 | ||
| 290 | In general, memory offline can use 2 techniques. | 288 | In general, memory offline can use 2 techniques. |
| 291 | 289 | ||
| 292 | (1) reclaim and free all memory in the section. | 290 | (1) reclaim and free all memory in the memory block. |
| 293 | (2) migrate all pages in the section. | 291 | (2) migrate all pages in the memory block. |
| 294 | 292 | ||
| 295 | In the current implementation, Linux's memory offline uses method (2), freeing | 293 | In the current implementation, Linux's memory offline uses method (2), freeing |
| 296 | all pages in the section by page migration. But not all pages are | 294 | all pages in the memory block by page migration. But not all pages are |
| 297 | migratable. Under current Linux, migratable pages are anonymous pages and | 295 | migratable. Under current Linux, migratable pages are anonymous pages and |
| 298 | page caches. For offlining a section by migration, the kernel has to guarantee | 296 | page caches. For offlining a memory block by migration, the kernel has to |
| 299 | that the section contains only migratable pages. | 297 | guarantee that the memory block contains only migratable pages. |
| 300 | 298 | ||
| 301 | Now, a boot option for making a section which consists of migratable pages is | 299 | Now, a boot option for making a memory block which consists of migratable pages |
| 302 | supported. By specifying "kernelcore=" or "movablecore=" boot option, you can | 300 | is supported. By specifying "kernelcore=" or "movablecore=" boot option, you can |
| 303 | create ZONE_MOVABLE...a zone which is just used for movable pages. | 301 | create ZONE_MOVABLE...a zone which is just used for movable pages. |
| 304 | (See also Documentation/kernel-parameters.txt) | 302 | (See also Documentation/kernel-parameters.txt) |
| 305 | 303 | ||
| @@ -315,28 +313,27 @@ creates ZONE_MOVABLE as following. | |||
| 315 | Size of memory for movable pages (for offline) is ZZZZ. | 313 | Size of memory for movable pages (for offline) is ZZZZ. |
| 316 | 314 | ||
| 317 | 315 | ||
| 318 | Note) Unfortunately, there is no information to show which section belongs | 316 | Note: Unfortunately, there is no information to show which memory block belongs |
| 319 | to ZONE_MOVABLE. This is TBD. | 317 | to ZONE_MOVABLE. This is TBD. |
| 320 | 318 | ||
| 321 | 319 | ||
| 322 | 6.2. How to offline memory | 320 | 6.2. How to offline memory |
| 323 | ------------ | 321 | ------------ |
| 324 | You can offline a section by using the same sysfs interface that was used in | 322 | You can offline a memory block by using the same sysfs interface that was used |
| 325 | memory onlining. | 323 | in memory onlining. |
| 326 | 324 | ||
| 327 | % echo offline > /sys/devices/system/memory/memoryXXX/state | 325 | % echo offline > /sys/devices/system/memory/memoryXXX/state |
| 328 | 326 | ||
| 329 | If offline succeeds, the state of the memory section is changed to be "offline". | 327 | If offline succeeds, the state of the memory block is changed to be "offline". |
| 330 | If it fails, some error core (like -EBUSY) will be returned by the kernel. | 328 | If it fails, some error core (like -EBUSY) will be returned by the kernel. |
| 331 | Even if a section does not belong to ZONE_MOVABLE, you can try to offline it. | 329 | Even if a memory block does not belong to ZONE_MOVABLE, you can try to offline |
| 332 | If it doesn't contain 'unmovable' memory, you'll get success. | 330 | it. If it doesn't contain 'unmovable' memory, you'll get success. |
| 333 | 331 | ||
| 334 | A section under ZONE_MOVABLE is considered to be able to be offlined easily. | 332 | A memory block under ZONE_MOVABLE is considered to be able to be offlined |
| 335 | But under some busy state, it may return -EBUSY. Even if a memory section | 333 | easily. But under some busy state, it may return -EBUSY. Even if a memory |
| 336 | cannot be offlined due to -EBUSY, you can retry offlining it and may be able to | 334 | block cannot be offlined due to -EBUSY, you can retry offlining it and may be |
| 337 | offline it (or not). | 335 | able to offline it (or not). (For example, a page is referred to by some kernel |
| 338 | (For example, a page is referred to by some kernel internal call and released | 336 | internal call and released soon.) |
| 339 | soon.) | ||
| 340 | 337 | ||
| 341 | Consideration: | 338 | Consideration: |
| 342 | Memory hotplug's design direction is to make the possibility of memory offlining | 339 | Memory hotplug's design direction is to make the possibility of memory offlining |
| @@ -373,11 +370,11 @@ MEMORY_GOING_OFFLINE | |||
| 373 | Generated to begin the process of offlining memory. Allocations are no | 370 | Generated to begin the process of offlining memory. Allocations are no |
| 374 | longer possible from the memory but some of the memory to be offlined | 371 | longer possible from the memory but some of the memory to be offlined |
| 375 | is still in use. The callback can be used to free memory known to a | 372 | is still in use. The callback can be used to free memory known to a |
| 376 | subsystem from the indicated memory section. | 373 | subsystem from the indicated memory block. |
| 377 | 374 | ||
| 378 | MEMORY_CANCEL_OFFLINE | 375 | MEMORY_CANCEL_OFFLINE |
| 379 | Generated if MEMORY_GOING_OFFLINE fails. Memory is available again from | 376 | Generated if MEMORY_GOING_OFFLINE fails. Memory is available again from |
| 380 | the section that we attempted to offline. | 377 | the memory block that we attempted to offline. |
| 381 | 378 | ||
| 382 | MEMORY_OFFLINE | 379 | MEMORY_OFFLINE |
| 383 | Generated after offlining memory is complete. | 380 | Generated after offlining memory is complete. |
| @@ -413,8 +410,8 @@ node if necessary. | |||
| 413 | -------------- | 410 | -------------- |
| 414 | - allowing memory hot-add to ZONE_MOVABLE. maybe we need some switch like | 411 | - allowing memory hot-add to ZONE_MOVABLE. maybe we need some switch like |
| 415 | sysctl or new control file. | 412 | sysctl or new control file. |
| 416 | - showing memory section and physical device relationship. | 413 | - showing memory block and physical device relationship. |
| 417 | - showing memory section is under ZONE_MOVABLE or not | 414 | - showing memory block is under ZONE_MOVABLE or not |
| 418 | - test and make it better memory offlining. | 415 | - test and make it better memory offlining. |
| 419 | - support HugeTLB page migration and offlining. | 416 | - support HugeTLB page migration and offlining. |
| 420 | - memmap removing at memory offline. | 417 | - memmap removing at memory offline. |
diff --git a/Documentation/mtd/nand/pxa3xx-nand.txt b/Documentation/mtd/nand/pxa3xx-nand.txt index 840fd41c181b..1074cbc67ec6 100644 --- a/Documentation/mtd/nand/pxa3xx-nand.txt +++ b/Documentation/mtd/nand/pxa3xx-nand.txt | |||
| @@ -48,7 +48,7 @@ configurable between two modes: 1) Hamming, 2) BCH. | |||
| 48 | Note that the actual BCH mode: BCH-4 or BCH-8 will depend on the way | 48 | Note that the actual BCH mode: BCH-4 or BCH-8 will depend on the way |
| 49 | the controller is configured to transfer the data. | 49 | the controller is configured to transfer the data. |
| 50 | 50 | ||
| 51 | In the BCH mode the ECC code will be calculated for each transfered chunk | 51 | In the BCH mode the ECC code will be calculated for each transferred chunk |
| 52 | and expected to be located (when reading/programming) right after the spare | 52 | and expected to be located (when reading/programming) right after the spare |
| 53 | bytes as the figure above shows. | 53 | bytes as the figure above shows. |
| 54 | 54 | ||
diff --git a/Documentation/mtd/spi-nor.txt b/Documentation/mtd/spi-nor.txt new file mode 100644 index 000000000000..548d6306ebca --- /dev/null +++ b/Documentation/mtd/spi-nor.txt | |||
| @@ -0,0 +1,62 @@ | |||
| 1 | SPI NOR framework | ||
| 2 | ============================================ | ||
| 3 | |||
| 4 | Part I - Why do we need this framework? | ||
| 5 | --------------------------------------- | ||
| 6 | |||
| 7 | SPI bus controllers (drivers/spi/) only deal with streams of bytes; the bus | ||
| 8 | controller operates agnostic of the specific device attached. However, some | ||
| 9 | controllers (such as Freescale's QuadSPI controller) cannot easily handle | ||
| 10 | arbitrary streams of bytes, but rather are designed specifically for SPI NOR. | ||
| 11 | |||
| 12 | In particular, Freescale's QuadSPI controller must know the NOR commands to | ||
| 13 | find the right LUT sequence. Unfortunately, the SPI subsystem has no notion of | ||
| 14 | opcodes, addresses, or data payloads; a SPI controller simply knows to send or | ||
| 15 | receive bytes (Tx and Rx). Therefore, we must define a new layering scheme under | ||
| 16 | which the controller driver is aware of the opcodes, addressing, and other | ||
| 17 | details of the SPI NOR protocol. | ||
| 18 | |||
| 19 | Part II - How does the framework work? | ||
| 20 | -------------------------------------- | ||
| 21 | |||
| 22 | This framework just adds a new layer between the MTD and the SPI bus driver. | ||
| 23 | With this new layer, the SPI NOR controller driver does not depend on the | ||
| 24 | m25p80 code anymore. | ||
| 25 | |||
| 26 | Before this framework, the layer is like: | ||
| 27 | |||
| 28 | MTD | ||
| 29 | ------------------------ | ||
| 30 | m25p80 | ||
| 31 | ------------------------ | ||
| 32 | SPI bus driver | ||
| 33 | ------------------------ | ||
| 34 | SPI NOR chip | ||
| 35 | |||
| 36 | After this framework, the layer is like: | ||
| 37 | MTD | ||
| 38 | ------------------------ | ||
| 39 | SPI NOR framework | ||
| 40 | ------------------------ | ||
| 41 | m25p80 | ||
| 42 | ------------------------ | ||
| 43 | SPI bus driver | ||
| 44 | ------------------------ | ||
| 45 | SPI NOR chip | ||
| 46 | |||
| 47 | With the SPI NOR controller driver (Freescale QuadSPI), it looks like: | ||
| 48 | MTD | ||
| 49 | ------------------------ | ||
| 50 | SPI NOR framework | ||
| 51 | ------------------------ | ||
| 52 | fsl-quadSPI | ||
| 53 | ------------------------ | ||
| 54 | SPI NOR chip | ||
| 55 | |||
| 56 | Part III - How can drivers use the framework? | ||
| 57 | --------------------------------------------- | ||
| 58 | |||
| 59 | The main API is spi_nor_scan(). Before you call the hook, a driver should | ||
| 60 | initialize the necessary fields for spi_nor{}. Please see | ||
| 61 | drivers/mtd/spi-nor/spi-nor.c for detail. Please also refer to fsl-quadspi.c | ||
| 62 | when you want to write a new driver for a SPI NOR controller. | ||
diff --git a/Documentation/mutex-design.txt b/Documentation/mutex-design.txt index 1dfe62c3641d..ee231ed09ec6 100644 --- a/Documentation/mutex-design.txt +++ b/Documentation/mutex-design.txt | |||
| @@ -1,139 +1,157 @@ | |||
| 1 | Generic Mutex Subsystem | 1 | Generic Mutex Subsystem |
| 2 | 2 | ||
| 3 | started by Ingo Molnar <mingo@redhat.com> | 3 | started by Ingo Molnar <mingo@redhat.com> |
| 4 | updated by Davidlohr Bueso <davidlohr@hp.com> | ||
| 4 | 5 | ||
| 5 | "Why on earth do we need a new mutex subsystem, and what's wrong | 6 | What are mutexes? |
| 6 | with semaphores?" | 7 | ----------------- |
| 7 | 8 | ||
| 8 | firstly, there's nothing wrong with semaphores. But if the simpler | 9 | In the Linux kernel, mutexes refer to a particular locking primitive |
| 9 | mutex semantics are sufficient for your code, then there are a couple | 10 | that enforces serialization on shared memory systems, and not only to |
| 10 | of advantages of mutexes: | 11 | the generic term referring to 'mutual exclusion' found in academia |
| 12 | or similar theoretical text books. Mutexes are sleeping locks which | ||
| 13 | behave similarly to binary semaphores, and were introduced in 2006[1] | ||
| 14 | as an alternative to these. This new data structure provided a number | ||
| 15 | of advantages, including simpler interfaces, and at that time smaller | ||
| 16 | code (see Disadvantages). | ||
| 11 | 17 | ||
| 12 | - 'struct mutex' is smaller on most architectures: E.g. on x86, | 18 | [1] http://lwn.net/Articles/164802/ |
| 13 | 'struct semaphore' is 20 bytes, 'struct mutex' is 16 bytes. | ||
| 14 | A smaller structure size means less RAM footprint, and better | ||
| 15 | CPU-cache utilization. | ||
| 16 | 19 | ||
| 17 | - tighter code. On x86 i get the following .text sizes when | 20 | Implementation |
| 18 | switching all mutex-alike semaphores in the kernel to the mutex | 21 | -------------- |
| 19 | subsystem: | ||
| 20 | 22 | ||
| 21 | text data bss dec hex filename | 23 | Mutexes are represented by 'struct mutex', defined in include/linux/mutex.h |
| 22 | 3280380 868188 396860 4545428 455b94 vmlinux-semaphore | 24 | and implemented in kernel/locking/mutex.c. These locks use a three |
| 23 | 3255329 865296 396732 4517357 44eded vmlinux-mutex | 25 | state atomic counter (->count) to represent the different possible |
| 26 | transitions that can occur during the lifetime of a lock: | ||
| 24 | 27 | ||
| 25 | that's 25051 bytes of code saved, or a 0.76% win - off the hottest | 28 | 1: unlocked |
| 26 | codepaths of the kernel. (The .data savings are 2892 bytes, or 0.33%) | 29 | 0: locked, no waiters |
| 27 | Smaller code means better icache footprint, which is one of the | 30 | negative: locked, with potential waiters |
| 28 | major optimization goals in the Linux kernel currently. | ||
| 29 | 31 | ||
| 30 | - the mutex subsystem is slightly faster and has better scalability for | 32 | In its most basic form it also includes a wait-queue and a spinlock |
| 31 | contended workloads. On an 8-way x86 system, running a mutex-based | 33 | that serializes access to it. CONFIG_SMP systems can also include |
| 32 | kernel and testing creat+unlink+close (of separate, per-task files) | 34 | a pointer to the lock task owner (->owner) as well as a spinner MCS |
| 33 | in /tmp with 16 parallel tasks, the average number of ops/sec is: | 35 | lock (->osq), both described below in (ii). |
| 34 | 36 | ||
| 35 | Semaphores: Mutexes: | 37 | When acquiring a mutex, there are three possible paths that can be |
| 38 | taken, depending on the state of the lock: | ||
| 36 | 39 | ||
| 37 | $ ./test-mutex V 16 10 $ ./test-mutex V 16 10 | 40 | (i) fastpath: tries to atomically acquire the lock by decrementing the |
| 38 | 8 CPUs, running 16 tasks. 8 CPUs, running 16 tasks. | 41 | counter. If it was already taken by another task it goes to the next |
| 39 | checking VFS performance. checking VFS performance. | 42 | possible path. This logic is architecture specific. On x86-64, the |
| 40 | avg loops/sec: 34713 avg loops/sec: 84153 | 43 | locking fastpath is 2 instructions: |
| 41 | CPU utilization: 63% CPU utilization: 22% | ||
| 42 | 44 | ||
| 43 | i.e. in this workload, the mutex based kernel was 2.4 times faster | 45 | 0000000000000e10 <mutex_lock>: |
| 44 | than the semaphore based kernel, _and_ it also had 2.8 times less CPU | 46 | e21: f0 ff 0b lock decl (%rbx) |
| 45 | utilization. (In terms of 'ops per CPU cycle', the semaphore kernel | 47 | e24: 79 08 jns e2e <mutex_lock+0x1e> |
| 46 | performed 551 ops/sec per 1% of CPU time used, while the mutex kernel | ||
| 47 | performed 3825 ops/sec per 1% of CPU time used - it was 6.9 times | ||
| 48 | more efficient.) | ||
| 49 | |||
| 50 | the scalability difference is visible even on a 2-way P4 HT box: | ||
| 51 | |||
| 52 | Semaphores: Mutexes: | ||
| 53 | |||
| 54 | $ ./test-mutex V 16 10 $ ./test-mutex V 16 10 | ||
| 55 | 4 CPUs, running 16 tasks. 8 CPUs, running 16 tasks. | ||
| 56 | checking VFS performance. checking VFS performance. | ||
| 57 | avg loops/sec: 127659 avg loops/sec: 181082 | ||
| 58 | CPU utilization: 100% CPU utilization: 34% | ||
| 59 | |||
| 60 | (the straight performance advantage of mutexes is 41%, the per-cycle | ||
| 61 | efficiency of mutexes is 4.1 times better.) | ||
| 62 | |||
| 63 | - there are no fastpath tradeoffs, the mutex fastpath is just as tight | ||
| 64 | as the semaphore fastpath. On x86, the locking fastpath is 2 | ||
| 65 | instructions: | ||
| 66 | |||
| 67 | c0377ccb <mutex_lock>: | ||
| 68 | c0377ccb: f0 ff 08 lock decl (%eax) | ||
| 69 | c0377cce: 78 0e js c0377cde <.text..lock.mutex> | ||
| 70 | c0377cd0: c3 ret | ||
| 71 | 48 | ||
| 72 | the unlocking fastpath is equally tight: | 49 | the unlocking fastpath is equally tight: |
| 73 | 50 | ||
| 74 | c0377cd1 <mutex_unlock>: | 51 | 0000000000000bc0 <mutex_unlock>: |
| 75 | c0377cd1: f0 ff 00 lock incl (%eax) | 52 | bc8: f0 ff 07 lock incl (%rdi) |
| 76 | c0377cd4: 7e 0f jle c0377ce5 <.text..lock.mutex+0x7> | 53 | bcb: 7f 0a jg bd7 <mutex_unlock+0x17> |
| 77 | c0377cd6: c3 ret | 54 | |
| 78 | 55 | ||
| 79 | - 'struct mutex' semantics are well-defined and are enforced if | 56 | (ii) midpath: aka optimistic spinning, tries to spin for acquisition |
| 80 | CONFIG_DEBUG_MUTEXES is turned on. Semaphores on the other hand have | 57 | while the lock owner is running and there are no other tasks ready |
| 81 | virtually no debugging code or instrumentation. The mutex subsystem | 58 | to run that have higher priority (need_resched). The rationale is |
| 82 | checks and enforces the following rules: | 59 | that if the lock owner is running, it is likely to release the lock |
| 83 | 60 | soon. The mutex spinners are queued up using MCS lock so that only | |
| 84 | * - only one task can hold the mutex at a time | 61 | one spinner can compete for the mutex. |
| 85 | * - only the owner can unlock the mutex | 62 | |
| 86 | * - multiple unlocks are not permitted | 63 | The MCS lock (proposed by Mellor-Crummey and Scott) is a simple spinlock |
| 87 | * - recursive locking is not permitted | 64 | with the desirable properties of being fair and with each cpu trying |
| 88 | * - a mutex object must be initialized via the API | 65 | to acquire the lock spinning on a local variable. It avoids expensive |
| 89 | * - a mutex object must not be initialized via memset or copying | 66 | cacheline bouncing that common test-and-set spinlock implementations |
| 90 | * - task may not exit with mutex held | 67 | incur. An MCS-like lock is specially tailored for optimistic spinning |
| 91 | * - memory areas where held locks reside must not be freed | 68 | for sleeping lock implementation. An important feature of the customized |
| 92 | * - held mutexes must not be reinitialized | 69 | MCS lock is that it has the extra property that spinners are able to exit |
| 93 | * - mutexes may not be used in hardware or software interrupt | 70 | the MCS spinlock queue when they need to reschedule. This further helps |
| 94 | * contexts such as tasklets and timers | 71 | avoid situations where MCS spinners that need to reschedule would continue |
| 95 | 72 | waiting to spin on mutex owner, only to go directly to slowpath upon | |
| 96 | furthermore, there are also convenience features in the debugging | 73 | obtaining the MCS lock. |
| 97 | code: | 74 | |
| 98 | 75 | ||
| 99 | * - uses symbolic names of mutexes, whenever they are printed in debug output | 76 | (iii) slowpath: last resort, if the lock is still unable to be acquired, |
| 100 | * - point-of-acquire tracking, symbolic lookup of function names | 77 | the task is added to the wait-queue and sleeps until woken up by the |
| 101 | * - list of all locks held in the system, printout of them | 78 | unlock path. Under normal circumstances it blocks as TASK_UNINTERRUPTIBLE. |
| 102 | * - owner tracking | 79 | |
| 103 | * - detects self-recursing locks and prints out all relevant info | 80 | While formally kernel mutexes are sleepable locks, it is path (ii) that |
| 104 | * - detects multi-task circular deadlocks and prints out all affected | 81 | makes them more practically a hybrid type. By simply not interrupting a |
| 105 | * locks and tasks (and only those tasks) | 82 | task and busy-waiting for a few cycles instead of immediately sleeping, |
| 83 | the performance of this lock has been seen to significantly improve a | ||
| 84 | number of workloads. Note that this technique is also used for rw-semaphores. | ||
| 85 | |||
| 86 | Semantics | ||
| 87 | --------- | ||
| 88 | |||
| 89 | The mutex subsystem checks and enforces the following rules: | ||
| 90 | |||
| 91 | - Only one task can hold the mutex at a time. | ||
| 92 | - Only the owner can unlock the mutex. | ||
| 93 | - Multiple unlocks are not permitted. | ||
| 94 | - Recursive locking/unlocking is not permitted. | ||
| 95 | - A mutex must only be initialized via the API (see below). | ||
| 96 | - A task may not exit with a mutex held. | ||
| 97 | - Memory areas where held locks reside must not be freed. | ||
| 98 | - Held mutexes must not be reinitialized. | ||
| 99 | - Mutexes may not be used in hardware or software interrupt | ||
| 100 | contexts such as tasklets and timers. | ||
| 101 | |||
| 102 | These semantics are fully enforced when CONFIG DEBUG_MUTEXES is enabled. | ||
| 103 | In addition, the mutex debugging code also implements a number of other | ||
| 104 | features that make lock debugging easier and faster: | ||
| 105 | |||
| 106 | - Uses symbolic names of mutexes, whenever they are printed | ||
| 107 | in debug output. | ||
| 108 | - Point-of-acquire tracking, symbolic lookup of function names, | ||
| 109 | list of all locks held in the system, printout of them. | ||
| 110 | - Owner tracking. | ||
| 111 | - Detects self-recursing locks and prints out all relevant info. | ||
| 112 | - Detects multi-task circular deadlocks and prints out all affected | ||
| 113 | locks and tasks (and only those tasks). | ||
| 114 | |||
| 115 | |||
| 116 | Interfaces | ||
| 117 | ---------- | ||
| 118 | Statically define the mutex: | ||
| 119 | DEFINE_MUTEX(name); | ||
| 120 | |||
| 121 | Dynamically initialize the mutex: | ||
| 122 | mutex_init(mutex); | ||
| 123 | |||
| 124 | Acquire the mutex, uninterruptible: | ||
| 125 | void mutex_lock(struct mutex *lock); | ||
| 126 | void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | ||
| 127 | int mutex_trylock(struct mutex *lock); | ||
| 128 | |||
| 129 | Acquire the mutex, interruptible: | ||
| 130 | int mutex_lock_interruptible_nested(struct mutex *lock, | ||
| 131 | unsigned int subclass); | ||
| 132 | int mutex_lock_interruptible(struct mutex *lock); | ||
| 133 | |||
| 134 | Acquire the mutex, interruptible, if dec to 0: | ||
| 135 | int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | ||
| 136 | |||
| 137 | Unlock the mutex: | ||
| 138 | void mutex_unlock(struct mutex *lock); | ||
| 139 | |||
| 140 | Test if the mutex is taken: | ||
| 141 | int mutex_is_locked(struct mutex *lock); | ||
| 106 | 142 | ||
| 107 | Disadvantages | 143 | Disadvantages |
| 108 | ------------- | 144 | ------------- |
| 109 | 145 | ||
| 110 | The stricter mutex API means you cannot use mutexes the same way you | 146 | Unlike its original design and purpose, 'struct mutex' is larger than |
| 111 | can use semaphores: e.g. they cannot be used from an interrupt context, | 147 | most locks in the kernel. E.g: on x86-64 it is 40 bytes, almost twice |
| 112 | nor can they be unlocked from a different context that which acquired | 148 | as large as 'struct semaphore' (24 bytes) and 8 bytes shy of the |
| 113 | it. [ I'm not aware of any other (e.g. performance) disadvantages from | 149 | 'struct rw_semaphore' variant. Larger structure sizes mean more CPU |
| 114 | using mutexes at the moment, please let me know if you find any. ] | 150 | cache and memory footprint. |
| 115 | |||
| 116 | Implementation of mutexes | ||
| 117 | ------------------------- | ||
| 118 | |||
| 119 | 'struct mutex' is the new mutex type, defined in include/linux/mutex.h and | ||
| 120 | implemented in kernel/locking/mutex.c. It is a counter-based mutex with a | ||
| 121 | spinlock and a wait-list. The counter has 3 states: 1 for "unlocked", 0 for | ||
| 122 | "locked" and negative numbers (usually -1) for "locked, potential waiters | ||
| 123 | queued". | ||
| 124 | |||
| 125 | the APIs of 'struct mutex' have been streamlined: | ||
| 126 | |||
| 127 | DEFINE_MUTEX(name); | ||
| 128 | 151 | ||
| 129 | mutex_init(mutex); | 152 | When to use mutexes |
| 153 | ------------------- | ||
| 130 | 154 | ||
| 131 | void mutex_lock(struct mutex *lock); | 155 | Unless the strict semantics of mutexes are unsuitable and/or the critical |
| 132 | int mutex_lock_interruptible(struct mutex *lock); | 156 | region prevents the lock from being shared, always prefer them to any other |
| 133 | int mutex_trylock(struct mutex *lock); | 157 | locking primitive. |
| 134 | void mutex_unlock(struct mutex *lock); | ||
| 135 | int mutex_is_locked(struct mutex *lock); | ||
| 136 | void mutex_lock_nested(struct mutex *lock, unsigned int subclass); | ||
| 137 | int mutex_lock_interruptible_nested(struct mutex *lock, | ||
| 138 | unsigned int subclass); | ||
| 139 | int atomic_dec_and_mutex_lock(atomic_t *cnt, struct mutex *lock); | ||
diff --git a/Documentation/networking/bonding.txt b/Documentation/networking/bonding.txt index a383c00392d0..9c723ecd0025 100644 --- a/Documentation/networking/bonding.txt +++ b/Documentation/networking/bonding.txt | |||
| @@ -585,13 +585,19 @@ mode | |||
| 585 | balance-tlb or 5 | 585 | balance-tlb or 5 |
| 586 | 586 | ||
| 587 | Adaptive transmit load balancing: channel bonding that | 587 | Adaptive transmit load balancing: channel bonding that |
| 588 | does not require any special switch support. The | 588 | does not require any special switch support. |
| 589 | outgoing traffic is distributed according to the | 589 | |
| 590 | current load (computed relative to the speed) on each | 590 | In tlb_dynamic_lb=1 mode; the outgoing traffic is |
| 591 | slave. Incoming traffic is received by the current | 591 | distributed according to the current load (computed |
| 592 | slave. If the receiving slave fails, another slave | 592 | relative to the speed) on each slave. |
| 593 | takes over the MAC address of the failed receiving | 593 | |
| 594 | slave. | 594 | In tlb_dynamic_lb=0 mode; the load balancing based on |
| 595 | current load is disabled and the load is distributed | ||
| 596 | only using the hash distribution. | ||
| 597 | |||
| 598 | Incoming traffic is received by the current slave. | ||
| 599 | If the receiving slave fails, another slave takes over | ||
| 600 | the MAC address of the failed receiving slave. | ||
| 595 | 601 | ||
| 596 | Prerequisite: | 602 | Prerequisite: |
| 597 | 603 | ||
| @@ -736,6 +742,28 @@ primary_reselect | |||
| 736 | 742 | ||
| 737 | This option was added for bonding version 3.6.0. | 743 | This option was added for bonding version 3.6.0. |
| 738 | 744 | ||
| 745 | tlb_dynamic_lb | ||
| 746 | |||
| 747 | Specifies if dynamic shuffling of flows is enabled in tlb | ||
| 748 | mode. The value has no effect on any other modes. | ||
| 749 | |||
| 750 | The default behavior of tlb mode is to shuffle active flows across | ||
| 751 | slaves based on the load in that interval. This gives nice lb | ||
| 752 | characteristics but can cause packet reordering. If re-ordering is | ||
| 753 | a concern use this variable to disable flow shuffling and rely on | ||
| 754 | load balancing provided solely by the hash distribution. | ||
| 755 | xmit-hash-policy can be used to select the appropriate hashing for | ||
| 756 | the setup. | ||
| 757 | |||
| 758 | The sysfs entry can be used to change the setting per bond device | ||
| 759 | and the initial value is derived from the module parameter. The | ||
| 760 | sysfs entry is allowed to be changed only if the bond device is | ||
| 761 | down. | ||
| 762 | |||
| 763 | The default value is "1" that enables flow shuffling while value "0" | ||
| 764 | disables it. This option was added in bonding driver 3.7.1 | ||
| 765 | |||
| 766 | |||
| 739 | updelay | 767 | updelay |
| 740 | 768 | ||
| 741 | Specifies the time, in milliseconds, to wait before enabling a | 769 | Specifies the time, in milliseconds, to wait before enabling a |
| @@ -769,7 +797,7 @@ use_carrier | |||
| 769 | xmit_hash_policy | 797 | xmit_hash_policy |
| 770 | 798 | ||
| 771 | Selects the transmit hash policy to use for slave selection in | 799 | Selects the transmit hash policy to use for slave selection in |
| 772 | balance-xor and 802.3ad modes. Possible values are: | 800 | balance-xor, 802.3ad, and tlb modes. Possible values are: |
| 773 | 801 | ||
| 774 | layer2 | 802 | layer2 |
| 775 | 803 | ||
diff --git a/Documentation/networking/can.txt b/Documentation/networking/can.txt index 2fa44cbe81b7..2236d6dcb7da 100644 --- a/Documentation/networking/can.txt +++ b/Documentation/networking/can.txt | |||
| @@ -469,6 +469,41 @@ solution for a couple of reasons: | |||
| 469 | having this 'send only' use-case we may remove the receive list in the | 469 | having this 'send only' use-case we may remove the receive list in the |
| 470 | Kernel to save a little (really a very little!) CPU usage. | 470 | Kernel to save a little (really a very little!) CPU usage. |
| 471 | 471 | ||
| 472 | 4.1.1.1 CAN filter usage optimisation | ||
| 473 | |||
| 474 | The CAN filters are processed in per-device filter lists at CAN frame | ||
| 475 | reception time. To reduce the number of checks that need to be performed | ||
| 476 | while walking through the filter lists the CAN core provides an optimized | ||
| 477 | filter handling when the filter subscription focusses on a single CAN ID. | ||
| 478 | |||
| 479 | For the possible 2048 SFF CAN identifiers the identifier is used as an index | ||
| 480 | to access the corresponding subscription list without any further checks. | ||
| 481 | For the 2^29 possible EFF CAN identifiers a 10 bit XOR folding is used as | ||
| 482 | hash function to retrieve the EFF table index. | ||
| 483 | |||
| 484 | To benefit from the optimized filters for single CAN identifiers the | ||
| 485 | CAN_SFF_MASK or CAN_EFF_MASK have to be set into can_filter.mask together | ||
| 486 | with set CAN_EFF_FLAG and CAN_RTR_FLAG bits. A set CAN_EFF_FLAG bit in the | ||
| 487 | can_filter.mask makes clear that it matters whether a SFF or EFF CAN ID is | ||
| 488 | subscribed. E.g. in the example from above | ||
| 489 | |||
| 490 | rfilter[0].can_id = 0x123; | ||
| 491 | rfilter[0].can_mask = CAN_SFF_MASK; | ||
| 492 | |||
| 493 | both SFF frames with CAN ID 0x123 and EFF frames with 0xXXXXX123 can pass. | ||
| 494 | |||
| 495 | To filter for only 0x123 (SFF) and 0x12345678 (EFF) CAN identifiers the | ||
| 496 | filter has to be defined in this way to benefit from the optimized filters: | ||
| 497 | |||
| 498 | struct can_filter rfilter[2]; | ||
| 499 | |||
| 500 | rfilter[0].can_id = 0x123; | ||
| 501 | rfilter[0].can_mask = (CAN_EFF_FLAG | CAN_RTR_FLAG | CAN_SFF_MASK); | ||
| 502 | rfilter[1].can_id = 0x12345678 | CAN_EFF_FLAG; | ||
| 503 | rfilter[1].can_mask = (CAN_EFF_FLAG | CAN_RTR_FLAG | CAN_EFF_MASK); | ||
| 504 | |||
| 505 | setsockopt(s, SOL_CAN_RAW, CAN_RAW_FILTER, &rfilter, sizeof(rfilter)); | ||
| 506 | |||
| 472 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER | 507 | 4.1.2 RAW socket option CAN_RAW_ERR_FILTER |
| 473 | 508 | ||
| 474 | As described in chapter 3.4 the CAN interface driver can generate so | 509 | As described in chapter 3.4 the CAN interface driver can generate so |
| @@ -706,7 +741,7 @@ solution for a couple of reasons: | |||
| 706 | 741 | ||
| 707 | RX_NO_AUTOTIMER: Prevent automatically starting the timeout monitor. | 742 | RX_NO_AUTOTIMER: Prevent automatically starting the timeout monitor. |
| 708 | 743 | ||
| 709 | RX_ANNOUNCE_RESUME: If passed at RX_SETUP and a receive timeout occured, a | 744 | RX_ANNOUNCE_RESUME: If passed at RX_SETUP and a receive timeout occurred, a |
| 710 | RX_CHANGED message will be generated when the (cyclic) receive restarts. | 745 | RX_CHANGED message will be generated when the (cyclic) receive restarts. |
| 711 | 746 | ||
| 712 | TX_RESET_MULTI_IDX: Reset the index for the multiple frame transmission. | 747 | TX_RESET_MULTI_IDX: Reset the index for the multiple frame transmission. |
diff --git a/Documentation/networking/cdc_mbim.txt b/Documentation/networking/cdc_mbim.txt new file mode 100644 index 000000000000..a15ea602aa52 --- /dev/null +++ b/Documentation/networking/cdc_mbim.txt | |||
| @@ -0,0 +1,339 @@ | |||
| 1 | cdc_mbim - Driver for CDC MBIM Mobile Broadband modems | ||
| 2 | ======================================================== | ||
| 3 | |||
| 4 | The cdc_mbim driver supports USB devices conforming to the "Universal | ||
| 5 | Serial Bus Communications Class Subclass Specification for Mobile | ||
| 6 | Broadband Interface Model" [1], which is a further development of | ||
| 7 | "Universal Serial Bus Communications Class Subclass Specifications for | ||
| 8 | Network Control Model Devices" [2] optimized for Mobile Broadband | ||
| 9 | devices, aka "3G/LTE modems". | ||
| 10 | |||
| 11 | |||
| 12 | Command Line Parameters | ||
| 13 | ======================= | ||
| 14 | |||
| 15 | The cdc_mbim driver has no parameters of its own. But the probing | ||
| 16 | behaviour for NCM 1.0 backwards compatible MBIM functions (an | ||
| 17 | "NCM/MBIM function" as defined in section 3.2 of [1]) is affected | ||
| 18 | by a cdc_ncm driver parameter: | ||
| 19 | |||
| 20 | prefer_mbim | ||
| 21 | ----------- | ||
| 22 | Type: Boolean | ||
| 23 | Valid Range: N/Y (0-1) | ||
| 24 | Default Value: Y (MBIM is preferred) | ||
| 25 | |||
| 26 | This parameter sets the system policy for NCM/MBIM functions. Such | ||
| 27 | functions will be handled by either the cdc_ncm driver or the cdc_mbim | ||
| 28 | driver depending on the prefer_mbim setting. Setting prefer_mbim=N | ||
| 29 | makes the cdc_mbim driver ignore these functions and lets the cdc_ncm | ||
| 30 | driver handle them instead. | ||
| 31 | |||
| 32 | The parameter is writable, and can be changed at any time. A manual | ||
| 33 | unbind/bind is required to make the change effective for NCM/MBIM | ||
| 34 | functions bound to the "wrong" driver | ||
| 35 | |||
| 36 | |||
| 37 | Basic usage | ||
| 38 | =========== | ||
| 39 | |||
| 40 | MBIM functions are inactive when unmanaged. The cdc_mbim driver only | ||
| 41 | provides an userspace interface to the MBIM control channel, and will | ||
| 42 | not participate in the management of the function. This implies that a | ||
| 43 | userspace MBIM management application always is required to enable a | ||
| 44 | MBIM function. | ||
| 45 | |||
| 46 | Such userspace applications includes, but are not limited to: | ||
| 47 | - mbimcli (included with the libmbim [3] library), and | ||
| 48 | - ModemManager [4] | ||
| 49 | |||
| 50 | Establishing a MBIM IP session reequires at least these actions by the | ||
| 51 | management application: | ||
| 52 | - open the control channel | ||
| 53 | - configure network connection settings | ||
| 54 | - connect to network | ||
| 55 | - configure IP interface | ||
| 56 | |||
| 57 | Management application development | ||
| 58 | ---------------------------------- | ||
| 59 | The driver <-> userspace interfaces are described below. The MBIM | ||
| 60 | control channel protocol is described in [1]. | ||
| 61 | |||
| 62 | |||
| 63 | MBIM control channel userspace ABI | ||
| 64 | ================================== | ||
| 65 | |||
| 66 | /dev/cdc-wdmX character device | ||
| 67 | ------------------------------ | ||
| 68 | The driver creates a two-way pipe to the MBIM function control channel | ||
| 69 | using the cdc-wdm driver as a subdriver. The userspace end of the | ||
| 70 | control channel pipe is a /dev/cdc-wdmX character device. | ||
| 71 | |||
| 72 | The cdc_mbim driver does not process or police messages on the control | ||
| 73 | channel. The channel is fully delegated to the userspace management | ||
| 74 | application. It is therefore up to this application to ensure that it | ||
| 75 | complies with all the control channel requirements in [1]. | ||
| 76 | |||
| 77 | The cdc-wdmX device is created as a child of the MBIM control | ||
| 78 | interface USB device. The character device associated with a specific | ||
| 79 | MBIM function can be looked up using sysfs. For example: | ||
| 80 | |||
| 81 | bjorn@nemi:~$ ls /sys/bus/usb/drivers/cdc_mbim/2-4:2.12/usbmisc | ||
| 82 | cdc-wdm0 | ||
| 83 | |||
| 84 | bjorn@nemi:~$ grep . /sys/bus/usb/drivers/cdc_mbim/2-4:2.12/usbmisc/cdc-wdm0/dev | ||
| 85 | 180:0 | ||
| 86 | |||
| 87 | |||
| 88 | USB configuration descriptors | ||
| 89 | ----------------------------- | ||
| 90 | The wMaxControlMessage field of the CDC MBIM functional descriptor | ||
| 91 | limits the maximum control message size. The managament application is | ||
| 92 | responsible for negotiating a control message size complying with the | ||
| 93 | requirements in section 9.3.1 of [1], taking this descriptor field | ||
| 94 | into consideration. | ||
| 95 | |||
| 96 | The userspace application can access the CDC MBIM functional | ||
| 97 | descriptor of a MBIM function using either of the two USB | ||
| 98 | configuration descriptor kernel interfaces described in [6] or [7]. | ||
| 99 | |||
| 100 | See also the ioctl documentation below. | ||
| 101 | |||
| 102 | |||
| 103 | Fragmentation | ||
| 104 | ------------- | ||
| 105 | The userspace application is responsible for all control message | ||
| 106 | fragmentation and defragmentaion, as described in section 9.5 of [1]. | ||
| 107 | |||
| 108 | |||
| 109 | /dev/cdc-wdmX write() | ||
| 110 | --------------------- | ||
| 111 | The MBIM control messages from the management application *must not* | ||
| 112 | exceed the negotiated control message size. | ||
| 113 | |||
| 114 | |||
| 115 | /dev/cdc-wdmX read() | ||
| 116 | -------------------- | ||
| 117 | The management application *must* accept control messages of up the | ||
| 118 | negotiated control message size. | ||
| 119 | |||
| 120 | |||
| 121 | /dev/cdc-wdmX ioctl() | ||
| 122 | -------------------- | ||
| 123 | IOCTL_WDM_MAX_COMMAND: Get Maximum Command Size | ||
| 124 | This ioctl returns the wMaxControlMessage field of the CDC MBIM | ||
| 125 | functional descriptor for MBIM devices. This is intended as a | ||
| 126 | convenience, eliminating the need to parse the USB descriptors from | ||
| 127 | userspace. | ||
| 128 | |||
| 129 | #include <stdio.h> | ||
| 130 | #include <fcntl.h> | ||
| 131 | #include <sys/ioctl.h> | ||
| 132 | #include <linux/types.h> | ||
| 133 | #include <linux/usb/cdc-wdm.h> | ||
| 134 | int main() | ||
| 135 | { | ||
| 136 | __u16 max; | ||
| 137 | int fd = open("/dev/cdc-wdm0", O_RDWR); | ||
| 138 | if (!ioctl(fd, IOCTL_WDM_MAX_COMMAND, &max)) | ||
| 139 | printf("wMaxControlMessage is %d\n", max); | ||
| 140 | } | ||
| 141 | |||
| 142 | |||
| 143 | Custom device services | ||
| 144 | ---------------------- | ||
| 145 | The MBIM specification allows vendors to freely define additional | ||
| 146 | services. This is fully supported by the cdc_mbim driver. | ||
| 147 | |||
| 148 | Support for new MBIM services, including vendor specified services, is | ||
| 149 | implemented entirely in userspace, like the rest of the MBIM control | ||
| 150 | protocol | ||
| 151 | |||
| 152 | New services should be registered in the MBIM Registry [5]. | ||
| 153 | |||
| 154 | |||
| 155 | |||
| 156 | MBIM data channel userspace ABI | ||
| 157 | =============================== | ||
| 158 | |||
| 159 | wwanY network device | ||
| 160 | -------------------- | ||
| 161 | The cdc_mbim driver represents the MBIM data channel as a single | ||
| 162 | network device of the "wwan" type. This network device is initially | ||
| 163 | mapped to MBIM IP session 0. | ||
| 164 | |||
| 165 | |||
| 166 | Multiplexed IP sessions (IPS) | ||
| 167 | ----------------------------- | ||
| 168 | MBIM allows multiplexing up to 256 IP sessions over a single USB data | ||
| 169 | channel. The cdc_mbim driver models such IP sessions as 802.1q VLAN | ||
| 170 | subdevices of the master wwanY device, mapping MBIM IP session Z to | ||
| 171 | VLAN ID Z for all values of Z greater than 0. | ||
| 172 | |||
| 173 | The device maximum Z is given in the MBIM_DEVICE_CAPS_INFO structure | ||
| 174 | described in section 10.5.1 of [1]. | ||
| 175 | |||
| 176 | The userspace management application is responsible for adding new | ||
| 177 | VLAN links prior to establishing MBIM IP sessions where the SessionId | ||
| 178 | is greater than 0. These links can be added by using the normal VLAN | ||
| 179 | kernel interfaces, either ioctl or netlink. | ||
| 180 | |||
| 181 | For example, adding a link for a MBIM IP session with SessionId 3: | ||
| 182 | |||
| 183 | ip link add link wwan0 name wwan0.3 type vlan id 3 | ||
| 184 | |||
| 185 | The driver will automatically map the "wwan0.3" network device to MBIM | ||
| 186 | IP session 3. | ||
| 187 | |||
| 188 | |||
| 189 | Device Service Streams (DSS) | ||
| 190 | ---------------------------- | ||
| 191 | MBIM also allows up to 256 non-IP data streams to be multiplexed over | ||
| 192 | the same shared USB data channel. The cdc_mbim driver models these | ||
| 193 | sessions as another set of 802.1q VLAN subdevices of the master wwanY | ||
| 194 | device, mapping MBIM DSS session A to VLAN ID (256 + A) for all values | ||
| 195 | of A. | ||
| 196 | |||
| 197 | The device maximum A is given in the MBIM_DEVICE_SERVICES_INFO | ||
| 198 | structure described in section 10.5.29 of [1]. | ||
| 199 | |||
| 200 | The DSS VLAN subdevices are used as a practical interface between the | ||
| 201 | shared MBIM data channel and a MBIM DSS aware userspace application. | ||
| 202 | It is not intended to be presented as-is to an end user. The | ||
| 203 | assumption is that an userspace application initiating a DSS session | ||
| 204 | also takes care of the necessary framing of the DSS data, presenting | ||
| 205 | the stream to the end user in an appropriate way for the stream type. | ||
| 206 | |||
| 207 | The network device ABI requires a dummy ethernet header for every DSS | ||
| 208 | data frame being transported. The contents of this header is | ||
| 209 | arbitrary, with the following exceptions: | ||
| 210 | - TX frames using an IP protocol (0x0800 or 0x86dd) will be dropped | ||
| 211 | - RX frames will have the protocol field set to ETH_P_802_3 (but will | ||
| 212 | not be properly formatted 802.3 frames) | ||
| 213 | - RX frames will have the destination address set to the hardware | ||
| 214 | address of the master device | ||
| 215 | |||
| 216 | The DSS supporting userspace management application is responsible for | ||
| 217 | adding the dummy ethernet header on TX and stripping it on RX. | ||
| 218 | |||
| 219 | This is a simple example using tools commonly available, exporting | ||
| 220 | DssSessionId 5 as a pty character device pointed to by a /dev/nmea | ||
| 221 | symlink: | ||
| 222 | |||
| 223 | ip link add link wwan0 name wwan0.dss5 type vlan id 261 | ||
| 224 | ip link set dev wwan0.dss5 up | ||
| 225 | socat INTERFACE:wwan0.dss5,type=2 PTY:,echo=0,link=/dev/nmea | ||
| 226 | |||
| 227 | This is only an example, most suitable for testing out a DSS | ||
| 228 | service. Userspace applications supporting specific MBIM DSS services | ||
| 229 | are expected to use the tools and programming interfaces required by | ||
| 230 | that service. | ||
| 231 | |||
| 232 | Note that adding VLAN links for DSS sessions is entirely optional. A | ||
| 233 | management application may instead choose to bind a packet socket | ||
| 234 | directly to the master network device, using the received VLAN tags to | ||
| 235 | map frames to the correct DSS session and adding 18 byte VLAN ethernet | ||
| 236 | headers with the appropriate tag on TX. In this case using a socket | ||
| 237 | filter is recommended, matching only the DSS VLAN subset. This avoid | ||
| 238 | unnecessary copying of unrelated IP session data to userspace. For | ||
| 239 | example: | ||
| 240 | |||
| 241 | static struct sock_filter dssfilter[] = { | ||
| 242 | /* use special negative offsets to get VLAN tag */ | ||
| 243 | BPF_STMT(BPF_LD|BPF_B|BPF_ABS, SKF_AD_OFF + SKF_AD_VLAN_TAG_PRESENT), | ||
| 244 | BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, 1, 0, 6), /* true */ | ||
| 245 | |||
| 246 | /* verify DSS VLAN range */ | ||
| 247 | BPF_STMT(BPF_LD|BPF_H|BPF_ABS, SKF_AD_OFF + SKF_AD_VLAN_TAG), | ||
| 248 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 256, 0, 4), /* 256 is first DSS VLAN */ | ||
| 249 | BPF_JUMP(BPF_JMP|BPF_JGE|BPF_K, 512, 3, 0), /* 511 is last DSS VLAN */ | ||
| 250 | |||
| 251 | /* verify ethertype */ | ||
| 252 | BPF_STMT(BPF_LD|BPF_H|BPF_ABS, 2 * ETH_ALEN), | ||
| 253 | BPF_JUMP(BPF_JMP|BPF_JEQ|BPF_K, ETH_P_802_3, 0, 1), | ||
| 254 | |||
| 255 | BPF_STMT(BPF_RET|BPF_K, (u_int)-1), /* accept */ | ||
| 256 | BPF_STMT(BPF_RET|BPF_K, 0), /* ignore */ | ||
| 257 | }; | ||
| 258 | |||
| 259 | |||
| 260 | |||
| 261 | Tagged IP session 0 VLAN | ||
| 262 | ------------------------ | ||
| 263 | As described above, MBIM IP session 0 is treated as special by the | ||
| 264 | driver. It is initially mapped to untagged frames on the wwanY | ||
| 265 | network device. | ||
| 266 | |||
| 267 | This mapping implies a few restrictions on multiplexed IPS and DSS | ||
| 268 | sessions, which may not always be practical: | ||
| 269 | - no IPS or DSS session can use a frame size greater than the MTU on | ||
| 270 | IP session 0 | ||
| 271 | - no IPS or DSS session can be in the up state unless the network | ||
| 272 | device representing IP session 0 also is up | ||
| 273 | |||
| 274 | These problems can be avoided by optionally making the driver map IP | ||
| 275 | session 0 to a VLAN subdevice, similar to all other IP sessions. This | ||
| 276 | behaviour is triggered by adding a VLAN link for the magic VLAN ID | ||
| 277 | 4094. The driver will then immediately start mapping MBIM IP session | ||
| 278 | 0 to this VLAN, and will drop untagged frames on the master wwanY | ||
| 279 | device. | ||
| 280 | |||
| 281 | Tip: It might be less confusing to the end user to name this VLAN | ||
| 282 | subdevice after the MBIM SessionID instead of the VLAN ID. For | ||
| 283 | example: | ||
| 284 | |||
| 285 | ip link add link wwan0 name wwan0.0 type vlan id 4094 | ||
| 286 | |||
| 287 | |||
| 288 | VLAN mapping | ||
| 289 | ------------ | ||
| 290 | |||
| 291 | Summarizing the cdc_mbim driver mapping described above, we have this | ||
| 292 | relationship between VLAN tags on the wwanY network device and MBIM | ||
| 293 | sessions on the shared USB data channel: | ||
| 294 | |||
| 295 | VLAN ID MBIM type MBIM SessionID Notes | ||
| 296 | --------------------------------------------------------- | ||
| 297 | untagged IPS 0 a) | ||
| 298 | 1 - 255 IPS 1 - 255 <VLANID> | ||
| 299 | 256 - 511 DSS 0 - 255 <VLANID - 256> | ||
| 300 | 512 - 4093 b) | ||
| 301 | 4094 IPS 0 c) | ||
| 302 | |||
| 303 | a) if no VLAN ID 4094 link exists, else dropped | ||
| 304 | b) unsupported VLAN range, unconditionally dropped | ||
| 305 | c) if a VLAN ID 4094 link exists, else dropped | ||
| 306 | |||
| 307 | |||
| 308 | |||
| 309 | |||
| 310 | References | ||
| 311 | ========== | ||
| 312 | |||
| 313 | [1] USB Implementers Forum, Inc. - "Universal Serial Bus | ||
| 314 | Communications Class Subclass Specification for Mobile Broadband | ||
| 315 | Interface Model", Revision 1.0 (Errata 1), May 1, 2013 | ||
| 316 | - http://www.usb.org/developers/docs/devclass_docs/ | ||
| 317 | |||
| 318 | [2] USB Implementers Forum, Inc. - "Universal Serial Bus | ||
| 319 | Communications Class Subclass Specifications for Network Control | ||
| 320 | Model Devices", Revision 1.0 (Errata 1), November 24, 2010 | ||
| 321 | - http://www.usb.org/developers/docs/devclass_docs/ | ||
| 322 | |||
| 323 | [3] libmbim - "a glib-based library for talking to WWAN modems and | ||
| 324 | devices which speak the Mobile Interface Broadband Model (MBIM) | ||
| 325 | protocol" | ||
| 326 | - http://www.freedesktop.org/wiki/Software/libmbim/ | ||
| 327 | |||
| 328 | [4] ModemManager - "a DBus-activated daemon which controls mobile | ||
| 329 | broadband (2G/3G/4G) devices and connections" | ||
| 330 | - http://www.freedesktop.org/wiki/Software/ModemManager/ | ||
| 331 | |||
| 332 | [5] "MBIM (Mobile Broadband Interface Model) Registry" | ||
| 333 | - http://compliance.usb.org/mbim/ | ||
| 334 | |||
| 335 | [6] "/proc/bus/usb filesystem output" | ||
| 336 | - Documentation/usb/proc_usb_info.txt | ||
| 337 | |||
| 338 | [7] "/sys/bus/usb/devices/.../descriptors" | ||
| 339 | - Documentation/ABI/stable/sysfs-bus-usb | ||
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index bf5dbe3ab8c5..55c575fcaf17 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
| @@ -86,7 +86,7 @@ built-in CCIDs. | |||
| 86 | 86 | ||
| 87 | DCCP_SOCKOPT_CCID is write-only and sets both the TX and RX CCIDs at the same | 87 | DCCP_SOCKOPT_CCID is write-only and sets both the TX and RX CCIDs at the same |
| 88 | time, combining the operation of the next two socket options. This option is | 88 | time, combining the operation of the next two socket options. This option is |
| 89 | preferrable over the latter two, since often applications will use the same | 89 | preferable over the latter two, since often applications will use the same |
| 90 | type of CCID for both directions; and mixed use of CCIDs is not currently well | 90 | type of CCID for both directions; and mixed use of CCIDs is not currently well |
| 91 | understood. This socket option takes as argument at least one uint8_t value, or | 91 | understood. This socket option takes as argument at least one uint8_t value, or |
| 92 | an array of uint8_t values, which must match available CCIDS (see above). CCIDs | 92 | an array of uint8_t values, which must match available CCIDS (see above). CCIDs |
diff --git a/Documentation/networking/filter.txt b/Documentation/networking/filter.txt index 81f940f4e884..ee78eba78a9d 100644 --- a/Documentation/networking/filter.txt +++ b/Documentation/networking/filter.txt | |||
| @@ -277,10 +277,11 @@ Possible BPF extensions are shown in the following table: | |||
| 277 | mark skb->mark | 277 | mark skb->mark |
| 278 | queue skb->queue_mapping | 278 | queue skb->queue_mapping |
| 279 | hatype skb->dev->type | 279 | hatype skb->dev->type |
| 280 | rxhash skb->rxhash | 280 | rxhash skb->hash |
| 281 | cpu raw_smp_processor_id() | 281 | cpu raw_smp_processor_id() |
| 282 | vlan_tci vlan_tx_tag_get(skb) | 282 | vlan_tci vlan_tx_tag_get(skb) |
| 283 | vlan_pr vlan_tx_tag_present(skb) | 283 | vlan_pr vlan_tx_tag_present(skb) |
| 284 | rand prandom_u32() | ||
| 284 | 285 | ||
| 285 | These extensions can also be prefixed with '#'. | 286 | These extensions can also be prefixed with '#'. |
| 286 | Examples for low-level BPF: | 287 | Examples for low-level BPF: |
| @@ -308,6 +309,18 @@ Examples for low-level BPF: | |||
| 308 | ret #-1 | 309 | ret #-1 |
| 309 | drop: ret #0 | 310 | drop: ret #0 |
| 310 | 311 | ||
| 312 | ** icmp random packet sampling, 1 in 4 | ||
| 313 | ldh [12] | ||
| 314 | jne #0x800, drop | ||
| 315 | ldb [23] | ||
| 316 | jneq #1, drop | ||
| 317 | # get a random uint32 number | ||
| 318 | ld rand | ||
| 319 | mod #4 | ||
| 320 | jneq #1, drop | ||
| 321 | ret #-1 | ||
| 322 | drop: ret #0 | ||
| 323 | |||
| 311 | ** SECCOMP filter example: | 324 | ** SECCOMP filter example: |
| 312 | 325 | ||
| 313 | ld [4] /* offsetof(struct seccomp_data, arch) */ | 326 | ld [4] /* offsetof(struct seccomp_data, arch) */ |
| @@ -548,42 +561,43 @@ toolchain for developing and testing the kernel's JIT compiler. | |||
| 548 | 561 | ||
| 549 | BPF kernel internals | 562 | BPF kernel internals |
| 550 | -------------------- | 563 | -------------------- |
| 551 | Internally, for the kernel interpreter, a different BPF instruction set | 564 | Internally, for the kernel interpreter, a different instruction set |
| 552 | format with similar underlying principles from BPF described in previous | 565 | format with similar underlying principles from BPF described in previous |
| 553 | paragraphs is being used. However, the instruction set format is modelled | 566 | paragraphs is being used. However, the instruction set format is modelled |
| 554 | closer to the underlying architecture to mimic native instruction sets, so | 567 | closer to the underlying architecture to mimic native instruction sets, so |
| 555 | that a better performance can be achieved (more details later). | 568 | that a better performance can be achieved (more details later). This new |
| 569 | ISA is called 'eBPF' or 'internal BPF' interchangeably. (Note: eBPF which | ||
| 570 | originates from [e]xtended BPF is not the same as BPF extensions! While | ||
| 571 | eBPF is an ISA, BPF extensions date back to classic BPF's 'overloading' | ||
| 572 | of BPF_LD | BPF_{B,H,W} | BPF_ABS instruction.) | ||
| 556 | 573 | ||
| 557 | It is designed to be JITed with one to one mapping, which can also open up | 574 | It is designed to be JITed with one to one mapping, which can also open up |
| 558 | the possibility for GCC/LLVM compilers to generate optimized BPF code through | 575 | the possibility for GCC/LLVM compilers to generate optimized eBPF code through |
| 559 | a BPF backend that performs almost as fast as natively compiled code. | 576 | an eBPF backend that performs almost as fast as natively compiled code. |
| 560 | 577 | ||
| 561 | The new instruction set was originally designed with the possible goal in | 578 | The new instruction set was originally designed with the possible goal in |
| 562 | mind to write programs in "restricted C" and compile into BPF with a optional | 579 | mind to write programs in "restricted C" and compile into eBPF with a optional |
| 563 | GCC/LLVM backend, so that it can just-in-time map to modern 64-bit CPUs with | 580 | GCC/LLVM backend, so that it can just-in-time map to modern 64-bit CPUs with |
| 564 | minimal performance overhead over two steps, that is, C -> BPF -> native code. | 581 | minimal performance overhead over two steps, that is, C -> eBPF -> native code. |
| 565 | 582 | ||
| 566 | Currently, the new format is being used for running user BPF programs, which | 583 | Currently, the new format is being used for running user BPF programs, which |
| 567 | includes seccomp BPF, classic socket filters, cls_bpf traffic classifier, | 584 | includes seccomp BPF, classic socket filters, cls_bpf traffic classifier, |
| 568 | team driver's classifier for its load-balancing mode, netfilter's xt_bpf | 585 | team driver's classifier for its load-balancing mode, netfilter's xt_bpf |
| 569 | extension, PTP dissector/classifier, and much more. They are all internally | 586 | extension, PTP dissector/classifier, and much more. They are all internally |
| 570 | converted by the kernel into the new instruction set representation and run | 587 | converted by the kernel into the new instruction set representation and run |
| 571 | in the extended interpreter. For in-kernel handlers, this all works | 588 | in the eBPF interpreter. For in-kernel handlers, this all works transparently |
| 572 | transparently by using sk_unattached_filter_create() for setting up the | 589 | by using sk_unattached_filter_create() for setting up the filter, resp. |
| 573 | filter, resp. sk_unattached_filter_destroy() for destroying it. The macro | 590 | sk_unattached_filter_destroy() for destroying it. The macro |
| 574 | SK_RUN_FILTER(filter, ctx) transparently invokes the right BPF function to | 591 | SK_RUN_FILTER(filter, ctx) transparently invokes eBPF interpreter or JITed |
| 575 | run the filter. 'filter' is a pointer to struct sk_filter that we got from | 592 | code to run the filter. 'filter' is a pointer to struct sk_filter that we |
| 576 | sk_unattached_filter_create(), and 'ctx' the given context (e.g. skb pointer). | 593 | got from sk_unattached_filter_create(), and 'ctx' the given context (e.g. |
| 577 | All constraints and restrictions from sk_chk_filter() apply before a | 594 | skb pointer). All constraints and restrictions from sk_chk_filter() apply |
| 578 | conversion to the new layout is being done behind the scenes! | 595 | before a conversion to the new layout is being done behind the scenes! |
| 579 | 596 | ||
| 580 | Currently, for JITing, the user BPF format is being used and current BPF JIT | 597 | Currently, the classic BPF format is being used for JITing on most of the |
| 581 | compilers reused whenever possible. In other words, we do not (yet!) perform | 598 | architectures. Only x86-64 performs JIT compilation from eBPF instruction set, |
| 582 | a JIT compilation in the new layout, however, future work will successively | 599 | however, future work will migrate other JIT compilers as well, so that they |
| 583 | migrate traditional JIT compilers into the new instruction format as well, so | 600 | will profit from the very same benefits. |
| 584 | that they will profit from the very same benefits. Thus, when speaking about | ||
| 585 | JIT in the following, a JIT compiler (TBD) for the new instruction format is | ||
| 586 | meant in this context. | ||
| 587 | 601 | ||
| 588 | Some core changes of the new internal format: | 602 | Some core changes of the new internal format: |
| 589 | 603 | ||
| @@ -592,35 +606,35 @@ Some core changes of the new internal format: | |||
| 592 | The old format had two registers A and X, and a hidden frame pointer. The | 606 | The old format had two registers A and X, and a hidden frame pointer. The |
| 593 | new layout extends this to be 10 internal registers and a read-only frame | 607 | new layout extends this to be 10 internal registers and a read-only frame |
| 594 | pointer. Since 64-bit CPUs are passing arguments to functions via registers | 608 | pointer. Since 64-bit CPUs are passing arguments to functions via registers |
| 595 | the number of args from BPF program to in-kernel function is restricted | 609 | the number of args from eBPF program to in-kernel function is restricted |
| 596 | to 5 and one register is used to accept return value from an in-kernel | 610 | to 5 and one register is used to accept return value from an in-kernel |
| 597 | function. Natively, x86_64 passes first 6 arguments in registers, aarch64/ | 611 | function. Natively, x86_64 passes first 6 arguments in registers, aarch64/ |
| 598 | sparcv9/mips64 have 7 - 8 registers for arguments; x86_64 has 6 callee saved | 612 | sparcv9/mips64 have 7 - 8 registers for arguments; x86_64 has 6 callee saved |
| 599 | registers, and aarch64/sparcv9/mips64 have 11 or more callee saved registers. | 613 | registers, and aarch64/sparcv9/mips64 have 11 or more callee saved registers. |
| 600 | 614 | ||
| 601 | Therefore, BPF calling convention is defined as: | 615 | Therefore, eBPF calling convention is defined as: |
| 602 | 616 | ||
| 603 | * R0 - return value from in-kernel function | 617 | * R0 - return value from in-kernel function, and exit value for eBPF program |
| 604 | * R1 - R5 - arguments from BPF program to in-kernel function | 618 | * R1 - R5 - arguments from eBPF program to in-kernel function |
| 605 | * R6 - R9 - callee saved registers that in-kernel function will preserve | 619 | * R6 - R9 - callee saved registers that in-kernel function will preserve |
| 606 | * R10 - read-only frame pointer to access stack | 620 | * R10 - read-only frame pointer to access stack |
| 607 | 621 | ||
| 608 | Thus, all BPF registers map one to one to HW registers on x86_64, aarch64, | 622 | Thus, all eBPF registers map one to one to HW registers on x86_64, aarch64, |
| 609 | etc, and BPF calling convention maps directly to ABIs used by the kernel on | 623 | etc, and eBPF calling convention maps directly to ABIs used by the kernel on |
| 610 | 64-bit architectures. | 624 | 64-bit architectures. |
| 611 | 625 | ||
| 612 | On 32-bit architectures JIT may map programs that use only 32-bit arithmetic | 626 | On 32-bit architectures JIT may map programs that use only 32-bit arithmetic |
| 613 | and may let more complex programs to be interpreted. | 627 | and may let more complex programs to be interpreted. |
| 614 | 628 | ||
| 615 | R0 - R5 are scratch registers and BPF program needs spill/fill them if | 629 | R0 - R5 are scratch registers and eBPF program needs spill/fill them if |
| 616 | necessary across calls. Note that there is only one BPF program (== one BPF | 630 | necessary across calls. Note that there is only one eBPF program (== one |
| 617 | main routine) and it cannot call other BPF functions, it can only call | 631 | eBPF main routine) and it cannot call other eBPF functions, it can only |
| 618 | predefined in-kernel functions, though. | 632 | call predefined in-kernel functions, though. |
| 619 | 633 | ||
| 620 | - Register width increases from 32-bit to 64-bit: | 634 | - Register width increases from 32-bit to 64-bit: |
| 621 | 635 | ||
| 622 | Still, the semantics of the original 32-bit ALU operations are preserved | 636 | Still, the semantics of the original 32-bit ALU operations are preserved |
| 623 | via 32-bit subregisters. All BPF registers are 64-bit with 32-bit lower | 637 | via 32-bit subregisters. All eBPF registers are 64-bit with 32-bit lower |
| 624 | subregisters that zero-extend into 64-bit if they are being written to. | 638 | subregisters that zero-extend into 64-bit if they are being written to. |
| 625 | That behavior maps directly to x86_64 and arm64 subregister definition, but | 639 | That behavior maps directly to x86_64 and arm64 subregister definition, but |
| 626 | makes other JITs more difficult. | 640 | makes other JITs more difficult. |
| @@ -631,8 +645,8 @@ Some core changes of the new internal format: | |||
| 631 | 645 | ||
| 632 | Operation is 64-bit, because on 64-bit architectures, pointers are also | 646 | Operation is 64-bit, because on 64-bit architectures, pointers are also |
| 633 | 64-bit wide, and we want to pass 64-bit values in/out of kernel functions, | 647 | 64-bit wide, and we want to pass 64-bit values in/out of kernel functions, |
| 634 | so 32-bit BPF registers would otherwise require to define register-pair | 648 | so 32-bit eBPF registers would otherwise require to define register-pair |
| 635 | ABI, thus, there won't be able to use a direct BPF register to HW register | 649 | ABI, thus, there won't be able to use a direct eBPF register to HW register |
| 636 | mapping and JIT would need to do combine/split/move operations for every | 650 | mapping and JIT would need to do combine/split/move operations for every |
| 637 | register in and out of the function, which is complex, bug prone and slow. | 651 | register in and out of the function, which is complex, bug prone and slow. |
| 638 | Another reason is the use of atomic 64-bit counters. | 652 | Another reason is the use of atomic 64-bit counters. |
| @@ -646,14 +660,145 @@ Some core changes of the new internal format: | |||
| 646 | - Introduces bpf_call insn and register passing convention for zero overhead | 660 | - Introduces bpf_call insn and register passing convention for zero overhead |
| 647 | calls from/to other kernel functions: | 661 | calls from/to other kernel functions: |
| 648 | 662 | ||
| 649 | After a kernel function call, R1 - R5 are reset to unreadable and R0 has a | 663 | Before an in-kernel function call, the internal BPF program needs to |
| 650 | return type of the function. Since R6 - R9 are callee saved, their state is | 664 | place function arguments into R1 to R5 registers to satisfy calling |
| 651 | preserved across the call. | 665 | convention, then the interpreter will take them from registers and pass |
| 652 | 666 | to in-kernel function. If R1 - R5 registers are mapped to CPU registers | |
| 653 | Also in the new design, BPF is limited to 4096 insns, which means that any | 667 | that are used for argument passing on given architecture, the JIT compiler |
| 668 | doesn't need to emit extra moves. Function arguments will be in the correct | ||
| 669 | registers and BPF_CALL instruction will be JITed as single 'call' HW | ||
| 670 | instruction. This calling convention was picked to cover common call | ||
| 671 | situations without performance penalty. | ||
| 672 | |||
| 673 | After an in-kernel function call, R1 - R5 are reset to unreadable and R0 has | ||
| 674 | a return value of the function. Since R6 - R9 are callee saved, their state | ||
| 675 | is preserved across the call. | ||
| 676 | |||
| 677 | For example, consider three C functions: | ||
| 678 | |||
| 679 | u64 f1() { return (*_f2)(1); } | ||
| 680 | u64 f2(u64 a) { return f3(a + 1, a); } | ||
| 681 | u64 f3(u64 a, u64 b) { return a - b; } | ||
| 682 | |||
| 683 | GCC can compile f1, f3 into x86_64: | ||
| 684 | |||
| 685 | f1: | ||
| 686 | movl $1, %edi | ||
| 687 | movq _f2(%rip), %rax | ||
| 688 | jmp *%rax | ||
| 689 | f3: | ||
| 690 | movq %rdi, %rax | ||
| 691 | subq %rsi, %rax | ||
| 692 | ret | ||
| 693 | |||
| 694 | Function f2 in eBPF may look like: | ||
| 695 | |||
| 696 | f2: | ||
| 697 | bpf_mov R2, R1 | ||
| 698 | bpf_add R1, 1 | ||
| 699 | bpf_call f3 | ||
| 700 | bpf_exit | ||
| 701 | |||
| 702 | If f2 is JITed and the pointer stored to '_f2'. The calls f1 -> f2 -> f3 and | ||
| 703 | returns will be seamless. Without JIT, __sk_run_filter() interpreter needs to | ||
| 704 | be used to call into f2. | ||
| 705 | |||
| 706 | For practical reasons all eBPF programs have only one argument 'ctx' which is | ||
| 707 | already placed into R1 (e.g. on __sk_run_filter() startup) and the programs | ||
| 708 | can call kernel functions with up to 5 arguments. Calls with 6 or more arguments | ||
| 709 | are currently not supported, but these restrictions can be lifted if necessary | ||
| 710 | in the future. | ||
| 711 | |||
| 712 | On 64-bit architectures all register map to HW registers one to one. For | ||
| 713 | example, x86_64 JIT compiler can map them as ... | ||
| 714 | |||
| 715 | R0 - rax | ||
| 716 | R1 - rdi | ||
| 717 | R2 - rsi | ||
| 718 | R3 - rdx | ||
| 719 | R4 - rcx | ||
| 720 | R5 - r8 | ||
| 721 | R6 - rbx | ||
| 722 | R7 - r13 | ||
| 723 | R8 - r14 | ||
| 724 | R9 - r15 | ||
| 725 | R10 - rbp | ||
| 726 | |||
| 727 | ... since x86_64 ABI mandates rdi, rsi, rdx, rcx, r8, r9 for argument passing | ||
| 728 | and rbx, r12 - r15 are callee saved. | ||
| 729 | |||
| 730 | Then the following internal BPF pseudo-program: | ||
| 731 | |||
| 732 | bpf_mov R6, R1 /* save ctx */ | ||
| 733 | bpf_mov R2, 2 | ||
| 734 | bpf_mov R3, 3 | ||
| 735 | bpf_mov R4, 4 | ||
| 736 | bpf_mov R5, 5 | ||
| 737 | bpf_call foo | ||
| 738 | bpf_mov R7, R0 /* save foo() return value */ | ||
| 739 | bpf_mov R1, R6 /* restore ctx for next call */ | ||
| 740 | bpf_mov R2, 6 | ||
| 741 | bpf_mov R3, 7 | ||
| 742 | bpf_mov R4, 8 | ||
| 743 | bpf_mov R5, 9 | ||
| 744 | bpf_call bar | ||
| 745 | bpf_add R0, R7 | ||
| 746 | bpf_exit | ||
| 747 | |||
| 748 | After JIT to x86_64 may look like: | ||
| 749 | |||
| 750 | push %rbp | ||
| 751 | mov %rsp,%rbp | ||
| 752 | sub $0x228,%rsp | ||
| 753 | mov %rbx,-0x228(%rbp) | ||
| 754 | mov %r13,-0x220(%rbp) | ||
| 755 | mov %rdi,%rbx | ||
| 756 | mov $0x2,%esi | ||
| 757 | mov $0x3,%edx | ||
| 758 | mov $0x4,%ecx | ||
| 759 | mov $0x5,%r8d | ||
| 760 | callq foo | ||
| 761 | mov %rax,%r13 | ||
| 762 | mov %rbx,%rdi | ||
| 763 | mov $0x2,%esi | ||
| 764 | mov $0x3,%edx | ||
| 765 | mov $0x4,%ecx | ||
| 766 | mov $0x5,%r8d | ||
| 767 | callq bar | ||
| 768 | add %r13,%rax | ||
| 769 | mov -0x228(%rbp),%rbx | ||
| 770 | mov -0x220(%rbp),%r13 | ||
| 771 | leaveq | ||
| 772 | retq | ||
| 773 | |||
| 774 | Which is in this example equivalent in C to: | ||
| 775 | |||
| 776 | u64 bpf_filter(u64 ctx) | ||
| 777 | { | ||
| 778 | return foo(ctx, 2, 3, 4, 5) + bar(ctx, 6, 7, 8, 9); | ||
| 779 | } | ||
| 780 | |||
| 781 | In-kernel functions foo() and bar() with prototype: u64 (*)(u64 arg1, u64 | ||
| 782 | arg2, u64 arg3, u64 arg4, u64 arg5); will receive arguments in proper | ||
| 783 | registers and place their return value into '%rax' which is R0 in eBPF. | ||
| 784 | Prologue and epilogue are emitted by JIT and are implicit in the | ||
| 785 | interpreter. R0-R5 are scratch registers, so eBPF program needs to preserve | ||
| 786 | them across the calls as defined by calling convention. | ||
| 787 | |||
| 788 | For example the following program is invalid: | ||
| 789 | |||
| 790 | bpf_mov R1, 1 | ||
| 791 | bpf_call foo | ||
| 792 | bpf_mov R0, R1 | ||
| 793 | bpf_exit | ||
| 794 | |||
| 795 | After the call the registers R1-R5 contain junk values and cannot be read. | ||
| 796 | In the future an eBPF verifier can be used to validate internal BPF programs. | ||
| 797 | |||
| 798 | Also in the new design, eBPF is limited to 4096 insns, which means that any | ||
| 654 | program will terminate quickly and will only call a fixed number of kernel | 799 | program will terminate quickly and will only call a fixed number of kernel |
| 655 | functions. Original BPF and the new format are two operand instructions, | 800 | functions. Original BPF and the new format are two operand instructions, |
| 656 | which helps to do one-to-one mapping between BPF insn and x86 insn during JIT. | 801 | which helps to do one-to-one mapping between eBPF insn and x86 insn during JIT. |
| 657 | 802 | ||
| 658 | The input context pointer for invoking the interpreter function is generic, | 803 | The input context pointer for invoking the interpreter function is generic, |
| 659 | its content is defined by a specific use case. For seccomp register R1 points | 804 | its content is defined by a specific use case. For seccomp register R1 points |
| @@ -661,7 +806,26 @@ to seccomp_data, for converted BPF filters R1 points to a skb. | |||
| 661 | 806 | ||
| 662 | A program, that is translated internally consists of the following elements: | 807 | A program, that is translated internally consists of the following elements: |
| 663 | 808 | ||
| 664 | op:16, jt:8, jf:8, k:32 ==> op:8, a_reg:4, x_reg:4, off:16, imm:32 | 809 | op:16, jt:8, jf:8, k:32 ==> op:8, dst_reg:4, src_reg:4, off:16, imm:32 |
| 810 | |||
| 811 | So far 87 internal BPF instructions were implemented. 8-bit 'op' opcode field | ||
| 812 | has room for new instructions. Some of them may use 16/24/32 byte encoding. New | ||
| 813 | instructions must be multiple of 8 bytes to preserve backward compatibility. | ||
| 814 | |||
| 815 | Internal BPF is a general purpose RISC instruction set. Not every register and | ||
| 816 | every instruction are used during translation from original BPF to new format. | ||
| 817 | For example, socket filters are not using 'exclusive add' instruction, but | ||
| 818 | tracing filters may do to maintain counters of events, for example. Register R9 | ||
| 819 | is not used by socket filters either, but more complex filters may be running | ||
| 820 | out of registers and would have to resort to spill/fill to stack. | ||
| 821 | |||
| 822 | Internal BPF can used as generic assembler for last step performance | ||
| 823 | optimizations, socket filters and seccomp are using it as assembler. Tracing | ||
| 824 | filters may use it as assembler to generate code from kernel. In kernel usage | ||
| 825 | may not be bounded by security considerations, since generated internal BPF code | ||
| 826 | may be optimizing internal code path and not being exposed to the user space. | ||
| 827 | Safety of internal BPF can come from a verifier (TBD). In such use cases as | ||
| 828 | described, it may be used as safe instruction set. | ||
| 665 | 829 | ||
| 666 | Just like the original BPF, the new format runs within a controlled environment, | 830 | Just like the original BPF, the new format runs within a controlled environment, |
| 667 | is deterministic and the kernel can easily prove that. The safety of the program | 831 | is deterministic and the kernel can easily prove that. The safety of the program |
| @@ -670,6 +834,181 @@ loops and other CFG validation; second step starts from the first insn and | |||
| 670 | descends all possible paths. It simulates execution of every insn and observes | 834 | descends all possible paths. It simulates execution of every insn and observes |
| 671 | the state change of registers and stack. | 835 | the state change of registers and stack. |
| 672 | 836 | ||
| 837 | eBPF opcode encoding | ||
| 838 | -------------------- | ||
| 839 | |||
| 840 | eBPF is reusing most of the opcode encoding from classic to simplify conversion | ||
| 841 | of classic BPF to eBPF. For arithmetic and jump instructions the 8-bit 'code' | ||
| 842 | field is divided into three parts: | ||
| 843 | |||
| 844 | +----------------+--------+--------------------+ | ||
| 845 | | 4 bits | 1 bit | 3 bits | | ||
| 846 | | operation code | source | instruction class | | ||
| 847 | +----------------+--------+--------------------+ | ||
| 848 | (MSB) (LSB) | ||
| 849 | |||
| 850 | Three LSB bits store instruction class which is one of: | ||
| 851 | |||
| 852 | Classic BPF classes: eBPF classes: | ||
| 853 | |||
| 854 | BPF_LD 0x00 BPF_LD 0x00 | ||
| 855 | BPF_LDX 0x01 BPF_LDX 0x01 | ||
| 856 | BPF_ST 0x02 BPF_ST 0x02 | ||
| 857 | BPF_STX 0x03 BPF_STX 0x03 | ||
| 858 | BPF_ALU 0x04 BPF_ALU 0x04 | ||
| 859 | BPF_JMP 0x05 BPF_JMP 0x05 | ||
| 860 | BPF_RET 0x06 [ class 6 unused, for future if needed ] | ||
| 861 | BPF_MISC 0x07 BPF_ALU64 0x07 | ||
| 862 | |||
| 863 | When BPF_CLASS(code) == BPF_ALU or BPF_JMP, 4th bit encodes source operand ... | ||
| 864 | |||
| 865 | BPF_K 0x00 | ||
| 866 | BPF_X 0x08 | ||
| 867 | |||
| 868 | * in classic BPF, this means: | ||
| 869 | |||
| 870 | BPF_SRC(code) == BPF_X - use register X as source operand | ||
| 871 | BPF_SRC(code) == BPF_K - use 32-bit immediate as source operand | ||
| 872 | |||
| 873 | * in eBPF, this means: | ||
| 874 | |||
| 875 | BPF_SRC(code) == BPF_X - use 'src_reg' register as source operand | ||
| 876 | BPF_SRC(code) == BPF_K - use 32-bit immediate as source operand | ||
| 877 | |||
| 878 | ... and four MSB bits store operation code. | ||
| 879 | |||
| 880 | If BPF_CLASS(code) == BPF_ALU or BPF_ALU64 [ in eBPF ], BPF_OP(code) is one of: | ||
| 881 | |||
| 882 | BPF_ADD 0x00 | ||
| 883 | BPF_SUB 0x10 | ||
| 884 | BPF_MUL 0x20 | ||
| 885 | BPF_DIV 0x30 | ||
| 886 | BPF_OR 0x40 | ||
| 887 | BPF_AND 0x50 | ||
| 888 | BPF_LSH 0x60 | ||
| 889 | BPF_RSH 0x70 | ||
| 890 | BPF_NEG 0x80 | ||
| 891 | BPF_MOD 0x90 | ||
| 892 | BPF_XOR 0xa0 | ||
| 893 | BPF_MOV 0xb0 /* eBPF only: mov reg to reg */ | ||
| 894 | BPF_ARSH 0xc0 /* eBPF only: sign extending shift right */ | ||
| 895 | BPF_END 0xd0 /* eBPF only: endianness conversion */ | ||
| 896 | |||
| 897 | If BPF_CLASS(code) == BPF_JMP, BPF_OP(code) is one of: | ||
| 898 | |||
| 899 | BPF_JA 0x00 | ||
| 900 | BPF_JEQ 0x10 | ||
| 901 | BPF_JGT 0x20 | ||
| 902 | BPF_JGE 0x30 | ||
| 903 | BPF_JSET 0x40 | ||
| 904 | BPF_JNE 0x50 /* eBPF only: jump != */ | ||
| 905 | BPF_JSGT 0x60 /* eBPF only: signed '>' */ | ||
| 906 | BPF_JSGE 0x70 /* eBPF only: signed '>=' */ | ||
| 907 | BPF_CALL 0x80 /* eBPF only: function call */ | ||
| 908 | BPF_EXIT 0x90 /* eBPF only: function return */ | ||
| 909 | |||
| 910 | So BPF_ADD | BPF_X | BPF_ALU means 32-bit addition in both classic BPF | ||
| 911 | and eBPF. There are only two registers in classic BPF, so it means A += X. | ||
| 912 | In eBPF it means dst_reg = (u32) dst_reg + (u32) src_reg; similarly, | ||
| 913 | BPF_XOR | BPF_K | BPF_ALU means A ^= imm32 in classic BPF and analogous | ||
| 914 | src_reg = (u32) src_reg ^ (u32) imm32 in eBPF. | ||
| 915 | |||
| 916 | Classic BPF is using BPF_MISC class to represent A = X and X = A moves. | ||
| 917 | eBPF is using BPF_MOV | BPF_X | BPF_ALU code instead. Since there are no | ||
| 918 | BPF_MISC operations in eBPF, the class 7 is used as BPF_ALU64 to mean | ||
| 919 | exactly the same operations as BPF_ALU, but with 64-bit wide operands | ||
| 920 | instead. So BPF_ADD | BPF_X | BPF_ALU64 means 64-bit addition, i.e.: | ||
| 921 | dst_reg = dst_reg + src_reg | ||
| 922 | |||
| 923 | Classic BPF wastes the whole BPF_RET class to represent a single 'ret' | ||
| 924 | operation. Classic BPF_RET | BPF_K means copy imm32 into return register | ||
| 925 | and perform function exit. eBPF is modeled to match CPU, so BPF_JMP | BPF_EXIT | ||
| 926 | in eBPF means function exit only. The eBPF program needs to store return | ||
| 927 | value into register R0 before doing a BPF_EXIT. Class 6 in eBPF is currently | ||
| 928 | unused and reserved for future use. | ||
| 929 | |||
| 930 | For load and store instructions the 8-bit 'code' field is divided as: | ||
| 931 | |||
| 932 | +--------+--------+-------------------+ | ||
| 933 | | 3 bits | 2 bits | 3 bits | | ||
| 934 | | mode | size | instruction class | | ||
| 935 | +--------+--------+-------------------+ | ||
| 936 | (MSB) (LSB) | ||
| 937 | |||
| 938 | Size modifier is one of ... | ||
| 939 | |||
| 940 | BPF_W 0x00 /* word */ | ||
| 941 | BPF_H 0x08 /* half word */ | ||
| 942 | BPF_B 0x10 /* byte */ | ||
| 943 | BPF_DW 0x18 /* eBPF only, double word */ | ||
| 944 | |||
| 945 | ... which encodes size of load/store operation: | ||
| 946 | |||
| 947 | B - 1 byte | ||
| 948 | H - 2 byte | ||
| 949 | W - 4 byte | ||
| 950 | DW - 8 byte (eBPF only) | ||
| 951 | |||
| 952 | Mode modifier is one of: | ||
| 953 | |||
| 954 | BPF_IMM 0x00 /* classic BPF only, reserved in eBPF */ | ||
| 955 | BPF_ABS 0x20 | ||
| 956 | BPF_IND 0x40 | ||
| 957 | BPF_MEM 0x60 | ||
| 958 | BPF_LEN 0x80 /* classic BPF only, reserved in eBPF */ | ||
| 959 | BPF_MSH 0xa0 /* classic BPF only, reserved in eBPF */ | ||
| 960 | BPF_XADD 0xc0 /* eBPF only, exclusive add */ | ||
| 961 | |||
| 962 | eBPF has two non-generic instructions: (BPF_ABS | <size> | BPF_LD) and | ||
| 963 | (BPF_IND | <size> | BPF_LD) which are used to access packet data. | ||
| 964 | |||
| 965 | They had to be carried over from classic to have strong performance of | ||
| 966 | socket filters running in eBPF interpreter. These instructions can only | ||
| 967 | be used when interpreter context is a pointer to 'struct sk_buff' and | ||
| 968 | have seven implicit operands. Register R6 is an implicit input that must | ||
| 969 | contain pointer to sk_buff. Register R0 is an implicit output which contains | ||
| 970 | the data fetched from the packet. Registers R1-R5 are scratch registers | ||
| 971 | and must not be used to store the data across BPF_ABS | BPF_LD or | ||
| 972 | BPF_IND | BPF_LD instructions. | ||
| 973 | |||
| 974 | These instructions have implicit program exit condition as well. When | ||
| 975 | eBPF program is trying to access the data beyond the packet boundary, | ||
| 976 | the interpreter will abort the execution of the program. JIT compilers | ||
| 977 | therefore must preserve this property. src_reg and imm32 fields are | ||
| 978 | explicit inputs to these instructions. | ||
| 979 | |||
| 980 | For example: | ||
| 981 | |||
| 982 | BPF_IND | BPF_W | BPF_LD means: | ||
| 983 | |||
| 984 | R0 = ntohl(*(u32 *) (((struct sk_buff *) R6)->data + src_reg + imm32)) | ||
| 985 | and R1 - R5 were scratched. | ||
| 986 | |||
| 987 | Unlike classic BPF instruction set, eBPF has generic load/store operations: | ||
| 988 | |||
| 989 | BPF_MEM | <size> | BPF_STX: *(size *) (dst_reg + off) = src_reg | ||
| 990 | BPF_MEM | <size> | BPF_ST: *(size *) (dst_reg + off) = imm32 | ||
| 991 | BPF_MEM | <size> | BPF_LDX: dst_reg = *(size *) (src_reg + off) | ||
| 992 | BPF_XADD | BPF_W | BPF_STX: lock xadd *(u32 *)(dst_reg + off16) += src_reg | ||
| 993 | BPF_XADD | BPF_DW | BPF_STX: lock xadd *(u64 *)(dst_reg + off16) += src_reg | ||
| 994 | |||
| 995 | Where size is one of: BPF_B or BPF_H or BPF_W or BPF_DW. Note that 1 and | ||
| 996 | 2 byte atomic increments are not supported. | ||
| 997 | |||
| 998 | Testing | ||
| 999 | ------- | ||
| 1000 | |||
| 1001 | Next to the BPF toolchain, the kernel also ships a test module that contains | ||
| 1002 | various test cases for classic and internal BPF that can be executed against | ||
| 1003 | the BPF interpreter and JIT compiler. It can be found in lib/test_bpf.c and | ||
| 1004 | enabled via Kconfig: | ||
| 1005 | |||
| 1006 | CONFIG_TEST_BPF=m | ||
| 1007 | |||
| 1008 | After the module has been built and installed, the test suite can be executed | ||
| 1009 | via insmod or modprobe against 'test_bpf' module. Results of the test cases | ||
| 1010 | including timings in nsec can be found in the kernel log (dmesg). | ||
| 1011 | |||
| 673 | Misc | 1012 | Misc |
| 674 | ---- | 1013 | ---- |
| 675 | 1014 | ||
diff --git a/Documentation/networking/packet_mmap.txt b/Documentation/networking/packet_mmap.txt index 6fea79efb4cb..38112d512f47 100644 --- a/Documentation/networking/packet_mmap.txt +++ b/Documentation/networking/packet_mmap.txt | |||
| @@ -578,7 +578,7 @@ processes. This also works in combination with mmap(2) on packet sockets. | |||
| 578 | 578 | ||
| 579 | Currently implemented fanout policies are: | 579 | Currently implemented fanout policies are: |
| 580 | 580 | ||
| 581 | - PACKET_FANOUT_HASH: schedule to socket by skb's rxhash | 581 | - PACKET_FANOUT_HASH: schedule to socket by skb's packet hash |
| 582 | - PACKET_FANOUT_LB: schedule to socket by round-robin | 582 | - PACKET_FANOUT_LB: schedule to socket by round-robin |
| 583 | - PACKET_FANOUT_CPU: schedule to socket by CPU packet arrives on | 583 | - PACKET_FANOUT_CPU: schedule to socket by CPU packet arrives on |
| 584 | - PACKET_FANOUT_RND: schedule to socket by random selection | 584 | - PACKET_FANOUT_RND: schedule to socket by random selection |
diff --git a/Documentation/networking/scaling.txt b/Documentation/networking/scaling.txt index ca6977f5b2ed..99ca40e8e810 100644 --- a/Documentation/networking/scaling.txt +++ b/Documentation/networking/scaling.txt | |||
| @@ -429,7 +429,7 @@ RPS and RFS were introduced in kernel 2.6.35. XPS was incorporated into | |||
| 429 | (therbert@google.com) | 429 | (therbert@google.com) |
| 430 | 430 | ||
| 431 | Accelerated RFS was introduced in 2.6.35. Original patches were | 431 | Accelerated RFS was introduced in 2.6.35. Original patches were |
| 432 | submitted by Ben Hutchings (bhutchings@solarflare.com) | 432 | submitted by Ben Hutchings (bwh@kernel.org) |
| 433 | 433 | ||
| 434 | Authors: | 434 | Authors: |
| 435 | Tom Herbert (therbert@google.com) | 435 | Tom Herbert (therbert@google.com) |
diff --git a/Documentation/platform/x86-laptop-drivers.txt b/Documentation/platform/x86-laptop-drivers.txt new file mode 100644 index 000000000000..01facd2590bb --- /dev/null +++ b/Documentation/platform/x86-laptop-drivers.txt | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | compal-laptop | ||
| 2 | ============= | ||
| 3 | List of supported hardware: | ||
| 4 | |||
| 5 | by Compal: | ||
| 6 | Compal FL90/IFL90 | ||
| 7 | Compal FL91/IFL91 | ||
| 8 | Compal FL92/JFL92 | ||
| 9 | Compal FT00/IFT00 | ||
| 10 | |||
| 11 | by Dell: | ||
| 12 | Dell Vostro 1200 | ||
| 13 | Dell Mini 9 (Inspiron 910) | ||
| 14 | Dell Mini 10 (Inspiron 1010) | ||
| 15 | Dell Mini 10v (Inspiron 1011) | ||
| 16 | Dell Mini 1012 (Inspiron 1012) | ||
| 17 | Dell Inspiron 11z (Inspiron 1110) | ||
| 18 | Dell Mini 12 (Inspiron 1210) | ||
diff --git a/Documentation/power/devices.txt b/Documentation/power/devices.txt index 47d46dff70f7..d172bce0fd49 100644 --- a/Documentation/power/devices.txt +++ b/Documentation/power/devices.txt | |||
| @@ -2,6 +2,7 @@ Device Power Management | |||
| 2 | 2 | ||
| 3 | Copyright (c) 2010-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. | 3 | Copyright (c) 2010-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. |
| 4 | Copyright (c) 2010 Alan Stern <stern@rowland.harvard.edu> | 4 | Copyright (c) 2010 Alan Stern <stern@rowland.harvard.edu> |
| 5 | Copyright (c) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ||
| 5 | 6 | ||
| 6 | 7 | ||
| 7 | Most of the code in Linux is device drivers, so most of the Linux power | 8 | Most of the code in Linux is device drivers, so most of the Linux power |
| @@ -326,6 +327,20 @@ the phases are: | |||
| 326 | driver in some way for the upcoming system power transition, but it | 327 | driver in some way for the upcoming system power transition, but it |
| 327 | should not put the device into a low-power state. | 328 | should not put the device into a low-power state. |
| 328 | 329 | ||
| 330 | For devices supporting runtime power management, the return value of the | ||
| 331 | prepare callback can be used to indicate to the PM core that it may | ||
| 332 | safely leave the device in runtime suspend (if runtime-suspended | ||
| 333 | already), provided that all of the device's descendants are also left in | ||
| 334 | runtime suspend. Namely, if the prepare callback returns a positive | ||
| 335 | number and that happens for all of the descendants of the device too, | ||
| 336 | and all of them (including the device itself) are runtime-suspended, the | ||
| 337 | PM core will skip the suspend, suspend_late and suspend_noirq suspend | ||
| 338 | phases as well as the resume_noirq, resume_early and resume phases of | ||
| 339 | the following system resume for all of these devices. In that case, | ||
| 340 | the complete callback will be called directly after the prepare callback | ||
| 341 | and is entirely responsible for bringing the device back to the | ||
| 342 | functional state as appropriate. | ||
| 343 | |||
| 329 | 2. The suspend methods should quiesce the device to stop it from performing | 344 | 2. The suspend methods should quiesce the device to stop it from performing |
| 330 | I/O. They also may save the device registers and put it into the | 345 | I/O. They also may save the device registers and put it into the |
| 331 | appropriate low-power state, depending on the bus type the device is on, | 346 | appropriate low-power state, depending on the bus type the device is on, |
| @@ -400,12 +415,23 @@ When resuming from freeze, standby or memory sleep, the phases are: | |||
| 400 | the resume callbacks occur; it's not necessary to wait until the | 415 | the resume callbacks occur; it's not necessary to wait until the |
| 401 | complete phase. | 416 | complete phase. |
| 402 | 417 | ||
| 418 | Moreover, if the preceding prepare callback returned a positive number, | ||
| 419 | the device may have been left in runtime suspend throughout the whole | ||
| 420 | system suspend and resume (the suspend, suspend_late, suspend_noirq | ||
| 421 | phases of system suspend and the resume_noirq, resume_early, resume | ||
| 422 | phases of system resume may have been skipped for it). In that case, | ||
| 423 | the complete callback is entirely responsible for bringing the device | ||
| 424 | back to the functional state after system suspend if necessary. [For | ||
| 425 | example, it may need to queue up a runtime resume request for the device | ||
| 426 | for this purpose.] To check if that is the case, the complete callback | ||
| 427 | can consult the device's power.direct_complete flag. Namely, if that | ||
| 428 | flag is set when the complete callback is being run, it has been called | ||
| 429 | directly after the preceding prepare and special action may be required | ||
| 430 | to make the device work correctly afterward. | ||
| 431 | |||
| 403 | At the end of these phases, drivers should be as functional as they were before | 432 | At the end of these phases, drivers should be as functional as they were before |
| 404 | suspending: I/O can be performed using DMA and IRQs, and the relevant clocks are | 433 | suspending: I/O can be performed using DMA and IRQs, and the relevant clocks are |
| 405 | gated on. Even if the device was in a low-power state before the system sleep | 434 | gated on. |
| 406 | because of runtime power management, afterwards it should be back in its | ||
| 407 | full-power state. There are multiple reasons why it's best to do this; they are | ||
| 408 | discussed in more detail in Documentation/power/runtime_pm.txt. | ||
| 409 | 435 | ||
| 410 | However, the details here may again be platform-specific. For example, | 436 | However, the details here may again be platform-specific. For example, |
| 411 | some systems support multiple "run" states, and the mode in effect at | 437 | some systems support multiple "run" states, and the mode in effect at |
diff --git a/Documentation/power/opp.txt b/Documentation/power/opp.txt index b8a907dc0169..a9adad828cdc 100644 --- a/Documentation/power/opp.txt +++ b/Documentation/power/opp.txt | |||
| @@ -10,8 +10,7 @@ Contents | |||
| 10 | 3. OPP Search Functions | 10 | 3. OPP Search Functions |
| 11 | 4. OPP Availability Control Functions | 11 | 4. OPP Availability Control Functions |
| 12 | 5. OPP Data Retrieval Functions | 12 | 5. OPP Data Retrieval Functions |
| 13 | 6. Cpufreq Table Generation | 13 | 6. Data Structures |
| 14 | 7. Data Structures | ||
| 15 | 14 | ||
| 16 | 1. Introduction | 15 | 1. Introduction |
| 17 | =============== | 16 | =============== |
| @@ -72,7 +71,6 @@ operations until that OPP could be re-enabled if possible. | |||
| 72 | OPP library facilitates this concept in it's implementation. The following | 71 | OPP library facilitates this concept in it's implementation. The following |
| 73 | operational functions operate only on available opps: | 72 | operational functions operate only on available opps: |
| 74 | opp_find_freq_{ceil, floor}, dev_pm_opp_get_voltage, dev_pm_opp_get_freq, dev_pm_opp_get_opp_count | 73 | opp_find_freq_{ceil, floor}, dev_pm_opp_get_voltage, dev_pm_opp_get_freq, dev_pm_opp_get_opp_count |
| 75 | and dev_pm_opp_init_cpufreq_table | ||
| 76 | 74 | ||
| 77 | dev_pm_opp_find_freq_exact is meant to be used to find the opp pointer which can then | 75 | dev_pm_opp_find_freq_exact is meant to be used to find the opp pointer which can then |
| 78 | be used for dev_pm_opp_enable/disable functions to make an opp available as required. | 76 | be used for dev_pm_opp_enable/disable functions to make an opp available as required. |
| @@ -96,10 +94,9 @@ using RCU read locks. The opp_find_freq_{exact,ceil,floor}, | |||
| 96 | opp_get_{voltage, freq, opp_count} fall into this category. | 94 | opp_get_{voltage, freq, opp_count} fall into this category. |
| 97 | 95 | ||
| 98 | opp_{add,enable,disable} are updaters which use mutex and implement it's own | 96 | opp_{add,enable,disable} are updaters which use mutex and implement it's own |
| 99 | RCU locking mechanisms. dev_pm_opp_init_cpufreq_table acts as an updater and uses | 97 | RCU locking mechanisms. These functions should *NOT* be called under RCU locks |
| 100 | mutex to implment RCU updater strategy. These functions should *NOT* be called | 98 | and other contexts that prevent blocking functions in RCU or mutex operations |
| 101 | under RCU locks and other contexts that prevent blocking functions in RCU or | 99 | from working. |
| 102 | mutex operations from working. | ||
| 103 | 100 | ||
| 104 | 2. Initial OPP List Registration | 101 | 2. Initial OPP List Registration |
| 105 | ================================ | 102 | ================================ |
| @@ -311,34 +308,7 @@ dev_pm_opp_get_opp_count - Retrieve the number of available opps for a device | |||
| 311 | /* Do other things */ | 308 | /* Do other things */ |
| 312 | } | 309 | } |
| 313 | 310 | ||
| 314 | 6. Cpufreq Table Generation | 311 | 6. Data Structures |
| 315 | =========================== | ||
| 316 | dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with | ||
| 317 | cpufreq_frequency_table_cpuinfo which is provided with the list of | ||
| 318 | frequencies that are available for operation. This function provides | ||
| 319 | a ready to use conversion routine to translate the OPP layer's internal | ||
| 320 | information about the available frequencies into a format readily | ||
| 321 | providable to cpufreq. | ||
| 322 | |||
| 323 | WARNING: Do not use this function in interrupt context. | ||
| 324 | |||
| 325 | Example: | ||
| 326 | soc_pm_init() | ||
| 327 | { | ||
| 328 | /* Do things */ | ||
| 329 | r = dev_pm_opp_init_cpufreq_table(dev, &freq_table); | ||
| 330 | if (!r) | ||
| 331 | cpufreq_frequency_table_cpuinfo(policy, freq_table); | ||
| 332 | /* Do other things */ | ||
| 333 | } | ||
| 334 | |||
| 335 | NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in | ||
| 336 | addition to CONFIG_PM as power management feature is required to | ||
| 337 | dynamically scale voltage and frequency in a system. | ||
| 338 | |||
| 339 | dev_pm_opp_free_cpufreq_table - Free up the table allocated by dev_pm_opp_init_cpufreq_table | ||
| 340 | |||
| 341 | 7. Data Structures | ||
| 342 | ================== | 312 | ================== |
| 343 | Typically an SoC contains multiple voltage domains which are variable. Each | 313 | Typically an SoC contains multiple voltage domains which are variable. Each |
| 344 | domain is represented by a device pointer. The relationship to OPP can be | 314 | domain is represented by a device pointer. The relationship to OPP can be |
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt index 5f96daf8566a..f32ce5419573 100644 --- a/Documentation/power/runtime_pm.txt +++ b/Documentation/power/runtime_pm.txt | |||
| @@ -2,6 +2,7 @@ Runtime Power Management Framework for I/O Devices | |||
| 2 | 2 | ||
| 3 | (C) 2009-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. | 3 | (C) 2009-2011 Rafael J. Wysocki <rjw@sisk.pl>, Novell Inc. |
| 4 | (C) 2010 Alan Stern <stern@rowland.harvard.edu> | 4 | (C) 2010 Alan Stern <stern@rowland.harvard.edu> |
| 5 | (C) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ||
| 5 | 6 | ||
| 6 | 1. Introduction | 7 | 1. Introduction |
| 7 | 8 | ||
| @@ -444,6 +445,10 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h: | |||
| 444 | bool pm_runtime_status_suspended(struct device *dev); | 445 | bool pm_runtime_status_suspended(struct device *dev); |
| 445 | - return true if the device's runtime PM status is 'suspended' | 446 | - return true if the device's runtime PM status is 'suspended' |
| 446 | 447 | ||
| 448 | bool pm_runtime_suspended_if_enabled(struct device *dev); | ||
| 449 | - return true if the device's runtime PM status is 'suspended' and its | ||
| 450 | 'power.disable_depth' field is equal to 1 | ||
| 451 | |||
| 447 | void pm_runtime_allow(struct device *dev); | 452 | void pm_runtime_allow(struct device *dev); |
| 448 | - set the power.runtime_auto flag for the device and decrease its usage | 453 | - set the power.runtime_auto flag for the device and decrease its usage |
| 449 | counter (used by the /sys/devices/.../power/control interface to | 454 | counter (used by the /sys/devices/.../power/control interface to |
| @@ -644,19 +649,33 @@ place (in particular, if the system is not waking up from hibernation), it may | |||
| 644 | be more efficient to leave the devices that had been suspended before the system | 649 | be more efficient to leave the devices that had been suspended before the system |
| 645 | suspend began in the suspended state. | 650 | suspend began in the suspended state. |
| 646 | 651 | ||
| 652 | To this end, the PM core provides a mechanism allowing some coordination between | ||
| 653 | different levels of device hierarchy. Namely, if a system suspend .prepare() | ||
| 654 | callback returns a positive number for a device, that indicates to the PM core | ||
| 655 | that the device appears to be runtime-suspended and its state is fine, so it | ||
| 656 | may be left in runtime suspend provided that all of its descendants are also | ||
| 657 | left in runtime suspend. If that happens, the PM core will not execute any | ||
| 658 | system suspend and resume callbacks for all of those devices, except for the | ||
| 659 | complete callback, which is then entirely responsible for handling the device | ||
| 660 | as appropriate. This only applies to system suspend transitions that are not | ||
| 661 | related to hibernation (see Documentation/power/devices.txt for more | ||
| 662 | information). | ||
| 663 | |||
| 647 | The PM core does its best to reduce the probability of race conditions between | 664 | The PM core does its best to reduce the probability of race conditions between |
| 648 | the runtime PM and system suspend/resume (and hibernation) callbacks by carrying | 665 | the runtime PM and system suspend/resume (and hibernation) callbacks by carrying |
| 649 | out the following operations: | 666 | out the following operations: |
| 650 | 667 | ||
| 651 | * During system suspend it calls pm_runtime_get_noresume() and | 668 | * During system suspend pm_runtime_get_noresume() is called for every device |
| 652 | pm_runtime_barrier() for every device right before executing the | 669 | right before executing the subsystem-level .prepare() callback for it and |
| 653 | subsystem-level .suspend() callback for it. In addition to that it calls | 670 | pm_runtime_barrier() is called for every device right before executing the |
| 654 | __pm_runtime_disable() with 'false' as the second argument for every device | 671 | subsystem-level .suspend() callback for it. In addition to that the PM core |
| 655 | right before executing the subsystem-level .suspend_late() callback for it. | 672 | calls __pm_runtime_disable() with 'false' as the second argument for every |
| 656 | 673 | device right before executing the subsystem-level .suspend_late() callback | |
| 657 | * During system resume it calls pm_runtime_enable() and pm_runtime_put() | 674 | for it. |
| 658 | for every device right after executing the subsystem-level .resume_early() | 675 | |
| 659 | callback and right after executing the subsystem-level .resume() callback | 676 | * During system resume pm_runtime_enable() and pm_runtime_put() are called for |
| 677 | every device right after executing the subsystem-level .resume_early() | ||
| 678 | callback and right after executing the subsystem-level .complete() callback | ||
| 660 | for it, respectively. | 679 | for it, respectively. |
| 661 | 680 | ||
| 662 | 7. Generic subsystem callbacks | 681 | 7. Generic subsystem callbacks |
diff --git a/Documentation/power/states.txt b/Documentation/power/states.txt index 442d43df9b25..50f3ef9177c1 100644 --- a/Documentation/power/states.txt +++ b/Documentation/power/states.txt | |||
| @@ -1,62 +1,87 @@ | |||
| 1 | System Power Management Sleep States | ||
| 1 | 2 | ||
| 2 | System Power Management States | 3 | (C) 2014 Intel Corp., Rafael J. Wysocki <rafael.j.wysocki@intel.com> |
| 3 | 4 | ||
| 5 | The kernel supports up to four system sleep states generically, although three | ||
| 6 | of them depend on the platform support code to implement the low-level details | ||
| 7 | for each state. | ||
| 4 | 8 | ||
| 5 | The kernel supports four power management states generically, though | 9 | The states are represented by strings that can be read or written to the |
| 6 | one is generic and the other three are dependent on platform support | 10 | /sys/power/state file. Those strings may be "mem", "standby", "freeze" and |
| 7 | code to implement the low-level details for each state. | 11 | "disk", where the last one always represents hibernation (Suspend-To-Disk) and |
| 8 | This file describes each state, what they are | 12 | the meaning of the remaining ones depends on the relative_sleep_states command |
| 9 | commonly called, what ACPI state they map to, and what string to write | 13 | line argument. |
| 10 | to /sys/power/state to enter that state | ||
| 11 | 14 | ||
| 12 | state: Freeze / Low-Power Idle | 15 | For relative_sleep_states=1, the strings "mem", "standby" and "freeze" label the |
| 16 | available non-hibernation sleep states from the deepest to the shallowest, | ||
| 17 | respectively. In that case, "mem" is always present in /sys/power/state, | ||
| 18 | because there is at least one non-hibernation sleep state in every system. If | ||
| 19 | the given system supports two non-hibernation sleep states, "standby" is present | ||
| 20 | in /sys/power/state in addition to "mem". If the system supports three | ||
| 21 | non-hibernation sleep states, "freeze" will be present in /sys/power/state in | ||
| 22 | addition to "mem" and "standby". | ||
| 23 | |||
| 24 | For relative_sleep_states=0, which is the default, the following descriptions | ||
| 25 | apply. | ||
| 26 | |||
| 27 | state: Suspend-To-Idle | ||
| 13 | ACPI state: S0 | 28 | ACPI state: S0 |
| 14 | String: "freeze" | 29 | Label: "freeze" |
| 15 | 30 | ||
| 16 | This state is a generic, pure software, light-weight, low-power state. | 31 | This state is a generic, pure software, light-weight, system sleep state. |
| 17 | It allows more energy to be saved relative to idle by freezing user | 32 | It allows more energy to be saved relative to runtime idle by freezing user |
| 18 | space and putting all I/O devices into low-power states (possibly | 33 | 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 | 34 | lower-power than available at run time), such that the processors can |
| 20 | spend more time in their idle states. | 35 | spend more time in their idle states. |
| 21 | This state can be used for platforms without Standby/Suspend-to-RAM | 36 | |
| 37 | This state can be used for platforms without Power-On Suspend/Suspend-to-RAM | ||
| 22 | support, or it can be used in addition to Suspend-to-RAM (memory sleep) | 38 | support, or it can be used in addition to Suspend-to-RAM (memory sleep) |
| 23 | to provide reduced resume latency. | 39 | to provide reduced resume latency. It is always supported. |
| 24 | 40 | ||
| 25 | 41 | ||
| 26 | State: Standby / Power-On Suspend | 42 | State: Standby / Power-On Suspend |
| 27 | ACPI State: S1 | 43 | ACPI State: S1 |
| 28 | String: "standby" | 44 | Label: "standby" |
| 29 | 45 | ||
| 30 | This state offers minimal, though real, power savings, while providing | 46 | This state, if supported, offers moderate, though real, power savings, while |
| 31 | a very low-latency transition back to a working system. No operating | 47 | providing a relatively low-latency transition back to a working system. No |
| 32 | state is lost (the CPU retains power), so the system easily starts up | 48 | operating state is lost (the CPU retains power), so the system easily starts up |
| 33 | again where it left off. | 49 | again where it left off. |
| 34 | 50 | ||
| 35 | We try to put devices in a low-power state equivalent to D1, which | 51 | In addition to freezing user space and putting all I/O devices into low-power |
| 36 | also offers low power savings, but low resume latency. Not all devices | 52 | states, which is done for Suspend-To-Idle too, nonboot CPUs are taken offline |
| 37 | support D1, and those that don't are left on. | 53 | and all low-level system functions are suspended during transitions into this |
| 54 | state. For this reason, it should allow more energy to be saved relative to | ||
| 55 | Suspend-To-Idle, but the resume latency will generally be greater than for that | ||
| 56 | state. | ||
| 38 | 57 | ||
| 39 | 58 | ||
| 40 | State: Suspend-to-RAM | 59 | State: Suspend-to-RAM |
| 41 | ACPI State: S3 | 60 | ACPI State: S3 |
| 42 | String: "mem" | 61 | Label: "mem" |
| 43 | 62 | ||
| 44 | This state offers significant power savings as everything in the | 63 | This state, if supported, offers significant power savings as everything in the |
| 45 | system is put into a low-power state, except for memory, which is | 64 | system is put into a low-power state, except for memory, which should be placed |
| 46 | placed in self-refresh mode to retain its contents. | 65 | into the self-refresh mode to retain its contents. All of the steps carried out |
| 66 | when entering Power-On Suspend are also carried out during transitions to STR. | ||
| 67 | Additional operations may take place depending on the platform capabilities. In | ||
| 68 | particular, on ACPI systems the kernel passes control to the BIOS (platform | ||
| 69 | firmware) as the last step during STR transitions and that usually results in | ||
| 70 | powering down some more low-level components that aren't directly controlled by | ||
| 71 | the kernel. | ||
| 47 | 72 | ||
| 48 | System and device state is saved and kept in memory. All devices are | 73 | System and device state is saved and kept in memory. All devices are suspended |
| 49 | suspended and put into D3. In many cases, all peripheral buses lose | 74 | and put into low-power states. In many cases, all peripheral buses lose power |
| 50 | power when entering STR, so devices must be able to handle the | 75 | when entering STR, so devices must be able to handle the transition back to the |
| 51 | transition back to the On state. | 76 | "on" state. |
| 52 | 77 | ||
| 53 | For at least ACPI, STR requires some minimal boot-strapping code to | 78 | For at least ACPI, STR requires some minimal boot-strapping code to resume the |
| 54 | resume the system from STR. This may be true on other platforms. | 79 | system from it. This may be the case on other platforms too. |
| 55 | 80 | ||
| 56 | 81 | ||
| 57 | State: Suspend-to-disk | 82 | State: Suspend-to-disk |
| 58 | ACPI State: S4 | 83 | ACPI State: S4 |
| 59 | String: "disk" | 84 | Label: "disk" |
| 60 | 85 | ||
| 61 | This state offers the greatest power savings, and can be used even in | 86 | This state offers the greatest power savings, and can be used even in |
| 62 | the absence of low-level platform support for power management. This | 87 | the absence of low-level platform support for power management. This |
diff --git a/Documentation/power/suspend-and-cpuhotplug.txt b/Documentation/power/suspend-and-cpuhotplug.txt index e13dafc8e8f1..2850df3bf957 100644 --- a/Documentation/power/suspend-and-cpuhotplug.txt +++ b/Documentation/power/suspend-and-cpuhotplug.txt | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | Interaction of Suspend code (S3) with the CPU hotplug infrastructure | 1 | Interaction of Suspend code (S3) with the CPU hotplug infrastructure |
| 2 | 2 | ||
| 3 | (C) 2011 Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> | 3 | (C) 2011 - 2014 Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | I. How does the regular CPU hotplug code differ from how the Suspend-to-RAM | 6 | I. How does the regular CPU hotplug code differ from how the Suspend-to-RAM |
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt index 079160e22bcc..f732a8321e8a 100644 --- a/Documentation/power/swsusp.txt +++ b/Documentation/power/swsusp.txt | |||
| @@ -220,7 +220,10 @@ Q: After resuming, system is paging heavily, leading to very bad interactivity. | |||
| 220 | 220 | ||
| 221 | A: Try running | 221 | A: Try running |
| 222 | 222 | ||
| 223 | cat `cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u` > /dev/null | 223 | cat /proc/[0-9]*/maps | grep / | sed 's:.* /:/:' | sort -u | while read file |
| 224 | do | ||
| 225 | test -f "$file" && cat "$file" > /dev/null | ||
| 226 | done | ||
| 224 | 227 | ||
| 225 | after resume. swapoff -a; swapon -a may also be useful. | 228 | after resume. swapoff -a; swapon -a may also be useful. |
| 226 | 229 | ||
diff --git a/Documentation/powerpc/cpu_families.txt b/Documentation/powerpc/cpu_families.txt new file mode 100644 index 000000000000..fc08e22feb1a --- /dev/null +++ b/Documentation/powerpc/cpu_families.txt | |||
| @@ -0,0 +1,221 @@ | |||
| 1 | CPU Families | ||
| 2 | ============ | ||
| 3 | |||
| 4 | This document tries to summarise some of the different cpu families that exist | ||
| 5 | and are supported by arch/powerpc. | ||
| 6 | |||
| 7 | |||
| 8 | Book3S (aka sPAPR) | ||
| 9 | ------------------ | ||
| 10 | |||
| 11 | - Hash MMU | ||
| 12 | - Mix of 32 & 64 bit | ||
| 13 | |||
| 14 | +--------------+ +----------------+ | ||
| 15 | | Old POWER | --------------> | RS64 (threads) | | ||
| 16 | +--------------+ +----------------+ | ||
| 17 | | | ||
| 18 | | | ||
| 19 | v | ||
| 20 | +--------------+ +----------------+ +------+ | ||
| 21 | | 601 | --------------> | 603 | ---> | e300 | | ||
| 22 | +--------------+ +----------------+ +------+ | ||
| 23 | | | | ||
| 24 | | | | ||
| 25 | v v | ||
| 26 | +--------------+ +----------------+ +-------+ | ||
| 27 | | 604 | | 750 (G3) | ---> | 750CX | | ||
| 28 | +--------------+ +----------------+ +-------+ | ||
| 29 | | | | | ||
| 30 | | | | | ||
| 31 | v v v | ||
| 32 | +--------------+ +----------------+ +-------+ | ||
| 33 | | 620 (64 bit) | | 7400 | | 750CL | | ||
| 34 | +--------------+ +----------------+ +-------+ | ||
| 35 | | | | | ||
| 36 | | | | | ||
| 37 | v v v | ||
| 38 | +--------------+ +----------------+ +-------+ | ||
| 39 | | POWER3/630 | | 7410 | | 750FX | | ||
| 40 | +--------------+ +----------------+ +-------+ | ||
| 41 | | | | ||
| 42 | | | | ||
| 43 | v v | ||
| 44 | +--------------+ +----------------+ | ||
| 45 | | POWER3+ | | 7450 | | ||
| 46 | +--------------+ +----------------+ | ||
| 47 | | | | ||
| 48 | | | | ||
| 49 | v v | ||
| 50 | +--------------+ +----------------+ | ||
| 51 | | POWER4 | | 7455 | | ||
| 52 | +--------------+ +----------------+ | ||
| 53 | | | | ||
| 54 | | | | ||
| 55 | v v | ||
| 56 | +--------------+ +-------+ +----------------+ | ||
| 57 | | POWER4+ | --> | 970 | | 7447 | | ||
| 58 | +--------------+ +-------+ +----------------+ | ||
| 59 | | | | | ||
| 60 | | | | | ||
| 61 | v v v | ||
| 62 | +--------------+ +-------+ +----------------+ | ||
| 63 | | POWER5 | | 970FX | | 7448 | | ||
| 64 | +--------------+ +-------+ +----------------+ | ||
| 65 | | | | | ||
| 66 | | | | | ||
| 67 | v v v | ||
| 68 | +--------------+ +-------+ +----------------+ | ||
| 69 | | POWER5+ | | 970MP | | e600 | | ||
| 70 | +--------------+ +-------+ +----------------+ | ||
| 71 | | | ||
| 72 | | | ||
| 73 | v | ||
| 74 | +--------------+ | ||
| 75 | | POWER5++ | | ||
| 76 | +--------------+ | ||
| 77 | | | ||
| 78 | | | ||
| 79 | v | ||
| 80 | +--------------+ +-------+ | ||
| 81 | | POWER6 | <-?-> | Cell | | ||
| 82 | +--------------+ +-------+ | ||
| 83 | | | ||
| 84 | | | ||
| 85 | v | ||
| 86 | +--------------+ | ||
| 87 | | POWER7 | | ||
| 88 | +--------------+ | ||
| 89 | | | ||
| 90 | | | ||
| 91 | v | ||
| 92 | +--------------+ | ||
| 93 | | POWER7+ | | ||
| 94 | +--------------+ | ||
| 95 | | | ||
| 96 | | | ||
| 97 | v | ||
| 98 | +--------------+ | ||
| 99 | | POWER8 | | ||
| 100 | +--------------+ | ||
| 101 | |||
| 102 | |||
| 103 | +---------------+ | ||
| 104 | | PA6T (64 bit) | | ||
| 105 | +---------------+ | ||
| 106 | |||
| 107 | |||
| 108 | IBM BookE | ||
| 109 | --------- | ||
| 110 | |||
| 111 | - Software loaded TLB. | ||
| 112 | - All 32 bit | ||
| 113 | |||
| 114 | +--------------+ | ||
| 115 | | 401 | | ||
| 116 | +--------------+ | ||
| 117 | | | ||
| 118 | | | ||
| 119 | v | ||
| 120 | +--------------+ | ||
| 121 | | 403 | | ||
| 122 | +--------------+ | ||
| 123 | | | ||
| 124 | | | ||
| 125 | v | ||
| 126 | +--------------+ | ||
| 127 | | 405 | | ||
| 128 | +--------------+ | ||
| 129 | | | ||
| 130 | | | ||
| 131 | v | ||
| 132 | +--------------+ | ||
| 133 | | 440 | | ||
| 134 | +--------------+ | ||
| 135 | | | ||
| 136 | | | ||
| 137 | v | ||
| 138 | +--------------+ +----------------+ | ||
| 139 | | 450 | --> | BG/P | | ||
| 140 | +--------------+ +----------------+ | ||
| 141 | | | ||
| 142 | | | ||
| 143 | v | ||
| 144 | +--------------+ | ||
| 145 | | 460 | | ||
| 146 | +--------------+ | ||
| 147 | | | ||
| 148 | | | ||
| 149 | v | ||
| 150 | +--------------+ | ||
| 151 | | 476 | | ||
| 152 | +--------------+ | ||
| 153 | |||
| 154 | |||
| 155 | Motorola/Freescale 8xx | ||
| 156 | ---------------------- | ||
| 157 | |||
| 158 | - Software loaded with hardware assist. | ||
| 159 | - All 32 bit | ||
| 160 | |||
| 161 | +-------------+ | ||
| 162 | | MPC8xx Core | | ||
| 163 | +-------------+ | ||
| 164 | |||
| 165 | |||
| 166 | Freescale BookE | ||
| 167 | --------------- | ||
| 168 | |||
| 169 | - Software loaded TLB. | ||
| 170 | - e6500 adds HW loaded indirect TLB entries. | ||
| 171 | - Mix of 32 & 64 bit | ||
| 172 | |||
| 173 | +--------------+ | ||
| 174 | | e200 | | ||
| 175 | +--------------+ | ||
| 176 | |||
| 177 | |||
| 178 | +--------------------------------+ | ||
| 179 | | e500 | | ||
| 180 | +--------------------------------+ | ||
| 181 | | | ||
| 182 | | | ||
| 183 | v | ||
| 184 | +--------------------------------+ | ||
| 185 | | e500v2 | | ||
| 186 | +--------------------------------+ | ||
| 187 | | | ||
| 188 | | | ||
| 189 | v | ||
| 190 | +--------------------------------+ | ||
| 191 | | e500mc (Book3e) | | ||
| 192 | +--------------------------------+ | ||
| 193 | | | ||
| 194 | | | ||
| 195 | v | ||
| 196 | +--------------------------------+ | ||
| 197 | | e5500 (64 bit) | | ||
| 198 | +--------------------------------+ | ||
| 199 | | | ||
| 200 | | | ||
| 201 | v | ||
| 202 | +--------------------------------+ | ||
| 203 | | e6500 (HW TLB) (Multithreaded) | | ||
| 204 | +--------------------------------+ | ||
| 205 | |||
| 206 | |||
| 207 | IBM A2 core | ||
| 208 | ----------- | ||
| 209 | |||
| 210 | - Book3E, software loaded TLB + HW loaded indirect TLB entries. | ||
| 211 | - 64 bit | ||
| 212 | |||
| 213 | +--------------+ +----------------+ | ||
| 214 | | A2 core | --> | WSP | | ||
| 215 | +--------------+ +----------------+ | ||
| 216 | | | ||
| 217 | | | ||
| 218 | v | ||
| 219 | +--------------+ | ||
| 220 | | BG/Q | | ||
| 221 | +--------------+ | ||
diff --git a/Documentation/powerpc/transactional_memory.txt b/Documentation/powerpc/transactional_memory.txt index dc23e58ae264..9791e98ab49c 100644 --- a/Documentation/powerpc/transactional_memory.txt +++ b/Documentation/powerpc/transactional_memory.txt | |||
| @@ -160,7 +160,7 @@ 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 | 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 | 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 | 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 | 163 | because of the treclaim, so any memory written between the tbegin and the |
| 164 | signal will be rolled back anyway. | 164 | signal will be rolled back anyway. |
| 165 | 165 | ||
| 166 | For signals taken in non-TM or suspended mode, we use the | 166 | For signals taken in non-TM or suspended mode, we use the |
diff --git a/Documentation/printk-formats.txt b/Documentation/printk-formats.txt index 6f4eb322ffaf..b4498218c474 100644 --- a/Documentation/printk-formats.txt +++ b/Documentation/printk-formats.txt | |||
| @@ -199,11 +199,11 @@ struct va_format: | |||
| 199 | Do not use this feature without some mechanism to verify the | 199 | Do not use this feature without some mechanism to verify the |
| 200 | correctness of the format string and va_list arguments. | 200 | correctness of the format string and va_list arguments. |
| 201 | 201 | ||
| 202 | u64 SHOULD be printed with %llu/%llx, (unsigned long long): | 202 | u64 SHOULD be printed with %llu/%llx: |
| 203 | 203 | ||
| 204 | printk("%llu", u64_var); | 204 | printk("%llu", u64_var); |
| 205 | 205 | ||
| 206 | s64 SHOULD be printed with %lld/%llx, (long long): | 206 | s64 SHOULD be printed with %lld/%llx: |
| 207 | 207 | ||
| 208 | printk("%lld", s64_var); | 208 | printk("%lld", s64_var); |
| 209 | 209 | ||
diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt index 93cb97974986..ca895fd211e4 100644 --- a/Documentation/pwm.txt +++ b/Documentation/pwm.txt | |||
| @@ -19,7 +19,8 @@ should instead register a static mapping that can be used to match PWM | |||
| 19 | consumers to providers, as given in the following example: | 19 | consumers to providers, as given in the following example: |
| 20 | 20 | ||
| 21 | static struct pwm_lookup board_pwm_lookup[] = { | 21 | static struct pwm_lookup board_pwm_lookup[] = { |
| 22 | PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL), | 22 | PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL, |
| 23 | 50000, PWM_POLARITY_NORMAL), | ||
| 23 | }; | 24 | }; |
| 24 | 25 | ||
| 25 | static void __init board_init(void) | 26 | static void __init board_init(void) |
| @@ -97,6 +98,13 @@ pwm_chip as argument which provides a description of the PWM chip, the | |||
| 97 | number of PWM devices provided by the chip and the chip-specific | 98 | number of PWM devices provided by the chip and the chip-specific |
| 98 | implementation of the supported PWM operations to the framework. | 99 | implementation of the supported PWM operations to the framework. |
| 99 | 100 | ||
| 101 | When implementing polarity support in a PWM driver, make sure to respect the | ||
| 102 | signal conventions in the PWM framework. By definition, normal polarity | ||
| 103 | characterizes a signal starts high for the duration of the duty cycle and | ||
| 104 | goes low for the remainder of the period. Conversely, a signal with inversed | ||
| 105 | polarity starts low for the duration of the duty cycle and goes high for the | ||
| 106 | remainder of the period. | ||
| 107 | |||
| 100 | Locking | 108 | Locking |
| 101 | ------- | 109 | ------- |
| 102 | 110 | ||
diff --git a/Documentation/rbtree.txt b/Documentation/rbtree.txt index 61b6c48871a0..39873ef41bf9 100644 --- a/Documentation/rbtree.txt +++ b/Documentation/rbtree.txt | |||
| @@ -255,7 +255,7 @@ However, rbtree can be augmented to store such interval ranges in a structured | |||
| 255 | way making it possible to do efficient lookup and exact match. | 255 | way making it possible to do efficient lookup and exact match. |
| 256 | 256 | ||
| 257 | This "extra information" stored in each node is the maximum hi | 257 | This "extra information" stored in each node is the maximum hi |
| 258 | (max_hi) value among all the nodes that are its descendents. This | 258 | (max_hi) value among all the nodes that are its descendants. This |
| 259 | information can be maintained at each node just be looking at the node | 259 | information can be maintained at each node just be looking at the node |
| 260 | and its immediate children. And this will be used in O(log n) lookup | 260 | and its immediate children. And this will be used in O(log n) lookup |
| 261 | for lowest match (lowest start address among all possible matches) | 261 | for lowest match (lowest start address among all possible matches) |
diff --git a/Documentation/rfkill.txt b/Documentation/rfkill.txt index f430004df73c..427e89712f4a 100644 --- a/Documentation/rfkill.txt +++ b/Documentation/rfkill.txt | |||
| @@ -21,7 +21,7 @@ aircraft. | |||
| 21 | The rfkill subsystem has a concept of "hard" and "soft" block, which | 21 | The rfkill subsystem has a concept of "hard" and "soft" block, which |
| 22 | differ little in their meaning (block == transmitters off) but rather in | 22 | differ little in their meaning (block == transmitters off) but rather in |
| 23 | whether they can be changed or not: | 23 | whether they can be changed or not: |
| 24 | - hard block: read-only radio block that cannot be overriden by software | 24 | - hard block: read-only radio block that cannot be overridden by software |
| 25 | - soft block: writable radio block (need not be readable) that is set by | 25 | - soft block: writable radio block (need not be readable) that is set by |
| 26 | the system software. | 26 | the system software. |
| 27 | 27 | ||
diff --git a/Documentation/robust-futexes.txt b/Documentation/robust-futexes.txt index 0a9446a53bd1..af6fce23e484 100644 --- a/Documentation/robust-futexes.txt +++ b/Documentation/robust-futexes.txt | |||
| @@ -210,7 +210,7 @@ i386 and x86_64 syscalls are wired up at the moment, and Ulrich has | |||
| 210 | tested the new glibc code (on x86_64 and i386), and it works for his | 210 | tested the new glibc code (on x86_64 and i386), and it works for his |
| 211 | robust-mutex testcases. | 211 | robust-mutex testcases. |
| 212 | 212 | ||
| 213 | All other architectures should build just fine too - but they wont have | 213 | All other architectures should build just fine too - but they won't have |
| 214 | the new syscalls yet. | 214 | the new syscalls yet. |
| 215 | 215 | ||
| 216 | Architectures need to implement the new futex_atomic_cmpxchg_inatomic() | 216 | Architectures need to implement the new futex_atomic_cmpxchg_inatomic() |
diff --git a/Documentation/s390/monreader.txt b/Documentation/s390/monreader.txt index beeaa4b24427..d3729585fdb0 100644 --- a/Documentation/s390/monreader.txt +++ b/Documentation/s390/monreader.txt | |||
| @@ -10,7 +10,7 @@ Author: Gerald Schaefer (geraldsc@de.ibm.com) | |||
| 10 | Description | 10 | Description |
| 11 | =========== | 11 | =========== |
| 12 | This item delivers a new Linux API in the form of a misc char device that is | 12 | This item delivers a new Linux API in the form of a misc char device that is |
| 13 | useable from user space and allows read access to the z/VM Monitor Records | 13 | usable from user space and allows read access to the z/VM Monitor Records |
| 14 | collected by the *MONITOR System Service of z/VM. | 14 | collected by the *MONITOR System Service of z/VM. |
| 15 | 15 | ||
| 16 | 16 | ||
diff --git a/Documentation/s390/zfcpdump.txt b/Documentation/s390/zfcpdump.txt index cf45d27c4608..dc929be96016 100644 --- a/Documentation/s390/zfcpdump.txt +++ b/Documentation/s390/zfcpdump.txt | |||
| @@ -1,15 +1,15 @@ | |||
| 1 | s390 SCSI dump tool (zfcpdump) | 1 | The s390 SCSI dump tool (zfcpdump) |
| 2 | 2 | ||
| 3 | System z machines (z900 or higher) provide hardware support for creating system | 3 | System z machines (z900 or higher) provide hardware support for creating system |
| 4 | dumps on SCSI disks. The dump process is initiated by booting a dump tool, which | 4 | dumps on SCSI disks. The dump process is initiated by booting a dump tool, which |
| 5 | has to create a dump of the current (probably crashed) Linux image. In order to | 5 | has to create a dump of the current (probably crashed) Linux image. In order to |
| 6 | not overwrite memory of the crashed Linux with data of the dump tool, the | 6 | not overwrite memory of the crashed Linux with data of the dump tool, the |
| 7 | hardware saves some memory plus the register sets of the boot cpu before the | 7 | hardware saves some memory plus the register sets of the boot CPU before the |
| 8 | dump tool is loaded. There exists an SCLP hardware interface to obtain the saved | 8 | dump tool is loaded. There exists an SCLP hardware interface to obtain the saved |
| 9 | memory afterwards. Currently 32 MB are saved. | 9 | memory afterwards. Currently 32 MB are saved. |
| 10 | 10 | ||
| 11 | This zfcpdump implementation consists of a Linux dump kernel together with | 11 | This zfcpdump implementation consists of a Linux dump kernel together with |
| 12 | a userspace dump tool, which are loaded together into the saved memory region | 12 | a user space dump tool, which are loaded together into the saved memory region |
| 13 | below 32 MB. zfcpdump is installed on a SCSI disk using zipl (as contained in | 13 | below 32 MB. zfcpdump is installed on a SCSI disk using zipl (as contained in |
| 14 | the s390-tools package) to make the device bootable. The operator of a Linux | 14 | the s390-tools package) to make the device bootable. The operator of a Linux |
| 15 | system can then trigger a SCSI dump by booting the SCSI disk, where zfcpdump | 15 | system can then trigger a SCSI dump by booting the SCSI disk, where zfcpdump |
| @@ -19,68 +19,33 @@ The kernel part of zfcpdump is implemented as a debugfs file under "zcore/mem", | |||
| 19 | which exports memory and registers of the crashed Linux in an s390 | 19 | which exports memory and registers of the crashed Linux in an s390 |
| 20 | standalone dump format. It can be used in the same way as e.g. /dev/mem. The | 20 | standalone dump format. It can be used in the same way as e.g. /dev/mem. The |
| 21 | dump format defines a 4K header followed by plain uncompressed memory. The | 21 | dump format defines a 4K header followed by plain uncompressed memory. The |
| 22 | register sets are stored in the prefix pages of the respective cpus. To build a | 22 | register sets are stored in the prefix pages of the respective CPUs. To build a |
| 23 | dump enabled kernel with the zcore driver, the kernel config option | 23 | dump enabled kernel with the zcore driver, the kernel config option |
| 24 | CONFIG_ZFCPDUMP has to be set. When reading from "zcore/mem", the part of | 24 | CONFIG_CRASH_DUMP has to be set. When reading from "zcore/mem", the part of |
| 25 | memory, which has been saved by hardware is read by the driver via the SCLP | 25 | memory, which has been saved by hardware is read by the driver via the SCLP |
| 26 | hardware interface. The second part is just copied from the non overwritten real | 26 | hardware interface. The second part is just copied from the non overwritten real |
| 27 | memory. | 27 | memory. |
| 28 | 28 | ||
| 29 | The userspace application of zfcpdump can reside e.g. in an intitramfs or an | 29 | Since kernel version 3.12 also the /proc/vmcore file can also be used to access |
| 30 | initrd. It reads from zcore/mem and writes the system dump to a file on a | 30 | the dump. |
| 31 | SCSI disk. | ||
| 32 | 31 | ||
| 33 | To build a zfcpdump kernel use the following settings in your kernel | 32 | To get a valid zfcpdump kernel configuration use "make zfcpdump_defconfig". |
| 34 | configuration: | ||
| 35 | * CONFIG_ZFCPDUMP=y | ||
| 36 | * Enable ZFCP driver | ||
| 37 | * Enable SCSI driver | ||
| 38 | * Enable ext2 and ext3 filesystems | ||
| 39 | * Disable as many features as possible to keep the kernel small. | ||
| 40 | E.g. network support is not needed at all. | ||
| 41 | 33 | ||
| 42 | To use the zfcpdump userspace application in an initramfs you have to do the | 34 | The s390 zipl tool looks for the zfcpdump kernel and optional initrd/initramfs |
| 43 | following: | 35 | under the following locations: |
| 44 | 36 | ||
| 45 | * Copy the zfcpdump executable somewhere into your Linux tree. | 37 | * kernel: <zfcpdump directory>/zfcpdump.image |
| 46 | E.g. to "arch/s390/boot/zfcpdump. If you do not want to include | 38 | * ramdisk: <zfcpdump directory>/zfcpdump.rd |
| 47 | shared libraries, compile the tool with the "-static" gcc option. | ||
| 48 | * If you want to include e2fsck, add it to your source tree, too. The zfcpdump | ||
| 49 | application attempts to start /sbin/e2fsck from the ramdisk. | ||
| 50 | * Use an initramfs config file like the following: | ||
| 51 | 39 | ||
| 52 | dir /dev 755 0 0 | 40 | The zfcpdump directory is defined in the s390-tools package. |
| 53 | nod /dev/console 644 0 0 c 5 1 | ||
| 54 | nod /dev/null 644 0 0 c 1 3 | ||
| 55 | nod /dev/sda1 644 0 0 b 8 1 | ||
| 56 | nod /dev/sda2 644 0 0 b 8 2 | ||
| 57 | nod /dev/sda3 644 0 0 b 8 3 | ||
| 58 | nod /dev/sda4 644 0 0 b 8 4 | ||
| 59 | nod /dev/sda5 644 0 0 b 8 5 | ||
| 60 | nod /dev/sda6 644 0 0 b 8 6 | ||
| 61 | nod /dev/sda7 644 0 0 b 8 7 | ||
| 62 | nod /dev/sda8 644 0 0 b 8 8 | ||
| 63 | nod /dev/sda9 644 0 0 b 8 9 | ||
| 64 | nod /dev/sda10 644 0 0 b 8 10 | ||
| 65 | nod /dev/sda11 644 0 0 b 8 11 | ||
| 66 | nod /dev/sda12 644 0 0 b 8 12 | ||
| 67 | nod /dev/sda13 644 0 0 b 8 13 | ||
| 68 | nod /dev/sda14 644 0 0 b 8 14 | ||
| 69 | nod /dev/sda15 644 0 0 b 8 15 | ||
| 70 | file /init arch/s390/boot/zfcpdump 755 0 0 | ||
| 71 | file /sbin/e2fsck arch/s390/boot/e2fsck 755 0 0 | ||
| 72 | dir /proc 755 0 0 | ||
| 73 | dir /sys 755 0 0 | ||
| 74 | dir /mnt 755 0 0 | ||
| 75 | dir /sbin 755 0 0 | ||
| 76 | 41 | ||
| 77 | * Issue "make image" to build the zfcpdump image with initramfs. | 42 | The user space application of zfcpdump can reside in an intitramfs or an |
| 43 | initrd. It can also be included in a built-in kernel initramfs. The application | ||
| 44 | reads from /proc/vmcore or zcore/mem and writes the system dump to a SCSI disk. | ||
| 78 | 45 | ||
| 79 | In a Linux distribution the zfcpdump enabled kernel image must be copied to | 46 | The s390-tools package version 1.24.0 and above builds an external zfcpdump |
| 80 | /usr/share/zfcpdump/zfcpdump.image, where the s390 zipl tool is looking for the | 47 | initramfs with a user space application that writes the dump to a SCSI |
| 81 | dump kernel when preparing a SCSI dump disk. | 48 | partition. |
| 82 | |||
| 83 | If you use a ramdisk copy it to "/usr/share/zfcpdump/zfcpdump.rd". | ||
| 84 | 49 | ||
| 85 | For more information on how to use zfcpdump refer to the s390 'Using the Dump | 50 | For more information on how to use zfcpdump refer to the s390 'Using the Dump |
| 86 | Tools book', which is available from | 51 | Tools book', which is available from |
diff --git a/Documentation/scsi/LICENSE.qla2xxx b/Documentation/scsi/LICENSE.qla2xxx index 5020b7b5a244..52f0b4359234 100644 --- a/Documentation/scsi/LICENSE.qla2xxx +++ b/Documentation/scsi/LICENSE.qla2xxx | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | Copyright (c) 2003-2013 QLogic Corporation | 1 | Copyright (c) 2003-2014 QLogic Corporation |
| 2 | QLogic Linux FC-FCoE Driver | 2 | QLogic Linux FC-FCoE Driver |
| 3 | 3 | ||
| 4 | This program includes a device driver for Linux 3.x. | 4 | This program includes a device driver for Linux 3.x. |
diff --git a/Documentation/security/Smack.txt b/Documentation/security/Smack.txt index 5ea996f21d6c..b6ef7e9dba30 100644 --- a/Documentation/security/Smack.txt +++ b/Documentation/security/Smack.txt | |||
| @@ -204,6 +204,16 @@ onlycap | |||
| 204 | these capabilities are effective at for processes with any | 204 | these capabilities are effective at for processes with any |
| 205 | label. The value is set by writing the desired label to the | 205 | label. The value is set by writing the desired label to the |
| 206 | file or cleared by writing "-" to the file. | 206 | file or cleared by writing "-" to the file. |
| 207 | ptrace | ||
| 208 | This is used to define the current ptrace policy | ||
| 209 | 0 - default: this is the policy that relies on smack access rules. | ||
| 210 | For the PTRACE_READ a subject needs to have a read access on | ||
| 211 | object. For the PTRACE_ATTACH a read-write access is required. | ||
| 212 | 1 - exact: this is the policy that limits PTRACE_ATTACH. Attach is | ||
| 213 | only allowed when subject's and object's labels are equal. | ||
| 214 | PTRACE_READ is not affected. Can be overriden with CAP_SYS_PTRACE. | ||
| 215 | 2 - draconian: this policy behaves like the 'exact' above with an | ||
| 216 | exception that it can't be overriden with CAP_SYS_PTRACE. | ||
| 207 | revoke-subject | 217 | revoke-subject |
| 208 | Writing a Smack label here sets the access to '-' for all access | 218 | Writing a Smack label here sets the access to '-' for all access |
| 209 | rules with that subject label. | 219 | rules with that subject label. |
diff --git a/Documentation/security/Yama.txt b/Documentation/security/Yama.txt index dd908cf64ecf..227a63f018a2 100644 --- a/Documentation/security/Yama.txt +++ b/Documentation/security/Yama.txt | |||
| @@ -37,7 +37,7 @@ still work as root). | |||
| 37 | In mode 1, software that has defined application-specific relationships | 37 | In mode 1, software that has defined application-specific relationships |
| 38 | between a debugging process and its inferior (crash handlers, etc), | 38 | between a debugging process and its inferior (crash handlers, etc), |
| 39 | prctl(PR_SET_PTRACER, pid, ...) can be used. An inferior can declare which | 39 | prctl(PR_SET_PTRACER, pid, ...) can be used. An inferior can declare which |
| 40 | other process (and its descendents) are allowed to call PTRACE_ATTACH | 40 | other process (and its descendants) are allowed to call PTRACE_ATTACH |
| 41 | against it. Only one such declared debugging process can exists for | 41 | against it. Only one such declared debugging process can exists for |
| 42 | each inferior at a time. For example, this is used by KDE, Chromium, and | 42 | each inferior at a time. For example, this is used by KDE, Chromium, and |
| 43 | Firefox's crash handlers, and by Wine for allowing only Wine processes | 43 | Firefox's crash handlers, and by Wine for allowing only Wine processes |
diff --git a/Documentation/serial/00-INDEX b/Documentation/serial/00-INDEX index f9c6b5ed03e7..8021a9f29fc5 100644 --- a/Documentation/serial/00-INDEX +++ b/Documentation/serial/00-INDEX | |||
| @@ -2,23 +2,15 @@ | |||
| 2 | - this file. | 2 | - this file. |
| 3 | README.cycladesZ | 3 | README.cycladesZ |
| 4 | - info on Cyclades-Z firmware loading. | 4 | - info on Cyclades-Z firmware loading. |
| 5 | digiepca.txt | ||
| 6 | - info on Digi Intl. {PC,PCI,EISA}Xx and Xem series cards. | ||
| 7 | driver | 5 | driver |
| 8 | - intro to the low level serial driver. | 6 | - intro to the low level serial driver. |
| 9 | moxa-smartio | 7 | moxa-smartio |
| 10 | - file with info on installing/using Moxa multiport serial driver. | 8 | - file with info on installing/using Moxa multiport serial driver. |
| 11 | n_gsm.txt | 9 | n_gsm.txt |
| 12 | - GSM 0710 tty multiplexer howto. | 10 | - GSM 0710 tty multiplexer howto. |
| 13 | riscom8.txt | ||
| 14 | - notes on using the RISCom/8 multi-port serial driver. | ||
| 15 | rocket.txt | 11 | rocket.txt |
| 16 | - info on the Comtrol RocketPort multiport serial driver. | 12 | - info on the Comtrol RocketPort multiport serial driver. |
| 17 | serial-rs485.txt | 13 | serial-rs485.txt |
| 18 | - info about RS485 structures and support in the kernel. | 14 | - info about RS485 structures and support in the kernel. |
| 19 | specialix.txt | ||
| 20 | - info on hardware/driver for specialix IO8+ multiport serial card. | ||
| 21 | sx.txt | ||
| 22 | - info on the Specialix SX/SI multiport serial driver. | ||
| 23 | tty.txt | 15 | tty.txt |
| 24 | - guide to the locking policies of the tty layer. | 16 | - guide to the locking policies of the tty layer. |
diff --git a/Documentation/serial/digiepca.txt b/Documentation/serial/digiepca.txt deleted file mode 100644 index f2560e22f2c9..000000000000 --- a/Documentation/serial/digiepca.txt +++ /dev/null | |||
| @@ -1,98 +0,0 @@ | |||
| 1 | NOTE: This driver is obsolete. Digi provides a 2.6 driver (dgdm) at | ||
| 2 | http://www.digi.com for PCI cards. They no longer maintain this driver, | ||
| 3 | and have no 2.6 driver for ISA cards. | ||
| 4 | |||
| 5 | This driver requires a number of user-space tools. They can be acquired from | ||
| 6 | http://www.digi.com, but only works with 2.4 kernels. | ||
| 7 | |||
| 8 | |||
| 9 | The Digi Intl. epca driver. | ||
| 10 | ---------------------------- | ||
| 11 | The Digi Intl. epca driver for Linux supports the following boards: | ||
| 12 | |||
| 13 | Digi PC/Xem, PC/Xr, PC/Xe, PC/Xi, PC/Xeve | ||
| 14 | Digi EISA/Xem, PCI/Xem, PCI/Xr | ||
| 15 | |||
| 16 | Limitations: | ||
| 17 | ------------ | ||
| 18 | Currently the driver only autoprobes for supported PCI boards. | ||
| 19 | |||
| 20 | The Linux MAKEDEV command does not support generating the Digiboard | ||
| 21 | Devices. Users executing digiConfig to setup EISA and PC series cards | ||
| 22 | will have their device nodes automatically constructed (cud?? for ~CLOCAL, | ||
| 23 | and ttyD?? for CLOCAL). Users wishing to boot their board from the LILO | ||
| 24 | prompt, or those users booting PCI cards may use buildDIGI to construct | ||
| 25 | the necessary nodes. | ||
| 26 | |||
| 27 | Notes: | ||
| 28 | ------ | ||
| 29 | This driver may be configured via LILO. For users who have already configured | ||
| 30 | their driver using digiConfig, configuring from LILO will override previous | ||
| 31 | settings. Multiple boards may be configured by issuing multiple LILO command | ||
| 32 | lines. For examples see the bottom of this document. | ||
| 33 | |||
| 34 | Device names start at 0 and continue up. Beware of this as previous Digi | ||
| 35 | drivers started device names with 1. | ||
| 36 | |||
| 37 | PCI boards are auto-detected and configured by the driver. PCI boards will | ||
| 38 | be allocated device numbers (internally) beginning with the lowest PCI slot | ||
| 39 | first. In other words a PCI card in slot 3 will always have higher device | ||
| 40 | nodes than a PCI card in slot 1. | ||
| 41 | |||
| 42 | LILO config examples: | ||
| 43 | --------------------- | ||
| 44 | Using LILO's APPEND command, a string of comma separated identifiers or | ||
| 45 | integers can be used to configure supported boards. The six values in order | ||
| 46 | are: | ||
| 47 | |||
| 48 | Enable/Disable this card or Override, | ||
| 49 | Type of card: PC/Xe (AccelePort) (0), PC/Xeve (1), PC/Xem or PC/Xr (2), | ||
| 50 | EISA/Xem (3), PC/64Xe (4), PC/Xi (5), | ||
| 51 | Enable/Disable alternate pin arrangement, | ||
| 52 | Number of ports on this card, | ||
| 53 | I/O Port where card is configured (in HEX if using string identifiers), | ||
| 54 | Base of memory window (in HEX if using string identifiers), | ||
| 55 | |||
| 56 | NOTE : PCI boards are auto-detected and configured. Do not attempt to | ||
| 57 | configure PCI boards with the LILO append command. If you wish to override | ||
| 58 | previous configuration data (As set by digiConfig), but you do not wish to | ||
| 59 | configure any specific card (Example if there are PCI cards in the system) | ||
| 60 | the following override command will accomplish this: | ||
| 61 | -> append="digi=2" | ||
| 62 | |||
| 63 | Samples: | ||
| 64 | append="digiepca=E,PC/Xe,D,16,200,D0000" | ||
| 65 | or | ||
| 66 | append="digi=1,0,0,16,512,851968" | ||
| 67 | |||
| 68 | Supporting Tools: | ||
| 69 | ----------------- | ||
| 70 | Supporting tools include digiDload, digiConfig, buildPCI, and ditty. See | ||
| 71 | drivers/char/README.epca for more details. Note, | ||
| 72 | this driver REQUIRES that digiDload be executed prior to it being used. | ||
| 73 | Failure to do this will result in an ENODEV error. | ||
| 74 | |||
| 75 | Documentation: | ||
| 76 | -------------- | ||
| 77 | Complete documentation for this product may be found in the tool package. | ||
| 78 | |||
| 79 | Sources of information and support: | ||
| 80 | ----------------------------------- | ||
| 81 | Digi Intl. support site for this product: | ||
| 82 | |||
| 83 | -> http://www.digi.com | ||
| 84 | |||
| 85 | Acknowledgments: | ||
| 86 | ---------------- | ||
| 87 | Much of this work (And even text) was derived from a similar document | ||
| 88 | supporting the original public domain DigiBoard driver Copyright (C) | ||
| 89 | 1994,1995 Troy De Jongh. Many thanks to Christoph Lameter | ||
| 90 | (christoph@lameter.com) and Mike McLagan (mike.mclagan@linux.org) who authored | ||
| 91 | and contributed to the original document. | ||
| 92 | |||
| 93 | Changelog: | ||
| 94 | ---------- | ||
| 95 | 10-29-04: Update status of driver, remove dead links in document | ||
| 96 | James Nelson <james4765@gmail.com> | ||
| 97 | |||
| 98 | 2000 (?) Original Document | ||
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index c3a7689a90e6..3bba1aeb799c 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
| @@ -429,3 +429,28 @@ thus: | |||
| 429 | struct uart_port port; | 429 | struct uart_port port; |
| 430 | int my_stuff; | 430 | int my_stuff; |
| 431 | }; | 431 | }; |
| 432 | |||
| 433 | Modem control lines via GPIO | ||
| 434 | ---------------------------- | ||
| 435 | |||
| 436 | Some helpers are provided in order to set/get modem control lines via GPIO. | ||
| 437 | |||
| 438 | mctrl_gpio_init(dev, idx): | ||
| 439 | This will get the {cts,rts,...}-gpios from device tree if they are | ||
| 440 | present and request them, set direction etc, and return an | ||
| 441 | allocated structure. devm_* functions are used, so there's no need | ||
| 442 | to call mctrl_gpio_free(). | ||
| 443 | |||
| 444 | mctrl_gpio_free(dev, gpios): | ||
| 445 | This will free the requested gpios in mctrl_gpio_init(). | ||
| 446 | As devm_* function are used, there's generally no need to call | ||
| 447 | this function. | ||
| 448 | |||
| 449 | mctrl_gpio_to_gpiod(gpios, gidx) | ||
| 450 | This returns the gpio structure associated to the modem line index. | ||
| 451 | |||
| 452 | mctrl_gpio_set(gpios, mctrl): | ||
| 453 | This will sets the gpios according to the mctrl state. | ||
| 454 | |||
| 455 | mctrl_gpio_get(gpios, mctrl): | ||
| 456 | This will update mctrl with the gpios values. | ||
diff --git a/Documentation/serial/riscom8.txt b/Documentation/serial/riscom8.txt deleted file mode 100644 index 14f61fdad7ca..000000000000 --- a/Documentation/serial/riscom8.txt +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | * NOTE - this is an unmaintained driver. The original author cannot be located. | ||
| 2 | |||
| 3 | SDL Communications is now SBS Technologies, and does not have any | ||
| 4 | information on these ancient ISA cards on their website. | ||
| 5 | |||
| 6 | James Nelson <james4765@gmail.com> - 12-12-2004 | ||
| 7 | |||
| 8 | This is the README for RISCom/8 multi-port serial driver | ||
| 9 | (C) 1994-1996 D.Gorodchanin | ||
| 10 | See file LICENSE for terms and conditions. | ||
| 11 | |||
| 12 | NOTE: English is not my native language. | ||
| 13 | I'm sorry for any mistakes in this text. | ||
| 14 | |||
| 15 | Misc. notes for RISCom/8 serial driver, in no particular order :) | ||
| 16 | |||
| 17 | 1) This driver can support up to 4 boards at time. | ||
| 18 | Use string "riscom8=0xXXX,0xXXX,0xXXX,0xXXX" at LILO prompt, for | ||
| 19 | setting I/O base addresses for boards. If you compile driver | ||
| 20 | as module use modprobe options "iobase=0xXXX iobase1=0xXXX iobase2=..." | ||
| 21 | |||
| 22 | 2) The driver partially supports famous 'setserial' program, you can use almost | ||
| 23 | any of its options, excluding port & irq settings. | ||
| 24 | |||
| 25 | 3) There are some misc. defines at the beginning of riscom8.c, please read the | ||
| 26 | comments and try to change some of them in case of problems. | ||
| 27 | |||
| 28 | 4) I consider the current state of the driver as BETA. | ||
| 29 | |||
| 30 | 5) SDL Communications WWW page is http://www.sdlcomm.com. | ||
| 31 | |||
| 32 | 6) You can use the MAKEDEV program to create RISCom/8 /dev/ttyL* entries. | ||
| 33 | |||
| 34 | 7) Minor numbers for first board are 0-7, for second 8-15, etc. | ||
| 35 | |||
| 36 | 22 Apr 1996. | ||
diff --git a/Documentation/serial/specialix.txt b/Documentation/serial/specialix.txt deleted file mode 100644 index 6eb6f3a3331c..000000000000 --- a/Documentation/serial/specialix.txt +++ /dev/null | |||
| @@ -1,383 +0,0 @@ | |||
| 1 | |||
| 2 | specialix.txt -- specialix IO8+ multiport serial driver readme. | ||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 | Copyright (C) 1997 Roger Wolff (R.E.Wolff@BitWizard.nl) | ||
| 7 | |||
| 8 | Specialix pays for the development and support of this driver. | ||
| 9 | Please DO contact io8-linux@specialix.co.uk if you require | ||
| 10 | support. | ||
| 11 | |||
| 12 | This driver was developed in the BitWizard linux device | ||
| 13 | driver service. If you require a linux device driver for your | ||
| 14 | product, please contact devices@BitWizard.nl for a quote. | ||
| 15 | |||
| 16 | This code is firmly based on the riscom/8 serial driver, | ||
| 17 | written by Dmitry Gorodchanin. The specialix IO8+ card | ||
| 18 | programming information was obtained from the CL-CD1865 Data | ||
| 19 | Book, and Specialix document number 6200059: IO8+ Hardware | ||
| 20 | Functional Specification, augmented by document number 6200088: | ||
| 21 | Merak Hardware Functional Specification. (IO8+/PCI is also | ||
| 22 | called Merak) | ||
| 23 | |||
| 24 | |||
| 25 | This program is free software; you can redistribute it and/or | ||
| 26 | modify it under the terms of the GNU General Public License as | ||
| 27 | published by the Free Software Foundation; either version 2 of | ||
| 28 | the License, or (at your option) any later version. | ||
| 29 | |||
| 30 | This program is distributed in the hope that it will be | ||
| 31 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
| 32 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
| 33 | PURPOSE. See the GNU General Public License for more details. | ||
| 34 | |||
| 35 | You should have received a copy of the GNU General Public | ||
| 36 | License along with this program; if not, write to the Free | ||
| 37 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, | ||
| 38 | USA. | ||
| 39 | |||
| 40 | |||
| 41 | Intro | ||
| 42 | ===== | ||
| 43 | |||
| 44 | |||
| 45 | This file contains some random information, that I like to have online | ||
| 46 | instead of in a manual that can get lost. Ever misplace your Linux | ||
| 47 | kernel sources? And the manual of one of the boards in your computer? | ||
| 48 | |||
| 49 | |||
| 50 | Addresses and interrupts | ||
| 51 | ======================== | ||
| 52 | |||
| 53 | Address dip switch settings: | ||
| 54 | The dip switch sets bits 2-9 of the IO address. | ||
| 55 | |||
| 56 | 9 8 7 6 5 4 3 2 | ||
| 57 | +-----------------+ | ||
| 58 | 0 | X X X X X X X | | ||
| 59 | | | = IoBase = 0x100 | ||
| 60 | 1 | X | | ||
| 61 | +-----------------+ ------ RS232 connectors ----> | ||
| 62 | |||
| 63 | | | | | ||
| 64 | edge connector | ||
| 65 | | | | | ||
| 66 | V V V | ||
| 67 | |||
| 68 | Base address 0x100 caused a conflict in one of my computers once. I | ||
| 69 | haven't the foggiest why. My Specialix card is now at 0x180. My | ||
| 70 | other computer runs just fine with the Specialix card at 0x100.... | ||
| 71 | The card occupies 4 addresses, but actually only two are really used. | ||
| 72 | |||
| 73 | The PCI version doesn't have any dip switches. The BIOS assigns | ||
| 74 | an IO address. | ||
| 75 | |||
| 76 | The driver now still autoprobes at 0x100, 0x180, 0x250 and 0x260. If | ||
| 77 | that causes trouble for you, please report that. I'll remove | ||
| 78 | autoprobing then. | ||
| 79 | |||
| 80 | The driver will tell the card what IRQ to use, so you don't have to | ||
| 81 | change any jumpers to change the IRQ. Just use a command line | ||
| 82 | argument (irq=xx) to the insmod program to set the interrupt. | ||
| 83 | |||
| 84 | The BIOS assigns the IRQ on the PCI version. You have no say in what | ||
| 85 | IRQ to use in that case. | ||
| 86 | |||
| 87 | If your specialix cards are not at the default locations, you can use | ||
| 88 | the kernel command line argument "specialix=io0,irq0,io1,irq1...". | ||
| 89 | Here "io0" is the io address for the first card, and "irq0" is the | ||
| 90 | irq line that the first card should use. And so on. | ||
| 91 | |||
| 92 | Examples. | ||
| 93 | |||
| 94 | You use the driver as a module and have three cards at 0x100, 0x250 | ||
| 95 | and 0x180. And some way or another you want them detected in that | ||
| 96 | order. Moreover irq 12 is taken (e.g. by your PS/2 mouse). | ||
| 97 | |||
| 98 | insmod specialix.o iobase=0x100,0x250,0x180 irq=9,11,15 | ||
| 99 | |||
| 100 | The same three cards, but now in the kernel would require you to | ||
| 101 | add | ||
| 102 | |||
| 103 | specialix=0x100,9,0x250,11,0x180,15 | ||
| 104 | |||
| 105 | to the command line. This would become | ||
| 106 | |||
| 107 | append="specialix=0x100,9,0x250,11,0x180,15" | ||
| 108 | |||
| 109 | in your /etc/lilo.conf file if you use lilo. | ||
| 110 | |||
| 111 | The Specialix driver is slightly odd: It allows you to have the second | ||
| 112 | or third card detected without having a first card. This has | ||
| 113 | advantages and disadvantages. A slot that isn't filled by an ISA card, | ||
| 114 | might be filled if a PCI card is detected. Thus if you have an ISA | ||
| 115 | card at 0x250 and a PCI card, you would get: | ||
| 116 | |||
| 117 | sx0: specialix IO8+ Board at 0x100 not found. | ||
| 118 | sx1: specialix IO8+ Board at 0x180 not found. | ||
| 119 | sx2: specialix IO8+ board detected at 0x250, IRQ 12, CD1865 Rev. B. | ||
| 120 | sx3: specialix IO8+ Board at 0x260 not found. | ||
| 121 | sx0: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B. | ||
| 122 | |||
| 123 | This would happen if you don't give any probe hints to the driver. | ||
| 124 | If you would specify: | ||
| 125 | |||
| 126 | specialix=0x250,11 | ||
| 127 | |||
| 128 | you'd get the following messages: | ||
| 129 | |||
| 130 | sx0: specialix IO8+ board detected at 0x250, IRQ 11, CD1865 Rev. B. | ||
| 131 | sx1: specialix IO8+ board detected at 0xd800, IRQ 9, CD1865 Rev. B. | ||
| 132 | |||
| 133 | ISA probing is aborted after the IO address you gave is exhausted, and | ||
| 134 | the PCI card is now detected as the second card. The ISA card is now | ||
| 135 | also forced to IRQ11.... | ||
| 136 | |||
| 137 | |||
| 138 | Baud rates | ||
| 139 | ========== | ||
| 140 | |||
| 141 | The rev 1.2 and below boards use a CL-CD1864. These chips can only | ||
| 142 | do 64kbit. The rev 1.3 and newer boards use a CL-CD1865. These chips | ||
| 143 | are officially capable of 115k2. | ||
| 144 | |||
| 145 | The Specialix card uses a 25MHz crystal (in times two mode, which in | ||
| 146 | fact is a divided by two mode). This is not enough to reach the rated | ||
| 147 | 115k2 on all ports at the same time. With this clock rate you can only | ||
| 148 | do 37% of this rate. This means that at 115k2 on all ports you are | ||
| 149 | going to lose characters (The chip cannot handle that many incoming | ||
| 150 | bits at this clock rate.) (Yes, you read that correctly: there is a | ||
| 151 | limit to the number of -=bits=- per second that the chip can handle.) | ||
| 152 | |||
| 153 | If you near the "limit" you will first start to see a graceful | ||
| 154 | degradation in that the chip cannot keep the transmitter busy at all | ||
| 155 | times. However with a central clock this slow, you can also get it to | ||
| 156 | miss incoming characters. The driver will print a warning message when | ||
| 157 | you are outside the official specs. The messages usually show up in | ||
| 158 | the file /var/log/messages . | ||
| 159 | |||
| 160 | The specialix card cannot reliably do 115k2. If you use it, you have | ||
| 161 | to do "extensive testing" (*) to verify if it actually works. | ||
| 162 | |||
| 163 | When "mgetty" communicates with my modem at 115k2 it reports: | ||
| 164 | got: +++[0d]ATQ0V1H0[0d][0d][8a]O[cb][0d][8a] | ||
| 165 | ^^^^ ^^^^ ^^^^ | ||
| 166 | |||
| 167 | The three characters that have the "^^^" under them have suffered a | ||
| 168 | bit error in the highest bit. In conclusion: I've tested it, and found | ||
| 169 | that it simply DOESN'T work for me. I also suspect that this is also | ||
| 170 | caused by the baud rate being just a little bit out of tune. | ||
| 171 | |||
| 172 | I upgraded the crystal to 66Mhz on one of my Specialix cards. Works | ||
| 173 | great! Contact me for details. (Voids warranty, requires a steady hand | ||
| 174 | and more such restrictions....) | ||
| 175 | |||
| 176 | |||
| 177 | (*) Cirrus logic CD1864 databook, page 40. | ||
| 178 | |||
| 179 | |||
| 180 | Cables for the Specialix IO8+ | ||
| 181 | ============================= | ||
| 182 | |||
| 183 | The pinout of the connectors on the IO8+ is: | ||
| 184 | |||
| 185 | pin short direction long name | ||
| 186 | name | ||
| 187 | Pin 1 DCD input Data Carrier Detect | ||
| 188 | Pin 2 RXD input Receive | ||
| 189 | Pin 3 DTR/RTS output Data Terminal Ready/Ready To Send | ||
| 190 | Pin 4 GND - Ground | ||
| 191 | Pin 5 TXD output Transmit | ||
| 192 | Pin 6 CTS input Clear To Send | ||
| 193 | |||
| 194 | |||
| 195 | -- 6 5 4 3 2 1 -- | ||
| 196 | | | | ||
| 197 | | | | ||
| 198 | | | | ||
| 199 | | | | ||
| 200 | +----- -----+ | ||
| 201 | |__________| | ||
| 202 | clip | ||
| 203 | |||
| 204 | Front view of an RJ12 connector. Cable moves "into" the paper. | ||
| 205 | (the plug is ready to plug into your mouth this way...) | ||
| 206 | |||
| 207 | |||
| 208 | NULL cable. I don't know who is going to use these except for | ||
| 209 | testing purposes, but I tested the cards with this cable. (It | ||
| 210 | took quite a while to figure out, so I'm not going to delete | ||
| 211 | it. So there! :-) | ||
| 212 | |||
| 213 | |||
| 214 | This end goes This end needs | ||
| 215 | straight into the some twists in | ||
| 216 | RJ12 plug. the wiring. | ||
| 217 | IO8+ RJ12 IO8+ RJ12 | ||
| 218 | 1 DCD white - | ||
| 219 | - - 1 DCD | ||
| 220 | 2 RXD black 5 TXD | ||
| 221 | 3 DTR/RTS red 6 CTS | ||
| 222 | 4 GND green 4 GND | ||
| 223 | 5 TXD yellow 2 RXD | ||
| 224 | 6 CTS blue 3 DTR/RTS | ||
| 225 | |||
| 226 | |||
| 227 | Same NULL cable, but now sorted on the second column. | ||
| 228 | |||
| 229 | 1 DCD white - | ||
| 230 | - - 1 DCD | ||
| 231 | 5 TXD yellow 2 RXD | ||
| 232 | 6 CTS blue 3 DTR/RTS | ||
| 233 | 4 GND green 4 GND | ||
| 234 | 2 RXD black 5 TXD | ||
| 235 | 3 DTR/RTS red 6 CTS | ||
| 236 | |||
| 237 | |||
| 238 | |||
| 239 | This is a modem cable usable for hardware handshaking: | ||
| 240 | RJ12 DB25 DB9 | ||
| 241 | 1 DCD white 8 DCD 1 DCD | ||
| 242 | 2 RXD black 3 RXD 2 RXD | ||
| 243 | 3 DTR/RTS red 4 RTS 7 RTS | ||
| 244 | 4 GND green 7 GND 5 GND | ||
| 245 | 5 TXD yellow 2 TXD 3 TXD | ||
| 246 | 6 CTS blue 5 CTS 8 CTS | ||
| 247 | +---- 6 DSR 6 DSR | ||
| 248 | +---- 20 DTR 4 DTR | ||
| 249 | |||
| 250 | This is a modem cable usable for software handshaking: | ||
| 251 | It allows you to reset the modem using the DTR ioctls. | ||
| 252 | I (REW) have never tested this, "but xxxxxxxxxxxxx | ||
| 253 | says that it works." If you test this, please | ||
| 254 | tell me and I'll fill in your name on the xxx's. | ||
| 255 | |||
| 256 | RJ12 DB25 DB9 | ||
| 257 | 1 DCD white 8 DCD 1 DCD | ||
| 258 | 2 RXD black 3 RXD 2 RXD | ||
| 259 | 3 DTR/RTS red 20 DTR 4 DTR | ||
| 260 | 4 GND green 7 GND 5 GND | ||
| 261 | 5 TXD yellow 2 TXD 3 TXD | ||
| 262 | 6 CTS blue 5 CTS 8 CTS | ||
| 263 | +---- 6 DSR 6 DSR | ||
| 264 | +---- 4 RTS 7 RTS | ||
| 265 | |||
| 266 | I bought a 6 wire flat cable. It was colored as indicated. | ||
| 267 | Check that yours is the same before you trust me on this. | ||
| 268 | |||
| 269 | |||
| 270 | Hardware handshaking issues. | ||
| 271 | ============================ | ||
| 272 | |||
| 273 | The driver can be told to operate in two different ways. The default | ||
| 274 | behaviour is specialix.sx_rtscts = 0 where the pin behaves as DTR when | ||
| 275 | hardware handshaking is off. It behaves as the RTS hardware | ||
| 276 | handshaking signal when hardware handshaking is selected. | ||
| 277 | |||
| 278 | When you use this, you have to use the appropriate cable. The | ||
| 279 | cable will either be compatible with hardware handshaking or with | ||
| 280 | software handshaking. So switching on the fly is not really an | ||
| 281 | option. | ||
| 282 | |||
| 283 | I actually prefer to use the "specialix.sx_rtscts=1" option. | ||
| 284 | This makes the DTR/RTS pin always an RTS pin, and ioctls to | ||
| 285 | change DTR are always ignored. I have a cable that is configured | ||
| 286 | for this. | ||
| 287 | |||
| 288 | |||
| 289 | Ports and devices | ||
| 290 | ================= | ||
| 291 | |||
| 292 | Port 0 is the one furthest from the card-edge connector. | ||
| 293 | |||
| 294 | Devices: | ||
| 295 | |||
| 296 | You should make the devices as follows: | ||
| 297 | |||
| 298 | bash | ||
| 299 | cd /dev | ||
| 300 | for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 \ | ||
| 301 | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | ||
| 302 | do | ||
| 303 | echo -n "$i " | ||
| 304 | mknod /dev/ttyW$i c 75 $i | ||
| 305 | mknod /dev/cuw$i c 76 $i | ||
| 306 | done | ||
| 307 | echo "" | ||
| 308 | |||
| 309 | If your system doesn't come with these devices preinstalled, bug your | ||
| 310 | linux-vendor about this. They have had ample time to get this | ||
| 311 | implemented by now. | ||
| 312 | |||
| 313 | You cannot have more than 4 boards in one computer. The card only | ||
| 314 | supports 4 different interrupts. If you really want this, contact me | ||
| 315 | about this and I'll give you a few tips (requires soldering iron).... | ||
| 316 | |||
| 317 | If you have enough PCI slots, you can probably use more than 4 PCI | ||
| 318 | versions of the card though.... | ||
| 319 | |||
| 320 | The PCI version of the card cannot adhere to the mechanical part of | ||
| 321 | the PCI spec because the 8 serial connectors are simply too large. If | ||
| 322 | it doesn't fit in your computer, bring back the card. | ||
| 323 | |||
| 324 | |||
| 325 | ------------------------------------------------------------------------ | ||
| 326 | |||
| 327 | |||
| 328 | Fixed bugs and restrictions: | ||
| 329 | - During initialization, interrupts are blindly turned on. | ||
| 330 | Having a shadow variable would cause an extra memory | ||
| 331 | access on every IO instruction. | ||
| 332 | - The interrupt (on the card) should be disabled when we | ||
| 333 | don't allocate the Linux end of the interrupt. This allows | ||
| 334 | a different driver/card to use it while all ports are not in | ||
| 335 | use..... (a la standard serial port) | ||
| 336 | == An extra _off variant of the sx_in and sx_out macros are | ||
| 337 | now available. They don't set the interrupt enable bit. | ||
| 338 | These are used during initialization. Normal operation uses | ||
| 339 | the old variant which enables the interrupt line. | ||
| 340 | - RTS/DTR issue needs to be implemented according to | ||
| 341 | specialix' spec. | ||
| 342 | I kind of like the "determinism" of the current | ||
| 343 | implementation. Compile time flag? | ||
| 344 | == Ok. Compile time flag! Default is how Specialix likes it. | ||
| 345 | == Now a config time flag! Gets saved in your config file. Neat! | ||
| 346 | - Can you set the IO address from the lilo command line? | ||
| 347 | If you need this, bug me about it, I'll make it. | ||
| 348 | == Hah! No bugging needed. Fixed! :-) | ||
| 349 | - Cirrus logic hasn't gotten back to me yet why the CD1865 can | ||
| 350 | and the CD1864 can't do 115k2. I suspect that this is | ||
| 351 | because the CD1864 is not rated for 33MHz operation. | ||
| 352 | Therefore the CD1864 versions of the card can't do 115k2 on | ||
| 353 | all ports just like the CD1865 versions. The driver does | ||
| 354 | not block 115k2 on CD1864 cards. | ||
| 355 | == I called the Cirrus Logic representative here in Holland. | ||
| 356 | The CD1864 databook is identical to the CD1865 databook, | ||
| 357 | except for an extra warning at the end. Similar Bit errors | ||
| 358 | have been observed in testing at 115k2 on both an 1865 and | ||
| 359 | a 1864 chip. I see no reason why I would prohibit 115k2 on | ||
| 360 | 1864 chips and not do it on 1865 chips. Actually there is | ||
| 361 | reason to prohibit it on BOTH chips. I print a warning. | ||
| 362 | If you use 115k2, you're on your own. | ||
| 363 | - A spiky CD may send spurious HUPs. Also in CLOCAL??? | ||
| 364 | -- A fix for this turned out to be counter productive. | ||
| 365 | Different fix? Current behaviour is acceptable? | ||
| 366 | -- Maybe the current implementation is correct. If anybody | ||
| 367 | gets bitten by this, please report, and it will get fixed. | ||
| 368 | |||
| 369 | -- Testing revealed that when in CLOCAL, the problem doesn't | ||
| 370 | occur. As warned for in the CD1865 manual, the chip may | ||
| 371 | send modem intr's on a spike. We could filter those out, | ||
| 372 | but that would be a cludge anyway (You'd still risk getting | ||
| 373 | a spurious HUP when two spikes occur.)..... | ||
| 374 | |||
| 375 | |||
| 376 | |||
| 377 | Bugs & restrictions: | ||
| 378 | - This is a difficult card to autoprobe. | ||
| 379 | You have to WRITE to the address register to even | ||
| 380 | read-probe a CD186x register. Disable autodetection? | ||
| 381 | -- Specialix: any suggestions? | ||
| 382 | |||
| 383 | |||
diff --git a/Documentation/serial/sx.txt b/Documentation/serial/sx.txt deleted file mode 100644 index cb4efa0fb5cc..000000000000 --- a/Documentation/serial/sx.txt +++ /dev/null | |||
| @@ -1,294 +0,0 @@ | |||
| 1 | |||
| 2 | sx.txt -- specialix SX/SI multiport serial driver readme. | ||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 | Copyright (C) 1997 Roger Wolff (R.E.Wolff@BitWizard.nl) | ||
| 7 | |||
| 8 | Specialix pays for the development and support of this driver. | ||
| 9 | Please DO contact support@specialix.co.uk if you require | ||
| 10 | support. | ||
| 11 | |||
| 12 | This driver was developed in the BitWizard linux device | ||
| 13 | driver service. If you require a linux device driver for your | ||
| 14 | product, please contact devices@BitWizard.nl for a quote. | ||
| 15 | |||
| 16 | (History) | ||
| 17 | There used to be an SI driver by Simon Allan. This is a complete | ||
| 18 | rewrite from scratch. Just a few lines-of-code have been snatched. | ||
| 19 | |||
| 20 | (Sources) | ||
| 21 | Specialix document number 6210028: SX Host Card and Download Code | ||
| 22 | Software Functional Specification. | ||
| 23 | |||
| 24 | (Copying) | ||
| 25 | This program is free software; you can redistribute it and/or | ||
| 26 | modify it under the terms of the GNU General Public License as | ||
| 27 | published by the Free Software Foundation; either version 2 of | ||
| 28 | the License, or (at your option) any later version. | ||
| 29 | |||
| 30 | This program is distributed in the hope that it will be | ||
| 31 | useful, but WITHOUT ANY WARRANTY; without even the implied | ||
| 32 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR | ||
| 33 | PURPOSE. See the GNU General Public License for more details. | ||
| 34 | |||
| 35 | You should have received a copy of the GNU General Public | ||
| 36 | License along with this program; if not, write to the Free | ||
| 37 | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, | ||
| 38 | USA. | ||
| 39 | |||
| 40 | (Addendum) | ||
| 41 | I'd appreciate it that if you have fixes, that you send them | ||
| 42 | to me first. | ||
| 43 | |||
| 44 | |||
| 45 | Introduction | ||
| 46 | ============ | ||
| 47 | |||
| 48 | This file contains some random information, that I like to have online | ||
| 49 | instead of in a manual that can get lost. Ever misplace your Linux | ||
| 50 | kernel sources? And the manual of one of the boards in your computer? | ||
| 51 | |||
| 52 | |||
| 53 | Theory of operation | ||
| 54 | =================== | ||
| 55 | |||
| 56 | An important thing to know is that the driver itself doesn't have the | ||
| 57 | firmware for the card. This means that you need the separate package | ||
| 58 | "sx_firmware". For now you can get the source at | ||
| 59 | |||
| 60 | ftp://ftp.bitwizard.nl/specialix/sx_firmware_<version>.tgz | ||
| 61 | |||
| 62 | The firmware load needs a "misc" device, so you'll need to enable the | ||
| 63 | "Support for user misc device modules" in your kernel configuration. | ||
| 64 | The misc device needs to be called "/dev/specialix_sxctl". It needs | ||
| 65 | misc major 10, and minor number 167 (assigned by HPA). The section | ||
| 66 | on creating device files below also creates this device. | ||
| 67 | |||
| 68 | After loading the sx.o module into your kernel, the driver will report | ||
| 69 | the number of cards detected, but because it doesn't have any | ||
| 70 | firmware, it will not be able to determine the number of ports. Only | ||
| 71 | when you then run "sx_firmware" will the firmware be downloaded and | ||
| 72 | the rest of the driver initialized. At that time the sx_firmware | ||
| 73 | program will report the number of ports installed. | ||
| 74 | |||
| 75 | In contrast with many other multi port serial cards, some of the data | ||
| 76 | structures are only allocated when the card knows the number of ports | ||
| 77 | that are connected. This means we won't waste memory for 120 port | ||
| 78 | descriptor structures when you only have 8 ports. If you experience | ||
| 79 | problems due to this, please report them: I haven't seen any. | ||
| 80 | |||
| 81 | |||
| 82 | Interrupts | ||
| 83 | ========== | ||
| 84 | |||
| 85 | A multi port serial card, would generate a horrendous amount of | ||
| 86 | interrupts if it would interrupt the CPU for every received | ||
| 87 | character. Even more than 10 years ago, the trick not to use | ||
| 88 | interrupts but to poll the serial cards was invented. | ||
| 89 | |||
| 90 | The SX card allow us to do this two ways. First the card limits its | ||
| 91 | own interrupt rate to a rate that won't overwhelm the CPU. Secondly, | ||
| 92 | we could forget about the cards interrupt completely and use the | ||
| 93 | internal timer for this purpose. | ||
| 94 | |||
| 95 | Polling the card can take up to a few percent of your CPU. Using the | ||
| 96 | interrupts would be better if you have most of the ports idle. Using | ||
| 97 | timer-based polling is better if your card almost always has work to | ||
| 98 | do. You save the separate interrupt in that case. | ||
| 99 | |||
| 100 | In any case, it doesn't really matter all that much. | ||
| 101 | |||
| 102 | The most common problem with interrupts is that for ISA cards in a PCI | ||
| 103 | system the BIOS has to be told to configure that interrupt as "legacy | ||
| 104 | ISA". Otherwise the card can pull on the interrupt line all it wants | ||
| 105 | but the CPU won't see this. | ||
| 106 | |||
| 107 | If you can't get the interrupt to work, remember that polling mode is | ||
| 108 | more efficient (provided you actually use the card intensively). | ||
| 109 | |||
| 110 | |||
| 111 | Allowed Configurations | ||
| 112 | ====================== | ||
| 113 | |||
| 114 | Some configurations are disallowed. Even though at a glance they might | ||
| 115 | seem to work, they are known to lockup the bus between the host card | ||
| 116 | and the device concentrators. You should respect the drivers decision | ||
| 117 | not to support certain configurations. It's there for a reason. | ||
| 118 | |||
| 119 | Warning: Seriously technical stuff ahead. Executive summary: Don't use | ||
| 120 | SX cards except configured at a 64k boundary. Skip the next paragraph. | ||
| 121 | |||
| 122 | The SX cards can theoretically be placed at a 32k boundary. So for | ||
| 123 | instance you can put an SX card at 0xc8000-0xd7fff. This is not a | ||
| 124 | "recommended configuration". ISA cards have to tell the bus controller | ||
| 125 | how they like their timing. Due to timing issues they have to do this | ||
| 126 | based on which 64k window the address falls into. This means that the | ||
| 127 | 32k window below and above the SX card have to use exactly the same | ||
| 128 | timing as the SX card. That reportedly works for other SX cards. But | ||
| 129 | you're still left with two useless 32k windows that should not be used | ||
| 130 | by anybody else. | ||
| 131 | |||
| 132 | |||
| 133 | Configuring the driver | ||
| 134 | ====================== | ||
| 135 | |||
| 136 | PCI cards are always detected. The driver auto-probes for ISA cards at | ||
| 137 | some sensible addresses. Please report if the auto-probe causes trouble | ||
| 138 | in your system, or when a card isn't detected. | ||
| 139 | |||
| 140 | I'm afraid I haven't implemented "kernel command line parameters" yet. | ||
| 141 | This means that if the default doesn't work for you, you shouldn't use | ||
| 142 | the compiled-into-the-kernel version of the driver. Use a module | ||
| 143 | instead. If you convince me that you need this, I'll make it for | ||
| 144 | you. Deal? | ||
| 145 | |||
| 146 | I'm afraid that the module parameters are a bit clumsy. If you have a | ||
| 147 | better idea, please tell me. | ||
| 148 | |||
| 149 | You can specify several parameters: | ||
| 150 | |||
| 151 | sx_poll: number of jiffies between timer-based polls. | ||
| 152 | |||
| 153 | Set this to "0" to disable timer based polls. | ||
| 154 | Initialization of cards without a working interrupt | ||
| 155 | will fail. | ||
| 156 | |||
| 157 | Set this to "1" if you want a polling driver. | ||
| 158 | (on Intel: 100 polls per second). If you don't use | ||
| 159 | fast baud rates, you might consider a value like "5". | ||
| 160 | (If you don't know how to do the math, use 1). | ||
| 161 | |||
| 162 | sx_slowpoll: Number of jiffies between timer-based polls. | ||
| 163 | Set this to "100" to poll once a second. | ||
| 164 | This should get the card out of a stall if the driver | ||
| 165 | ever misses an interrupt. I've never seen this happen, | ||
| 166 | and if it does, that's a bug. Tell me. | ||
| 167 | |||
| 168 | sx_maxints: Number of interrupts to request from the card. | ||
| 169 | The card normally limits interrupts to about 100 per | ||
| 170 | second to offload the host CPU. You can increase this | ||
| 171 | number to reduce latency on the card a little. | ||
| 172 | Note that if you give a very high number you can overload | ||
| 173 | your CPU as well as the CPU on the host card. This setting | ||
| 174 | is inaccurate and not recommended for SI cards (But it | ||
| 175 | works). | ||
| 176 | |||
| 177 | sx_irqmask: The mask of allowable IRQs to use. I suggest you set | ||
| 178 | this to 0 (disable IRQs all together) and use polling if | ||
| 179 | the assignment of IRQs becomes problematic. This is defined | ||
| 180 | as the sum of (1 << irq) 's that you want to allow. So | ||
| 181 | sx_irqmask of 8 (1 << 3) specifies that only irq 3 may | ||
| 182 | be used by the SX driver. If you want to specify to the | ||
| 183 | driver: "Either irq 11 or 12 is ok for you to use", then | ||
| 184 | specify (1 << 11) | (1 << 12) = 0x1800 . | ||
| 185 | |||
| 186 | sx_debug: You can enable different sorts of debug traces with this. | ||
| 187 | At "-1" all debugging traces are active. You'll get several | ||
| 188 | times more debugging output than you'll get characters | ||
| 189 | transmitted. | ||
| 190 | |||
| 191 | |||
| 192 | Baud rates | ||
| 193 | ========== | ||
| 194 | |||
| 195 | Theoretically new SXDCs should be capable of more than 460k | ||
| 196 | baud. However the line drivers usually give up before that. Also the | ||
| 197 | CPU on the card may not be able to handle 8 channels going at full | ||
| 198 | blast at that speed. Moreover, the buffers are not large enough to | ||
| 199 | allow operation with 100 interrupts per second. You'll have to realize | ||
| 200 | that the card has a 256 byte buffer, so you'll have to increase the | ||
| 201 | number of interrupts per second if you have more than 256*100 bytes | ||
| 202 | per second to transmit. If you do any performance testing in this | ||
| 203 | area, I'd be glad to hear from you... | ||
| 204 | |||
| 205 | (Psst Linux users..... I think the Linux driver is more efficient than | ||
| 206 | the driver for other OSes. If you can and want to benchmark them | ||
| 207 | against each other, be my guest, and report your findings...... :-) | ||
| 208 | |||
| 209 | |||
| 210 | Ports and devices | ||
| 211 | ================= | ||
| 212 | |||
| 213 | Port 0 is the top connector on the module closest to the host | ||
| 214 | card. Oh, the ports on the SXDCs and TAs are labelled from 1 to 8 | ||
| 215 | instead of from 0 to 7, as they are numbered by linux. I'm stubborn in | ||
| 216 | this: I know for sure that I wouldn't be able to calculate which port | ||
| 217 | is which anymore if I would change that.... | ||
| 218 | |||
| 219 | |||
| 220 | Devices: | ||
| 221 | |||
| 222 | You should make the device files as follows: | ||
| 223 | |||
| 224 | #!/bin/sh | ||
| 225 | # (I recommend that you cut-and-paste this into a file and run that) | ||
| 226 | cd /dev | ||
| 227 | t=0 | ||
| 228 | mknod specialix_sxctl c 10 167 | ||
| 229 | while [ $t -lt 64 ] | ||
| 230 | do | ||
| 231 | echo -n "$t " | ||
| 232 | mknod ttyX$t c 32 $t | ||
| 233 | mknod cux$t c 33 $t | ||
| 234 | t=`expr $t + 1` | ||
| 235 | done | ||
| 236 | echo "" | ||
| 237 | rm /etc/psdevtab | ||
| 238 | ps > /dev/null | ||
| 239 | |||
| 240 | |||
| 241 | This creates 64 devices. If you have more, increase the constant on | ||
| 242 | the line with "while". The devices start at 0, as is customary on | ||
| 243 | Linux. Specialix seems to like starting the numbering at 1. | ||
| 244 | |||
| 245 | If your system doesn't come with these devices pre-installed, bug your | ||
| 246 | linux-vendor about this. They should have these devices | ||
| 247 | "pre-installed" before the new millennium. The "ps" stuff at the end | ||
| 248 | is to "tell" ps that the new devices exist. | ||
| 249 | |||
| 250 | Officially the maximum number of cards per computer is 4. This driver | ||
| 251 | however supports as many cards in one machine as you want. You'll run | ||
| 252 | out of interrupts after a few, but you can switch to polled operation | ||
| 253 | then. At about 256 ports (More than 8 cards), we run out of minor | ||
| 254 | device numbers. Sorry. I suggest you buy a second computer.... (Or | ||
| 255 | switch to RIO). | ||
| 256 | |||
| 257 | ------------------------------------------------------------------------ | ||
| 258 | |||
| 259 | |||
| 260 | Fixed bugs and restrictions: | ||
| 261 | - Hangup processing. | ||
| 262 | -- Done. | ||
| 263 | |||
| 264 | - the write path in generic_serial (lockup / oops). | ||
| 265 | -- Done (Ugly: not the way I want it. Copied from serial.c). | ||
| 266 | |||
| 267 | - write buffer isn't flushed at close. | ||
| 268 | -- Done. I still seem to lose a few chars at close. | ||
| 269 | Sorry. I think that this is a firmware issue. (-> Specialix) | ||
| 270 | |||
| 271 | - drain hardware before changing termios | ||
| 272 | - Change debug on the fly. | ||
| 273 | - ISA free irq -1. (no firmware loaded). | ||
| 274 | - adding c8000 as a probe address. Added warning. | ||
| 275 | - Add a RAMtest for the RAM on the card.c | ||
| 276 | - Crash when opening a port "way" of the number of allowed ports. | ||
| 277 | (for example opening port 60 when there are only 24 ports attached) | ||
| 278 | - Sometimes the use-count strays a bit. After a few hours of | ||
| 279 | testing the use count is sometimes "3". If you are not like | ||
| 280 | me and can remember what you did to get it that way, I'd | ||
| 281 | appreciate an Email. Possibly fixed. Tell me if anyone still | ||
| 282 | sees this. | ||
| 283 | - TAs don't work right if you don't connect all the modem control | ||
| 284 | signals. SXDCs do. T225 firmware problem -> Specialix. | ||
| 285 | (Mostly fixed now, I think. Tell me if you encounter this!) | ||
| 286 | |||
| 287 | Bugs & restrictions: | ||
| 288 | |||
| 289 | - Arbitrary baud rates. Requires firmware update. (-> Specialix) | ||
| 290 | |||
| 291 | - Low latency (mostly firmware, -> Specialix) | ||
| 292 | |||
| 293 | |||
| 294 | |||
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index b8dd0df76952..7ccf933bfbe0 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
| @@ -948,7 +948,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
| 948 | avoided as much as possible... | 948 | avoided as much as possible... |
| 949 | 949 | ||
| 950 | MORE NOTES ON "azx_get_response timeout" PROBLEMS: | 950 | MORE NOTES ON "azx_get_response timeout" PROBLEMS: |
| 951 | On some hardwares, you may need to add a proper probe_mask option | 951 | On some hardware, you may need to add a proper probe_mask option |
| 952 | to avoid the "azx_get_response timeout" problem above, instead. | 952 | to avoid the "azx_get_response timeout" problem above, instead. |
| 953 | This occurs when the access to non-existing or non-working codec slot | 953 | This occurs when the access to non-existing or non-working codec slot |
| 954 | (likely a modem one) causes a stall of the communication via HD-audio | 954 | (likely a modem one) causes a stall of the communication via HD-audio |
| @@ -1124,7 +1124,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
| 1124 | buggy_irq - Enable workaround for buggy interrupts on some | 1124 | buggy_irq - Enable workaround for buggy interrupts on some |
| 1125 | motherboards (default yes on nForce chips, | 1125 | motherboards (default yes on nForce chips, |
| 1126 | otherwise off) | 1126 | otherwise off) |
| 1127 | buggy_semaphore - Enable workaround for hardwares with buggy | 1127 | buggy_semaphore - Enable workaround for hardware with buggy |
| 1128 | semaphores (e.g. on some ASUS laptops) | 1128 | semaphores (e.g. on some ASUS laptops) |
| 1129 | (default off) | 1129 | (default off) |
| 1130 | spdif_aclink - Use S/PDIF over AC-link instead of direct connection | 1130 | spdif_aclink - Use S/PDIF over AC-link instead of direct connection |
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt index b0714d8f678a..cbc2f03056bd 100644 --- a/Documentation/stable_kernel_rules.txt +++ b/Documentation/stable_kernel_rules.txt | |||
| @@ -39,7 +39,7 @@ Procedure for submitting patches to the -stable tree: | |||
| 39 | the stable tree without anything else needing to be done by the author | 39 | the stable tree without anything else needing to be done by the author |
| 40 | or subsystem maintainer. | 40 | or subsystem maintainer. |
| 41 | - If the patch requires other patches as prerequisites which can be | 41 | - If the patch requires other patches as prerequisites which can be |
| 42 | cherry-picked than this can be specified in the following format in | 42 | cherry-picked, then this can be specified in the following format in |
| 43 | the sign-off area: | 43 | the sign-off area: |
| 44 | 44 | ||
| 45 | Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle | 45 | Cc: <stable@vger.kernel.org> # 3.3.x: a1f84a3: sched: Check for idle |
diff --git a/Documentation/sysctl/kernel.txt b/Documentation/sysctl/kernel.txt index 9886c3d57fc2..708bb7f1b7e0 100644 --- a/Documentation/sysctl/kernel.txt +++ b/Documentation/sysctl/kernel.txt | |||
| @@ -77,6 +77,7 @@ show up in /proc/sys/kernel: | |||
| 77 | - shmmni | 77 | - shmmni |
| 78 | - stop-a [ SPARC only ] | 78 | - stop-a [ SPARC only ] |
| 79 | - sysrq ==> Documentation/sysrq.txt | 79 | - sysrq ==> Documentation/sysrq.txt |
| 80 | - sysctl_writes_strict | ||
| 80 | - tainted | 81 | - tainted |
| 81 | - threads-max | 82 | - threads-max |
| 82 | - unknown_nmi_panic | 83 | - unknown_nmi_panic |
| @@ -762,6 +763,26 @@ without users and with a dead originative process will be destroyed. | |||
| 762 | 763 | ||
| 763 | ============================================================== | 764 | ============================================================== |
| 764 | 765 | ||
| 766 | sysctl_writes_strict: | ||
| 767 | |||
| 768 | Control how file position affects the behavior of updating sysctl values | ||
| 769 | via the /proc/sys interface: | ||
| 770 | |||
| 771 | -1 - Legacy per-write sysctl value handling, with no printk warnings. | ||
| 772 | Each write syscall must fully contain the sysctl value to be | ||
| 773 | written, and multiple writes on the same sysctl file descriptor | ||
| 774 | will rewrite the sysctl value, regardless of file position. | ||
| 775 | 0 - (default) Same behavior as above, but warn about processes that | ||
| 776 | perform writes to a sysctl file descriptor when the file position | ||
| 777 | is not 0. | ||
| 778 | 1 - Respect file position when writing sysctl strings. Multiple writes | ||
| 779 | will append to the sysctl value buffer. Anything past the max length | ||
| 780 | of the sysctl value buffer will be ignored. Writes to numeric sysctl | ||
| 781 | entries must always be at file position 0 and the value must be | ||
| 782 | fully contained in the buffer sent in the write syscall. | ||
| 783 | |||
| 784 | ============================================================== | ||
| 785 | |||
| 765 | tainted: | 786 | tainted: |
| 766 | 787 | ||
| 767 | Non-zero if the kernel has been tainted. Numeric values, which | 788 | Non-zero if the kernel has been tainted. Numeric values, which |
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index dd9d0e33b443..bd4b34c03738 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
| @@ -746,8 +746,8 @@ Changing this takes effect whenever an application requests memory. | |||
| 746 | vfs_cache_pressure | 746 | vfs_cache_pressure |
| 747 | ------------------ | 747 | ------------------ |
| 748 | 748 | ||
| 749 | Controls the tendency of the kernel to reclaim the memory which is used for | 749 | This percentage value controls the tendency of the kernel to reclaim |
| 750 | caching of directory and inode objects. | 750 | the memory which is used for caching of directory and inode objects. |
| 751 | 751 | ||
| 752 | At the default value of vfs_cache_pressure=100 the kernel will attempt to | 752 | At the default value of vfs_cache_pressure=100 the kernel will attempt to |
| 753 | reclaim dentries and inodes at a "fair" rate with respect to pagecache and | 753 | reclaim dentries and inodes at a "fair" rate with respect to pagecache and |
| @@ -757,6 +757,11 @@ never reclaim dentries and inodes due to memory pressure and this can easily | |||
| 757 | lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100 | 757 | lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100 |
| 758 | causes the kernel to prefer to reclaim dentries and inodes. | 758 | causes the kernel to prefer to reclaim dentries and inodes. |
| 759 | 759 | ||
| 760 | Increasing vfs_cache_pressure significantly beyond 100 may have negative | ||
| 761 | performance impact. Reclaim code needs to take various locks to find freeable | ||
| 762 | directory and inode objects. With vfs_cache_pressure=1000, it will look for | ||
| 763 | ten times more freeable objects than there are. | ||
| 764 | |||
| 760 | ============================================================== | 765 | ============================================================== |
| 761 | 766 | ||
| 762 | zone_reclaim_mode: | 767 | zone_reclaim_mode: |
| @@ -772,16 +777,17 @@ This is value ORed together of | |||
| 772 | 2 = Zone reclaim writes dirty pages out | 777 | 2 = Zone reclaim writes dirty pages out |
| 773 | 4 = Zone reclaim swaps pages | 778 | 4 = Zone reclaim swaps pages |
| 774 | 779 | ||
| 775 | zone_reclaim_mode is set during bootup to 1 if it is determined that pages | 780 | zone_reclaim_mode is disabled by default. For file servers or workloads |
| 776 | from remote zones will cause a measurable performance reduction. The | 781 | that benefit from having their data cached, zone_reclaim_mode should be |
| 777 | page allocator will then reclaim easily reusable pages (those page | 782 | left disabled as the caching effect is likely to be more important than |
| 778 | cache pages that are currently not used) before allocating off node pages. | ||
| 779 | |||
| 780 | It may be beneficial to switch off zone reclaim if the system is | ||
| 781 | used for a file server and all of memory should be used for caching files | ||
| 782 | from disk. In that case the caching effect is more important than | ||
| 783 | data locality. | 783 | data locality. |
| 784 | 784 | ||
| 785 | zone_reclaim may be enabled if it's known that the workload is partitioned | ||
| 786 | such that each partition fits within a NUMA node and that accessing remote | ||
| 787 | memory would cause a measurable performance reduction. The page allocator | ||
| 788 | will then reclaim easily reusable pages (those page cache pages that are | ||
| 789 | currently not used) before allocating off node pages. | ||
| 790 | |||
| 785 | Allowing zone reclaim to write out pages stops processes that are | 791 | Allowing zone reclaim to write out pages stops processes that are |
| 786 | writing large amounts of data from dirtying pages on other nodes. Zone | 792 | writing large amounts of data from dirtying pages on other nodes. Zone |
| 787 | reclaim will write out dirty pages if a zone fills up and so effectively | 793 | reclaim will write out dirty pages if a zone fills up and so effectively |
diff --git a/Documentation/timers/timer_stats.txt b/Documentation/timers/timer_stats.txt index 8abd40b22b7f..de835ee97455 100644 --- a/Documentation/timers/timer_stats.txt +++ b/Documentation/timers/timer_stats.txt | |||
| @@ -39,9 +39,9 @@ To stop a sample period issue: | |||
| 39 | The statistics can be retrieved by: | 39 | The statistics can be retrieved by: |
| 40 | # cat /proc/timer_stats | 40 | # cat /proc/timer_stats |
| 41 | 41 | ||
| 42 | The readout of /proc/timer_stats automatically disables sampling. The sampled | 42 | While sampling is enabled, each readout from /proc/timer_stats will see |
| 43 | information is kept until a new sample period is started. This allows multiple | 43 | newly updated statistics. Once sampling is disabled, the sampled information |
| 44 | readouts. | 44 | is kept until a new sample period is started. This allows multiple readouts. |
| 45 | 45 | ||
| 46 | Sample output of /proc/timer_stats: | 46 | Sample output of /proc/timer_stats: |
| 47 | 47 | ||
diff --git a/Documentation/trace/events.txt b/Documentation/trace/events.txt index c94435df2037..75d25a1d6e42 100644 --- a/Documentation/trace/events.txt +++ b/Documentation/trace/events.txt | |||
| @@ -443,7 +443,7 @@ The following commands are supported: | |||
| 443 | The following command creates a snapshot every time a block request | 443 | The following command creates a snapshot every time a block request |
| 444 | queue is unplugged with a depth > 1. If you were tracing a set of | 444 | queue is unplugged with a depth > 1. If you were tracing a set of |
| 445 | events or functions at the time, the snapshot trace buffer would | 445 | events or functions at the time, the snapshot trace buffer would |
| 446 | capture those events when the trigger event occured: | 446 | capture those events when the trigger event occurred: |
| 447 | 447 | ||
| 448 | # echo 'snapshot if nr_rq > 1' > \ | 448 | # echo 'snapshot if nr_rq > 1' > \ |
| 449 | /sys/kernel/debug/tracing/events/block/block_unplug/trigger | 449 | /sys/kernel/debug/tracing/events/block/block_unplug/trigger |
diff --git a/Documentation/trace/ftrace.txt b/Documentation/trace/ftrace.txt index bd365988e8d8..2479b2a0c77c 100644 --- a/Documentation/trace/ftrace.txt +++ b/Documentation/trace/ftrace.txt | |||
| @@ -2003,6 +2003,32 @@ want, depending on your needs. | |||
| 2003 | 360.774530 | 1) 0.594 us | __phys_addr(); | 2003 | 360.774530 | 1) 0.594 us | __phys_addr(); |
| 2004 | 2004 | ||
| 2005 | 2005 | ||
| 2006 | The function name is always displayed after the closing bracket | ||
| 2007 | for a function if the start of that function is not in the | ||
| 2008 | trace buffer. | ||
| 2009 | |||
| 2010 | Display of the function name after the closing bracket may be | ||
| 2011 | enabled for functions whose start is in the trace buffer, | ||
| 2012 | allowing easier searching with grep for function durations. | ||
| 2013 | It is default disabled. | ||
| 2014 | |||
| 2015 | hide: echo nofuncgraph-tail > trace_options | ||
| 2016 | show: echo funcgraph-tail > trace_options | ||
| 2017 | |||
| 2018 | Example with nofuncgraph-tail (default): | ||
| 2019 | 0) | putname() { | ||
| 2020 | 0) | kmem_cache_free() { | ||
| 2021 | 0) 0.518 us | __phys_addr(); | ||
| 2022 | 0) 1.757 us | } | ||
| 2023 | 0) 2.861 us | } | ||
| 2024 | |||
| 2025 | Example with funcgraph-tail: | ||
| 2026 | 0) | putname() { | ||
| 2027 | 0) | kmem_cache_free() { | ||
| 2028 | 0) 0.518 us | __phys_addr(); | ||
| 2029 | 0) 1.757 us | } /* kmem_cache_free() */ | ||
| 2030 | 0) 2.861 us | } /* putname() */ | ||
| 2031 | |||
| 2006 | You can put some comments on specific functions by using | 2032 | You can put some comments on specific functions by using |
| 2007 | trace_printk() For example, if you want to put a comment inside | 2033 | trace_printk() For example, if you want to put a comment inside |
| 2008 | the __might_sleep() function, you just have to include | 2034 | the __might_sleep() function, you just have to include |
diff --git a/Documentation/trace/tracepoints.txt b/Documentation/trace/tracepoints.txt index 6b018b53177a..a3efac621c5a 100644 --- a/Documentation/trace/tracepoints.txt +++ b/Documentation/trace/tracepoints.txt | |||
| @@ -115,6 +115,30 @@ If the tracepoint has to be used in kernel modules, an | |||
| 115 | EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be | 115 | EXPORT_TRACEPOINT_SYMBOL_GPL() or EXPORT_TRACEPOINT_SYMBOL() can be |
| 116 | used to export the defined tracepoints. | 116 | used to export the defined tracepoints. |
| 117 | 117 | ||
| 118 | If you need to do a bit of work for a tracepoint parameter, and | ||
| 119 | that work is only used for the tracepoint, that work can be encapsulated | ||
| 120 | within an if statement with the following: | ||
| 121 | |||
| 122 | if (trace_foo_bar_enabled()) { | ||
| 123 | int i; | ||
| 124 | int tot = 0; | ||
| 125 | |||
| 126 | for (i = 0; i < count; i++) | ||
| 127 | tot += calculate_nuggets(); | ||
| 128 | |||
| 129 | trace_foo_bar(tot); | ||
| 130 | } | ||
| 131 | |||
| 132 | All trace_<tracepoint>() calls have a matching trace_<tracepoint>_enabled() | ||
| 133 | function defined that returns true if the tracepoint is enabled and | ||
| 134 | false otherwise. The trace_<tracepoint>() should always be within the | ||
| 135 | block of the if (trace_<tracepoint>_enabled()) to prevent races between | ||
| 136 | the tracepoint being enabled and the check being seen. | ||
| 137 | |||
| 138 | The advantage of using the trace_<tracepoint>_enabled() is that it uses | ||
| 139 | the static_key of the tracepoint to allow the if statement to be implemented | ||
| 140 | with jump labels and avoid conditional branches. | ||
| 141 | |||
| 118 | Note: The convenience macro TRACE_EVENT provides an alternative way to | 142 | Note: The convenience macro TRACE_EVENT provides an alternative way to |
| 119 | define tracepoints. Check http://lwn.net/Articles/379903, | 143 | define tracepoints. Check http://lwn.net/Articles/379903, |
| 120 | http://lwn.net/Articles/381064 and http://lwn.net/Articles/383362 | 144 | http://lwn.net/Articles/381064 and http://lwn.net/Articles/383362 |
diff --git a/Documentation/usb/chipidea.txt b/Documentation/usb/chipidea.txt new file mode 100644 index 000000000000..995c8bca40e2 --- /dev/null +++ b/Documentation/usb/chipidea.txt | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | 1. How to test OTG FSM(HNP and SRP) | ||
| 2 | ----------------------------------- | ||
| 3 | To show how to demo OTG HNP and SRP functions via sys input files | ||
| 4 | with 2 Freescale i.MX6Q sabre SD boards. | ||
| 5 | |||
| 6 | 1.1 How to enable OTG FSM in menuconfig | ||
| 7 | --------------------------------------- | ||
| 8 | Select CONFIG_USB_OTG_FSM, rebuild kernel Image and modules. | ||
| 9 | If you want to check some internal variables for otg fsm, | ||
| 10 | select CONFIG_USB_CHIPIDEA_DEBUG, there are 2 files which | ||
| 11 | can show otg fsm variables and some controller registers value: | ||
| 12 | cat /sys/kernel/debug/ci_hdrc.0/otg | ||
| 13 | cat /sys/kernel/debug/ci_hdrc.0/registers | ||
| 14 | |||
| 15 | 1.2 Test operations | ||
| 16 | ------------------- | ||
| 17 | 1) Power up 2 Freescale i.MX6Q sabre SD boards with gadget class driver loaded | ||
| 18 | (e.g. g_mass_storage). | ||
| 19 | |||
| 20 | 2) Connect 2 boards with usb cable with one end is micro A plug, the other end | ||
| 21 | is micro B plug. | ||
| 22 | |||
| 23 | The A-device(with micro A plug inserted) should enumrate B-device. | ||
| 24 | |||
| 25 | 3) Role switch | ||
| 26 | On B-device: | ||
| 27 | echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req | ||
| 28 | |||
| 29 | if HNP polling is not supported, also need: | ||
| 30 | On A-device: | ||
| 31 | echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req | ||
| 32 | |||
| 33 | B-device should take host role and enumrate A-device. | ||
| 34 | |||
| 35 | 4) A-device switch back to host. | ||
| 36 | On B-device: | ||
| 37 | echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req | ||
| 38 | |||
| 39 | A-device should switch back to host and enumrate B-device. | ||
| 40 | |||
| 41 | 5) Remove B-device(unplug micro B plug) and insert again in 10 seconds, | ||
| 42 | A-device should enumrate B-device again. | ||
| 43 | |||
| 44 | 6) Remove B-device(unplug micro B plug) and insert again after 10 seconds, | ||
| 45 | A-device should NOT enumrate B-device. | ||
| 46 | |||
| 47 | if A-device wants to use bus: | ||
| 48 | On A-device: | ||
| 49 | echo 0 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop | ||
| 50 | echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req | ||
| 51 | |||
| 52 | if B-device wants to use bus: | ||
| 53 | On B-device: | ||
| 54 | echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req | ||
| 55 | |||
| 56 | 7) A-device power down the bus. | ||
| 57 | On A-device: | ||
| 58 | echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop | ||
| 59 | |||
| 60 | A-device should disconnect with B-device and power down the bus. | ||
| 61 | |||
| 62 | 8) B-device does data pulse for SRP. | ||
| 63 | On B-device: | ||
| 64 | echo 1 > /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req | ||
| 65 | |||
| 66 | A-device should resume usb bus and enumrate B-device. | ||
| 67 | |||
| 68 | 1.3 Reference document | ||
| 69 | ---------------------- | ||
| 70 | "On-The-Go and Embedded Host Supplement to the USB Revision 2.0 Specification | ||
| 71 | July 27, 2012 Revision 2.0 version 1.1a" | ||
diff --git a/Documentation/usb/mass-storage.txt b/Documentation/usb/mass-storage.txt index 59063ad7a60d..e89803a5a960 100644 --- a/Documentation/usb/mass-storage.txt +++ b/Documentation/usb/mass-storage.txt | |||
| @@ -13,7 +13,7 @@ | |||
| 13 | operation. | 13 | operation. |
| 14 | 14 | ||
| 15 | Note that the driver is slightly non-portable in that it assumes | 15 | Note that the driver is slightly non-portable in that it assumes |
| 16 | a single memory/DMA buffer will be useable for bulk-in and bulk-out | 16 | a single memory/DMA buffer will be usable for bulk-in and bulk-out |
| 17 | endpoints. With most device controllers this is not an issue, but | 17 | endpoints. With most device controllers this is not an issue, but |
| 18 | there may be some with hardware restrictions that prevent a buffer | 18 | there may be some with hardware restrictions that prevent a buffer |
| 19 | from being used by more than one endpoint. | 19 | from being used by more than one endpoint. |
diff --git a/Documentation/vDSO/parse_vdso.c b/Documentation/vDSO/parse_vdso.c index 85870208edcf..1dbb4b87268f 100644 --- a/Documentation/vDSO/parse_vdso.c +++ b/Documentation/vDSO/parse_vdso.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * parse_vdso.c: Linux reference vDSO parser | 2 | * parse_vdso.c: Linux reference vDSO parser |
| 3 | * Written by Andrew Lutomirski, 2011. | 3 | * Written by Andrew Lutomirski, 2011-2014. |
| 4 | * | 4 | * |
| 5 | * This code is meant to be linked in to various programs that run on Linux. | 5 | * This code is meant to be linked in to various programs that run on Linux. |
| 6 | * As such, it is available with as few restrictions as possible. This file | 6 | * As such, it is available with as few restrictions as possible. This file |
| @@ -11,13 +11,14 @@ | |||
| 11 | * it starts a program. It works equally well in statically and dynamically | 11 | * it starts a program. It works equally well in statically and dynamically |
| 12 | * linked binaries. | 12 | * linked binaries. |
| 13 | * | 13 | * |
| 14 | * This code is tested on x86_64. In principle it should work on any 64-bit | 14 | * This code is tested on x86. In principle it should work on any |
| 15 | * architecture that has a vDSO. | 15 | * architecture that has a vDSO. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include <stdbool.h> | 18 | #include <stdbool.h> |
| 19 | #include <stdint.h> | 19 | #include <stdint.h> |
| 20 | #include <string.h> | 20 | #include <string.h> |
| 21 | #include <limits.h> | ||
| 21 | #include <elf.h> | 22 | #include <elf.h> |
| 22 | 23 | ||
| 23 | /* | 24 | /* |
| @@ -45,11 +46,18 @@ extern void *vdso_sym(const char *version, const char *name); | |||
| 45 | 46 | ||
| 46 | 47 | ||
| 47 | /* And here's the code. */ | 48 | /* And here's the code. */ |
| 48 | 49 | #ifndef ELF_BITS | |
| 49 | #ifndef __x86_64__ | 50 | # if ULONG_MAX > 0xffffffffUL |
| 50 | # error Not yet ported to non-x86_64 architectures | 51 | # define ELF_BITS 64 |
| 52 | # else | ||
| 53 | # define ELF_BITS 32 | ||
| 54 | # endif | ||
| 51 | #endif | 55 | #endif |
| 52 | 56 | ||
| 57 | #define ELF_BITS_XFORM2(bits, x) Elf##bits##_##x | ||
| 58 | #define ELF_BITS_XFORM(bits, x) ELF_BITS_XFORM2(bits, x) | ||
| 59 | #define ELF(x) ELF_BITS_XFORM(ELF_BITS, x) | ||
| 60 | |||
| 53 | static struct vdso_info | 61 | static struct vdso_info |
| 54 | { | 62 | { |
| 55 | bool valid; | 63 | bool valid; |
| @@ -59,14 +67,14 @@ static struct vdso_info | |||
| 59 | uintptr_t load_offset; /* load_addr - recorded vaddr */ | 67 | uintptr_t load_offset; /* load_addr - recorded vaddr */ |
| 60 | 68 | ||
| 61 | /* Symbol table */ | 69 | /* Symbol table */ |
| 62 | Elf64_Sym *symtab; | 70 | ELF(Sym) *symtab; |
| 63 | const char *symstrings; | 71 | const char *symstrings; |
| 64 | Elf64_Word *bucket, *chain; | 72 | ELF(Word) *bucket, *chain; |
| 65 | Elf64_Word nbucket, nchain; | 73 | ELF(Word) nbucket, nchain; |
| 66 | 74 | ||
| 67 | /* Version table */ | 75 | /* Version table */ |
| 68 | Elf64_Versym *versym; | 76 | ELF(Versym) *versym; |
| 69 | Elf64_Verdef *verdef; | 77 | ELF(Verdef) *verdef; |
| 70 | } vdso_info; | 78 | } vdso_info; |
| 71 | 79 | ||
| 72 | /* Straight from the ELF specification. */ | 80 | /* Straight from the ELF specification. */ |
| @@ -92,9 +100,14 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base) | |||
| 92 | 100 | ||
| 93 | vdso_info.load_addr = base; | 101 | vdso_info.load_addr = base; |
| 94 | 102 | ||
| 95 | Elf64_Ehdr *hdr = (Elf64_Ehdr*)base; | 103 | ELF(Ehdr) *hdr = (ELF(Ehdr)*)base; |
| 96 | Elf64_Phdr *pt = (Elf64_Phdr*)(vdso_info.load_addr + hdr->e_phoff); | 104 | if (hdr->e_ident[EI_CLASS] != |
| 97 | Elf64_Dyn *dyn = 0; | 105 | (ELF_BITS == 32 ? ELFCLASS32 : ELFCLASS64)) { |
| 106 | return; /* Wrong ELF class -- check ELF_BITS */ | ||
| 107 | } | ||
| 108 | |||
| 109 | ELF(Phdr) *pt = (ELF(Phdr)*)(vdso_info.load_addr + hdr->e_phoff); | ||
| 110 | ELF(Dyn) *dyn = 0; | ||
| 98 | 111 | ||
| 99 | /* | 112 | /* |
| 100 | * We need two things from the segment table: the load offset | 113 | * We need two things from the segment table: the load offset |
| @@ -108,7 +121,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base) | |||
| 108 | + (uintptr_t)pt[i].p_offset | 121 | + (uintptr_t)pt[i].p_offset |
| 109 | - (uintptr_t)pt[i].p_vaddr; | 122 | - (uintptr_t)pt[i].p_vaddr; |
| 110 | } else if (pt[i].p_type == PT_DYNAMIC) { | 123 | } else if (pt[i].p_type == PT_DYNAMIC) { |
| 111 | dyn = (Elf64_Dyn*)(base + pt[i].p_offset); | 124 | dyn = (ELF(Dyn)*)(base + pt[i].p_offset); |
| 112 | } | 125 | } |
| 113 | } | 126 | } |
| 114 | 127 | ||
| @@ -118,7 +131,7 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base) | |||
| 118 | /* | 131 | /* |
| 119 | * Fish out the useful bits of the dynamic table. | 132 | * Fish out the useful bits of the dynamic table. |
| 120 | */ | 133 | */ |
| 121 | Elf64_Word *hash = 0; | 134 | ELF(Word) *hash = 0; |
| 122 | vdso_info.symstrings = 0; | 135 | vdso_info.symstrings = 0; |
| 123 | vdso_info.symtab = 0; | 136 | vdso_info.symtab = 0; |
| 124 | vdso_info.versym = 0; | 137 | vdso_info.versym = 0; |
| @@ -131,22 +144,22 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base) | |||
| 131 | + vdso_info.load_offset); | 144 | + vdso_info.load_offset); |
| 132 | break; | 145 | break; |
| 133 | case DT_SYMTAB: | 146 | case DT_SYMTAB: |
| 134 | vdso_info.symtab = (Elf64_Sym *) | 147 | vdso_info.symtab = (ELF(Sym) *) |
| 135 | ((uintptr_t)dyn[i].d_un.d_ptr | 148 | ((uintptr_t)dyn[i].d_un.d_ptr |
| 136 | + vdso_info.load_offset); | 149 | + vdso_info.load_offset); |
| 137 | break; | 150 | break; |
| 138 | case DT_HASH: | 151 | case DT_HASH: |
| 139 | hash = (Elf64_Word *) | 152 | hash = (ELF(Word) *) |
| 140 | ((uintptr_t)dyn[i].d_un.d_ptr | 153 | ((uintptr_t)dyn[i].d_un.d_ptr |
| 141 | + vdso_info.load_offset); | 154 | + vdso_info.load_offset); |
| 142 | break; | 155 | break; |
| 143 | case DT_VERSYM: | 156 | case DT_VERSYM: |
| 144 | vdso_info.versym = (Elf64_Versym *) | 157 | vdso_info.versym = (ELF(Versym) *) |
| 145 | ((uintptr_t)dyn[i].d_un.d_ptr | 158 | ((uintptr_t)dyn[i].d_un.d_ptr |
| 146 | + vdso_info.load_offset); | 159 | + vdso_info.load_offset); |
| 147 | break; | 160 | break; |
| 148 | case DT_VERDEF: | 161 | case DT_VERDEF: |
| 149 | vdso_info.verdef = (Elf64_Verdef *) | 162 | vdso_info.verdef = (ELF(Verdef) *) |
| 150 | ((uintptr_t)dyn[i].d_un.d_ptr | 163 | ((uintptr_t)dyn[i].d_un.d_ptr |
| 151 | + vdso_info.load_offset); | 164 | + vdso_info.load_offset); |
| 152 | break; | 165 | break; |
| @@ -168,8 +181,8 @@ void vdso_init_from_sysinfo_ehdr(uintptr_t base) | |||
| 168 | vdso_info.valid = true; | 181 | vdso_info.valid = true; |
| 169 | } | 182 | } |
| 170 | 183 | ||
| 171 | static bool vdso_match_version(Elf64_Versym ver, | 184 | static bool vdso_match_version(ELF(Versym) ver, |
| 172 | const char *name, Elf64_Word hash) | 185 | const char *name, ELF(Word) hash) |
| 173 | { | 186 | { |
| 174 | /* | 187 | /* |
| 175 | * This is a helper function to check if the version indexed by | 188 | * This is a helper function to check if the version indexed by |
| @@ -188,7 +201,7 @@ static bool vdso_match_version(Elf64_Versym ver, | |||
| 188 | 201 | ||
| 189 | /* First step: find the version definition */ | 202 | /* First step: find the version definition */ |
| 190 | ver &= 0x7fff; /* Apparently bit 15 means "hidden" */ | 203 | ver &= 0x7fff; /* Apparently bit 15 means "hidden" */ |
| 191 | Elf64_Verdef *def = vdso_info.verdef; | 204 | ELF(Verdef) *def = vdso_info.verdef; |
| 192 | while(true) { | 205 | while(true) { |
| 193 | if ((def->vd_flags & VER_FLG_BASE) == 0 | 206 | if ((def->vd_flags & VER_FLG_BASE) == 0 |
| 194 | && (def->vd_ndx & 0x7fff) == ver) | 207 | && (def->vd_ndx & 0x7fff) == ver) |
| @@ -197,11 +210,11 @@ static bool vdso_match_version(Elf64_Versym ver, | |||
| 197 | if (def->vd_next == 0) | 210 | if (def->vd_next == 0) |
| 198 | return false; /* No definition. */ | 211 | return false; /* No definition. */ |
| 199 | 212 | ||
| 200 | def = (Elf64_Verdef *)((char *)def + def->vd_next); | 213 | def = (ELF(Verdef) *)((char *)def + def->vd_next); |
| 201 | } | 214 | } |
| 202 | 215 | ||
| 203 | /* Now figure out whether it matches. */ | 216 | /* Now figure out whether it matches. */ |
| 204 | Elf64_Verdaux *aux = (Elf64_Verdaux*)((char *)def + def->vd_aux); | 217 | ELF(Verdaux) *aux = (ELF(Verdaux)*)((char *)def + def->vd_aux); |
| 205 | return def->vd_hash == hash | 218 | return def->vd_hash == hash |
| 206 | && !strcmp(name, vdso_info.symstrings + aux->vda_name); | 219 | && !strcmp(name, vdso_info.symstrings + aux->vda_name); |
| 207 | } | 220 | } |
| @@ -213,10 +226,10 @@ void *vdso_sym(const char *version, const char *name) | |||
| 213 | return 0; | 226 | return 0; |
| 214 | 227 | ||
| 215 | ver_hash = elf_hash(version); | 228 | ver_hash = elf_hash(version); |
| 216 | Elf64_Word chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket]; | 229 | ELF(Word) chain = vdso_info.bucket[elf_hash(name) % vdso_info.nbucket]; |
| 217 | 230 | ||
| 218 | for (; chain != STN_UNDEF; chain = vdso_info.chain[chain]) { | 231 | for (; chain != STN_UNDEF; chain = vdso_info.chain[chain]) { |
| 219 | Elf64_Sym *sym = &vdso_info.symtab[chain]; | 232 | ELF(Sym) *sym = &vdso_info.symtab[chain]; |
| 220 | 233 | ||
| 221 | /* Check for a defined global or weak function w/ right name. */ | 234 | /* Check for a defined global or weak function w/ right name. */ |
| 222 | if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC) | 235 | if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC) |
| @@ -243,7 +256,7 @@ void *vdso_sym(const char *version, const char *name) | |||
| 243 | 256 | ||
| 244 | void vdso_init_from_auxv(void *auxv) | 257 | void vdso_init_from_auxv(void *auxv) |
| 245 | { | 258 | { |
| 246 | Elf64_auxv_t *elf_auxv = auxv; | 259 | ELF(auxv_t) *elf_auxv = auxv; |
| 247 | for (int i = 0; elf_auxv[i].a_type != AT_NULL; i++) | 260 | for (int i = 0; elf_auxv[i].a_type != AT_NULL; i++) |
| 248 | { | 261 | { |
| 249 | if (elf_auxv[i].a_type == AT_SYSINFO_EHDR) { | 262 | if (elf_auxv[i].a_type == AT_SYSINFO_EHDR) { |
diff --git a/Documentation/vDSO/vdso_standalone_test_x86.c b/Documentation/vDSO/vdso_standalone_test_x86.c new file mode 100644 index 000000000000..d46240265c50 --- /dev/null +++ b/Documentation/vDSO/vdso_standalone_test_x86.c | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | /* | ||
| 2 | * vdso_test.c: Sample code to test parse_vdso.c on x86 | ||
| 3 | * Copyright (c) 2011-2014 Andy Lutomirski | ||
| 4 | * Subject to the GNU General Public License, version 2 | ||
| 5 | * | ||
| 6 | * You can amuse yourself by compiling with: | ||
| 7 | * gcc -std=gnu99 -nostdlib | ||
| 8 | * -Os -fno-asynchronous-unwind-tables -flto -lgcc_s | ||
| 9 | * vdso_standalone_test_x86.c parse_vdso.c | ||
| 10 | * to generate a small binary. On x86_64, you can omit -lgcc_s | ||
| 11 | * if you want the binary to be completely standalone. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <sys/syscall.h> | ||
| 15 | #include <sys/time.h> | ||
| 16 | #include <unistd.h> | ||
| 17 | #include <stdint.h> | ||
| 18 | |||
| 19 | extern void *vdso_sym(const char *version, const char *name); | ||
| 20 | extern void vdso_init_from_sysinfo_ehdr(uintptr_t base); | ||
| 21 | extern void vdso_init_from_auxv(void *auxv); | ||
| 22 | |||
| 23 | /* We need a libc functions... */ | ||
| 24 | int strcmp(const char *a, const char *b) | ||
| 25 | { | ||
| 26 | /* This implementation is buggy: it never returns -1. */ | ||
| 27 | while (*a || *b) { | ||
| 28 | if (*a != *b) | ||
| 29 | return 1; | ||
| 30 | if (*a == 0 || *b == 0) | ||
| 31 | return 1; | ||
| 32 | a++; | ||
| 33 | b++; | ||
| 34 | } | ||
| 35 | |||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | |||
| 39 | /* ...and two syscalls. This is x86-specific. */ | ||
| 40 | static inline long x86_syscall3(long nr, long a0, long a1, long a2) | ||
| 41 | { | ||
| 42 | long ret; | ||
| 43 | #ifdef __x86_64__ | ||
| 44 | asm volatile ("syscall" : "=a" (ret) : "a" (nr), | ||
| 45 | "D" (a0), "S" (a1), "d" (a2) : | ||
| 46 | "cc", "memory", "rcx", | ||
| 47 | "r8", "r9", "r10", "r11" ); | ||
| 48 | #else | ||
| 49 | asm volatile ("int $0x80" : "=a" (ret) : "a" (nr), | ||
| 50 | "b" (a0), "c" (a1), "d" (a2) : | ||
| 51 | "cc", "memory" ); | ||
| 52 | #endif | ||
| 53 | return ret; | ||
| 54 | } | ||
| 55 | |||
| 56 | static inline long linux_write(int fd, const void *data, size_t len) | ||
| 57 | { | ||
| 58 | return x86_syscall3(__NR_write, fd, (long)data, (long)len); | ||
| 59 | } | ||
| 60 | |||
| 61 | static inline void linux_exit(int code) | ||
| 62 | { | ||
| 63 | x86_syscall3(__NR_exit, code, 0, 0); | ||
| 64 | } | ||
| 65 | |||
| 66 | void to_base10(char *lastdig, uint64_t n) | ||
| 67 | { | ||
| 68 | while (n) { | ||
| 69 | *lastdig = (n % 10) + '0'; | ||
| 70 | n /= 10; | ||
| 71 | lastdig--; | ||
| 72 | } | ||
| 73 | } | ||
| 74 | |||
| 75 | __attribute__((externally_visible)) void c_main(void **stack) | ||
| 76 | { | ||
| 77 | /* Parse the stack */ | ||
| 78 | long argc = (long)*stack; | ||
| 79 | stack += argc + 2; | ||
| 80 | |||
| 81 | /* Now we're pointing at the environment. Skip it. */ | ||
| 82 | while(*stack) | ||
| 83 | stack++; | ||
| 84 | stack++; | ||
| 85 | |||
| 86 | /* Now we're pointing at auxv. Initialize the vDSO parser. */ | ||
| 87 | vdso_init_from_auxv((void *)stack); | ||
| 88 | |||
| 89 | /* Find gettimeofday. */ | ||
| 90 | typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); | ||
| 91 | gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday"); | ||
| 92 | |||
| 93 | if (!gtod) | ||
| 94 | linux_exit(1); | ||
| 95 | |||
| 96 | struct timeval tv; | ||
| 97 | long ret = gtod(&tv, 0); | ||
| 98 | |||
| 99 | if (ret == 0) { | ||
| 100 | char buf[] = "The time is .000000\n"; | ||
| 101 | to_base10(buf + 31, tv.tv_sec); | ||
| 102 | to_base10(buf + 38, tv.tv_usec); | ||
| 103 | linux_write(1, buf, sizeof(buf) - 1); | ||
| 104 | } else { | ||
| 105 | linux_exit(ret); | ||
| 106 | } | ||
| 107 | |||
| 108 | linux_exit(0); | ||
| 109 | } | ||
| 110 | |||
| 111 | /* | ||
| 112 | * This is the real entry point. It passes the initial stack into | ||
| 113 | * the C entry point. | ||
| 114 | */ | ||
| 115 | asm ( | ||
| 116 | ".text\n" | ||
| 117 | ".global _start\n" | ||
| 118 | ".type _start,@function\n" | ||
| 119 | "_start:\n\t" | ||
| 120 | #ifdef __x86_64__ | ||
| 121 | "mov %rsp,%rdi\n\t" | ||
| 122 | "jmp c_main" | ||
| 123 | #else | ||
| 124 | "push %esp\n\t" | ||
| 125 | "call c_main\n\t" | ||
| 126 | "int $3" | ||
| 127 | #endif | ||
| 128 | ); | ||
diff --git a/Documentation/vDSO/vdso_test.c b/Documentation/vDSO/vdso_test.c index fff633432dff..8daeb7d7032c 100644 --- a/Documentation/vDSO/vdso_test.c +++ b/Documentation/vDSO/vdso_test.c | |||
| @@ -1,111 +1,52 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * vdso_test.c: Sample code to test parse_vdso.c on x86_64 | 2 | * vdso_test.c: Sample code to test parse_vdso.c |
| 3 | * Copyright (c) 2011 Andy Lutomirski | 3 | * Copyright (c) 2014 Andy Lutomirski |
| 4 | * Subject to the GNU General Public License, version 2 | 4 | * Subject to the GNU General Public License, version 2 |
| 5 | * | 5 | * |
| 6 | * You can amuse yourself by compiling with: | 6 | * Compile with: |
| 7 | * gcc -std=gnu99 -nostdlib | 7 | * gcc -std=gnu99 vdso_test.c parse_vdso.c |
| 8 | * -Os -fno-asynchronous-unwind-tables -flto | 8 | * |
| 9 | * vdso_test.c parse_vdso.c -o vdso_test | 9 | * Tested on x86, 32-bit and 64-bit. It may work on other architectures, too. |
| 10 | * to generate a small binary with no dependencies at all. | ||
| 11 | */ | 10 | */ |
| 12 | 11 | ||
| 13 | #include <sys/syscall.h> | ||
| 14 | #include <sys/time.h> | ||
| 15 | #include <unistd.h> | ||
| 16 | #include <stdint.h> | 12 | #include <stdint.h> |
| 13 | #include <elf.h> | ||
| 14 | #include <stdio.h> | ||
| 15 | #include <sys/auxv.h> | ||
| 16 | #include <sys/time.h> | ||
| 17 | 17 | ||
| 18 | extern void *vdso_sym(const char *version, const char *name); | 18 | extern void *vdso_sym(const char *version, const char *name); |
| 19 | extern void vdso_init_from_sysinfo_ehdr(uintptr_t base); | 19 | extern void vdso_init_from_sysinfo_ehdr(uintptr_t base); |
| 20 | extern void vdso_init_from_auxv(void *auxv); | 20 | extern void vdso_init_from_auxv(void *auxv); |
| 21 | 21 | ||
| 22 | /* We need a libc functions... */ | 22 | int main(int argc, char **argv) |
| 23 | int strcmp(const char *a, const char *b) | ||
| 24 | { | 23 | { |
| 25 | /* This implementation is buggy: it never returns -1. */ | 24 | unsigned long sysinfo_ehdr = getauxval(AT_SYSINFO_EHDR); |
| 26 | while (*a || *b) { | 25 | if (!sysinfo_ehdr) { |
| 27 | if (*a != *b) | 26 | printf("AT_SYSINFO_EHDR is not present!\n"); |
| 28 | return 1; | 27 | return 0; |
| 29 | if (*a == 0 || *b == 0) | ||
| 30 | return 1; | ||
| 31 | a++; | ||
| 32 | b++; | ||
| 33 | } | 28 | } |
| 34 | 29 | ||
| 35 | return 0; | 30 | vdso_init_from_sysinfo_ehdr(getauxval(AT_SYSINFO_EHDR)); |
| 36 | } | ||
| 37 | |||
| 38 | /* ...and two syscalls. This is x86_64-specific. */ | ||
| 39 | static inline long linux_write(int fd, const void *data, size_t len) | ||
| 40 | { | ||
| 41 | |||
| 42 | long ret; | ||
| 43 | asm volatile ("syscall" : "=a" (ret) : "a" (__NR_write), | ||
| 44 | "D" (fd), "S" (data), "d" (len) : | ||
| 45 | "cc", "memory", "rcx", | ||
| 46 | "r8", "r9", "r10", "r11" ); | ||
| 47 | return ret; | ||
| 48 | } | ||
| 49 | |||
| 50 | static inline void linux_exit(int code) | ||
| 51 | { | ||
| 52 | asm volatile ("syscall" : : "a" (__NR_exit), "D" (code)); | ||
| 53 | } | ||
| 54 | |||
| 55 | void to_base10(char *lastdig, uint64_t n) | ||
| 56 | { | ||
| 57 | while (n) { | ||
| 58 | *lastdig = (n % 10) + '0'; | ||
| 59 | n /= 10; | ||
| 60 | lastdig--; | ||
| 61 | } | ||
| 62 | } | ||
| 63 | |||
| 64 | __attribute__((externally_visible)) void c_main(void **stack) | ||
| 65 | { | ||
| 66 | /* Parse the stack */ | ||
| 67 | long argc = (long)*stack; | ||
| 68 | stack += argc + 2; | ||
| 69 | |||
| 70 | /* Now we're pointing at the environment. Skip it. */ | ||
| 71 | while(*stack) | ||
| 72 | stack++; | ||
| 73 | stack++; | ||
| 74 | |||
| 75 | /* Now we're pointing at auxv. Initialize the vDSO parser. */ | ||
| 76 | vdso_init_from_auxv((void *)stack); | ||
| 77 | 31 | ||
| 78 | /* Find gettimeofday. */ | 32 | /* Find gettimeofday. */ |
| 79 | typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); | 33 | typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz); |
| 80 | gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday"); | 34 | gtod_t gtod = (gtod_t)vdso_sym("LINUX_2.6", "__vdso_gettimeofday"); |
| 81 | 35 | ||
| 82 | if (!gtod) | 36 | if (!gtod) { |
| 83 | linux_exit(1); | 37 | printf("Could not find __vdso_gettimeofday\n"); |
| 38 | return 1; | ||
| 39 | } | ||
| 84 | 40 | ||
| 85 | struct timeval tv; | 41 | struct timeval tv; |
| 86 | long ret = gtod(&tv, 0); | 42 | long ret = gtod(&tv, 0); |
| 87 | 43 | ||
| 88 | if (ret == 0) { | 44 | if (ret == 0) { |
| 89 | char buf[] = "The time is .000000\n"; | 45 | printf("The time is %lld.%06lld\n", |
| 90 | to_base10(buf + 31, tv.tv_sec); | 46 | (long long)tv.tv_sec, (long long)tv.tv_usec); |
| 91 | to_base10(buf + 38, tv.tv_usec); | ||
| 92 | linux_write(1, buf, sizeof(buf) - 1); | ||
| 93 | } else { | 47 | } else { |
| 94 | linux_exit(ret); | 48 | printf("__vdso_gettimeofday failed\n"); |
| 95 | } | 49 | } |
| 96 | 50 | ||
| 97 | linux_exit(0); | 51 | return 0; |
| 98 | } | 52 | } |
| 99 | |||
| 100 | /* | ||
| 101 | * This is the real entry point. It passes the initial stack into | ||
| 102 | * the C entry point. | ||
| 103 | */ | ||
| 104 | asm ( | ||
| 105 | ".text\n" | ||
| 106 | ".global _start\n" | ||
| 107 | ".type _start,@function\n" | ||
| 108 | "_start:\n\t" | ||
| 109 | "mov %rsp,%rdi\n\t" | ||
| 110 | "jmp c_main" | ||
| 111 | ); | ||
diff --git a/Documentation/video4linux/CARDLIST.bttv b/Documentation/video4linux/CARDLIST.bttv index 2f6e93597ce0..b092c0a14df2 100644 --- a/Documentation/video4linux/CARDLIST.bttv +++ b/Documentation/video4linux/CARDLIST.bttv | |||
| @@ -164,3 +164,4 @@ | |||
| 164 | 163 -> Bt848 Capture 14MHz | 164 | 163 -> Bt848 Capture 14MHz |
| 165 | 164 -> CyberVision CV06 (SV) | 165 | 164 -> CyberVision CV06 (SV) |
| 166 | 165 -> Kworld V-Stream Xpert TV PVR878 | 166 | 165 -> Kworld V-Stream Xpert TV PVR878 |
| 167 | 166 -> PCI-8604PW | ||
diff --git a/Documentation/video4linux/CARDLIST.em28xx b/Documentation/video4linux/CARDLIST.em28xx index e085b1243b45..5a3ddcd340d3 100644 --- a/Documentation/video4linux/CARDLIST.em28xx +++ b/Documentation/video4linux/CARDLIST.em28xx | |||
| @@ -92,3 +92,4 @@ | |||
| 92 | 91 -> SpeedLink Vicious And Devine Laplace webcam (em2765) [1ae7:9003,1ae7:9004] | 92 | 91 -> SpeedLink Vicious And Devine Laplace webcam (em2765) [1ae7:9003,1ae7:9004] |
| 93 | 92 -> PCTV DVB-S2 Stick (461e) (em28178) | 93 | 92 -> PCTV DVB-S2 Stick (461e) (em28178) |
| 94 | 93 -> KWorld USB ATSC TV Stick UB435-Q V3 (em2874) [1b80:e34c] | 94 | 93 -> KWorld USB ATSC TV Stick UB435-Q V3 (em2874) [1b80:e34c] |
| 95 | 94 -> PCTV tripleStick (292e) (em28178) | ||
diff --git a/Documentation/video4linux/fimc.txt b/Documentation/video4linux/fimc.txt index 7d6e160724bd..e0c6b8bc4743 100644 --- a/Documentation/video4linux/fimc.txt +++ b/Documentation/video4linux/fimc.txt | |||
| @@ -140,39 +140,9 @@ You can either grep through the kernel log to find relevant information, i.e. | |||
| 140 | or retrieve the information from /dev/media? with help of the media-ctl tool: | 140 | or retrieve the information from /dev/media? with help of the media-ctl tool: |
| 141 | # media-ctl -p | 141 | # media-ctl -p |
| 142 | 142 | ||
| 143 | 6. Platform support | ||
| 144 | =================== | ||
| 145 | |||
| 146 | The machine code (arch/arm/plat-samsung and arch/arm/mach-*) must select | ||
| 147 | following options: | ||
| 148 | |||
| 149 | CONFIG_S5P_DEV_FIMC0 mandatory | ||
| 150 | CONFIG_S5P_DEV_FIMC1 \ | ||
| 151 | CONFIG_S5P_DEV_FIMC2 | optional | ||
| 152 | CONFIG_S5P_DEV_FIMC3 | | ||
| 153 | CONFIG_S5P_SETUP_FIMC / | ||
| 154 | CONFIG_S5P_DEV_CSIS0 \ optional for MIPI-CSI interface | ||
| 155 | CONFIG_S5P_DEV_CSIS1 / | ||
| 156 | |||
| 157 | Except that, relevant s5p_device_fimc? should be registered in the machine code | ||
| 158 | in addition to a "s5p-fimc-md" platform device to which the media device driver | ||
| 159 | is bound. The "s5p-fimc-md" device instance is required even if only mem-to-mem | ||
| 160 | operation is used. | ||
| 161 | |||
| 162 | The description of sensor(s) attached to FIMC/MIPI-CSIS camera inputs should be | ||
| 163 | passed as the "s5p-fimc-md" device platform_data. The platform data structure | ||
| 164 | is defined in file include/media/s5p_fimc.h. | ||
| 165 | |||
| 166 | 7. Build | 143 | 7. Build |
| 167 | ======== | 144 | ======== |
| 168 | 145 | ||
| 169 | This driver depends on following config options: | ||
| 170 | PLAT_S5P, | ||
| 171 | PM_RUNTIME, | ||
| 172 | I2C, | ||
| 173 | REGULATOR, | ||
| 174 | VIDEO_V4L2_SUBDEV_API, | ||
| 175 | |||
| 176 | If the driver is built as a loadable kernel module (CONFIG_VIDEO_SAMSUNG_S5P_FIMC=m) | 146 | If the driver is built as a loadable kernel module (CONFIG_VIDEO_SAMSUNG_S5P_FIMC=m) |
| 177 | two modules are created (in addition to the core v4l2 modules): s5p-fimc.ko and | 147 | two modules are created (in addition to the core v4l2 modules): s5p-fimc.ko and |
| 178 | optional s5p-csis.ko (MIPI-CSI receiver subdev). | 148 | optional s5p-csis.ko (MIPI-CSI receiver subdev). |
diff --git a/Documentation/video4linux/v4l2-pci-skeleton.c b/Documentation/video4linux/v4l2-pci-skeleton.c index 3a1c0d2dafce..46904fe49609 100644 --- a/Documentation/video4linux/v4l2-pci-skeleton.c +++ b/Documentation/video4linux/v4l2-pci-skeleton.c | |||
| @@ -77,7 +77,8 @@ struct skeleton { | |||
| 77 | 77 | ||
| 78 | spinlock_t qlock; | 78 | spinlock_t qlock; |
| 79 | struct list_head buf_list; | 79 | struct list_head buf_list; |
| 80 | unsigned int sequence; | 80 | unsigned field; |
| 81 | unsigned sequence; | ||
| 81 | }; | 82 | }; |
| 82 | 83 | ||
| 83 | struct skel_buffer { | 84 | struct skel_buffer { |
| @@ -124,7 +125,7 @@ static const struct v4l2_dv_timings_cap skel_timings_cap = { | |||
| 124 | * Interrupt handler: typically interrupts happen after a new frame has been | 125 | * Interrupt handler: typically interrupts happen after a new frame has been |
| 125 | * captured. It is the job of the handler to remove the new frame from the | 126 | * captured. It is the job of the handler to remove the new frame from the |
| 126 | * internal list and give it back to the vb2 framework, updating the sequence | 127 | * internal list and give it back to the vb2 framework, updating the sequence |
| 127 | * counter and timestamp at the same time. | 128 | * counter, field and timestamp at the same time. |
| 128 | */ | 129 | */ |
| 129 | static irqreturn_t skeleton_irq(int irq, void *dev_id) | 130 | static irqreturn_t skeleton_irq(int irq, void *dev_id) |
| 130 | { | 131 | { |
| @@ -139,8 +140,15 @@ static irqreturn_t skeleton_irq(int irq, void *dev_id) | |||
| 139 | spin_lock(&skel->qlock); | 140 | spin_lock(&skel->qlock); |
| 140 | list_del(&new_buf->list); | 141 | list_del(&new_buf->list); |
| 141 | spin_unlock(&skel->qlock); | 142 | spin_unlock(&skel->qlock); |
| 142 | new_buf->vb.v4l2_buf.sequence = skel->sequence++; | ||
| 143 | v4l2_get_timestamp(&new_buf->vb.v4l2_buf.timestamp); | 143 | v4l2_get_timestamp(&new_buf->vb.v4l2_buf.timestamp); |
| 144 | new_buf->vb.v4l2_buf.sequence = skel->sequence++; | ||
| 145 | new_buf->vb.v4l2_buf.field = skel->field; | ||
| 146 | if (skel->format.field == V4L2_FIELD_ALTERNATE) { | ||
| 147 | if (skel->field == V4L2_FIELD_BOTTOM) | ||
| 148 | skel->field = V4L2_FIELD_TOP; | ||
| 149 | else if (skel->field == V4L2_FIELD_TOP) | ||
| 150 | skel->field = V4L2_FIELD_BOTTOM; | ||
| 151 | } | ||
| 144 | vb2_buffer_done(&new_buf->vb, VB2_BUF_STATE_DONE); | 152 | vb2_buffer_done(&new_buf->vb, VB2_BUF_STATE_DONE); |
| 145 | } | 153 | } |
| 146 | #endif | 154 | #endif |
| @@ -160,6 +168,17 @@ static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, | |||
| 160 | { | 168 | { |
| 161 | struct skeleton *skel = vb2_get_drv_priv(vq); | 169 | struct skeleton *skel = vb2_get_drv_priv(vq); |
| 162 | 170 | ||
| 171 | skel->field = skel->format.field; | ||
| 172 | if (skel->field == V4L2_FIELD_ALTERNATE) { | ||
| 173 | /* | ||
| 174 | * You cannot use read() with FIELD_ALTERNATE since the field | ||
| 175 | * information (TOP/BOTTOM) cannot be passed back to the user. | ||
| 176 | */ | ||
| 177 | if (vb2_fileio_is_active(vq)) | ||
| 178 | return -EINVAL; | ||
| 179 | skel->field = V4L2_FIELD_TOP; | ||
| 180 | } | ||
| 181 | |||
| 163 | if (vq->num_buffers + *nbuffers < 3) | 182 | if (vq->num_buffers + *nbuffers < 3) |
| 164 | *nbuffers = 3 - vq->num_buffers; | 183 | *nbuffers = 3 - vq->num_buffers; |
| 165 | 184 | ||
| @@ -173,10 +192,7 @@ static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *fmt, | |||
| 173 | 192 | ||
| 174 | /* | 193 | /* |
| 175 | * Prepare the buffer for queueing to the DMA engine: check and set the | 194 | * Prepare the buffer for queueing to the DMA engine: check and set the |
| 176 | * payload size and fill in the field. Note: if the format's field is | 195 | * payload size. |
| 177 | * V4L2_FIELD_ALTERNATE, then vb->v4l2_buf.field should be set in the | ||
| 178 | * interrupt handler since that's usually where you know if the TOP or | ||
| 179 | * BOTTOM field has been captured. | ||
| 180 | */ | 196 | */ |
| 181 | static int buffer_prepare(struct vb2_buffer *vb) | 197 | static int buffer_prepare(struct vb2_buffer *vb) |
| 182 | { | 198 | { |
| @@ -190,7 +206,6 @@ static int buffer_prepare(struct vb2_buffer *vb) | |||
| 190 | } | 206 | } |
| 191 | 207 | ||
| 192 | vb2_set_plane_payload(vb, 0, size); | 208 | vb2_set_plane_payload(vb, 0, size); |
| 193 | vb->v4l2_buf.field = skel->format.field; | ||
| 194 | return 0; | 209 | return 0; |
| 195 | } | 210 | } |
| 196 | 211 | ||
| @@ -254,7 +269,7 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count) | |||
| 254 | * Stop the DMA engine. Any remaining buffers in the DMA queue are dequeued | 269 | * Stop the DMA engine. Any remaining buffers in the DMA queue are dequeued |
| 255 | * and passed on to the vb2 framework marked as STATE_ERROR. | 270 | * and passed on to the vb2 framework marked as STATE_ERROR. |
| 256 | */ | 271 | */ |
| 257 | static int stop_streaming(struct vb2_queue *vq) | 272 | static void stop_streaming(struct vb2_queue *vq) |
| 258 | { | 273 | { |
| 259 | struct skeleton *skel = vb2_get_drv_priv(vq); | 274 | struct skeleton *skel = vb2_get_drv_priv(vq); |
| 260 | 275 | ||
| @@ -262,7 +277,6 @@ static int stop_streaming(struct vb2_queue *vq) | |||
| 262 | 277 | ||
| 263 | /* Release all active buffers */ | 278 | /* Release all active buffers */ |
| 264 | return_all_buffers(skel, VB2_BUF_STATE_ERROR); | 279 | return_all_buffers(skel, VB2_BUF_STATE_ERROR); |
| 265 | return 0; | ||
| 266 | } | 280 | } |
| 267 | 281 | ||
| 268 | /* | 282 | /* |
| @@ -319,10 +333,12 @@ static void skeleton_fill_pix_format(struct skeleton *skel, | |||
| 319 | /* HDMI input */ | 333 | /* HDMI input */ |
| 320 | pix->width = skel->timings.bt.width; | 334 | pix->width = skel->timings.bt.width; |
| 321 | pix->height = skel->timings.bt.height; | 335 | pix->height = skel->timings.bt.height; |
| 322 | if (skel->timings.bt.interlaced) | 336 | if (skel->timings.bt.interlaced) { |
| 323 | pix->field = V4L2_FIELD_INTERLACED; | 337 | pix->field = V4L2_FIELD_ALTERNATE; |
| 324 | else | 338 | pix->height /= 2; |
| 339 | } else { | ||
| 325 | pix->field = V4L2_FIELD_NONE; | 340 | pix->field = V4L2_FIELD_NONE; |
| 341 | } | ||
| 326 | pix->colorspace = V4L2_COLORSPACE_REC709; | 342 | pix->colorspace = V4L2_COLORSPACE_REC709; |
| 327 | } | 343 | } |
| 328 | 344 | ||
diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index a9380ba54c8e..0fe36497642c 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
| @@ -1794,6 +1794,11 @@ registers, find a list below: | |||
| 1794 | PPC | KVM_REG_PPC_MMCR0 | 64 | 1794 | PPC | KVM_REG_PPC_MMCR0 | 64 |
| 1795 | PPC | KVM_REG_PPC_MMCR1 | 64 | 1795 | PPC | KVM_REG_PPC_MMCR1 | 64 |
| 1796 | PPC | KVM_REG_PPC_MMCRA | 64 | 1796 | PPC | KVM_REG_PPC_MMCRA | 64 |
| 1797 | PPC | KVM_REG_PPC_MMCR2 | 64 | ||
| 1798 | PPC | KVM_REG_PPC_MMCRS | 64 | ||
| 1799 | PPC | KVM_REG_PPC_SIAR | 64 | ||
| 1800 | PPC | KVM_REG_PPC_SDAR | 64 | ||
| 1801 | PPC | KVM_REG_PPC_SIER | 64 | ||
| 1797 | PPC | KVM_REG_PPC_PMC1 | 32 | 1802 | PPC | KVM_REG_PPC_PMC1 | 32 |
| 1798 | PPC | KVM_REG_PPC_PMC2 | 32 | 1803 | PPC | KVM_REG_PPC_PMC2 | 32 |
| 1799 | PPC | KVM_REG_PPC_PMC3 | 32 | 1804 | PPC | KVM_REG_PPC_PMC3 | 32 |
| @@ -1868,6 +1873,7 @@ registers, find a list below: | |||
| 1868 | PPC | KVM_REG_PPC_PPR | 64 | 1873 | PPC | KVM_REG_PPC_PPR | 64 |
| 1869 | PPC | KVM_REG_PPC_ARCH_COMPAT 32 | 1874 | PPC | KVM_REG_PPC_ARCH_COMPAT 32 |
| 1870 | PPC | KVM_REG_PPC_DABRX | 32 | 1875 | PPC | KVM_REG_PPC_DABRX | 32 |
| 1876 | PPC | KVM_REG_PPC_WORT | 64 | ||
| 1871 | PPC | KVM_REG_PPC_TM_GPR0 | 64 | 1877 | PPC | KVM_REG_PPC_TM_GPR0 | 64 |
| 1872 | ... | 1878 | ... |
| 1873 | PPC | KVM_REG_PPC_TM_GPR31 | 64 | 1879 | PPC | KVM_REG_PPC_TM_GPR31 | 64 |
| @@ -2066,7 +2072,7 @@ the "Server" class MMU emulation supported by KVM. | |||
| 2066 | This can in turn be used by userspace to generate the appropriate | 2072 | This can in turn be used by userspace to generate the appropriate |
| 2067 | device-tree properties for the guest operating system. | 2073 | device-tree properties for the guest operating system. |
| 2068 | 2074 | ||
| 2069 | The structure contains some global informations, followed by an | 2075 | The structure contains some global information, followed by an |
| 2070 | array of supported segment page sizes: | 2076 | array of supported segment page sizes: |
| 2071 | 2077 | ||
| 2072 | struct kvm_ppc_smmu_info { | 2078 | struct kvm_ppc_smmu_info { |
| @@ -2126,7 +2132,7 @@ into the hash PTE second double word). | |||
| 2126 | 4.75 KVM_IRQFD | 2132 | 4.75 KVM_IRQFD |
| 2127 | 2133 | ||
| 2128 | Capability: KVM_CAP_IRQFD | 2134 | Capability: KVM_CAP_IRQFD |
| 2129 | Architectures: x86 | 2135 | Architectures: x86 s390 |
| 2130 | Type: vm ioctl | 2136 | Type: vm ioctl |
| 2131 | Parameters: struct kvm_irqfd (in) | 2137 | Parameters: struct kvm_irqfd (in) |
| 2132 | Returns: 0 on success, -1 on error | 2138 | Returns: 0 on success, -1 on error |
| @@ -2211,6 +2217,8 @@ KVM_S390_SIGP_STOP (vcpu) - sigp restart | |||
| 2211 | KVM_S390_PROGRAM_INT (vcpu) - program check; code in parm | 2217 | KVM_S390_PROGRAM_INT (vcpu) - program check; code in parm |
| 2212 | KVM_S390_SIGP_SET_PREFIX (vcpu) - sigp set prefix; prefix address in parm | 2218 | KVM_S390_SIGP_SET_PREFIX (vcpu) - sigp set prefix; prefix address in parm |
| 2213 | KVM_S390_RESTART (vcpu) - restart | 2219 | KVM_S390_RESTART (vcpu) - restart |
| 2220 | KVM_S390_INT_CLOCK_COMP (vcpu) - clock comparator interrupt | ||
| 2221 | KVM_S390_INT_CPU_TIMER (vcpu) - CPU timer interrupt | ||
| 2214 | KVM_S390_INT_VIRTIO (vm) - virtio external interrupt; external interrupt | 2222 | KVM_S390_INT_VIRTIO (vm) - virtio external interrupt; external interrupt |
| 2215 | parameters in parm and parm64 | 2223 | parameters in parm and parm64 |
| 2216 | KVM_S390_INT_SERVICE (vm) - sclp external interrupt; sclp parameter in parm | 2224 | KVM_S390_INT_SERVICE (vm) - sclp external interrupt; sclp parameter in parm |
| @@ -2314,8 +2322,8 @@ struct kvm_create_device { | |||
| 2314 | 2322 | ||
| 2315 | 4.80 KVM_SET_DEVICE_ATTR/KVM_GET_DEVICE_ATTR | 2323 | 4.80 KVM_SET_DEVICE_ATTR/KVM_GET_DEVICE_ATTR |
| 2316 | 2324 | ||
| 2317 | Capability: KVM_CAP_DEVICE_CTRL | 2325 | Capability: KVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device |
| 2318 | Type: device ioctl | 2326 | Type: device ioctl, vm ioctl |
| 2319 | Parameters: struct kvm_device_attr | 2327 | Parameters: struct kvm_device_attr |
| 2320 | Returns: 0 on success, -1 on error | 2328 | Returns: 0 on success, -1 on error |
| 2321 | Errors: | 2329 | Errors: |
| @@ -2340,8 +2348,8 @@ struct kvm_device_attr { | |||
| 2340 | 2348 | ||
| 2341 | 4.81 KVM_HAS_DEVICE_ATTR | 2349 | 4.81 KVM_HAS_DEVICE_ATTR |
| 2342 | 2350 | ||
| 2343 | Capability: KVM_CAP_DEVICE_CTRL | 2351 | Capability: KVM_CAP_DEVICE_CTRL, KVM_CAP_VM_ATTRIBUTES for vm device |
| 2344 | Type: device ioctl | 2352 | Type: device ioctl, vm ioctl |
| 2345 | Parameters: struct kvm_device_attr | 2353 | Parameters: struct kvm_device_attr |
| 2346 | Returns: 0 on success, -1 on error | 2354 | Returns: 0 on success, -1 on error |
| 2347 | Errors: | 2355 | Errors: |
| @@ -2376,6 +2384,8 @@ Possible features: | |||
| 2376 | Depends on KVM_CAP_ARM_PSCI. | 2384 | Depends on KVM_CAP_ARM_PSCI. |
| 2377 | - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. | 2385 | - KVM_ARM_VCPU_EL1_32BIT: Starts the CPU in a 32bit mode. |
| 2378 | Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only). | 2386 | Depends on KVM_CAP_ARM_EL1_32BIT (arm64 only). |
| 2387 | - KVM_ARM_VCPU_PSCI_0_2: Emulate PSCI v0.2 for the CPU. | ||
| 2388 | Depends on KVM_CAP_ARM_PSCI_0_2. | ||
| 2379 | 2389 | ||
| 2380 | 2390 | ||
| 2381 | 4.83 KVM_ARM_PREFERRED_TARGET | 2391 | 4.83 KVM_ARM_PREFERRED_TARGET |
| @@ -2738,6 +2748,21 @@ It gets triggered whenever both KVM_CAP_PPC_EPR are enabled and an | |||
| 2738 | external interrupt has just been delivered into the guest. User space | 2748 | external interrupt has just been delivered into the guest. User space |
| 2739 | should put the acknowledged interrupt vector into the 'epr' field. | 2749 | should put the acknowledged interrupt vector into the 'epr' field. |
| 2740 | 2750 | ||
| 2751 | /* KVM_EXIT_SYSTEM_EVENT */ | ||
| 2752 | struct { | ||
| 2753 | #define KVM_SYSTEM_EVENT_SHUTDOWN 1 | ||
| 2754 | #define KVM_SYSTEM_EVENT_RESET 2 | ||
| 2755 | __u32 type; | ||
| 2756 | __u64 flags; | ||
| 2757 | } system_event; | ||
| 2758 | |||
| 2759 | If exit_reason is KVM_EXIT_SYSTEM_EVENT then the vcpu has triggered | ||
| 2760 | a system-level event using some architecture specific mechanism (hypercall | ||
| 2761 | or some special instruction). In case of ARM/ARM64, this is triggered using | ||
| 2762 | HVC instruction based PSCI call from the vcpu. The 'type' field describes | ||
| 2763 | the system-level event type. The 'flags' field describes architecture | ||
| 2764 | specific flags for the system-level event. | ||
| 2765 | |||
| 2741 | /* Fix the size of the union. */ | 2766 | /* Fix the size of the union. */ |
| 2742 | char padding[256]; | 2767 | char padding[256]; |
| 2743 | }; | 2768 | }; |
diff --git a/Documentation/virtual/kvm/devices/vm.txt b/Documentation/virtual/kvm/devices/vm.txt new file mode 100644 index 000000000000..0d16f96c0eac --- /dev/null +++ b/Documentation/virtual/kvm/devices/vm.txt | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | Generic vm interface | ||
| 2 | ==================================== | ||
| 3 | |||
| 4 | The virtual machine "device" also accepts the ioctls KVM_SET_DEVICE_ATTR, | ||
| 5 | KVM_GET_DEVICE_ATTR, and KVM_HAS_DEVICE_ATTR. The interface uses the same | ||
| 6 | struct kvm_device_attr as other devices, but targets VM-wide settings | ||
| 7 | and controls. | ||
| 8 | |||
| 9 | The groups and attributes per virtual machine, if any, are architecture | ||
| 10 | specific. | ||
| 11 | |||
| 12 | 1. GROUP: KVM_S390_VM_MEM_CTRL | ||
| 13 | Architectures: s390 | ||
| 14 | |||
| 15 | 1.1. ATTRIBUTE: KVM_S390_VM_MEM_CTRL | ||
| 16 | Parameters: none | ||
| 17 | Returns: -EBUSY if already a vcpus is defined, otherwise 0 | ||
| 18 | |||
| 19 | Enables CMMA for the virtual machine | ||
| 20 | |||
| 21 | 1.2. ATTRIBUTE: KVM_S390_VM_CLR_CMMA | ||
| 22 | Parameteres: none | ||
| 23 | Returns: 0 | ||
| 24 | |||
| 25 | Clear the CMMA status for all guest pages, so any pages the guest marked | ||
| 26 | as unused are again used any may not be reclaimed by the host. | ||
diff --git a/Documentation/virtual/kvm/ppc-pv.txt b/Documentation/virtual/kvm/ppc-pv.txt index 4643cde517c4..319560646f32 100644 --- a/Documentation/virtual/kvm/ppc-pv.txt +++ b/Documentation/virtual/kvm/ppc-pv.txt | |||
| @@ -94,10 +94,24 @@ a bitmap of available features inside the magic page. | |||
| 94 | The following enhancements to the magic page are currently available: | 94 | The following enhancements to the magic page are currently available: |
| 95 | 95 | ||
| 96 | KVM_MAGIC_FEAT_SR Maps SR registers r/w in the magic page | 96 | KVM_MAGIC_FEAT_SR Maps SR registers r/w in the magic page |
| 97 | KVM_MAGIC_FEAT_MAS0_TO_SPRG7 Maps MASn, ESR, PIR and high SPRGs | ||
| 97 | 98 | ||
| 98 | For enhanced features in the magic page, please check for the existence of the | 99 | For enhanced features in the magic page, please check for the existence of the |
| 99 | feature before using them! | 100 | feature before using them! |
| 100 | 101 | ||
| 102 | Magic page flags | ||
| 103 | ================ | ||
| 104 | |||
| 105 | In addition to features that indicate whether a host is capable of a particular | ||
| 106 | feature we also have a channel for a guest to tell the guest whether it's capable | ||
| 107 | of something. This is what we call "flags". | ||
| 108 | |||
| 109 | Flags are passed to the host in the low 12 bits of the Effective Address. | ||
| 110 | |||
| 111 | The following flags are currently available for a guest to expose: | ||
| 112 | |||
| 113 | MAGIC_PAGE_FLAG_NOT_MAPPED_NX Guest handles NX bits correclty wrt magic page | ||
| 114 | |||
| 101 | MSR bits | 115 | MSR bits |
| 102 | ======== | 116 | ======== |
| 103 | 117 | ||
diff --git a/Documentation/virtual/kvm/s390-diag.txt b/Documentation/virtual/kvm/s390-diag.txt index f1de4fbade15..48c4921794ed 100644 --- a/Documentation/virtual/kvm/s390-diag.txt +++ b/Documentation/virtual/kvm/s390-diag.txt | |||
| @@ -78,3 +78,5 @@ DIAGNOSE function code 'X'501 - KVM breakpoint | |||
| 78 | 78 | ||
| 79 | If the function code specifies 0x501, breakpoint functions may be performed. | 79 | If the function code specifies 0x501, breakpoint functions may be performed. |
| 80 | This function code is handled by userspace. | 80 | This function code is handled by userspace. |
| 81 | |||
| 82 | This diagnose function code has no subfunctions and uses no parameters. | ||
diff --git a/Documentation/vm/hwpoison.txt b/Documentation/vm/hwpoison.txt index 550068466605..6ae89a9edf2a 100644 --- a/Documentation/vm/hwpoison.txt +++ b/Documentation/vm/hwpoison.txt | |||
| @@ -84,6 +84,11 @@ PR_MCE_KILL | |||
| 84 | PR_MCE_KILL_EARLY: Early kill | 84 | PR_MCE_KILL_EARLY: Early kill |
| 85 | PR_MCE_KILL_LATE: Late kill | 85 | PR_MCE_KILL_LATE: Late kill |
| 86 | PR_MCE_KILL_DEFAULT: Use system global default | 86 | PR_MCE_KILL_DEFAULT: Use system global default |
| 87 | Note that if you want to have a dedicated thread which handles | ||
| 88 | the SIGBUS(BUS_MCEERR_AO) on behalf of the process, you should | ||
| 89 | call prctl(PR_MCE_KILL_EARLY) on the designated thread. Otherwise, | ||
| 90 | the SIGBUS is sent to the main thread. | ||
| 91 | |||
| 87 | PR_MCE_KILL_GET | 92 | PR_MCE_KILL_GET |
| 88 | return current mode | 93 | return current mode |
| 89 | 94 | ||
diff --git a/Documentation/vm/numa_memory_policy.txt b/Documentation/vm/numa_memory_policy.txt index 4e7da6543424..badb0507608f 100644 --- a/Documentation/vm/numa_memory_policy.txt +++ b/Documentation/vm/numa_memory_policy.txt | |||
| @@ -174,7 +174,6 @@ Components of Memory Policies | |||
| 174 | allocation fails, the kernel will search other nodes, in order of | 174 | allocation fails, the kernel will search other nodes, in order of |
| 175 | increasing distance from the preferred node based on information | 175 | increasing distance from the preferred node based on information |
| 176 | provided by the platform firmware. | 176 | provided by the platform firmware. |
| 177 | containing the cpu where the allocation takes place. | ||
| 178 | 177 | ||
| 179 | Internally, the Preferred policy uses a single node--the | 178 | Internally, the Preferred policy uses a single node--the |
| 180 | preferred_node member of struct mempolicy. When the internal | 179 | preferred_node member of struct mempolicy. When the internal |
| @@ -275,9 +274,9 @@ Components of Memory Policies | |||
| 275 | For example, consider a task that is attached to a cpuset with | 274 | For example, consider a task that is attached to a cpuset with |
| 276 | mems 2-5 that sets an Interleave policy over the same set with | 275 | mems 2-5 that sets an Interleave policy over the same set with |
| 277 | MPOL_F_RELATIVE_NODES. If the cpuset's mems change to 3-7, the | 276 | MPOL_F_RELATIVE_NODES. If the cpuset's mems change to 3-7, the |
| 278 | interleave now occurs over nodes 3,5-6. If the cpuset's mems | 277 | interleave now occurs over nodes 3,5-7. If the cpuset's mems |
| 279 | then change to 0,2-3,5, then the interleave occurs over nodes | 278 | then change to 0,2-3,5, then the interleave occurs over nodes |
| 280 | 0,3,5. | 279 | 0,2-3,5. |
| 281 | 280 | ||
| 282 | Thanks to the consistent remapping, applications preparing | 281 | Thanks to the consistent remapping, applications preparing |
| 283 | nodemasks to specify memory policies using this flag should | 282 | nodemasks to specify memory policies using this flag should |
diff --git a/Documentation/vm/remap_file_pages.txt b/Documentation/vm/remap_file_pages.txt new file mode 100644 index 000000000000..560e4363a55d --- /dev/null +++ b/Documentation/vm/remap_file_pages.txt | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | The remap_file_pages() system call is used to create a nonlinear mapping, | ||
| 2 | that is, a mapping in which the pages of the file are mapped into a | ||
| 3 | nonsequential order in memory. The advantage of using remap_file_pages() | ||
| 4 | over using repeated calls to mmap(2) is that the former approach does not | ||
| 5 | require the kernel to create additional VMA (Virtual Memory Area) data | ||
| 6 | structures. | ||
| 7 | |||
| 8 | Supporting of nonlinear mapping requires significant amount of non-trivial | ||
| 9 | code in kernel virtual memory subsystem including hot paths. Also to get | ||
| 10 | nonlinear mapping work kernel need a way to distinguish normal page table | ||
| 11 | entries from entries with file offset (pte_file). Kernel reserves flag in | ||
| 12 | PTE for this purpose. PTE flags are scarce resource especially on some CPU | ||
| 13 | architectures. It would be nice to free up the flag for other usage. | ||
| 14 | |||
| 15 | Fortunately, there are not many users of remap_file_pages() in the wild. | ||
| 16 | It's only known that one enterprise RDBMS implementation uses the syscall | ||
| 17 | on 32-bit systems to map files bigger than can linearly fit into 32-bit | ||
| 18 | virtual address space. This use-case is not critical anymore since 64-bit | ||
| 19 | systems are widely available. | ||
| 20 | |||
| 21 | The plan is to deprecate the syscall and replace it with an emulation. | ||
| 22 | The emulation will create new VMAs instead of nonlinear mappings. It's | ||
| 23 | going to work slower for rare users of remap_file_pages() but ABI is | ||
| 24 | preserved. | ||
| 25 | |||
| 26 | One side effect of emulation (apart from performance) is that user can hit | ||
| 27 | vm.max_map_count limit more easily due to additional VMAs. See comment for | ||
| 28 | DEFAULT_MAX_MAP_COUNT for more details on the limit. | ||
diff --git a/Documentation/vm/transhuge.txt b/Documentation/vm/transhuge.txt index 4a63953a41f1..6b31cfbe2a9a 100644 --- a/Documentation/vm/transhuge.txt +++ b/Documentation/vm/transhuge.txt | |||
| @@ -360,13 +360,13 @@ on any tail page, would mean having to split all hugepages upfront in | |||
| 360 | get_user_pages which is unacceptable as too many gup users are | 360 | get_user_pages which is unacceptable as too many gup users are |
| 361 | performance critical and they must work natively on hugepages like | 361 | performance critical and they must work natively on hugepages like |
| 362 | they work natively on hugetlbfs already (hugetlbfs is simpler because | 362 | they work natively on hugetlbfs already (hugetlbfs is simpler because |
| 363 | hugetlbfs pages cannot be splitted so there wouldn't be requirement of | 363 | hugetlbfs pages cannot be split so there wouldn't be requirement of |
| 364 | accounting the pins on the tail pages for hugetlbfs). If we wouldn't | 364 | accounting the pins on the tail pages for hugetlbfs). If we wouldn't |
| 365 | account the gup refcounts on the tail pages during gup, we won't know | 365 | account the gup refcounts on the tail pages during gup, we won't know |
| 366 | anymore which tail page is pinned by gup and which is not while we run | 366 | anymore which tail page is pinned by gup and which is not while we run |
| 367 | split_huge_page. But we still have to add the gup pin to the head page | 367 | split_huge_page. But we still have to add the gup pin to the head page |
| 368 | too, to know when we can free the compound page in case it's never | 368 | too, to know when we can free the compound page in case it's never |
| 369 | splitted during its lifetime. That requires changing not just | 369 | split during its lifetime. That requires changing not just |
| 370 | get_page, but put_page as well so that when put_page runs on a tail | 370 | get_page, but put_page as well so that when put_page runs on a tail |
| 371 | page (and only on a tail page) it will find its respective head page, | 371 | page (and only on a tail page) it will find its respective head page, |
| 372 | and then it will decrease the head page refcount in addition to the | 372 | and then it will decrease the head page refcount in addition to the |
diff --git a/Documentation/w1/w1.generic b/Documentation/w1/w1.generic index a31c5a242973..b2033c64c7da 100644 --- a/Documentation/w1/w1.generic +++ b/Documentation/w1/w1.generic | |||
| @@ -82,7 +82,7 @@ driver - (standard) symlink to the w1 driver | |||
| 82 | w1_master_add - Manually register a slave device | 82 | w1_master_add - Manually register a slave device |
| 83 | w1_master_attempts - the number of times a search was attempted | 83 | w1_master_attempts - the number of times a search was attempted |
| 84 | w1_master_max_slave_count | 84 | w1_master_max_slave_count |
| 85 | - the maximum slaves that may be attached to a master | 85 | - maximum number of slaves to search for at a time |
| 86 | w1_master_name - the name of the device (w1_bus_masterX) | 86 | w1_master_name - the name of the device (w1_bus_masterX) |
| 87 | w1_master_pullup - 5V strong pullup 0 enabled, 1 disabled | 87 | w1_master_pullup - 5V strong pullup 0 enabled, 1 disabled |
| 88 | w1_master_remove - Manually remove a slave device | 88 | w1_master_remove - Manually remove a slave device |
diff --git a/Documentation/w1/w1.netlink b/Documentation/w1/w1.netlink index 927a52cc0519..ef2727192d69 100644 --- a/Documentation/w1/w1.netlink +++ b/Documentation/w1/w1.netlink | |||
| @@ -30,7 +30,7 @@ Protocol. | |||
| 30 | W1_SLAVE_CMD | 30 | W1_SLAVE_CMD |
| 31 | userspace command for slave device | 31 | userspace command for slave device |
| 32 | (read/write/touch) | 32 | (read/write/touch) |
| 33 | __u8 res - reserved | 33 | __u8 status - error indication from kernel |
| 34 | __u16 len - size of data attached to this header data | 34 | __u16 len - size of data attached to this header data |
| 35 | union { | 35 | union { |
| 36 | __u8 id[8]; - slave unique device id | 36 | __u8 id[8]; - slave unique device id |
| @@ -44,10 +44,14 @@ Protocol. | |||
| 44 | __u8 cmd - command opcode. | 44 | __u8 cmd - command opcode. |
| 45 | W1_CMD_READ - read command | 45 | W1_CMD_READ - read command |
| 46 | W1_CMD_WRITE - write command | 46 | W1_CMD_WRITE - write command |
| 47 | W1_CMD_TOUCH - touch command | ||
| 48 | (write and sample data back to userspace) | ||
| 49 | W1_CMD_SEARCH - search command | 47 | W1_CMD_SEARCH - search command |
| 50 | W1_CMD_ALARM_SEARCH - alarm search command | 48 | W1_CMD_ALARM_SEARCH - alarm search command |
| 49 | W1_CMD_TOUCH - touch command | ||
| 50 | (write and sample data back to userspace) | ||
| 51 | W1_CMD_RESET - send bus reset | ||
| 52 | W1_CMD_SLAVE_ADD - add slave to kernel list | ||
| 53 | W1_CMD_SLAVE_REMOVE - remove slave from kernel list | ||
| 54 | W1_CMD_LIST_SLAVES - get slaves list from kernel | ||
| 51 | __u8 res - reserved | 55 | __u8 res - reserved |
| 52 | __u16 len - length of data for this command | 56 | __u16 len - length of data for this command |
| 53 | For read command data must be allocated like for write command | 57 | For read command data must be allocated like for write command |
| @@ -87,8 +91,7 @@ format: | |||
| 87 | id0 ... idN | 91 | id0 ... idN |
| 88 | 92 | ||
| 89 | Each message is at most 4k in size, so if number of master devices | 93 | Each message is at most 4k in size, so if number of master devices |
| 90 | exceeds this, it will be split into several messages, | 94 | exceeds this, it will be split into several messages. |
| 91 | cn.seq will be increased for each one. | ||
| 92 | 95 | ||
| 93 | W1 search and alarm search commands. | 96 | W1 search and alarm search commands. |
| 94 | request: | 97 | request: |
diff --git a/Documentation/x86/earlyprintk.txt b/Documentation/x86/earlyprintk.txt index f19802c0f485..688e3eeed21d 100644 --- a/Documentation/x86/earlyprintk.txt +++ b/Documentation/x86/earlyprintk.txt | |||
| @@ -33,7 +33,7 @@ and two USB cables, connected like this: | |||
| 33 | ... | 33 | ... |
| 34 | 34 | ||
| 35 | ( If your system does not list a debug port capability then you probably | 35 | ( If your system does not list a debug port capability then you probably |
| 36 | wont be able to use the USB debug key. ) | 36 | won't be able to use the USB debug key. ) |
| 37 | 37 | ||
| 38 | b.) You also need a Netchip USB debug cable/key: | 38 | b.) You also need a Netchip USB debug cable/key: |
| 39 | 39 | ||
diff --git a/Documentation/x86/i386/IO-APIC.txt b/Documentation/x86/i386/IO-APIC.txt index 30b4c714fbe1..15f5baf7e1b6 100644 --- a/Documentation/x86/i386/IO-APIC.txt +++ b/Documentation/x86/i386/IO-APIC.txt | |||
| @@ -87,7 +87,7 @@ your PCI configuration: | |||
| 87 | 87 | ||
| 88 | echo -n pirq=; echo `scanpci | grep T_L | cut -c56-` | sed 's/ /,/g' | 88 | echo -n pirq=; echo `scanpci | grep T_L | cut -c56-` | sed 's/ /,/g' |
| 89 | 89 | ||
| 90 | note that this script wont work if you have skipped a few slots or if your | 90 | note that this script won't work if you have skipped a few slots or if your |
| 91 | board does not do default daisy-chaining. (or the IO-APIC has the PIRQ pins | 91 | board does not do default daisy-chaining. (or the IO-APIC has the PIRQ pins |
| 92 | connected in some strange way). E.g. if in the above case you have your SCSI | 92 | connected in some strange way). E.g. if in the above case you have your SCSI |
| 93 | card (IRQ11) in Slot3, and have Slot1 empty: | 93 | card (IRQ11) in Slot3, and have Slot1 empty: |
diff --git a/Documentation/x86/x86_64/mm.txt b/Documentation/x86/x86_64/mm.txt index c584a51add15..afe68ddbe6a4 100644 --- a/Documentation/x86/x86_64/mm.txt +++ b/Documentation/x86/x86_64/mm.txt | |||
| @@ -12,6 +12,8 @@ ffffc90000000000 - ffffe8ffffffffff (=45 bits) vmalloc/ioremap space | |||
| 12 | ffffe90000000000 - ffffe9ffffffffff (=40 bits) hole | 12 | ffffe90000000000 - ffffe9ffffffffff (=40 bits) hole |
| 13 | ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB) | 13 | ffffea0000000000 - ffffeaffffffffff (=40 bits) virtual memory map (1TB) |
| 14 | ... unused hole ... | 14 | ... unused hole ... |
| 15 | ffffff0000000000 - ffffff7fffffffff (=39 bits) %esp fixup stacks | ||
| 16 | ... unused hole ... | ||
| 15 | ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0 | 17 | ffffffff80000000 - ffffffffa0000000 (=512 MB) kernel text mapping, from phys 0 |
| 16 | ffffffffa0000000 - ffffffffff5fffff (=1525 MB) module mapping space | 18 | ffffffffa0000000 - ffffffffff5fffff (=1525 MB) module mapping space |
| 17 | ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls | 19 | ffffffffff600000 - ffffffffffdfffff (=8 MB) vsyscalls |
diff --git a/Documentation/zh_CN/HOWTO b/Documentation/zh_CN/HOWTO index 6c914aa87e71..54ea24ff63c7 100644 --- a/Documentation/zh_CN/HOWTO +++ b/Documentation/zh_CN/HOWTO | |||
| @@ -237,7 +237,7 @@ kernel.org网站的pub/linux/kernel/v2.6/目录下找到它。它的开发遵循 | |||
| 237 | 如果没有2.6.x.y版本内核存在,那么最新的2.6.x版本内核就相当于是当前的稳定 | 237 | 如果没有2.6.x.y版本内核存在,那么最新的2.6.x版本内核就相当于是当前的稳定 |
| 238 | 版内核。 | 238 | 版内核。 |
| 239 | 239 | ||
| 240 | 2.6.x.y版本由“稳定版”小组(邮件地址<stable@kernel.org>)维护,一般隔周发 | 240 | 2.6.x.y版本由“稳定版”小组(邮件地址<stable@vger.kernel.org>)维护,一般隔周发 |
| 241 | 布新版本。 | 241 | 布新版本。 |
| 242 | 242 | ||
| 243 | 内核源码中的Documentation/stable_kernel_rules.txt文件具体描述了可被稳定 | 243 | 内核源码中的Documentation/stable_kernel_rules.txt文件具体描述了可被稳定 |
diff --git a/Documentation/zh_CN/io_ordering.txt b/Documentation/zh_CN/io_ordering.txt new file mode 100644 index 000000000000..e592daf4e014 --- /dev/null +++ b/Documentation/zh_CN/io_ordering.txt | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | Chinese translated version of Documentation/io_orderings.txt | ||
| 2 | |||
| 3 | If you have any comment or update to the content, please contact the | ||
| 4 | original document maintainer directly. However, if you have a problem | ||
| 5 | communicating in English you can also ask the Chinese maintainer for | ||
| 6 | help. Contact the Chinese maintainer if this translation is outdated | ||
| 7 | or if there is a problem with the translation. | ||
| 8 | |||
| 9 | Chinese maintainer: Lin Yongting <linyongting@gmail.com> | ||
| 10 | --------------------------------------------------------------------- | ||
| 11 | Documentation/io_ordering.txt 的中文翻译 | ||
| 12 | |||
| 13 | 如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文 | ||
| 14 | 交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻 | ||
| 15 | 译存在问题,请联系中文版维护者。 | ||
| 16 | |||
| 17 | 中文版维护者: 林永听 Lin Yongting <linyongting@gmail.com> | ||
| 18 | 中文版翻译者: 林永听 Lin Yongting <linyongting@gmail.com> | ||
| 19 | 中文版校译者: 林永听 Lin Yongting <linyongting@gmail.com> | ||
| 20 | |||
| 21 | |||
| 22 | 以下为正文 | ||
| 23 | --------------------------------------------------------------------- | ||
| 24 | |||
| 25 | 在某些平台上,所谓的内存映射I/O是弱顺序。在这些平台上,驱动开发者有责任 | ||
| 26 | 保证I/O内存映射地址的写操作按程序图意的顺序达到设备。通常读取一个“安全” | ||
| 27 | 设备寄存器或桥寄存器,触发IO芯片清刷未处理的写操作到达设备后才处理读操作, | ||
| 28 | 而达到保证目的。驱动程序通常在spinlock保护的临界区退出之前使用这种技术。 | ||
| 29 | 这也可以保证后面的写操作只在前面的写操作之后到达设备(这非常类似于内存 | ||
| 30 | 屏障操作,mb(),不过仅适用于I/O)。 | ||
| 31 | |||
| 32 | 假设一个设备驱动程的具体例子: | ||
| 33 | |||
| 34 | ... | ||
| 35 | CPU A: spin_lock_irqsave(&dev_lock, flags) | ||
| 36 | CPU A: val = readl(my_status); | ||
| 37 | CPU A: ... | ||
| 38 | CPU A: writel(newval, ring_ptr); | ||
| 39 | CPU A: spin_unlock_irqrestore(&dev_lock, flags) | ||
| 40 | ... | ||
| 41 | CPU B: spin_lock_irqsave(&dev_lock, flags) | ||
| 42 | CPU B: val = readl(my_status); | ||
| 43 | CPU B: ... | ||
| 44 | CPU B: writel(newval2, ring_ptr); | ||
| 45 | CPU B: spin_unlock_irqrestore(&dev_lock, flags) | ||
| 46 | ... | ||
| 47 | |||
| 48 | 上述例子中,设备可能会先接收到newval2的值,然后接收到newval的值,问题就 | ||
| 49 | 发生了。不过很容易通过下面方法来修复: | ||
| 50 | |||
| 51 | ... | ||
| 52 | CPU A: spin_lock_irqsave(&dev_lock, flags) | ||
| 53 | CPU A: val = readl(my_status); | ||
| 54 | CPU A: ... | ||
| 55 | CPU A: writel(newval, ring_ptr); | ||
| 56 | CPU A: (void)readl(safe_register); /* 配置寄存器?*/ | ||
| 57 | CPU A: spin_unlock_irqrestore(&dev_lock, flags) | ||
| 58 | ... | ||
| 59 | CPU B: spin_lock_irqsave(&dev_lock, flags) | ||
| 60 | CPU B: val = readl(my_status); | ||
| 61 | CPU B: ... | ||
| 62 | CPU B: writel(newval2, ring_ptr); | ||
| 63 | CPU B: (void)readl(safe_register); /* 配置寄存器?*/ | ||
| 64 | CPU B: spin_unlock_irqrestore(&dev_lock, flags) | ||
| 65 | |||
| 66 | 在解决方案中,读取safe_register寄存器,触发IO芯片清刷未处理的写操作, | ||
| 67 | 再处理后面的读操作,防止引发数据不一致问题。 | ||
diff --git a/Documentation/zh_CN/magic-number.txt b/Documentation/zh_CN/magic-number.txt index 2ebe539f5450..dfb72a5c63e9 100644 --- a/Documentation/zh_CN/magic-number.txt +++ b/Documentation/zh_CN/magic-number.txt | |||
| @@ -63,8 +63,6 @@ struct tty_ldisc { | |||
| 63 | PG_MAGIC 'P' pg_{read,write}_hdr include/linux/pg.h | 63 | PG_MAGIC 'P' pg_{read,write}_hdr include/linux/pg.h |
| 64 | CMAGIC 0x0111 user include/linux/a.out.h | 64 | CMAGIC 0x0111 user include/linux/a.out.h |
| 65 | MKISS_DRIVER_MAGIC 0x04bf mkiss_channel drivers/net/mkiss.h | 65 | MKISS_DRIVER_MAGIC 0x04bf mkiss_channel drivers/net/mkiss.h |
| 66 | RISCOM8_MAGIC 0x0907 riscom_port drivers/char/riscom8.h | ||
| 67 | SPECIALIX_MAGIC 0x0907 specialix_port drivers/char/specialix_io8.h | ||
| 68 | HDLC_MAGIC 0x239e n_hdlc drivers/char/n_hdlc.c | 66 | HDLC_MAGIC 0x239e n_hdlc drivers/char/n_hdlc.c |
| 69 | APM_BIOS_MAGIC 0x4101 apm_user arch/x86/kernel/apm_32.c | 67 | APM_BIOS_MAGIC 0x4101 apm_user arch/x86/kernel/apm_32.c |
| 70 | CYCLADES_MAGIC 0x4359 cyclades_port include/linux/cyclades.h | 68 | CYCLADES_MAGIC 0x4359 cyclades_port include/linux/cyclades.h |
| @@ -82,7 +80,6 @@ STRIP_MAGIC 0x5303 strip drivers/net/strip.c | |||
| 82 | X25_ASY_MAGIC 0x5303 x25_asy drivers/net/x25_asy.h | 80 | X25_ASY_MAGIC 0x5303 x25_asy drivers/net/x25_asy.h |
| 83 | SIXPACK_MAGIC 0x5304 sixpack drivers/net/hamradio/6pack.h | 81 | SIXPACK_MAGIC 0x5304 sixpack drivers/net/hamradio/6pack.h |
| 84 | AX25_MAGIC 0x5316 ax_disp drivers/net/mkiss.h | 82 | AX25_MAGIC 0x5316 ax_disp drivers/net/mkiss.h |
| 85 | ESP_MAGIC 0x53ee esp_struct drivers/char/esp.h | ||
| 86 | TTY_MAGIC 0x5401 tty_struct include/linux/tty.h | 83 | TTY_MAGIC 0x5401 tty_struct include/linux/tty.h |
| 87 | MGSL_MAGIC 0x5401 mgsl_info drivers/char/synclink.c | 84 | MGSL_MAGIC 0x5401 mgsl_info drivers/char/synclink.c |
| 88 | TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h | 85 | TTY_DRIVER_MAGIC 0x5402 tty_driver include/linux/tty_driver.h |
| @@ -94,13 +91,10 @@ USB_BLUETOOTH_MAGIC 0x6d02 usb_bluetooth drivers/usb/class/bluetty.c | |||
| 94 | RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c | 91 | RFCOMM_TTY_MAGIC 0x6d02 net/bluetooth/rfcomm/tty.c |
| 95 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h | 92 | USB_SERIAL_PORT_MAGIC 0x7301 usb_serial_port drivers/usb/serial/usb-serial.h |
| 96 | CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h | 93 | CG_MAGIC 0x00090255 ufs_cylinder_group include/linux/ufs_fs.h |
| 97 | A2232_MAGIC 0x000a2232 gs_port drivers/char/ser_a2232.h | ||
| 98 | RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h | 94 | RPORT_MAGIC 0x00525001 r_port drivers/char/rocket_int.h |
| 99 | LSEMAGIC 0x05091998 lse drivers/fc4/fc.c | 95 | LSEMAGIC 0x05091998 lse drivers/fc4/fc.c |
| 100 | GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h | 96 | GDTIOCTL_MAGIC 0x06030f07 gdth_iowr_str drivers/scsi/gdth_ioctl.h |
| 101 | RIEBL_MAGIC 0x09051990 drivers/net/atarilance.c | 97 | RIEBL_MAGIC 0x09051990 drivers/net/atarilance.c |
| 102 | RIO_MAGIC 0x12345678 gs_port drivers/char/rio/rio_linux.c | ||
| 103 | SX_MAGIC 0x12345678 gs_port drivers/char/sx.h | ||
| 104 | NBD_REQUEST_MAGIC 0x12560953 nbd_request include/linux/nbd.h | 98 | NBD_REQUEST_MAGIC 0x12560953 nbd_request include/linux/nbd.h |
| 105 | RED_MAGIC2 0x170fc2a5 (any) mm/slab.c | 99 | RED_MAGIC2 0x170fc2a5 (any) mm/slab.c |
| 106 | BAYCOM_MAGIC 0x19730510 baycom_state drivers/net/baycom_epp.c | 100 | BAYCOM_MAGIC 0x19730510 baycom_state drivers/net/baycom_epp.c |
| @@ -116,7 +110,6 @@ ISDN_ASYNC_MAGIC 0x49344C01 modem_info include/linux/isdn.h | |||
| 116 | CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info drivers/s390/net/ctctty.c | 110 | CTC_ASYNC_MAGIC 0x49344C01 ctc_tty_info drivers/s390/net/ctctty.c |
| 117 | ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s drivers/isdn/i4l/isdn_net_lib.h | 111 | ISDN_NET_MAGIC 0x49344C02 isdn_net_local_s drivers/isdn/i4l/isdn_net_lib.h |
| 118 | SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg arch/*/amiga/config.c | 112 | SAVEKMSG_MAGIC2 0x4B4D5347 savekmsg arch/*/amiga/config.c |
| 119 | STLI_BOARDMAGIC 0x4bc6c825 stlibrd include/linux/istallion.h | ||
| 120 | CS_STATE_MAGIC 0x4c4f4749 cs_state sound/oss/cs46xx.c | 113 | CS_STATE_MAGIC 0x4c4f4749 cs_state sound/oss/cs46xx.c |
| 121 | SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c | 114 | SLAB_C_MAGIC 0x4f17a36d kmem_cache mm/slab.c |
| 122 | COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c | 115 | COW_MAGIC 0x4f4f4f4d cow_header_v1 arch/um/drivers/ubd_user.c |
| @@ -127,10 +120,8 @@ SCC_MAGIC 0x52696368 gs_port drivers/char/scc.h | |||
| 127 | SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c | 120 | SAVEKMSG_MAGIC1 0x53415645 savekmsg arch/*/amiga/config.c |
| 128 | GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h | 121 | GDA_MAGIC 0x58464552 gda arch/mips/include/asm/sn/gda.h |
| 129 | RED_MAGIC1 0x5a2cf071 (any) mm/slab.c | 122 | RED_MAGIC1 0x5a2cf071 (any) mm/slab.c |
| 130 | STL_PORTMAGIC 0x5a7182c9 stlport include/linux/stallion.h | ||
| 131 | EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev drivers/atm/lanai.c | 123 | EEPROM_MAGIC_VALUE 0x5ab478d2 lanai_dev drivers/atm/lanai.c |
| 132 | HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state include/linux/hdlcdrv.h | 124 | HDLCDRV_MAGIC 0x5ac6e778 hdlcdrv_state include/linux/hdlcdrv.h |
| 133 | EPCA_MAGIC 0x5c6df104 channel include/linux/epca.h | ||
| 134 | PCXX_MAGIC 0x5c6df104 channel drivers/char/pcxx.h | 125 | PCXX_MAGIC 0x5c6df104 channel drivers/char/pcxx.h |
| 135 | KV_MAGIC 0x5f4b565f kernel_vars_s arch/mips/include/asm/sn/klkernvars.h | 126 | KV_MAGIC 0x5f4b565f kernel_vars_s arch/mips/include/asm/sn/klkernvars.h |
| 136 | I810_STATE_MAGIC 0x63657373 i810_state sound/oss/i810_audio.c | 127 | I810_STATE_MAGIC 0x63657373 i810_state sound/oss/i810_audio.c |
| @@ -142,17 +133,14 @@ SLOT_MAGIC 0x67267322 slot drivers/hotplug/acpiphp.h | |||
| 142 | LO_MAGIC 0x68797548 nbd_device include/linux/nbd.h | 133 | LO_MAGIC 0x68797548 nbd_device include/linux/nbd.h |
| 143 | OPROFILE_MAGIC 0x6f70726f super_block drivers/oprofile/oprofilefs.h | 134 | OPROFILE_MAGIC 0x6f70726f super_block drivers/oprofile/oprofilefs.h |
| 144 | M3_STATE_MAGIC 0x734d724d m3_state sound/oss/maestro3.c | 135 | M3_STATE_MAGIC 0x734d724d m3_state sound/oss/maestro3.c |
| 145 | STL_PANELMAGIC 0x7ef621a1 stlpanel include/linux/stallion.h | ||
| 146 | VMALLOC_MAGIC 0x87654320 snd_alloc_track sound/core/memory.c | 136 | VMALLOC_MAGIC 0x87654320 snd_alloc_track sound/core/memory.c |
| 147 | KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c | 137 | KMALLOC_MAGIC 0x87654321 snd_alloc_track sound/core/memory.c |
| 148 | PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h | 138 | PWC_MAGIC 0x89DC10AB pwc_device drivers/usb/media/pwc.h |
| 149 | NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h | 139 | NBD_REPLY_MAGIC 0x96744668 nbd_reply include/linux/nbd.h |
| 150 | STL_BOARDMAGIC 0xa2267f52 stlbrd include/linux/stallion.h | ||
| 151 | ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h | 140 | ENI155_MAGIC 0xa54b872d midway_eprom drivers/atm/eni.h |
| 152 | SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h | 141 | SCI_MAGIC 0xbabeface gs_port drivers/char/sh-sci.h |
| 153 | CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h | 142 | CODA_MAGIC 0xC0DAC0DA coda_file_info include/linux/coda_fs_i.h |
| 154 | DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h | 143 | DPMEM_MAGIC 0xc0ffee11 gdt_pci_sram drivers/scsi/gdth.h |
| 155 | STLI_PORTMAGIC 0xe671c7a1 stliport include/linux/istallion.h | ||
| 156 | YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c | 144 | YAM_MAGIC 0xF10A7654 yam_port drivers/net/hamradio/yam.c |
| 157 | CCB_MAGIC 0xf2691ad2 ccb drivers/scsi/ncr53c8xx.c | 145 | CCB_MAGIC 0xf2691ad2 ccb drivers/scsi/ncr53c8xx.c |
| 158 | QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry drivers/scsi/arm/queue.c | 146 | QUEUE_MAGIC_FREE 0xf7e1c9a3 queue_entry drivers/scsi/arm/queue.c |
diff --git a/Documentation/zh_CN/stable_kernel_rules.txt b/Documentation/zh_CN/stable_kernel_rules.txt index b5b9b0ab02fd..26ea5ed7cd9c 100644 --- a/Documentation/zh_CN/stable_kernel_rules.txt +++ b/Documentation/zh_CN/stable_kernel_rules.txt | |||
| @@ -42,7 +42,7 @@ Documentation/stable_kernel_rules.txt 的中文翻译 | |||
| 42 | 42 | ||
| 43 | 向稳定版代码树提交补丁的过程: | 43 | 向稳定版代码树提交补丁的过程: |
| 44 | 44 | ||
| 45 | - 在确认了补丁符合以上的规则后,将补丁发送到stable@kernel.org。 | 45 | - 在确认了补丁符合以上的规则后,将补丁发送到stable@vger.kernel.org。 |
| 46 | - 如果补丁被接受到队列里,发送者会收到一个ACK回复,如果没有被接受,收 | 46 | - 如果补丁被接受到队列里,发送者会收到一个ACK回复,如果没有被接受,收 |
| 47 | 到的是NAK回复。回复需要几天的时间,这取决于开发者的时间安排。 | 47 | 到的是NAK回复。回复需要几天的时间,这取决于开发者的时间安排。 |
| 48 | - 被接受的补丁会被加到稳定版本队列里,等待其他开发者的审查。 | 48 | - 被接受的补丁会被加到稳定版本队列里,等待其他开发者的审查。 |
