diff options
Diffstat (limited to 'Documentation')
159 files changed, 5108 insertions, 1264 deletions
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/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-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/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/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/drm.tmpl b/Documentation/DocBook/drm.tmpl index 702c4474919c..ba60d93c1855 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> |
@@ -459,7 +459,7 @@ char *date;</synopsis> | |||
459 | providing a solution to every graphics memory-related problems, GEM | 459 | providing a solution to every graphics memory-related problems, GEM |
460 | identified common code between drivers and created a support library to | 460 | identified common code between drivers and created a support library to |
461 | share it. GEM has simpler initialization and execution requirements than | 461 | share it. GEM has simpler initialization and execution requirements than |
462 | TTM, but has no video RAM management capabitilies and is thus limited to | 462 | TTM, but has no video RAM management capabilities and is thus limited to |
463 | UMA devices. | 463 | UMA devices. |
464 | </para> | 464 | </para> |
465 | <sect2> | 465 | <sect2> |
@@ -889,7 +889,7 @@ int (*prime_fd_to_handle)(struct drm_device *dev, | |||
889 | vice versa. Drivers must use the kernel dma-buf buffer sharing framework | 889 | vice versa. Drivers must use the kernel dma-buf buffer sharing framework |
890 | to manage the PRIME file descriptors. Similar to the mode setting | 890 | to manage the PRIME file descriptors. Similar to the mode setting |
891 | API PRIME is agnostic to the underlying buffer object manager, as | 891 | API PRIME is agnostic to the underlying buffer object manager, as |
892 | long as handles are 32bit unsinged integers. | 892 | long as handles are 32bit unsigned integers. |
893 | </para> | 893 | </para> |
894 | <para> | 894 | <para> |
895 | While non-GEM drivers must implement the operations themselves, GEM | 895 | While non-GEM drivers must implement the operations themselves, GEM |
@@ -2287,6 +2287,11 @@ void intel_crt_init(struct drm_device *dev) | |||
2287 | !Edrivers/gpu/drm/drm_crtc_helper.c | 2287 | !Edrivers/gpu/drm/drm_crtc_helper.c |
2288 | </sect2> | 2288 | </sect2> |
2289 | <sect2> | 2289 | <sect2> |
2290 | <title>Output Probing Helper Functions Reference</title> | ||
2291 | !Pdrivers/gpu/drm/drm_probe_helper.c output probing helper overview | ||
2292 | !Edrivers/gpu/drm/drm_probe_helper.c | ||
2293 | </sect2> | ||
2294 | <sect2> | ||
2290 | <title>fbdev Helper Functions Reference</title> | 2295 | <title>fbdev Helper Functions Reference</title> |
2291 | !Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers | 2296 | !Pdrivers/gpu/drm/drm_fb_helper.c fbdev helpers |
2292 | !Edrivers/gpu/drm/drm_fb_helper.c | 2297 | !Edrivers/gpu/drm/drm_fb_helper.c |
@@ -2351,7 +2356,7 @@ void intel_crt_init(struct drm_device *dev) | |||
2351 | first create properties and then create and associate individual instances | 2356 | first create properties and then create and associate individual instances |
2352 | of those properties to objects. A property can be instantiated multiple | 2357 | of those properties to objects. A property can be instantiated multiple |
2353 | times and associated with different objects. Values are stored in property | 2358 | times and associated with different objects. Values are stored in property |
2354 | instances, and all other property information are stored in the propery | 2359 | instances, and all other property information are stored in the property |
2355 | and shared between all instances of the property. | 2360 | and shared between all instances of the property. |
2356 | </para> | 2361 | </para> |
2357 | <para> | 2362 | <para> |
@@ -2692,10 +2697,10 @@ int num_ioctls;</synopsis> | |||
2692 | <sect1> | 2697 | <sect1> |
2693 | <title>Legacy Support Code</title> | 2698 | <title>Legacy Support Code</title> |
2694 | <para> | 2699 | <para> |
2695 | The section very brievely covers some of the old legacy support code which | 2700 | 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 | 2701 | 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 | 2702 | to the underlying device instead of registering as a real driver. This |
2698 | also includes some of the old generic buffer mangement and command | 2703 | 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. | 2704 | submission code. Do not use any of this in new and modern drivers. |
2700 | </para> | 2705 | </para> |
2701 | 2706 | ||
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/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/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/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/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/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/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/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/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..189baba40cd6 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 Developement 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/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/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/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/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/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/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt index 5992dceec7af..6c3c0847e4fd 100644 --- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | |||
@@ -10,6 +10,7 @@ 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 | ||
13 | - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks | 14 | - "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 | 15 | - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks |
15 | - "renesas,cpg-mstp-clock" for generic MSTP gate clocks | 16 | - "renesas,cpg-mstp-clock" for generic MSTP gate clocks |
@@ -43,7 +44,7 @@ Example | |||
43 | clock-output-names = | 44 | clock-output-names = |
44 | "tpu0", "mmcif1", "sdhi3", "sdhi2", | 45 | "tpu0", "mmcif1", "sdhi3", "sdhi2", |
45 | "sdhi1", "sdhi0", "mmcif0"; | 46 | "sdhi1", "sdhi0", "mmcif0"; |
46 | renesas,clock-indices = < | 47 | clock-indices = < |
47 | R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3 | 48 | R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3 |
48 | R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 | 49 | R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 |
49 | R8A7790_CLK_MMCIF0 | 50 | R8A7790_CLK_MMCIF0 |
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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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..22d57404fdc3 100644 --- a/Documentation/devicetree/bindings/spi/spi-bus.txt +++ b/Documentation/devicetree/bindings/spi/spi-bus.txt | |||
@@ -55,6 +55,8 @@ 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 |
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/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/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..941980474e14 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,35 @@ 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 |
70 | microchip Microchip Technology Inc. | 80 | microchip Microchip Technology Inc. |
71 | mosaixtech Mosaix Technologies, Inc. | 81 | mosaixtech Mosaix Technologies, Inc. |
72 | moxa Moxa | 82 | moxa Moxa |
83 | mpl MPL AG | ||
84 | mundoreader Mundo Reader S.L. | ||
85 | mxicy Macronix International Co., Ltd. | ||
73 | national National Semiconductor | 86 | national National Semiconductor |
74 | neonode Neonode Inc. | 87 | neonode Neonode Inc. |
75 | netgear NETGEAR | 88 | netgear NETGEAR |
89 | newhaven Newhaven Display International | ||
76 | nintendo Nintendo | 90 | nintendo Nintendo |
77 | nokia Nokia | 91 | nokia Nokia |
78 | nvidia NVIDIA | 92 | nvidia NVIDIA |
@@ -82,10 +96,13 @@ opencores OpenCores.org | |||
82 | panasonic Panasonic Corporation | 96 | panasonic Panasonic Corporation |
83 | phytec PHYTEC Messtechnik GmbH | 97 | phytec PHYTEC Messtechnik GmbH |
84 | picochip Picochip Ltd | 98 | picochip Picochip Ltd |
99 | plathome Plat'Home Co., Ltd. | ||
85 | powervr PowerVR (deprecated, use img) | 100 | powervr PowerVR (deprecated, use img) |
86 | qca Qualcomm Atheros, Inc. | 101 | qca Qualcomm Atheros, Inc. |
87 | qcom Qualcomm Technologies, Inc | 102 | qcom Qualcomm Technologies, Inc |
88 | qnap QNAP Systems, Inc. | 103 | qnap QNAP Systems, Inc. |
104 | radxa Radxa | ||
105 | raidsonic RaidSonic Technology GmbH | ||
89 | ralink Mediatek/Ralink Technology Corp. | 106 | ralink Mediatek/Ralink Technology Corp. |
90 | ramtron Ramtron International | 107 | ramtron Ramtron International |
91 | realtek Realtek Semiconductor Corp. | 108 | realtek Realtek Semiconductor Corp. |
@@ -95,6 +112,7 @@ rockchip Fuzhou Rockchip Electronics Co., Ltd | |||
95 | samsung Samsung Semiconductor | 112 | samsung Samsung Semiconductor |
96 | sbs Smart Battery System | 113 | sbs Smart Battery System |
97 | schindler Schindler | 114 | schindler Schindler |
115 | seagate Seagate Technology PLC | ||
98 | sil Silicon Image | 116 | sil Silicon Image |
99 | silabs Silicon Laboratories | 117 | silabs Silicon Laboratories |
100 | simtek | 118 | simtek |
@@ -109,9 +127,12 @@ stericsson ST-Ericsson | |||
109 | synology Synology, Inc. | 127 | synology Synology, Inc. |
110 | ti Texas Instruments | 128 | ti Texas Instruments |
111 | tlm Trusted Logic Mobility | 129 | tlm Trusted Logic Mobility |
130 | toradex Toradex AG | ||
112 | toshiba Toshiba Corporation | 131 | toshiba Toshiba Corporation |
113 | toumaz Toumaz | 132 | toumaz Toumaz |
133 | usi Universal Scientifc Industrial Co., Ltd. | ||
114 | v3 V3 Semiconductor | 134 | v3 V3 Semiconductor |
135 | variscite Variscite Ltd. | ||
115 | via VIA Technologies, Inc. | 136 | via VIA Technologies, Inc. |
116 | voipac Voipac Technologies s.r.o. | 137 | voipac Voipac Technologies s.r.o. |
117 | winbond Winbond Electronics corp. | 138 | winbond Winbond Electronics corp. |
@@ -119,3 +140,4 @@ wlf Wolfson Microelectronics | |||
119 | wm Wondermedia Technologies, Inc. | 140 | wm Wondermedia Technologies, Inc. |
120 | xes Extreme Engineering Solutions (X-ES) | 141 | xes Extreme Engineering Solutions (X-ES) |
121 | xlnx Xilinx | 142 | xlnx Xilinx |
143 | zyxel ZyXEL Communications Corp. | ||
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt index 4f7897e99cba..89472558011e 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,10 @@ 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() | ||
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/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 8b9cd8eb3f91..264bcde0c51c 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -1245,8 +1245,9 @@ second). The meanings of the columns are as follows, from left to right: | |||
1245 | 1245 | ||
1246 | The "intr" line gives counts of interrupts serviced since boot time, for each | 1246 | 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 | 1247 | 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 | 1248 | interrupts serviced including unnumbered architecture specific interrupts; |
1249 | interrupt. | 1249 | each subsequent column is the total for that particular numbered interrupt. |
1250 | Unnumbered interrupts are not shown, only summed into the total. | ||
1250 | 1251 | ||
1251 | The "ctxt" line gives the total number of context switches across all CPUs. | 1252 | The "ctxt" line gives the total number of context switches across all CPUs. |
1252 | 1253 | ||
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/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/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/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/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/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 03e50b4883a8..4ddcbf949699 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -804,13 +804,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
804 | dhash_entries= [KNL] | 804 | dhash_entries= [KNL] |
805 | Set number of hash buckets for dentry cache. | 805 | Set number of hash buckets for dentry cache. |
806 | 806 | ||
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] | 807 | disable= [IPV6] |
815 | See Documentation/networking/ipv6.txt. | 808 | See Documentation/networking/ipv6.txt. |
816 | 809 | ||
@@ -890,6 +883,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
890 | which are not unmapped. | 883 | which are not unmapped. |
891 | 884 | ||
892 | earlycon= [KNL] Output early console device and options. | 885 | earlycon= [KNL] Output early console device and options. |
886 | |||
893 | uart[8250],io,<addr>[,options] | 887 | uart[8250],io,<addr>[,options] |
894 | uart[8250],mmio,<addr>[,options] | 888 | uart[8250],mmio,<addr>[,options] |
895 | uart[8250],mmio32,<addr>[,options] | 889 | uart[8250],mmio32,<addr>[,options] |
@@ -899,7 +893,15 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
899 | (mmio) or 32-bit (mmio32). | 893 | (mmio) or 32-bit (mmio32). |
900 | The options are the same as for ttyS, above. | 894 | The options are the same as for ttyS, above. |
901 | 895 | ||
902 | earlyprintk= [X86,SH,BLACKFIN,ARM] | 896 | pl011,<addr> |
897 | Start an early, polled-mode console on a pl011 serial | ||
898 | port at the specified address. The pl011 serial port | ||
899 | must already be setup and configured. Options are not | ||
900 | yet supported. | ||
901 | |||
902 | smh Use ARM semihosting calls for early console. | ||
903 | |||
904 | earlyprintk= [X86,SH,BLACKFIN,ARM,M68k] | ||
903 | earlyprintk=vga | 905 | earlyprintk=vga |
904 | earlyprintk=efi | 906 | earlyprintk=efi |
905 | earlyprintk=xen | 907 | earlyprintk=xen |
@@ -2225,10 +2227,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2225 | noreplace-smp [X86-32,SMP] Don't replace SMP instructions | 2227 | noreplace-smp [X86-32,SMP] Don't replace SMP instructions |
2226 | with UP alternatives | 2228 | with UP alternatives |
2227 | 2229 | ||
2228 | nordrand [X86] Disable the direct use of the RDRAND | 2230 | nordrand [X86] Disable kernel use of the RDRAND and |
2229 | instruction even if it is supported by the | 2231 | RDSEED instructions even if they are supported |
2230 | processor. RDRAND is still available to user | 2232 | by the processor. RDRAND and RDSEED are still |
2231 | space applications. | 2233 | available to user space applications. |
2232 | 2234 | ||
2233 | noresume [SWSUSP] Disables resume and restores original swap | 2235 | noresume [SWSUSP] Disables resume and restores original swap |
2234 | space. | 2236 | space. |
@@ -2939,9 +2941,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
2939 | rhash_entries= [KNL,NET] | 2941 | rhash_entries= [KNL,NET] |
2940 | Set number of hash buckets for route cache | 2942 | Set number of hash buckets for route cache |
2941 | 2943 | ||
2942 | riscom8= [HW,SERIAL] | ||
2943 | Format: <io_board1>[,<io_board2>[,...<io_boardN>]] | ||
2944 | |||
2945 | ro [KNL] Mount root device read-only on boot | 2944 | ro [KNL] Mount root device read-only on boot |
2946 | 2945 | ||
2947 | root= [KNL] Root filesystem | 2946 | root= [KNL] Root filesystem |
@@ -3083,9 +3082,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
3083 | sonypi.*= [HW] Sony Programmable I/O Control Device driver | 3082 | sonypi.*= [HW] Sony Programmable I/O Control Device driver |
3084 | See Documentation/laptops/sonypi.txt | 3083 | See Documentation/laptops/sonypi.txt |
3085 | 3084 | ||
3086 | specialix= [HW,SERIAL] Specialix multi-serial port adapter | ||
3087 | See Documentation/serial/specialix.txt. | ||
3088 | |||
3089 | spia_io_base= [HW,MTD] | 3085 | spia_io_base= [HW,MTD] |
3090 | spia_fio_base= | 3086 | spia_fio_base= |
3091 | spia_pedr= | 3087 | spia_pedr= |
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/networking/filter.txt b/Documentation/networking/filter.txt index 81f940f4e884..e3ba753cb714 100644 --- a/Documentation/networking/filter.txt +++ b/Documentation/networking/filter.txt | |||
@@ -277,7 +277,7 @@ 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) |
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/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/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/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/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/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index a9380ba54c8e..b4f53653c106 100644 --- a/Documentation/virtual/kvm/api.txt +++ b/Documentation/virtual/kvm/api.txt | |||
@@ -2126,7 +2126,7 @@ into the hash PTE second double word). | |||
2126 | 4.75 KVM_IRQFD | 2126 | 4.75 KVM_IRQFD |
2127 | 2127 | ||
2128 | Capability: KVM_CAP_IRQFD | 2128 | Capability: KVM_CAP_IRQFD |
2129 | Architectures: x86 | 2129 | Architectures: x86 s390 |
2130 | Type: vm ioctl | 2130 | Type: vm ioctl |
2131 | Parameters: struct kvm_irqfd (in) | 2131 | Parameters: struct kvm_irqfd (in) |
2132 | Returns: 0 on success, -1 on error | 2132 | Returns: 0 on success, -1 on error |
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/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/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 | - 被接受的补丁会被加到稳定版本队列里,等待其他开发者的审查。 |