diff options
Diffstat (limited to 'Documentation')
77 files changed, 3633 insertions, 1521 deletions
diff --git a/Documentation/ABI/testing/configfs-usb-gadget-mass-storage b/Documentation/ABI/testing/configfs-usb-gadget-mass-storage new file mode 100644 index 000000000000..ad72a37ee9ff --- /dev/null +++ b/Documentation/ABI/testing/configfs-usb-gadget-mass-storage | |||
@@ -0,0 +1,31 @@ | |||
1 | What: /config/usb-gadget/gadget/functions/mass_storage.name | ||
2 | Date: Oct 2013 | ||
3 | KenelVersion: 3.13 | ||
4 | Description: | ||
5 | The attributes: | ||
6 | |||
7 | stall - Set to permit function to halt bulk endpoints. | ||
8 | Disabled on some USB devices known not to work | ||
9 | correctly. You should set it to true. | ||
10 | num_buffers - Number of pipeline buffers. Valid numbers | ||
11 | are 2..4. Available only if | ||
12 | CONFIG_USB_GADGET_DEBUG_FILES is set. | ||
13 | |||
14 | What: /config/usb-gadget/gadget/functions/mass_storage.name/lun.name | ||
15 | Date: Oct 2013 | ||
16 | KenelVersion: 3.13 | ||
17 | Description: | ||
18 | The attributes: | ||
19 | |||
20 | file - The path to the backing file for the LUN. | ||
21 | Required if LUN is not marked as removable. | ||
22 | ro - Flag specifying access to the LUN shall be | ||
23 | read-only. This is implied if CD-ROM emulation | ||
24 | is enabled as well as when it was impossible | ||
25 | to open "filename" in R/W mode. | ||
26 | removable - Flag specifying that LUN shall be indicated as | ||
27 | being removable. | ||
28 | cdrom - Flag specifying that LUN shall be reported as | ||
29 | being a CD-ROM. | ||
30 | nofua - Flag specifying that FUA flag | ||
31 | in SCSI WRITE(10,12) | ||
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio index 39c8de0e53d0..b20e829d350f 100644 --- a/Documentation/ABI/testing/sysfs-bus-iio +++ b/Documentation/ABI/testing/sysfs-bus-iio | |||
@@ -79,7 +79,7 @@ Description: | |||
79 | correspond to externally available input one of the named | 79 | correspond to externally available input one of the named |
80 | versions may be used. The number must always be specified and | 80 | versions may be used. The number must always be specified and |
81 | unique to allow association with event codes. Units after | 81 | unique to allow association with event codes. Units after |
82 | application of scale and offset are microvolts. | 82 | application of scale and offset are millivolts. |
83 | 83 | ||
84 | What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_raw | 84 | What: /sys/bus/iio/devices/iio:deviceX/in_voltageY-voltageZ_raw |
85 | KernelVersion: 2.6.35 | 85 | KernelVersion: 2.6.35 |
@@ -90,7 +90,7 @@ Description: | |||
90 | physically equivalent inputs when non differential readings are | 90 | physically equivalent inputs when non differential readings are |
91 | separately available. In differential only parts, then all that | 91 | separately available. In differential only parts, then all that |
92 | is required is a consistent labeling. Units after application | 92 | is required is a consistent labeling. Units after application |
93 | of scale and offset are microvolts. | 93 | of scale and offset are millivolts. |
94 | 94 | ||
95 | What: /sys/bus/iio/devices/iio:deviceX/in_capacitanceY_raw | 95 | What: /sys/bus/iio/devices/iio:deviceX/in_capacitanceY_raw |
96 | KernelVersion: 3.2 | 96 | KernelVersion: 3.2 |
@@ -537,6 +537,62 @@ Description: | |||
537 | value is in raw device units or in processed units (as _raw | 537 | value is in raw device units or in processed units (as _raw |
538 | and _input do on sysfs direct channel read attributes). | 538 | and _input do on sysfs direct channel read attributes). |
539 | 539 | ||
540 | What: /sys/.../events/in_accel_x_thresh_rising_hysteresis | ||
541 | What: /sys/.../events/in_accel_x_thresh_falling_hysteresis | ||
542 | What: /sys/.../events/in_accel_x_thresh_either_hysteresis | ||
543 | What: /sys/.../events/in_accel_y_thresh_rising_hysteresis | ||
544 | What: /sys/.../events/in_accel_y_thresh_falling_hysteresis | ||
545 | What: /sys/.../events/in_accel_y_thresh_either_hysteresis | ||
546 | What: /sys/.../events/in_accel_z_thresh_rising_hysteresis | ||
547 | What: /sys/.../events/in_accel_z_thresh_falling_hysteresis | ||
548 | What: /sys/.../events/in_accel_z_thresh_either_hysteresis | ||
549 | What: /sys/.../events/in_anglvel_x_thresh_rising_hysteresis | ||
550 | What: /sys/.../events/in_anglvel_x_thresh_falling_hysteresis | ||
551 | What: /sys/.../events/in_anglvel_x_thresh_either_hysteresis | ||
552 | What: /sys/.../events/in_anglvel_y_thresh_rising_hysteresis | ||
553 | What: /sys/.../events/in_anglvel_y_thresh_falling_hysteresis | ||
554 | What: /sys/.../events/in_anglvel_y_thresh_either_hysteresis | ||
555 | What: /sys/.../events/in_anglvel_z_thresh_rising_hysteresis | ||
556 | What: /sys/.../events/in_anglvel_z_thresh_falling_hysteresis | ||
557 | What: /sys/.../events/in_anglvel_z_thresh_either_hysteresis | ||
558 | What: /sys/.../events/in_magn_x_thresh_rising_hysteresis | ||
559 | What: /sys/.../events/in_magn_x_thresh_falling_hysteresis | ||
560 | What: /sys/.../events/in_magn_x_thresh_either_hysteresis | ||
561 | What: /sys/.../events/in_magn_y_thresh_rising_hysteresis | ||
562 | What: /sys/.../events/in_magn_y_thresh_falling_hysteresis | ||
563 | What: /sys/.../events/in_magn_y_thresh_either_hysteresis | ||
564 | What: /sys/.../events/in_magn_z_thresh_rising_hysteresis | ||
565 | What: /sys/.../events/in_magn_z_thresh_falling_hysteresis | ||
566 | What: /sys/.../events/in_magn_z_thresh_either_hysteresis | ||
567 | What: /sys/.../events/in_voltageY_thresh_rising_hysteresis | ||
568 | What: /sys/.../events/in_voltageY_thresh_falling_hysteresis | ||
569 | What: /sys/.../events/in_voltageY_thresh_either_hysteresis | ||
570 | What: /sys/.../events/in_tempY_thresh_rising_hysteresis | ||
571 | What: /sys/.../events/in_tempY_thresh_falling_hysteresis | ||
572 | What: /sys/.../events/in_tempY_thresh_either_hysteresis | ||
573 | What: /sys/.../events/in_illuminance0_thresh_falling_hysteresis | ||
574 | what: /sys/.../events/in_illuminance0_thresh_rising_hysteresis | ||
575 | what: /sys/.../events/in_illuminance0_thresh_either_hysteresis | ||
576 | what: /sys/.../events/in_proximity0_thresh_falling_hysteresis | ||
577 | what: /sys/.../events/in_proximity0_thresh_rising_hysteresis | ||
578 | what: /sys/.../events/in_proximity0_thresh_either_hysteresis | ||
579 | KernelVersion: 3.13 | ||
580 | Contact: linux-iio@vger.kernel.org | ||
581 | Description: | ||
582 | Specifies the hysteresis of threshold that the device is comparing | ||
583 | against for the events enabled by | ||
584 | <type>Y[_name]_thresh[_(rising|falling)]_hysteresis. | ||
585 | If separate attributes exist for the two directions, but | ||
586 | direction is not specified for this attribute, then a single | ||
587 | hysteresis value applies to both directions. | ||
588 | For falling events the hysteresis is added to the _value attribute for | ||
589 | this event to get the upper threshold for when the event goes back to | ||
590 | normal, for rising events the hysteresis is subtracted from the _value | ||
591 | attribute. E.g. if in_voltage0_raw_thresh_rising_value is set to 1200 | ||
592 | and in_voltage0_raw_thresh_rising_hysteresis is set to 50. The event | ||
593 | will get activated once in_voltage0_raw goes above 1200 and will become | ||
594 | deactived again once the value falls below 1150. | ||
595 | |||
540 | What: /sys/.../events/in_accel_x_raw_roc_rising_value | 596 | What: /sys/.../events/in_accel_x_raw_roc_rising_value |
541 | What: /sys/.../events/in_accel_x_raw_roc_falling_value | 597 | What: /sys/.../events/in_accel_x_raw_roc_falling_value |
542 | What: /sys/.../events/in_accel_y_raw_roc_rising_value | 598 | What: /sys/.../events/in_accel_y_raw_roc_rising_value |
@@ -811,3 +867,14 @@ Description: | |||
811 | Writing '1' stores the current device configuration into | 867 | Writing '1' stores the current device configuration into |
812 | on-chip EEPROM. After power-up or chip reset the device will | 868 | on-chip EEPROM. After power-up or chip reset the device will |
813 | automatically load the saved configuration. | 869 | automatically load the saved configuration. |
870 | |||
871 | What: /sys/.../iio:deviceX/in_intensity_red_integration_time | ||
872 | What: /sys/.../iio:deviceX/in_intensity_green_integration_time | ||
873 | What: /sys/.../iio:deviceX/in_intensity_blue_integration_time | ||
874 | What: /sys/.../iio:deviceX/in_intensity_clear_integration_time | ||
875 | What: /sys/.../iio:deviceX/in_illuminance_integration_time | ||
876 | KernelVersion: 3.12 | ||
877 | Contact: linux-iio@vger.kernel.org | ||
878 | Description: | ||
879 | This attribute is used to get/set the integration time in | ||
880 | seconds. | ||
diff --git a/Documentation/ABI/testing/sysfs-class-mic.txt b/Documentation/ABI/testing/sysfs-class-mic.txt new file mode 100644 index 000000000000..13f48afc534f --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-mic.txt | |||
@@ -0,0 +1,157 @@ | |||
1 | What: /sys/class/mic/ | ||
2 | Date: October 2013 | ||
3 | KernelVersion: 3.13 | ||
4 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
5 | Description: | ||
6 | The mic class directory belongs to Intel MIC devices and | ||
7 | provides information per MIC device. An Intel MIC device is a | ||
8 | PCIe form factor add-in Coprocessor card based on the Intel Many | ||
9 | Integrated Core (MIC) architecture that runs a Linux OS. | ||
10 | |||
11 | What: /sys/class/mic/mic(x) | ||
12 | Date: October 2013 | ||
13 | KernelVersion: 3.13 | ||
14 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
15 | Description: | ||
16 | The directories /sys/class/mic/mic0, /sys/class/mic/mic1 etc., | ||
17 | represent MIC devices (0,1,..etc). Each directory has | ||
18 | information specific to that MIC device. | ||
19 | |||
20 | What: /sys/class/mic/mic(x)/family | ||
21 | Date: October 2013 | ||
22 | KernelVersion: 3.13 | ||
23 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
24 | Description: | ||
25 | Provides information about the Coprocessor family for an Intel | ||
26 | MIC device. For example - "x100" | ||
27 | |||
28 | What: /sys/class/mic/mic(x)/stepping | ||
29 | Date: October 2013 | ||
30 | KernelVersion: 3.13 | ||
31 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
32 | Description: | ||
33 | Provides information about the silicon stepping for an Intel | ||
34 | MIC device. For example - "A0" or "B0" | ||
35 | |||
36 | What: /sys/class/mic/mic(x)/state | ||
37 | Date: October 2013 | ||
38 | KernelVersion: 3.13 | ||
39 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
40 | Description: | ||
41 | When read, this entry provides the current state of an Intel | ||
42 | MIC device in the context of the card OS. Possible values that | ||
43 | will be read are: | ||
44 | "offline" - The MIC device is ready to boot the card OS. On | ||
45 | reading this entry after an OSPM resume, a "boot" has to be | ||
46 | written to this entry if the card was previously shutdown | ||
47 | during OSPM suspend. | ||
48 | "online" - The MIC device has initiated booting a card OS. | ||
49 | "shutting_down" - The card OS is shutting down. | ||
50 | "reset_failed" - The MIC device has failed to reset. | ||
51 | "suspending" - The MIC device is currently being prepared for | ||
52 | suspend. On reading this entry, a "suspend" has to be written | ||
53 | to the state sysfs entry to ensure the card is shutdown during | ||
54 | OSPM suspend. | ||
55 | "suspended" - The MIC device has been suspended. | ||
56 | |||
57 | When written, this sysfs entry triggers different state change | ||
58 | operations depending upon the current state of the card OS. | ||
59 | Acceptable values are: | ||
60 | "boot" - Boot the card OS image specified by the combination | ||
61 | of firmware, ramdisk, cmdline and bootmode | ||
62 | sysfs entries. | ||
63 | "reset" - Initiates device reset. | ||
64 | "shutdown" - Initiates card OS shutdown. | ||
65 | "suspend" - Initiates card OS shutdown and also marks the card | ||
66 | as suspended. | ||
67 | |||
68 | What: /sys/class/mic/mic(x)/shutdown_status | ||
69 | Date: October 2013 | ||
70 | KernelVersion: 3.13 | ||
71 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
72 | Description: | ||
73 | An Intel MIC device runs a Linux OS during its operation. This | ||
74 | OS can shutdown because of various reasons. When read, this | ||
75 | entry provides the status on why the card OS was shutdown. | ||
76 | Possible values are: | ||
77 | "nop" - shutdown status is not applicable, when the card OS is | ||
78 | "online" | ||
79 | "crashed" - Shutdown because of a HW or SW crash. | ||
80 | "halted" - Shutdown because of a halt command. | ||
81 | "poweroff" - Shutdown because of a poweroff command. | ||
82 | "restart" - Shutdown because of a restart command. | ||
83 | |||
84 | What: /sys/class/mic/mic(x)/cmdline | ||
85 | Date: October 2013 | ||
86 | KernelVersion: 3.13 | ||
87 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
88 | Description: | ||
89 | An Intel MIC device runs a Linux OS during its operation. Before | ||
90 | booting this card OS, it is possible to pass kernel command line | ||
91 | options to configure various features in it, similar to | ||
92 | self-bootable machines. When read, this entry provides | ||
93 | information about the current kernel command line options set to | ||
94 | boot the card OS. This entry can be written to change the | ||
95 | existing kernel command line options. Typically, the user would | ||
96 | want to read the current command line options, append new ones | ||
97 | or modify existing ones and then write the whole kernel command | ||
98 | line back to this entry. | ||
99 | |||
100 | What: /sys/class/mic/mic(x)/firmware | ||
101 | Date: October 2013 | ||
102 | KernelVersion: 3.13 | ||
103 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
104 | Description: | ||
105 | When read, this sysfs entry provides the path name under | ||
106 | /lib/firmware/ where the firmware image to be booted on the | ||
107 | card can be found. The entry can be written to change the | ||
108 | firmware image location under /lib/firmware/. | ||
109 | |||
110 | What: /sys/class/mic/mic(x)/ramdisk | ||
111 | Date: October 2013 | ||
112 | KernelVersion: 3.13 | ||
113 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
114 | Description: | ||
115 | When read, this sysfs entry provides the path name under | ||
116 | /lib/firmware/ where the ramdisk image to be used during card | ||
117 | OS boot can be found. The entry can be written to change | ||
118 | the ramdisk image location under /lib/firmware/. | ||
119 | |||
120 | What: /sys/class/mic/mic(x)/bootmode | ||
121 | Date: October 2013 | ||
122 | KernelVersion: 3.13 | ||
123 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
124 | Description: | ||
125 | When read, this sysfs entry provides the current bootmode for | ||
126 | the card. This sysfs entry can be written with the following | ||
127 | valid strings: | ||
128 | a) linux - Boot a Linux image. | ||
129 | b) elf - Boot an elf image for flash updates. | ||
130 | |||
131 | What: /sys/class/mic/mic(x)/log_buf_addr | ||
132 | Date: October 2013 | ||
133 | KernelVersion: 3.13 | ||
134 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
135 | Description: | ||
136 | An Intel MIC device runs a Linux OS during its operation. For | ||
137 | debugging purpose and early kernel boot messages, the user can | ||
138 | access the card OS log buffer via debugfs. When read, this entry | ||
139 | provides the kernel virtual address of the buffer where the card | ||
140 | OS log buffer can be read. This entry is written by the host | ||
141 | configuration daemon to set the log buffer address. The correct | ||
142 | log buffer address to be written can be found in the System.map | ||
143 | file of the card OS. | ||
144 | |||
145 | What: /sys/class/mic/mic(x)/log_buf_len | ||
146 | Date: October 2013 | ||
147 | KernelVersion: 3.13 | ||
148 | Contact: Sudeep Dutt <sudeep.dutt@intel.com> | ||
149 | Description: | ||
150 | An Intel MIC device runs a Linux OS during its operation. For | ||
151 | debugging purpose and early kernel boot messages, the user can | ||
152 | access the card OS log buffer via debugfs. When read, this entry | ||
153 | provides the kernel virtual address where the card OS log buffer | ||
154 | length can be read. This entry is written by host configuration | ||
155 | daemon to set the log buffer length address. The correct log | ||
156 | buffer length address to be written can be found in the | ||
157 | System.map file of the card OS. | ||
diff --git a/Documentation/ABI/testing/sysfs-driver-sunxi-sid b/Documentation/ABI/testing/sysfs-driver-sunxi-sid new file mode 100644 index 000000000000..ffb9536f6ecc --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-sunxi-sid | |||
@@ -0,0 +1,22 @@ | |||
1 | What: /sys/devices/*/<our-device>/eeprom | ||
2 | Date: August 2013 | ||
3 | Contact: Oliver Schinagl <oliver@schinagl.nl> | ||
4 | Description: read-only access to the SID (Security-ID) on current | ||
5 | A-series SoC's from Allwinner. Currently supports A10, A10s, A13 | ||
6 | and A20 CPU's. The earlier A1x series of SoCs exports 16 bytes, | ||
7 | whereas the newer A20 SoC exposes 512 bytes split into sections. | ||
8 | Besides the 16 bytes of SID, there's also an SJTAG area, | ||
9 | HDMI-HDCP key and some custom keys. Below a quick overview, for | ||
10 | details see the user manual: | ||
11 | 0x000 128 bit root-key (sun[457]i) | ||
12 | 0x010 128 bit boot-key (sun7i) | ||
13 | 0x020 64 bit security-jtag-key (sun7i) | ||
14 | 0x028 16 bit key configuration (sun7i) | ||
15 | 0x02b 16 bit custom-vendor-key (sun7i) | ||
16 | 0x02c 320 bit low general key (sun7i) | ||
17 | 0x040 32 bit read-control access (sun7i) | ||
18 | 0x064 224 bit low general key (sun7i) | ||
19 | 0x080 2304 bit HDCP-key (sun7i) | ||
20 | 0x1a0 768 bit high general key (sun7i) | ||
21 | Users: any user space application which wants to read the SID on | ||
22 | Allwinner's A-series of CPU's. | ||
diff --git a/Documentation/DocBook/filesystems.tmpl b/Documentation/DocBook/filesystems.tmpl index 25b58efd955d..4f676838da06 100644 --- a/Documentation/DocBook/filesystems.tmpl +++ b/Documentation/DocBook/filesystems.tmpl | |||
@@ -91,7 +91,6 @@ | |||
91 | <title>The Filesystem for Exporting Kernel Objects</title> | 91 | <title>The Filesystem for Exporting Kernel Objects</title> |
92 | !Efs/sysfs/file.c | 92 | !Efs/sysfs/file.c |
93 | !Efs/sysfs/symlink.c | 93 | !Efs/sysfs/symlink.c |
94 | !Efs/sysfs/bin.c | ||
95 | </chapter> | 94 | </chapter> |
96 | 95 | ||
97 | <chapter id="debugfs"> | 96 | <chapter id="debugfs"> |
diff --git a/Documentation/arm/Marvell/README b/Documentation/arm/Marvell/README index 8f08a86e03b7..da0151db9964 100644 --- a/Documentation/arm/Marvell/README +++ b/Documentation/arm/Marvell/README | |||
@@ -88,6 +88,7 @@ EBU Armada family | |||
88 | MV78230 | 88 | MV78230 |
89 | MV78260 | 89 | MV78260 |
90 | MV78460 | 90 | MV78460 |
91 | NOTE: not to be confused with the non-SMP 78xx0 SoCs | ||
91 | 92 | ||
92 | Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf | 93 | Product Brief: http://www.marvell.com/embedded-processors/armada-xp/assets/Marvell-ArmadaXP-SoC-product%20brief.pdf |
93 | No public datasheet available. | 94 | No public datasheet available. |
diff --git a/Documentation/arm/sunxi/README b/Documentation/arm/sunxi/README index e3f93fb9224e..7945238453ed 100644 --- a/Documentation/arm/sunxi/README +++ b/Documentation/arm/sunxi/README | |||
@@ -10,6 +10,10 @@ SunXi family | |||
10 | Linux kernel mach directory: arch/arm/mach-sunxi | 10 | Linux kernel mach directory: arch/arm/mach-sunxi |
11 | 11 | ||
12 | Flavors: | 12 | Flavors: |
13 | * ARM926 based SoCs | ||
14 | - Allwinner F20 (sun3i) | ||
15 | + Not Supported | ||
16 | |||
13 | * ARM Cortex-A8 based SoCs | 17 | * ARM Cortex-A8 based SoCs |
14 | - Allwinner A10 (sun4i) | 18 | - Allwinner A10 (sun4i) |
15 | + Datasheet | 19 | + Datasheet |
@@ -25,4 +29,24 @@ SunXi family | |||
25 | + Datasheet | 29 | + Datasheet |
26 | http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf | 30 | http://dl.linux-sunxi.org/A13/A13%20Datasheet%20-%20v1.12%20%282012-03-29%29.pdf |
27 | + User Manual | 31 | + User Manual |
28 | http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20%282013-08-08%29.pdf | 32 | http://dl.linux-sunxi.org/A13/A13%20User%20Manual%20-%20v1.2%20%282013-01-08%29.pdf |
33 | |||
34 | * Dual ARM Cortex-A7 based SoCs | ||
35 | - Allwinner A20 (sun7i) | ||
36 | + User Manual | ||
37 | http://dl.linux-sunxi.org/A20/A20%20User%20Manual%202013-03-22.pdf | ||
38 | |||
39 | - Allwinner A23 | ||
40 | + Not Supported | ||
41 | |||
42 | * Quad ARM Cortex-A7 based SoCs | ||
43 | - Allwinner A31 (sun6i) | ||
44 | + Datasheet | ||
45 | http://dl.linux-sunxi.org/A31/A31%20Datasheet%20-%20v1.00%20(2012-12-24).pdf | ||
46 | |||
47 | - Allwinner A31s (sun6i) | ||
48 | + Not Supported | ||
49 | |||
50 | * Quad ARM Cortex-A15, Quad ARM Cortex-A7 based SoCs | ||
51 | - Allwinner A80 | ||
52 | + Not Supported \ No newline at end of file | ||
diff --git a/Documentation/arm64/booting.txt b/Documentation/arm64/booting.txt index 98df4a03807e..a9691cc48fe3 100644 --- a/Documentation/arm64/booting.txt +++ b/Documentation/arm64/booting.txt | |||
@@ -115,9 +115,10 @@ Before jumping into the kernel, the following conditions must be met: | |||
115 | External caches (if present) must be configured and disabled. | 115 | External caches (if present) must be configured and disabled. |
116 | 116 | ||
117 | - Architected timers | 117 | - Architected timers |
118 | CNTFRQ must be programmed with the timer frequency. | 118 | CNTFRQ must be programmed with the timer frequency and CNTVOFF must |
119 | If entering the kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) | 119 | be programmed with a consistent value on all CPUs. If entering the |
120 | set where available. | 120 | kernel at EL1, CNTHCTL_EL2 must have EL1PCTEN (bit 0) set where |
121 | available. | ||
121 | 122 | ||
122 | - Coherency | 123 | - Coherency |
123 | All CPUs to be booted by the kernel must be part of the same coherency | 124 | All CPUs to be booted by the kernel must be part of the same coherency |
@@ -130,30 +131,46 @@ Before jumping into the kernel, the following conditions must be met: | |||
130 | the kernel image will be entered must be initialised by software at a | 131 | the kernel image will be entered must be initialised by software at a |
131 | higher exception level to prevent execution in an UNKNOWN state. | 132 | higher exception level to prevent execution in an UNKNOWN state. |
132 | 133 | ||
134 | The requirements described above for CPU mode, caches, MMUs, architected | ||
135 | timers, coherency and system registers apply to all CPUs. All CPUs must | ||
136 | enter the kernel in the same exception level. | ||
137 | |||
133 | The boot loader is expected to enter the kernel on each CPU in the | 138 | The boot loader is expected to enter the kernel on each CPU in the |
134 | following manner: | 139 | following manner: |
135 | 140 | ||
136 | - The primary CPU must jump directly to the first instruction of the | 141 | - The primary CPU must jump directly to the first instruction of the |
137 | kernel image. The device tree blob passed by this CPU must contain | 142 | kernel image. The device tree blob passed by this CPU must contain |
138 | for each CPU node: | 143 | an 'enable-method' property for each cpu node. The supported |
139 | 144 | enable-methods are described below. | |
140 | 1. An 'enable-method' property. Currently, the only supported value | ||
141 | for this field is the string "spin-table". | ||
142 | |||
143 | 2. A 'cpu-release-addr' property identifying a 64-bit, | ||
144 | zero-initialised memory location. | ||
145 | 145 | ||
146 | It is expected that the bootloader will generate these device tree | 146 | It is expected that the bootloader will generate these device tree |
147 | properties and insert them into the blob prior to kernel entry. | 147 | properties and insert them into the blob prior to kernel entry. |
148 | 148 | ||
149 | - Any secondary CPUs must spin outside of the kernel in a reserved area | 149 | - CPUs with a "spin-table" enable-method must have a 'cpu-release-addr' |
150 | of memory (communicated to the kernel by a /memreserve/ region in the | 150 | property in their cpu node. This property identifies a |
151 | naturally-aligned 64-bit zero-initalised memory location. | ||
152 | |||
153 | These CPUs should spin outside of the kernel in a reserved area of | ||
154 | memory (communicated to the kernel by a /memreserve/ region in the | ||
151 | device tree) polling their cpu-release-addr location, which must be | 155 | device tree) polling their cpu-release-addr location, which must be |
152 | contained in the reserved region. A wfe instruction may be inserted | 156 | contained in the reserved region. A wfe instruction may be inserted |
153 | to reduce the overhead of the busy-loop and a sev will be issued by | 157 | to reduce the overhead of the busy-loop and a sev will be issued by |
154 | the primary CPU. When a read of the location pointed to by the | 158 | the primary CPU. When a read of the location pointed to by the |
155 | cpu-release-addr returns a non-zero value, the CPU must jump directly | 159 | cpu-release-addr returns a non-zero value, the CPU must jump to this |
156 | to this value. | 160 | value. The value will be written as a single 64-bit little-endian |
161 | value, so CPUs must convert the read value to their native endianness | ||
162 | before jumping to it. | ||
163 | |||
164 | - CPUs with a "psci" enable method should remain outside of | ||
165 | the kernel (i.e. outside of the regions of memory described to the | ||
166 | kernel in the memory node, or in a reserved area of memory described | ||
167 | to the kernel by a /memreserve/ region in the device tree). The | ||
168 | kernel will issue CPU_ON calls as described in ARM document number ARM | ||
169 | DEN 0022A ("Power State Coordination Interface System Software on ARM | ||
170 | processors") to bring CPUs into the kernel. | ||
171 | |||
172 | The device tree should contain a 'psci' node, as described in | ||
173 | Documentation/devicetree/bindings/arm/psci.txt. | ||
157 | 174 | ||
158 | - Secondary CPU general-purpose register settings | 175 | - Secondary CPU general-purpose register settings |
159 | x0 = 0 (reserved for future use) | 176 | x0 = 0 (reserved for future use) |
diff --git a/Documentation/arm64/memory.txt b/Documentation/arm64/memory.txt index 78a377124ef0..5e054bfe4dde 100644 --- a/Documentation/arm64/memory.txt +++ b/Documentation/arm64/memory.txt | |||
@@ -21,7 +21,7 @@ The swapper_pgd_dir address is written to TTBR1 and never written to | |||
21 | TTBR0. | 21 | TTBR0. |
22 | 22 | ||
23 | 23 | ||
24 | AArch64 Linux memory layout: | 24 | AArch64 Linux memory layout with 4KB pages: |
25 | 25 | ||
26 | Start End Size Use | 26 | Start End Size Use |
27 | ----------------------------------------------------------------------- | 27 | ----------------------------------------------------------------------- |
@@ -39,13 +39,38 @@ ffffffbffbc00000 ffffffbffbdfffff 2MB earlyprintk device | |||
39 | 39 | ||
40 | ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space | 40 | ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O space |
41 | 41 | ||
42 | ffffffbbffff0000 ffffffbcffffffff ~2MB [guard] | 42 | ffffffbffbe10000 ffffffbcffffffff ~2MB [guard] |
43 | 43 | ||
44 | ffffffbffc000000 ffffffbfffffffff 64MB modules | 44 | ffffffbffc000000 ffffffbfffffffff 64MB modules |
45 | 45 | ||
46 | ffffffc000000000 ffffffffffffffff 256GB kernel logical memory map | 46 | ffffffc000000000 ffffffffffffffff 256GB kernel logical memory map |
47 | 47 | ||
48 | 48 | ||
49 | AArch64 Linux memory layout with 64KB pages: | ||
50 | |||
51 | Start End Size Use | ||
52 | ----------------------------------------------------------------------- | ||
53 | 0000000000000000 000003ffffffffff 4TB user | ||
54 | |||
55 | fffffc0000000000 fffffdfbfffeffff ~2TB vmalloc | ||
56 | |||
57 | fffffdfbffff0000 fffffdfbffffffff 64KB [guard page] | ||
58 | |||
59 | fffffdfc00000000 fffffdfdffffffff 8GB vmemmap | ||
60 | |||
61 | fffffdfe00000000 fffffdfffbbfffff ~8GB [guard, future vmmemap] | ||
62 | |||
63 | fffffdfffbc00000 fffffdfffbdfffff 2MB earlyprintk device | ||
64 | |||
65 | fffffdfffbe00000 fffffdfffbe0ffff 64KB PCI I/O space | ||
66 | |||
67 | fffffdfffbe10000 fffffdfffbffffff ~2MB [guard] | ||
68 | |||
69 | fffffdfffc000000 fffffdffffffffff 64MB modules | ||
70 | |||
71 | fffffe0000000000 ffffffffffffffff 2TB kernel logical memory map | ||
72 | |||
73 | |||
49 | Translation table lookup with 4KB pages: | 74 | Translation table lookup with 4KB pages: |
50 | 75 | ||
51 | +--------+--------+--------+--------+--------+--------+--------+--------+ | 76 | +--------+--------+--------+--------+--------+--------+--------+--------+ |
diff --git a/Documentation/connector/ucon.c b/Documentation/connector/ucon.c index 4848db8c71ff..8a4da64e02a8 100644 --- a/Documentation/connector/ucon.c +++ b/Documentation/connector/ucon.c | |||
@@ -71,7 +71,7 @@ static int netlink_send(int s, struct cn_msg *msg) | |||
71 | nlh->nlmsg_seq = seq++; | 71 | nlh->nlmsg_seq = seq++; |
72 | nlh->nlmsg_pid = getpid(); | 72 | nlh->nlmsg_pid = getpid(); |
73 | nlh->nlmsg_type = NLMSG_DONE; | 73 | nlh->nlmsg_type = NLMSG_DONE; |
74 | nlh->nlmsg_len = NLMSG_LENGTH(size - sizeof(*nlh)); | 74 | nlh->nlmsg_len = size; |
75 | nlh->nlmsg_flags = 0; | 75 | nlh->nlmsg_flags = 0; |
76 | 76 | ||
77 | m = NLMSG_DATA(nlh); | 77 | m = NLMSG_DATA(nlh); |
diff --git a/Documentation/devicetree/bindings/arm/arm-boards b/Documentation/devicetree/bindings/arm/arm-boards index db5858e32d3f..5fac246a9530 100644 --- a/Documentation/devicetree/bindings/arm/arm-boards +++ b/Documentation/devicetree/bindings/arm/arm-boards | |||
@@ -9,9 +9,53 @@ Required properties (in root node): | |||
9 | 9 | ||
10 | FPGA type interrupt controllers, see the versatile-fpga-irq binding doc. | 10 | FPGA type interrupt controllers, see the versatile-fpga-irq binding doc. |
11 | 11 | ||
12 | In the root node the Integrator/CP must have a /cpcon node pointing | 12 | Required nodes: |
13 | to the CP control registers, and the Integrator/AP must have a | 13 | |
14 | /syscon node pointing to the Integrator/AP system controller. | 14 | - core-module: the root node to the Integrator platforms must have |
15 | a core-module with regs and the compatible string | ||
16 | "arm,core-module-integrator" | ||
17 | |||
18 | Required properties for the core module: | ||
19 | - regs: the location and size of the core module registers, one | ||
20 | range of 0x200 bytes. | ||
21 | |||
22 | - syscon: the root node of the Integrator platforms must have a | ||
23 | system controller node pointong to the control registers, | ||
24 | with the compatible string | ||
25 | "arm,integrator-ap-syscon" | ||
26 | "arm,integrator-cp-syscon" | ||
27 | respectively. | ||
28 | |||
29 | Required properties for the system controller: | ||
30 | - regs: the location and size of the system controller registers, | ||
31 | one range of 0x100 bytes. | ||
32 | |||
33 | Required properties for the AP system controller: | ||
34 | - interrupts: the AP syscon node must include the logical module | ||
35 | interrupts, stated in order of module instance <module 0>, | ||
36 | <module 1>, <module 2> ... for the CP system controller this | ||
37 | is not required not of any use. | ||
38 | |||
39 | /dts-v1/; | ||
40 | /include/ "integrator.dtsi" | ||
41 | |||
42 | / { | ||
43 | model = "ARM Integrator/AP"; | ||
44 | compatible = "arm,integrator-ap"; | ||
45 | |||
46 | core-module@10000000 { | ||
47 | compatible = "arm,core-module-integrator"; | ||
48 | reg = <0x10000000 0x200>; | ||
49 | }; | ||
50 | |||
51 | syscon { | ||
52 | compatible = "arm,integrator-ap-syscon"; | ||
53 | reg = <0x11000000 0x100>; | ||
54 | interrupt-parent = <&pic>; | ||
55 | /* These are the logic module IRQs */ | ||
56 | interrupts = <9>, <10>, <11>, <12>; | ||
57 | }; | ||
58 | }; | ||
15 | 59 | ||
16 | 60 | ||
17 | ARM Versatile Application and Platform Baseboards | 61 | ARM Versatile Application and Platform Baseboards |
diff --git a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt index 61df564c0d23..d74091a8a3bf 100644 --- a/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt +++ b/Documentation/devicetree/bindings/arm/armada-370-xp-mpic.txt | |||
@@ -4,6 +4,8 @@ Marvell Armada 370 and Armada XP Interrupt Controller | |||
4 | Required properties: | 4 | Required properties: |
5 | - compatible: Should be "marvell,mpic" | 5 | - compatible: Should be "marvell,mpic" |
6 | - interrupt-controller: Identifies the node as an interrupt controller. | 6 | - interrupt-controller: Identifies the node as an interrupt controller. |
7 | - msi-controller: Identifies the node as an PCI Message Signaled | ||
8 | Interrupt controller. | ||
7 | - #interrupt-cells: The number of cells to define the interrupts. Should be 1. | 9 | - #interrupt-cells: The number of cells to define the interrupts. Should be 1. |
8 | The cell is the IRQ number | 10 | The cell is the IRQ number |
9 | 11 | ||
@@ -24,6 +26,7 @@ Example: | |||
24 | #address-cells = <1>; | 26 | #address-cells = <1>; |
25 | #size-cells = <1>; | 27 | #size-cells = <1>; |
26 | interrupt-controller; | 28 | interrupt-controller; |
29 | msi-controller; | ||
27 | reg = <0xd0020a00 0x1d0>, | 30 | reg = <0xd0020a00 0x1d0>, |
28 | <0xd0021070 0x58>; | 31 | <0xd0021070 0x58>; |
29 | }; | 32 | }; |
diff --git a/Documentation/devicetree/bindings/arm/atmel-adc.txt b/Documentation/devicetree/bindings/arm/atmel-adc.txt index 723c205cb10d..d1061469f63d 100644 --- a/Documentation/devicetree/bindings/arm/atmel-adc.txt +++ b/Documentation/devicetree/bindings/arm/atmel-adc.txt | |||
@@ -7,7 +7,6 @@ Required properties: | |||
7 | - interrupts: Should contain the IRQ line for the ADC | 7 | - interrupts: Should contain the IRQ line for the ADC |
8 | - atmel,adc-channels-used: Bitmask of the channels muxed and enable for this | 8 | - atmel,adc-channels-used: Bitmask of the channels muxed and enable for this |
9 | device | 9 | device |
10 | - atmel,adc-num-channels: Number of channels available in the ADC | ||
11 | - atmel,adc-startup-time: Startup Time of the ADC in microseconds as | 10 | - atmel,adc-startup-time: Startup Time of the ADC in microseconds as |
12 | defined in the datasheet | 11 | defined in the datasheet |
13 | - atmel,adc-vref: Reference voltage in millivolts for the conversions | 12 | - atmel,adc-vref: Reference voltage in millivolts for the conversions |
@@ -24,6 +23,13 @@ Optional properties: | |||
24 | resolution will be used. | 23 | resolution will be used. |
25 | - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion | 24 | - atmel,adc-sleep-mode: Boolean to enable sleep mode when no conversion |
26 | - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds | 25 | - atmel,adc-sample-hold-time: Sample and Hold Time in microseconds |
26 | - atmel,adc-ts-wires: Number of touch screen wires. Should be 4 or 5. If this | ||
27 | value is set, then adc driver will enable touch screen | ||
28 | support. | ||
29 | NOTE: when adc touch screen enabled, the adc hardware trigger will be | ||
30 | disabled. Since touch screen will occupied the trigger register. | ||
31 | - atmel,adc-ts-pressure-threshold: a pressure threshold for touchscreen. It | ||
32 | make touch detect more precision. | ||
27 | 33 | ||
28 | Optional trigger Nodes: | 34 | Optional trigger Nodes: |
29 | - Required properties: | 35 | - Required properties: |
diff --git a/Documentation/devicetree/bindings/arm/cci.txt b/Documentation/devicetree/bindings/arm/cci.txt index 92d36e2aa877..f28d82bbbc56 100644 --- a/Documentation/devicetree/bindings/arm/cci.txt +++ b/Documentation/devicetree/bindings/arm/cci.txt | |||
@@ -36,14 +36,18 @@ specific to ARM. | |||
36 | 36 | ||
37 | - reg | 37 | - reg |
38 | Usage: required | 38 | Usage: required |
39 | Value type: <prop-encoded-array> | 39 | Value type: Integer cells. A register entry, expressed as a pair |
40 | of cells, containing base and size. | ||
40 | Definition: A standard property. Specifies base physical | 41 | Definition: A standard property. Specifies base physical |
41 | address of CCI control registers common to all | 42 | address of CCI control registers common to all |
42 | interfaces. | 43 | interfaces. |
43 | 44 | ||
44 | - ranges: | 45 | - ranges: |
45 | Usage: required | 46 | Usage: required |
46 | Value type: <prop-encoded-array> | 47 | Value type: Integer cells. An array of range entries, expressed |
48 | as a tuple of cells, containing child address, | ||
49 | parent address and the size of the region in the | ||
50 | child address space. | ||
47 | Definition: A standard property. Follow rules in the ePAPR for | 51 | Definition: A standard property. Follow rules in the ePAPR for |
48 | hierarchical bus addressing. CCI interfaces | 52 | hierarchical bus addressing. CCI interfaces |
49 | addresses refer to the parent node addressing | 53 | addresses refer to the parent node addressing |
@@ -74,11 +78,49 @@ specific to ARM. | |||
74 | 78 | ||
75 | - reg: | 79 | - reg: |
76 | Usage: required | 80 | Usage: required |
77 | Value type: <prop-encoded-array> | 81 | Value type: Integer cells. A register entry, expressed |
82 | as a pair of cells, containing base and | ||
83 | size. | ||
78 | Definition: the base address and size of the | 84 | Definition: the base address and size of the |
79 | corresponding interface programming | 85 | corresponding interface programming |
80 | registers. | 86 | registers. |
81 | 87 | ||
88 | - CCI PMU node | ||
89 | |||
90 | Parent node must be CCI interconnect node. | ||
91 | |||
92 | A CCI pmu node must contain the following properties: | ||
93 | |||
94 | - compatible | ||
95 | Usage: required | ||
96 | Value type: <string> | ||
97 | Definition: must be "arm,cci-400-pmu" | ||
98 | |||
99 | - reg: | ||
100 | Usage: required | ||
101 | Value type: Integer cells. A register entry, expressed | ||
102 | as a pair of cells, containing base and | ||
103 | size. | ||
104 | Definition: the base address and size of the | ||
105 | corresponding interface programming | ||
106 | registers. | ||
107 | |||
108 | - interrupts: | ||
109 | Usage: required | ||
110 | Value type: Integer cells. Array of interrupt specifier | ||
111 | entries, as defined in | ||
112 | ../interrupt-controller/interrupts.txt. | ||
113 | Definition: list of counter overflow interrupts, one per | ||
114 | counter. The interrupts must be specified | ||
115 | starting with the cycle counter overflow | ||
116 | interrupt, followed by counter0 overflow | ||
117 | interrupt, counter1 overflow interrupt,... | ||
118 | ,counterN overflow interrupt. | ||
119 | |||
120 | The CCI PMU has an interrupt signal for each | ||
121 | counter. The number of interrupts must be | ||
122 | equal to the number of counters. | ||
123 | |||
82 | * CCI interconnect bus masters | 124 | * CCI interconnect bus masters |
83 | 125 | ||
84 | Description: masters in the device tree connected to a CCI port | 126 | Description: masters in the device tree connected to a CCI port |
@@ -144,7 +186,7 @@ Example: | |||
144 | #address-cells = <1>; | 186 | #address-cells = <1>; |
145 | #size-cells = <1>; | 187 | #size-cells = <1>; |
146 | reg = <0x0 0x2c090000 0 0x1000>; | 188 | reg = <0x0 0x2c090000 0 0x1000>; |
147 | ranges = <0x0 0x0 0x2c090000 0x6000>; | 189 | ranges = <0x0 0x0 0x2c090000 0x10000>; |
148 | 190 | ||
149 | cci_control0: slave-if@1000 { | 191 | cci_control0: slave-if@1000 { |
150 | compatible = "arm,cci-400-ctrl-if"; | 192 | compatible = "arm,cci-400-ctrl-if"; |
@@ -163,6 +205,16 @@ Example: | |||
163 | interface-type = "ace"; | 205 | interface-type = "ace"; |
164 | reg = <0x5000 0x1000>; | 206 | reg = <0x5000 0x1000>; |
165 | }; | 207 | }; |
208 | |||
209 | pmu@9000 { | ||
210 | compatible = "arm,cci-400-pmu"; | ||
211 | reg = <0x9000 0x5000>; | ||
212 | interrupts = <0 101 4>, | ||
213 | <0 102 4>, | ||
214 | <0 103 4>, | ||
215 | <0 104 4>, | ||
216 | <0 105 4>; | ||
217 | }; | ||
166 | }; | 218 | }; |
167 | 219 | ||
168 | This CCI node corresponds to a CCI component whose control registers sits | 220 | This CCI node corresponds to a CCI component whose control registers sits |
diff --git a/Documentation/devicetree/bindings/arm/omap/omap.txt b/Documentation/devicetree/bindings/arm/omap/omap.txt index 91b7049affa1..808c1543b0f8 100644 --- a/Documentation/devicetree/bindings/arm/omap/omap.txt +++ b/Documentation/devicetree/bindings/arm/omap/omap.txt | |||
@@ -21,7 +21,8 @@ Required properties: | |||
21 | Optional properties: | 21 | Optional properties: |
22 | - ti,no_idle_on_suspend: When present, it prevents the PM to idle the module | 22 | - ti,no_idle_on_suspend: When present, it prevents the PM to idle the module |
23 | during suspend. | 23 | during suspend. |
24 | 24 | - ti,no-reset-on-init: When present, the module should not be reset at init | |
25 | - ti,no-idle-on-init: When present, the module should not be idled at init | ||
25 | 26 | ||
26 | Example: | 27 | Example: |
27 | 28 | ||
diff --git a/Documentation/devicetree/bindings/arm/vic.txt b/Documentation/devicetree/bindings/arm/vic.txt index 266716b23437..dd527216c5fb 100644 --- a/Documentation/devicetree/bindings/arm/vic.txt +++ b/Documentation/devicetree/bindings/arm/vic.txt | |||
@@ -18,6 +18,15 @@ Required properties: | |||
18 | Optional properties: | 18 | Optional properties: |
19 | 19 | ||
20 | - interrupts : Interrupt source for parent controllers if the VIC is nested. | 20 | - interrupts : Interrupt source for parent controllers if the VIC is nested. |
21 | - valid-mask : A one cell big bit mask of valid interrupt sources. Each bit | ||
22 | represents single interrupt source, starting from source 0 at LSb and ending | ||
23 | at source 31 at MSb. A bit that is set means that the source is wired and | ||
24 | clear means otherwise. If unspecified, defaults to all valid. | ||
25 | - valid-wakeup-mask : A one cell big bit mask of interrupt sources that can be | ||
26 | configured as wake up source for the system. Order of bits is the same as for | ||
27 | valid-mask property. A set bit means that this interrupt source can be | ||
28 | configured as a wake up source for the system. If unspecied, defaults to all | ||
29 | interrupt sources configurable as wake up sources. | ||
21 | 30 | ||
22 | Example: | 31 | Example: |
23 | 32 | ||
@@ -26,4 +35,7 @@ Example: | |||
26 | interrupt-controller; | 35 | interrupt-controller; |
27 | #interrupt-cells = <1>; | 36 | #interrupt-cells = <1>; |
28 | reg = <0x60000 0x1000>; | 37 | reg = <0x60000 0x1000>; |
38 | |||
39 | valid-mask = <0xffffff7f>; | ||
40 | valid-wakeup-mask = <0x0000ff7f>; | ||
29 | }; | 41 | }; |
diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt b/Documentation/devicetree/bindings/clock/imx6q-clock.txt index 5a90a724b520..6aab72bf67ea 100644 --- a/Documentation/devicetree/bindings/clock/imx6q-clock.txt +++ b/Documentation/devicetree/bindings/clock/imx6q-clock.txt | |||
@@ -215,6 +215,11 @@ clocks and IDs. | |||
215 | cko2 200 | 215 | cko2 200 |
216 | cko 201 | 216 | cko 201 |
217 | vdoa 202 | 217 | vdoa 202 |
218 | pll4_audio_div 203 | ||
219 | lvds1_sel 204 | ||
220 | lvds2_sel 205 | ||
221 | lvds1_gate 206 | ||
222 | lvds2_gate 207 | ||
218 | 223 | ||
219 | Examples: | 224 | Examples: |
220 | 225 | ||
diff --git a/Documentation/devicetree/bindings/clock/mvebu-corediv-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-corediv-clock.txt new file mode 100644 index 000000000000..c62391fc0e39 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/mvebu-corediv-clock.txt | |||
@@ -0,0 +1,19 @@ | |||
1 | * Core Divider Clock bindings for Marvell MVEBU SoCs | ||
2 | |||
3 | The following is a list of provided IDs and clock names on Armada 370/XP: | ||
4 | 0 = nand (NAND clock) | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : must be "marvell,armada-370-corediv-clock" | ||
8 | - reg : must be the register address of Core Divider control register | ||
9 | - #clock-cells : from common clock binding; shall be set to 1 | ||
10 | - clocks : must be set to the parent's phandle | ||
11 | |||
12 | Example: | ||
13 | |||
14 | corediv_clk: corediv-clocks@18740 { | ||
15 | compatible = "marvell,armada-370-corediv-clock"; | ||
16 | reg = <0x18740 0xc>; | ||
17 | #clock-cells = <1>; | ||
18 | clocks = <&pll>; | ||
19 | }; | ||
diff --git a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt index cffc93d97f54..fc2910fa7e45 100644 --- a/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt +++ b/Documentation/devicetree/bindings/clock/mvebu-gated-clock.txt | |||
@@ -1,10 +1,10 @@ | |||
1 | * Gated Clock bindings for Marvell Orion SoCs | 1 | * Gated Clock bindings for Marvell EBU SoCs |
2 | 2 | ||
3 | Marvell Dove and Kirkwood allow some peripheral clocks to be gated to save | 3 | Marvell Armada 370/XP, Dove and Kirkwood allow some peripheral clocks to be |
4 | some power. The clock consumer should specify the desired clock by having | 4 | gated to save some power. The clock consumer should specify the desired clock |
5 | the clock ID in its "clocks" phandle cell. The clock ID is directly mapped to | 5 | by having the clock ID in its "clocks" phandle cell. The clock ID is directly |
6 | the corresponding clock gating control bit in HW to ease manual clock lookup | 6 | mapped to the corresponding clock gating control bit in HW to ease manual clock |
7 | in datasheet. | 7 | lookup in datasheet. |
8 | 8 | ||
9 | The following is a list of provided IDs for Armada 370: | 9 | The following is a list of provided IDs for Armada 370: |
10 | ID Clock Peripheral | 10 | ID Clock Peripheral |
@@ -94,6 +94,8 @@ ID Clock Peripheral | |||
94 | 94 | ||
95 | Required properties: | 95 | Required properties: |
96 | - compatible : shall be one of the following: | 96 | - compatible : shall be one of the following: |
97 | "marvell,armada-370-gating-clock" - for Armada 370 SoC clock gating | ||
98 | "marvell,armada-xp-gating-clock" - for Armada XP SoC clock gating | ||
97 | "marvell,dove-gating-clock" - for Dove SoC clock gating | 99 | "marvell,dove-gating-clock" - for Dove SoC clock gating |
98 | "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating | 100 | "marvell,kirkwood-gating-clock" - for Kirkwood SoC clock gating |
99 | - reg : shall be the register address of the Clock Gating Control register | 101 | - reg : shall be the register address of the Clock Gating Control register |
diff --git a/Documentation/devicetree/bindings/clock/sunxi.txt b/Documentation/devicetree/bindings/clock/sunxi.txt index 00a5c26454eb..91a748fed13d 100644 --- a/Documentation/devicetree/bindings/clock/sunxi.txt +++ b/Documentation/devicetree/bindings/clock/sunxi.txt | |||
@@ -45,8 +45,8 @@ Additionally, "allwinner,*-gates-clk" clocks require: | |||
45 | 45 | ||
46 | Clock consumers should specify the desired clocks they use with a | 46 | Clock consumers should specify the desired clocks they use with a |
47 | "clocks" phandle cell. Consumers that are using a gated clock should | 47 | "clocks" phandle cell. Consumers that are using a gated clock should |
48 | provide an additional ID in their clock property. The values of this | 48 | provide an additional ID in their clock property. This ID is the |
49 | ID are documented in sunxi/<soc>-gates.txt. | 49 | offset of the bit controlling this particular gate in the register. |
50 | 50 | ||
51 | For example: | 51 | For example: |
52 | 52 | ||
diff --git a/Documentation/devicetree/bindings/clock/sunxi/sun4i-a10-gates.txt b/Documentation/devicetree/bindings/clock/sunxi/sun4i-a10-gates.txt deleted file mode 100644 index 6a03475bbfe2..000000000000 --- a/Documentation/devicetree/bindings/clock/sunxi/sun4i-a10-gates.txt +++ /dev/null | |||
@@ -1,93 +0,0 @@ | |||
1 | Gate clock outputs | ||
2 | ------------------ | ||
3 | |||
4 | * AXI gates ("allwinner,sun4i-axi-gates-clk") | ||
5 | |||
6 | DRAM 0 | ||
7 | |||
8 | * AHB gates ("allwinner,sun4i-ahb-gates-clk") | ||
9 | |||
10 | USB0 0 | ||
11 | EHCI0 1 | ||
12 | OHCI0 2* | ||
13 | EHCI1 3 | ||
14 | OHCI1 4* | ||
15 | SS 5 | ||
16 | DMA 6 | ||
17 | BIST 7 | ||
18 | MMC0 8 | ||
19 | MMC1 9 | ||
20 | MMC2 10 | ||
21 | MMC3 11 | ||
22 | MS 12** | ||
23 | NAND 13 | ||
24 | SDRAM 14 | ||
25 | |||
26 | ACE 16 | ||
27 | EMAC 17 | ||
28 | TS 18 | ||
29 | |||
30 | SPI0 20 | ||
31 | SPI1 21 | ||
32 | SPI2 22 | ||
33 | SPI3 23 | ||
34 | PATA 24 | ||
35 | SATA 25** | ||
36 | GPS 26* | ||
37 | |||
38 | VE 32 | ||
39 | TVD 33 | ||
40 | TVE0 34 | ||
41 | TVE1 35 | ||
42 | LCD0 36 | ||
43 | LCD1 37 | ||
44 | |||
45 | CSI0 40 | ||
46 | CSI1 41 | ||
47 | |||
48 | HDMI 43 | ||
49 | DE_BE0 44 | ||
50 | DE_BE1 45 | ||
51 | DE_FE1 46 | ||
52 | DE_FE1 47 | ||
53 | |||
54 | MP 50 | ||
55 | |||
56 | MALI400 52 | ||
57 | |||
58 | * APB0 gates ("allwinner,sun4i-apb0-gates-clk") | ||
59 | |||
60 | CODEC 0 | ||
61 | SPDIF 1* | ||
62 | AC97 2 | ||
63 | IIS 3 | ||
64 | |||
65 | PIO 5 | ||
66 | IR0 6 | ||
67 | IR1 7 | ||
68 | |||
69 | KEYPAD 10 | ||
70 | |||
71 | * APB1 gates ("allwinner,sun4i-apb1-gates-clk") | ||
72 | |||
73 | I2C0 0 | ||
74 | I2C1 1 | ||
75 | I2C2 2 | ||
76 | |||
77 | CAN 4 | ||
78 | SCR 5 | ||
79 | PS20 6 | ||
80 | PS21 7 | ||
81 | |||
82 | UART0 16 | ||
83 | UART1 17 | ||
84 | UART2 18 | ||
85 | UART3 19 | ||
86 | UART4 20 | ||
87 | UART5 21 | ||
88 | UART6 22 | ||
89 | UART7 23 | ||
90 | |||
91 | Notation: | ||
92 | [*]: The datasheet didn't mention these, but they are present on AW code | ||
93 | [**]: The datasheet had this marked as "NC" but they are used on AW code | ||
diff --git a/Documentation/devicetree/bindings/clock/sunxi/sun5i-a10s-gates.txt b/Documentation/devicetree/bindings/clock/sunxi/sun5i-a10s-gates.txt deleted file mode 100644 index d24279fe1429..000000000000 --- a/Documentation/devicetree/bindings/clock/sunxi/sun5i-a10s-gates.txt +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | Gate clock outputs | ||
2 | ------------------ | ||
3 | |||
4 | * AXI gates ("allwinner,sun4i-axi-gates-clk") | ||
5 | |||
6 | DRAM 0 | ||
7 | |||
8 | * AHB gates ("allwinner,sun5i-a10s-ahb-gates-clk") | ||
9 | |||
10 | USB0 0 | ||
11 | EHCI0 1 | ||
12 | OHCI0 2 | ||
13 | |||
14 | SS 5 | ||
15 | DMA 6 | ||
16 | BIST 7 | ||
17 | MMC0 8 | ||
18 | MMC1 9 | ||
19 | MMC2 10 | ||
20 | |||
21 | NAND 13 | ||
22 | SDRAM 14 | ||
23 | |||
24 | EMAC 17 | ||
25 | TS 18 | ||
26 | |||
27 | SPI0 20 | ||
28 | SPI1 21 | ||
29 | SPI2 22 | ||
30 | |||
31 | GPS 26 | ||
32 | |||
33 | HSTIMER 28 | ||
34 | |||
35 | VE 32 | ||
36 | |||
37 | TVE 34 | ||
38 | |||
39 | LCD 36 | ||
40 | |||
41 | CSI 40 | ||
42 | |||
43 | HDMI 43 | ||
44 | DE_BE 44 | ||
45 | |||
46 | DE_FE 46 | ||
47 | |||
48 | IEP 51 | ||
49 | MALI400 52 | ||
50 | |||
51 | * APB0 gates ("allwinner,sun5i-a10s-apb0-gates-clk") | ||
52 | |||
53 | CODEC 0 | ||
54 | |||
55 | IIS 3 | ||
56 | |||
57 | PIO 5 | ||
58 | IR 6 | ||
59 | |||
60 | KEYPAD 10 | ||
61 | |||
62 | * APB1 gates ("allwinner,sun5i-a10s-apb1-gates-clk") | ||
63 | |||
64 | I2C0 0 | ||
65 | I2C1 1 | ||
66 | I2C2 2 | ||
67 | |||
68 | UART0 16 | ||
69 | UART1 17 | ||
70 | UART2 18 | ||
71 | UART3 19 | ||
72 | |||
73 | Notation: | ||
74 | [*]: The datasheet didn't mention these, but they are present on AW code | ||
75 | [**]: The datasheet had this marked as "NC" but they are used on AW code | ||
diff --git a/Documentation/devicetree/bindings/clock/sunxi/sun5i-a13-gates.txt b/Documentation/devicetree/bindings/clock/sunxi/sun5i-a13-gates.txt deleted file mode 100644 index 006b6dfc4703..000000000000 --- a/Documentation/devicetree/bindings/clock/sunxi/sun5i-a13-gates.txt +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | Gate clock outputs | ||
2 | ------------------ | ||
3 | |||
4 | * AXI gates ("allwinner,sun4i-axi-gates-clk") | ||
5 | |||
6 | DRAM 0 | ||
7 | |||
8 | * AHB gates ("allwinner,sun5i-a13-ahb-gates-clk") | ||
9 | |||
10 | USBOTG 0 | ||
11 | EHCI 1 | ||
12 | OHCI 2 | ||
13 | |||
14 | SS 5 | ||
15 | DMA 6 | ||
16 | BIST 7 | ||
17 | MMC0 8 | ||
18 | MMC1 9 | ||
19 | MMC2 10 | ||
20 | |||
21 | NAND 13 | ||
22 | SDRAM 14 | ||
23 | |||
24 | SPI0 20 | ||
25 | SPI1 21 | ||
26 | SPI2 22 | ||
27 | |||
28 | STIMER 28 | ||
29 | |||
30 | VE 32 | ||
31 | |||
32 | LCD 36 | ||
33 | |||
34 | CSI 40 | ||
35 | |||
36 | DE_BE 44 | ||
37 | |||
38 | DE_FE 46 | ||
39 | |||
40 | IEP 51 | ||
41 | MALI400 52 | ||
42 | |||
43 | * APB0 gates ("allwinner,sun5i-a13-apb0-gates-clk") | ||
44 | |||
45 | CODEC 0 | ||
46 | |||
47 | PIO 5 | ||
48 | IR 6 | ||
49 | |||
50 | * APB1 gates ("allwinner,sun5i-a13-apb1-gates-clk") | ||
51 | |||
52 | I2C0 0 | ||
53 | I2C1 1 | ||
54 | I2C2 2 | ||
55 | |||
56 | UART1 17 | ||
57 | |||
58 | UART3 19 | ||
diff --git a/Documentation/devicetree/bindings/clock/sunxi/sun6i-a31-gates.txt b/Documentation/devicetree/bindings/clock/sunxi/sun6i-a31-gates.txt deleted file mode 100644 index fe44932b5c6b..000000000000 --- a/Documentation/devicetree/bindings/clock/sunxi/sun6i-a31-gates.txt +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | Gate clock outputs | ||
2 | ------------------ | ||
3 | |||
4 | * AHB1 gates ("allwinner,sun6i-a31-ahb1-gates-clk") | ||
5 | |||
6 | MIPI DSI 1 | ||
7 | |||
8 | SS 5 | ||
9 | DMA 6 | ||
10 | |||
11 | MMC0 8 | ||
12 | MMC1 9 | ||
13 | MMC2 10 | ||
14 | MMC3 11 | ||
15 | |||
16 | NAND1 12 | ||
17 | NAND0 13 | ||
18 | SDRAM 14 | ||
19 | |||
20 | GMAC 17 | ||
21 | TS 18 | ||
22 | HSTIMER 19 | ||
23 | SPI0 20 | ||
24 | SPI1 21 | ||
25 | SPI2 22 | ||
26 | SPI3 23 | ||
27 | USB_OTG 24 | ||
28 | |||
29 | EHCI0 26 | ||
30 | EHCI1 27 | ||
31 | |||
32 | OHCI0 29 | ||
33 | OHCI1 30 | ||
34 | OHCI2 31 | ||
35 | VE 32 | ||
36 | |||
37 | LCD0 36 | ||
38 | LCD1 37 | ||
39 | |||
40 | CSI 40 | ||
41 | |||
42 | HDMI 43 | ||
43 | DE_BE0 44 | ||
44 | DE_BE1 45 | ||
45 | DE_FE1 46 | ||
46 | DE_FE1 47 | ||
47 | |||
48 | MP 50 | ||
49 | |||
50 | GPU 52 | ||
51 | |||
52 | DEU0 55 | ||
53 | DEU1 56 | ||
54 | DRC0 57 | ||
55 | DRC1 58 | ||
56 | |||
57 | * APB1 gates ("allwinner,sun6i-a31-apb1-gates-clk") | ||
58 | |||
59 | CODEC 0 | ||
60 | |||
61 | DIGITAL MIC 4 | ||
62 | PIO 5 | ||
63 | |||
64 | DAUDIO0 12 | ||
65 | DAUDIO1 13 | ||
66 | |||
67 | * APB2 gates ("allwinner,sun6i-a31-apb2-gates-clk") | ||
68 | |||
69 | I2C0 0 | ||
70 | I2C1 1 | ||
71 | I2C2 2 | ||
72 | I2C3 3 | ||
73 | |||
74 | UART0 16 | ||
75 | UART1 17 | ||
76 | UART2 18 | ||
77 | UART3 19 | ||
78 | UART4 20 | ||
79 | UART5 21 | ||
80 | |||
81 | Notation: | ||
82 | [*]: The datasheet didn't mention these, but they are present on AW code | ||
83 | [**]: The datasheet had this marked as "NC" but they are used on AW code | ||
diff --git a/Documentation/devicetree/bindings/clock/sunxi/sun7i-a20-gates.txt b/Documentation/devicetree/bindings/clock/sunxi/sun7i-a20-gates.txt deleted file mode 100644 index 357f4fdc02ef..000000000000 --- a/Documentation/devicetree/bindings/clock/sunxi/sun7i-a20-gates.txt +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | Gate clock outputs | ||
2 | ------------------ | ||
3 | |||
4 | * AXI gates ("allwinner,sun4i-axi-gates-clk") | ||
5 | |||
6 | DRAM 0 | ||
7 | |||
8 | * AHB gates ("allwinner,sun7i-a20-ahb-gates-clk") | ||
9 | |||
10 | USB0 0 | ||
11 | EHCI0 1 | ||
12 | OHCI0 2 | ||
13 | EHCI1 3 | ||
14 | OHCI1 4 | ||
15 | SS 5 | ||
16 | DMA 6 | ||
17 | BIST 7 | ||
18 | MMC0 8 | ||
19 | MMC1 9 | ||
20 | MMC2 10 | ||
21 | MMC3 11 | ||
22 | MS 12 | ||
23 | NAND 13 | ||
24 | SDRAM 14 | ||
25 | |||
26 | ACE 16 | ||
27 | EMAC 17 | ||
28 | TS 18 | ||
29 | |||
30 | SPI0 20 | ||
31 | SPI1 21 | ||
32 | SPI2 22 | ||
33 | SPI3 23 | ||
34 | |||
35 | SATA 25 | ||
36 | |||
37 | HSTIMER 28 | ||
38 | |||
39 | VE 32 | ||
40 | TVD 33 | ||
41 | TVE0 34 | ||
42 | TVE1 35 | ||
43 | LCD0 36 | ||
44 | LCD1 37 | ||
45 | |||
46 | CSI0 40 | ||
47 | CSI1 41 | ||
48 | |||
49 | HDMI1 42 | ||
50 | HDMI0 43 | ||
51 | DE_BE0 44 | ||
52 | DE_BE1 45 | ||
53 | DE_FE1 46 | ||
54 | DE_FE1 47 | ||
55 | |||
56 | GMAC 49 | ||
57 | MP 50 | ||
58 | |||
59 | MALI400 52 | ||
60 | |||
61 | * APB0 gates ("allwinner,sun7i-a20-apb0-gates-clk") | ||
62 | |||
63 | CODEC 0 | ||
64 | SPDIF 1 | ||
65 | AC97 2 | ||
66 | IIS0 3 | ||
67 | IIS1 4 | ||
68 | PIO 5 | ||
69 | IR0 6 | ||
70 | IR1 7 | ||
71 | IIS2 8 | ||
72 | |||
73 | KEYPAD 10 | ||
74 | |||
75 | * APB1 gates ("allwinner,sun7i-a20-apb1-gates-clk") | ||
76 | |||
77 | I2C0 0 | ||
78 | I2C1 1 | ||
79 | I2C2 2 | ||
80 | I2C3 3 | ||
81 | CAN 4 | ||
82 | SCR 5 | ||
83 | PS20 6 | ||
84 | PS21 7 | ||
85 | |||
86 | I2C4 15 | ||
87 | UART0 16 | ||
88 | UART1 17 | ||
89 | UART2 18 | ||
90 | UART3 19 | ||
91 | UART4 20 | ||
92 | UART5 21 | ||
93 | UART6 22 | ||
94 | UART7 23 | ||
95 | |||
96 | Notation: | ||
97 | [*]: The datasheet didn't mention these, but they are present on AW code | ||
98 | [**]: The datasheet had this marked as "NC" but they are used on AW code | ||
diff --git a/Documentation/devicetree/bindings/crypto/omap-aes.txt b/Documentation/devicetree/bindings/crypto/omap-aes.txt new file mode 100644 index 000000000000..fd9717653cbb --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/omap-aes.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | OMAP SoC AES crypto Module | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : Should contain entries for this and backward compatible | ||
6 | AES versions: | ||
7 | - "ti,omap2-aes" for OMAP2. | ||
8 | - "ti,omap3-aes" for OMAP3. | ||
9 | - "ti,omap4-aes" for OMAP4 and AM33XX. | ||
10 | Note that the OMAP2 and 3 versions are compatible (OMAP3 supports | ||
11 | more algorithms) but they are incompatible with OMAP4. | ||
12 | - ti,hwmods: Name of the hwmod associated with the AES module | ||
13 | - reg : Offset and length of the register set for the module | ||
14 | - interrupts : the interrupt-specifier for the AES module. | ||
15 | |||
16 | Optional properties: | ||
17 | - dmas: DMA specifiers for tx and rx dma. See the DMA client binding, | ||
18 | Documentation/devicetree/bindings/dma/dma.txt | ||
19 | - dma-names: DMA request names should include "tx" and "rx" if present. | ||
20 | |||
21 | Example: | ||
22 | /* AM335x */ | ||
23 | aes: aes@53500000 { | ||
24 | compatible = "ti,omap4-aes"; | ||
25 | ti,hwmods = "aes"; | ||
26 | reg = <0x53500000 0xa0>; | ||
27 | interrupts = <102>; | ||
28 | dmas = <&edma 6>, | ||
29 | <&edma 5>; | ||
30 | dma-names = "tx", "rx"; | ||
31 | }; | ||
diff --git a/Documentation/devicetree/bindings/crypto/omap-sham.txt b/Documentation/devicetree/bindings/crypto/omap-sham.txt new file mode 100644 index 000000000000..f839acd6f0ee --- /dev/null +++ b/Documentation/devicetree/bindings/crypto/omap-sham.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | OMAP SoC SHA crypto Module | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : Should contain entries for this and backward compatible | ||
6 | SHAM versions: | ||
7 | - "ti,omap2-sham" for OMAP2 & OMAP3. | ||
8 | - "ti,omap4-sham" for OMAP4 and AM33XX. | ||
9 | Note that these two versions are incompatible. | ||
10 | - ti,hwmods: Name of the hwmod associated with the SHAM module | ||
11 | - reg : Offset and length of the register set for the module | ||
12 | - interrupts : the interrupt-specifier for the SHAM module. | ||
13 | |||
14 | Optional properties: | ||
15 | - dmas: DMA specifiers for the rx dma. See the DMA client binding, | ||
16 | Documentation/devicetree/bindings/dma/dma.txt | ||
17 | - dma-names: DMA request name. Should be "rx" if a dma is present. | ||
18 | |||
19 | Example: | ||
20 | /* AM335x */ | ||
21 | sham: sham@53100000 { | ||
22 | compatible = "ti,omap4-sham"; | ||
23 | ti,hwmods = "sham"; | ||
24 | reg = <0x53100000 0x200>; | ||
25 | interrupts = <109>; | ||
26 | dmas = <&edma 36>; | ||
27 | dma-names = "rx"; | ||
28 | }; | ||
diff --git a/Documentation/devicetree/bindings/hwrng/omap_rng.txt b/Documentation/devicetree/bindings/hwrng/omap_rng.txt new file mode 100644 index 000000000000..6a62acd86953 --- /dev/null +++ b/Documentation/devicetree/bindings/hwrng/omap_rng.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | OMAP SoC HWRNG Module | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : Should contain entries for this and backward compatible | ||
6 | RNG versions: | ||
7 | - "ti,omap2-rng" for OMAP2. | ||
8 | - "ti,omap4-rng" for OMAP4, OMAP5 and AM33XX. | ||
9 | Note that these two versions are incompatible. | ||
10 | - ti,hwmods: Name of the hwmod associated with the RNG module | ||
11 | - reg : Offset and length of the register set for the module | ||
12 | - interrupts : the interrupt number for the RNG module. | ||
13 | Only used for "ti,omap4-rng". | ||
14 | |||
15 | Example: | ||
16 | /* AM335x */ | ||
17 | rng: rng@48310000 { | ||
18 | compatible = "ti,omap4-rng"; | ||
19 | ti,hwmods = "rng"; | ||
20 | reg = <0x48310000 0x2000>; | ||
21 | interrupts = <111>; | ||
22 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/light/cm36651.txt b/Documentation/devicetree/bindings/iio/light/cm36651.txt new file mode 100644 index 000000000000..c03e19db4550 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/cm36651.txt | |||
@@ -0,0 +1,26 @@ | |||
1 | * Capella CM36651 I2C Proximity and Color Light sensor | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: must be "capella,cm36651" | ||
5 | - reg: the I2C address of the device | ||
6 | - interrupts: interrupt-specifier for the sole interrupt | ||
7 | generated by the device | ||
8 | - vled-supply: regulator for the IR LED. IR_LED is a part | ||
9 | of the cm36651 for proximity detection. | ||
10 | As covered in ../../regulator/regulator.txt | ||
11 | |||
12 | Example: | ||
13 | |||
14 | i2c_cm36651: i2c-gpio { | ||
15 | /* ... */ | ||
16 | |||
17 | cm36651@18 { | ||
18 | compatible = "capella,cm36651"; | ||
19 | reg = <0x18>; | ||
20 | interrupt-parent = <&gpx0>; | ||
21 | interrupts = <2 0>; | ||
22 | vled-supply = <&ps_als_reg>; | ||
23 | }; | ||
24 | |||
25 | /* ... */ | ||
26 | }; | ||
diff --git a/Documentation/devicetree/bindings/iio/light/gp2ap020a00f.txt b/Documentation/devicetree/bindings/iio/light/gp2ap020a00f.txt new file mode 100644 index 000000000000..9231c82317ad --- /dev/null +++ b/Documentation/devicetree/bindings/iio/light/gp2ap020a00f.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Sharp GP2AP020A00F I2C Proximity/ALS sensor | ||
2 | |||
3 | The proximity detector sensor requires power supply | ||
4 | for its built-in led. It is also defined by this binding. | ||
5 | |||
6 | Required properties: | ||
7 | |||
8 | - compatible : should be "sharp,gp2ap020a00f" | ||
9 | - reg : the I2C slave address of the light sensor | ||
10 | - interrupts : interrupt specifier for the sole interrupt generated | ||
11 | by the device | ||
12 | - vled-supply : VLED power supply, as covered in ../regulator/regulator.txt | ||
13 | |||
14 | Example: | ||
15 | |||
16 | gp2ap020a00f@39 { | ||
17 | compatible = "sharp,gp2ap020a00f"; | ||
18 | reg = <0x39>; | ||
19 | interrupts = <2 0>; | ||
20 | vled-supply = <...>; | ||
21 | }; | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt index 57edb30dbbca..3d3b2b91e333 100644 --- a/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt +++ b/Documentation/devicetree/bindings/interrupt-controller/allwinner,sun4i-ic.txt | |||
@@ -8,9 +8,6 @@ Required properties: | |||
8 | - #interrupt-cells : Specifies the number of cells needed to encode an | 8 | - #interrupt-cells : Specifies the number of cells needed to encode an |
9 | interrupt source. The value shall be 1. | 9 | interrupt source. The value shall be 1. |
10 | 10 | ||
11 | For the valid interrupt sources for your SoC, see the documentation in | ||
12 | sunxi/<soc>.txt | ||
13 | |||
14 | Example: | 11 | Example: |
15 | 12 | ||
16 | intc: interrupt-controller { | 13 | intc: interrupt-controller { |
diff --git a/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt deleted file mode 100644 index 76b98c834499..000000000000 --- a/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun4i-a10.txt +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | Allwinner A10 (sun4i) interrupt sources | ||
2 | --------------------------------------- | ||
3 | |||
4 | The interrupt sources available for the Allwinner A10 SoC are the | ||
5 | following one: | ||
6 | |||
7 | 0: ENMI | ||
8 | 1: UART0 | ||
9 | 2: UART1 | ||
10 | 3: UART2 | ||
11 | 4: UART3 | ||
12 | 5: IR0 | ||
13 | 6: IR1 | ||
14 | 7: I2C0 | ||
15 | 8: I2C1 | ||
16 | 9: I2C2 | ||
17 | 10: SPI0 | ||
18 | 11: SPI1 | ||
19 | 12: SPI2 | ||
20 | 13: SPDIF | ||
21 | 14: AC97 | ||
22 | 15: TS | ||
23 | 16: I2S | ||
24 | 17: UART4 | ||
25 | 18: UART5 | ||
26 | 19: UART6 | ||
27 | 20: UART7 | ||
28 | 21: KEYPAD | ||
29 | 22: TIMER0 | ||
30 | 23: TIMER1 | ||
31 | 24: TIMER2 | ||
32 | 25: TIMER3 | ||
33 | 26: CAN | ||
34 | 27: DMA | ||
35 | 28: PIO | ||
36 | 29: TOUCH_PANEL | ||
37 | 30: AUDIO_CODEC | ||
38 | 31: LRADC | ||
39 | 32: MMC0 | ||
40 | 33: MMC1 | ||
41 | 34: MMC2 | ||
42 | 35: MMC3 | ||
43 | 36: MEMSTICK | ||
44 | 37: NAND | ||
45 | 38: USB0 | ||
46 | 39: USB1 | ||
47 | 40: USB2 | ||
48 | 41: SCR | ||
49 | 42: CSI0 | ||
50 | 43: CSI1 | ||
51 | 44: LCDCTRL0 | ||
52 | 45: LCDCTRL1 | ||
53 | 46: MP | ||
54 | 47: DEFEBE0 | ||
55 | 48: DEFEBE1 | ||
56 | 49: PMU | ||
57 | 50: SPI3 | ||
58 | 51: TZASC | ||
59 | 52: PATA | ||
60 | 53: VE | ||
61 | 54: SS | ||
62 | 55: EMAC | ||
63 | 56: SATA | ||
64 | 57: GPS | ||
65 | 58: HDMI | ||
66 | 59: TVE | ||
67 | 60: ACE | ||
68 | 61: TVD | ||
69 | 62: PS2_0 | ||
70 | 63: PS2_1 | ||
71 | 64: USB3 | ||
72 | 65: USB4 | ||
73 | 66: PLE_PFM | ||
74 | 67: TIMER4 | ||
75 | 68: TIMER5 | ||
76 | 69: GPU_GP | ||
77 | 70: GPU_GPMMU | ||
78 | 71: GPU_PP0 | ||
79 | 72: GPU_PPMMU0 | ||
80 | 73: GPU_PMU | ||
81 | 74: GPU_RSV0 | ||
82 | 75: GPU_RSV1 | ||
83 | 76: GPU_RSV2 | ||
84 | 77: GPU_RSV3 | ||
85 | 78: GPU_RSV4 | ||
86 | 79: GPU_RSV5 | ||
87 | 80: GPU_RSV6 | ||
88 | 82: SYNC_TIMER0 | ||
89 | 83: SYNC_TIMER1 | ||
diff --git a/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt b/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt deleted file mode 100644 index 2ec3b5ce1a0b..000000000000 --- a/Documentation/devicetree/bindings/interrupt-controller/sunxi/sun5i-a13.txt +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | Allwinner A13 (sun5i) interrupt sources | ||
2 | --------------------------------------- | ||
3 | |||
4 | The interrupt sources available for the Allwinner A13 SoC are the | ||
5 | following one: | ||
6 | |||
7 | 0: ENMI | ||
8 | 2: UART1 | ||
9 | 4: UART3 | ||
10 | 5: IR | ||
11 | 7: I2C0 | ||
12 | 8: I2C1 | ||
13 | 9: I2C2 | ||
14 | 10: SPI0 | ||
15 | 11: SPI1 | ||
16 | 12: SPI2 | ||
17 | 22: TIMER0 | ||
18 | 23: TIMER1 | ||
19 | 24: TIMER2 | ||
20 | 25: TIMER3 | ||
21 | 27: DMA | ||
22 | 28: PIO | ||
23 | 29: TOUCH_PANEL | ||
24 | 30: AUDIO_CODEC | ||
25 | 31: LRADC | ||
26 | 32: MMC0 | ||
27 | 33: MMC1 | ||
28 | 34: MMC2 | ||
29 | 37: NAND | ||
30 | 38: USB OTG | ||
31 | 39: USB EHCI | ||
32 | 40: USB OHCI | ||
33 | 42: CSI | ||
34 | 44: LCDCTRL | ||
35 | 47: DEFEBE | ||
36 | 49: PMU | ||
37 | 53: VE | ||
38 | 54: SS | ||
39 | 66: PLE_PFM | ||
40 | 67: TIMER4 | ||
41 | 68: TIMER5 | ||
42 | 69: GPU_GP | ||
43 | 70: GPU_GPMMU | ||
44 | 71: GPU_PP0 | ||
45 | 72: GPU_PPMMU0 | ||
46 | 73: GPU_PMU | ||
47 | 74: GPU_RSV0 | ||
48 | 75: GPU_RSV1 | ||
49 | 76: GPU_RSV2 | ||
50 | 77: GPU_RSV3 | ||
51 | 78: GPU_RSV4 | ||
52 | 79: GPU_RSV5 | ||
53 | 80: GPU_RSV6 | ||
54 | 82: SYNC_TIMER0 | ||
55 | 83: SYNC_TIMER1 | ||
diff --git a/Documentation/devicetree/bindings/misc/allwinner,sunxi-sid.txt b/Documentation/devicetree/bindings/misc/allwinner,sunxi-sid.txt new file mode 100644 index 000000000000..68ba37295565 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/allwinner,sunxi-sid.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Allwinner sunxi-sid | ||
2 | |||
3 | Required properties: | ||
4 | - compatible: "allwinner,sun4i-sid" or "allwinner,sun7i-a20-sid". | ||
5 | - reg: Should contain registers location and length | ||
6 | |||
7 | Example for sun4i: | ||
8 | sid@01c23800 { | ||
9 | compatible = "allwinner,sun4i-sid"; | ||
10 | reg = <0x01c23800 0x10> | ||
11 | }; | ||
12 | |||
13 | Example for sun7i: | ||
14 | sid@01c23800 { | ||
15 | compatible = "allwinner,sun7i-a20-sid"; | ||
16 | reg = <0x01c23800 0x200> | ||
17 | }; | ||
diff --git a/Documentation/devicetree/bindings/misc/ti,dac7512.txt b/Documentation/devicetree/bindings/misc/ti,dac7512.txt new file mode 100644 index 000000000000..1db45939dac9 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/ti,dac7512.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | TI DAC7512 DEVICETREE BINDINGS | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - "compatible" Must be set to "ti,dac7512" | ||
6 | |||
7 | Property rules described in Documentation/devicetree/bindings/spi/spi-bus.txt | ||
8 | apply. In particular, "reg" and "spi-max-frequency" properties must be given. | ||
9 | |||
10 | |||
11 | Example: | ||
12 | |||
13 | spi_master { | ||
14 | dac7512: dac7512@0 { | ||
15 | compatible = "ti,dac7512"; | ||
16 | reg = <0>; /* CS0 */ | ||
17 | spi-max-frequency = <1000000>; | ||
18 | }; | ||
19 | }; | ||
20 | |||
diff --git a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt index ed271fc255b2..8c8908ab84ba 100644 --- a/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +++ b/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt | |||
@@ -20,8 +20,29 @@ ti,dual-volt: boolean, supports dual voltage cards | |||
20 | ti,non-removable: non-removable slot (like eMMC) | 20 | ti,non-removable: non-removable slot (like eMMC) |
21 | ti,needs-special-reset: Requires a special softreset sequence | 21 | ti,needs-special-reset: Requires a special softreset sequence |
22 | ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed | 22 | ti,needs-special-hs-handling: HSMMC IP needs special setting for handling High Speed |
23 | dmas: List of DMA specifiers with the controller specific format | ||
24 | as described in the generic DMA client binding. A tx and rx | ||
25 | specifier is required. | ||
26 | dma-names: List of DMA request names. These strings correspond | ||
27 | 1:1 with the DMA specifiers listed in dmas. The string naming is | ||
28 | to be "rx" and "tx" for RX and TX DMA requests, respectively. | ||
29 | |||
30 | Examples: | ||
31 | |||
32 | [hwmod populated DMA resources] | ||
33 | |||
34 | mmc1: mmc@0x4809c000 { | ||
35 | compatible = "ti,omap4-hsmmc"; | ||
36 | reg = <0x4809c000 0x400>; | ||
37 | ti,hwmods = "mmc1"; | ||
38 | ti,dual-volt; | ||
39 | bus-width = <4>; | ||
40 | vmmc-supply = <&vmmc>; /* phandle to regulator node */ | ||
41 | ti,non-removable; | ||
42 | }; | ||
43 | |||
44 | [generic DMA request binding] | ||
23 | 45 | ||
24 | Example: | ||
25 | mmc1: mmc@0x4809c000 { | 46 | mmc1: mmc@0x4809c000 { |
26 | compatible = "ti,omap4-hsmmc"; | 47 | compatible = "ti,omap4-hsmmc"; |
27 | reg = <0x4809c000 0x400>; | 48 | reg = <0x4809c000 0x400>; |
@@ -30,4 +51,7 @@ Example: | |||
30 | bus-width = <4>; | 51 | bus-width = <4>; |
31 | vmmc-supply = <&vmmc>; /* phandle to regulator node */ | 52 | vmmc-supply = <&vmmc>; /* phandle to regulator node */ |
32 | ti,non-removable; | 53 | ti,non-removable; |
54 | dmas = <&edma 24 | ||
55 | &edma 25>; | ||
56 | dma-names = "tx", "rx"; | ||
33 | }; | 57 | }; |
diff --git a/Documentation/devicetree/bindings/pci/mvebu-pci.txt b/Documentation/devicetree/bindings/pci/mvebu-pci.txt index 9556e2fedf6d..08c716b2c6b6 100644 --- a/Documentation/devicetree/bindings/pci/mvebu-pci.txt +++ b/Documentation/devicetree/bindings/pci/mvebu-pci.txt | |||
@@ -5,6 +5,7 @@ Mandatory properties: | |||
5 | - compatible: one of the following values: | 5 | - compatible: one of the following values: |
6 | marvell,armada-370-pcie | 6 | marvell,armada-370-pcie |
7 | marvell,armada-xp-pcie | 7 | marvell,armada-xp-pcie |
8 | marvell,dove-pcie | ||
8 | marvell,kirkwood-pcie | 9 | marvell,kirkwood-pcie |
9 | - #address-cells, set to <3> | 10 | - #address-cells, set to <3> |
10 | - #size-cells, set to <2> | 11 | - #size-cells, set to <2> |
@@ -14,6 +15,8 @@ Mandatory properties: | |||
14 | - ranges: ranges describing the MMIO registers to control the PCIe | 15 | - ranges: ranges describing the MMIO registers to control the PCIe |
15 | interfaces, and ranges describing the MBus windows needed to access | 16 | interfaces, and ranges describing the MBus windows needed to access |
16 | the memory and I/O regions of each PCIe interface. | 17 | the memory and I/O regions of each PCIe interface. |
18 | - msi-parent: Link to the hardware entity that serves as the Message | ||
19 | Signaled Interrupt controller for this PCI controller. | ||
17 | 20 | ||
18 | The ranges describing the MMIO registers have the following layout: | 21 | The ranges describing the MMIO registers have the following layout: |
19 | 22 | ||
@@ -74,6 +77,8 @@ and the following optional properties: | |||
74 | - marvell,pcie-lane: the physical PCIe lane number, for ports having | 77 | - marvell,pcie-lane: the physical PCIe lane number, for ports having |
75 | multiple lanes. If this property is not found, we assume that the | 78 | multiple lanes. If this property is not found, we assume that the |
76 | value is 0. | 79 | value is 0. |
80 | - reset-gpios: optional gpio to PERST# | ||
81 | - reset-delay-us: delay in us to wait after reset de-assertion | ||
77 | 82 | ||
78 | Example: | 83 | Example: |
79 | 84 | ||
@@ -86,6 +91,7 @@ pcie-controller { | |||
86 | #size-cells = <2>; | 91 | #size-cells = <2>; |
87 | 92 | ||
88 | bus-range = <0x00 0xff>; | 93 | bus-range = <0x00 0xff>; |
94 | msi-parent = <&mpic>; | ||
89 | 95 | ||
90 | ranges = | 96 | ranges = |
91 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */ | 97 | <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */ |
@@ -135,6 +141,10 @@ pcie-controller { | |||
135 | interrupt-map = <0 0 0 0 &mpic 58>; | 141 | interrupt-map = <0 0 0 0 &mpic 58>; |
136 | marvell,pcie-port = <0>; | 142 | marvell,pcie-port = <0>; |
137 | marvell,pcie-lane = <0>; | 143 | marvell,pcie-lane = <0>; |
144 | /* low-active PERST# reset on GPIO 25 */ | ||
145 | reset-gpios = <&gpio0 25 1>; | ||
146 | /* wait 20ms for device settle after reset deassertion */ | ||
147 | reset-delay-us = <20000>; | ||
138 | clocks = <&gateclk 5>; | 148 | clocks = <&gateclk 5>; |
139 | status = "disabled"; | 149 | status = "disabled"; |
140 | }; | 150 | }; |
diff --git a/Documentation/devicetree/bindings/phy/phy-bindings.txt b/Documentation/devicetree/bindings/phy/phy-bindings.txt new file mode 100644 index 000000000000..8ae844fc0c60 --- /dev/null +++ b/Documentation/devicetree/bindings/phy/phy-bindings.txt | |||
@@ -0,0 +1,66 @@ | |||
1 | This document explains only the device tree data binding. For general | ||
2 | information about PHY subsystem refer to Documentation/phy.txt | ||
3 | |||
4 | PHY device node | ||
5 | =============== | ||
6 | |||
7 | Required Properties: | ||
8 | #phy-cells: Number of cells in a PHY specifier; The meaning of all those | ||
9 | cells is defined by the binding for the phy node. The PHY | ||
10 | provider can use the values in cells to find the appropriate | ||
11 | PHY. | ||
12 | |||
13 | For example: | ||
14 | |||
15 | phys: phy { | ||
16 | compatible = "xxx"; | ||
17 | reg = <...>; | ||
18 | . | ||
19 | . | ||
20 | #phy-cells = <1>; | ||
21 | . | ||
22 | . | ||
23 | }; | ||
24 | |||
25 | That node describes an IP block (PHY provider) that implements 2 different PHYs. | ||
26 | In order to differentiate between these 2 PHYs, an additonal specifier should be | ||
27 | given while trying to get a reference to it. | ||
28 | |||
29 | PHY user node | ||
30 | ============= | ||
31 | |||
32 | Required Properties: | ||
33 | phys : the phandle for the PHY device (used by the PHY subsystem) | ||
34 | phy-names : the names of the PHY corresponding to the PHYs present in the | ||
35 | *phys* phandle | ||
36 | |||
37 | Example 1: | ||
38 | usb1: usb_otg_ss@xxx { | ||
39 | compatible = "xxx"; | ||
40 | reg = <xxx>; | ||
41 | . | ||
42 | . | ||
43 | phys = <&usb2_phy>, <&usb3_phy>; | ||
44 | phy-names = "usb2phy", "usb3phy"; | ||
45 | . | ||
46 | . | ||
47 | }; | ||
48 | |||
49 | This node represents a controller that uses two PHYs, one for usb2 and one for | ||
50 | usb3. | ||
51 | |||
52 | Example 2: | ||
53 | usb2: usb_otg_ss@xxx { | ||
54 | compatible = "xxx"; | ||
55 | reg = <xxx>; | ||
56 | . | ||
57 | . | ||
58 | phys = <&phys 1>; | ||
59 | phy-names = "usbphy"; | ||
60 | . | ||
61 | . | ||
62 | }; | ||
63 | |||
64 | This node represents a controller that uses one of the PHYs of the PHY provider | ||
65 | device defined previously. Note that the phy handle has an additional specifier | ||
66 | "1" to differentiate between the two PHYs. | ||
diff --git a/Documentation/devicetree/bindings/phy/samsung-phy.txt b/Documentation/devicetree/bindings/phy/samsung-phy.txt new file mode 100644 index 000000000000..c0fccaa1671e --- /dev/null +++ b/Documentation/devicetree/bindings/phy/samsung-phy.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | Samsung S5P/EXYNOS SoC series MIPI CSIS/DSIM DPHY | ||
2 | ------------------------------------------------- | ||
3 | |||
4 | Required properties: | ||
5 | - compatible : should be "samsung,s5pv210-mipi-video-phy"; | ||
6 | - reg : offset and length of the MIPI DPHY register set; | ||
7 | - #phy-cells : from the generic phy bindings, must be 1; | ||
8 | |||
9 | For "samsung,s5pv210-mipi-video-phy" compatible PHYs the second cell in | ||
10 | the PHY specifier identifies the PHY and its meaning is as follows: | ||
11 | 0 - MIPI CSIS 0, | ||
12 | 1 - MIPI DSIM 0, | ||
13 | 2 - MIPI CSIS 1, | ||
14 | 3 - MIPI DSIM 1. | ||
15 | |||
16 | Samsung EXYNOS SoC series Display Port PHY | ||
17 | ------------------------------------------------- | ||
18 | |||
19 | Required properties: | ||
20 | - compatible : should be "samsung,exynos5250-dp-video-phy"; | ||
21 | - reg : offset and length of the Display Port PHY register set; | ||
22 | - #phy-cells : from the generic PHY bindings, must be 0; | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt index 3077370c89af..1e70a8aff260 100644 --- a/Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt +++ b/Documentation/devicetree/bindings/pinctrl/fsl,mxs-pinctrl.txt | |||
@@ -59,16 +59,16 @@ Required subnode-properties: | |||
59 | 59 | ||
60 | Optional subnode-properties: | 60 | Optional subnode-properties: |
61 | - fsl,drive-strength: Integer. | 61 | - fsl,drive-strength: Integer. |
62 | 0: 4 mA | 62 | 0: MXS_DRIVE_4mA |
63 | 1: 8 mA | 63 | 1: MXS_DRIVE_8mA |
64 | 2: 12 mA | 64 | 2: MXS_DRIVE_12mA |
65 | 3: 16 mA | 65 | 3: MXS_DRIVE_16mA |
66 | - fsl,voltage: Integer. | 66 | - fsl,voltage: Integer. |
67 | 0: 1.8 V | 67 | 0: MXS_VOLTAGE_LOW - 1.8 V |
68 | 1: 3.3 V | 68 | 1: MXS_VOLTAGE_HIGH - 3.3 V |
69 | - fsl,pull-up: Integer. | 69 | - fsl,pull-up: Integer. |
70 | 0: Disable the internal pull-up | 70 | 0: MXS_PULL_DISABLE - Disable the internal pull-up |
71 | 1: Enable the internal pull-up | 71 | 1: MXS_PULL_ENABLE - Enable the internal pull-up |
72 | 72 | ||
73 | Note that when enabling the pull-up, the internal pad keeper gets disabled. | 73 | Note that when enabling the pull-up, the internal pad keeper gets disabled. |
74 | Also, some pins doesn't have a pull up, in that case, setting the fsl,pull-up | 74 | Also, some pins doesn't have a pull up, in that case, setting the fsl,pull-up |
@@ -85,23 +85,32 @@ pinctrl@80018000 { | |||
85 | mmc0_8bit_pins_a: mmc0-8bit@0 { | 85 | mmc0_8bit_pins_a: mmc0-8bit@0 { |
86 | reg = <0>; | 86 | reg = <0>; |
87 | fsl,pinmux-ids = < | 87 | fsl,pinmux-ids = < |
88 | 0x2000 0x2010 0x2020 0x2030 | 88 | MX28_PAD_SSP0_DATA0__SSP0_D0 |
89 | 0x2040 0x2050 0x2060 0x2070 | 89 | MX28_PAD_SSP0_DATA1__SSP0_D1 |
90 | 0x2080 0x2090 0x20a0>; | 90 | MX28_PAD_SSP0_DATA2__SSP0_D2 |
91 | fsl,drive-strength = <1>; | 91 | MX28_PAD_SSP0_DATA3__SSP0_D3 |
92 | fsl,voltage = <1>; | 92 | MX28_PAD_SSP0_DATA4__SSP0_D4 |
93 | fsl,pull-up = <1>; | 93 | MX28_PAD_SSP0_DATA5__SSP0_D5 |
94 | MX28_PAD_SSP0_DATA6__SSP0_D6 | ||
95 | MX28_PAD_SSP0_DATA7__SSP0_D7 | ||
96 | MX28_PAD_SSP0_CMD__SSP0_CMD | ||
97 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT | ||
98 | MX28_PAD_SSP0_SCK__SSP0_SCK | ||
99 | >; | ||
100 | fsl,drive-strength = <MXS_DRIVE_4mA>; | ||
101 | fsl,voltage = <MXS_VOLTAGE_HIGH>; | ||
102 | fsl,pull-up = <MXS_PULL_ENABLE>; | ||
94 | }; | 103 | }; |
95 | 104 | ||
96 | mmc_cd_cfg: mmc-cd-cfg { | 105 | mmc_cd_cfg: mmc-cd-cfg { |
97 | fsl,pinmux-ids = <0x2090>; | 106 | fsl,pinmux-ids = <MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT>; |
98 | fsl,pull-up = <0>; | 107 | fsl,pull-up = <MXS_PULL_DISABLE>; |
99 | }; | 108 | }; |
100 | 109 | ||
101 | mmc_sck_cfg: mmc-sck-cfg { | 110 | mmc_sck_cfg: mmc-sck-cfg { |
102 | fsl,pinmux-ids = <0x20a0>; | 111 | fsl,pinmux-ids = <MX28_PAD_SSP0_SCK__SSP0_SCK>; |
103 | fsl,drive-strength = <2>; | 112 | fsl,drive-strength = <MXS_DRIVE_12mA>; |
104 | fsl,pull-up = <0>; | 113 | fsl,pull-up = <MXS_PULL_DISABLE>; |
105 | }; | 114 | }; |
106 | }; | 115 | }; |
107 | 116 | ||
@@ -112,811 +121,7 @@ adjusting the configuration for pins card-detection and clock from what group | |||
112 | node mmc0-8bit defines. Only the configuration properties to be adjusted need | 121 | node mmc0-8bit defines. Only the configuration properties to be adjusted need |
113 | to be listed in the config nodes. | 122 | to be listed in the config nodes. |
114 | 123 | ||
115 | Valid values for i.MX28 pinmux-id: | 124 | Valid values for i.MX28/i.MX23 pinmux-id are defined in |
116 | 125 | arch/arm/boot/dts/imx28-pinfunc.h and arch/arm/boot/dts/imx23-pinfunc.h. | |
117 | pinmux id | 126 | The definitions for the padconfig properties can be found in |
118 | ------ -- | 127 | arch/arm/boot/dts/mxs-pinfunc.h. |
119 | MX28_PAD_GPMI_D00__GPMI_D0 0x0000 | ||
120 | MX28_PAD_GPMI_D01__GPMI_D1 0x0010 | ||
121 | MX28_PAD_GPMI_D02__GPMI_D2 0x0020 | ||
122 | MX28_PAD_GPMI_D03__GPMI_D3 0x0030 | ||
123 | MX28_PAD_GPMI_D04__GPMI_D4 0x0040 | ||
124 | MX28_PAD_GPMI_D05__GPMI_D5 0x0050 | ||
125 | MX28_PAD_GPMI_D06__GPMI_D6 0x0060 | ||
126 | MX28_PAD_GPMI_D07__GPMI_D7 0x0070 | ||
127 | MX28_PAD_GPMI_CE0N__GPMI_CE0N 0x0100 | ||
128 | MX28_PAD_GPMI_CE1N__GPMI_CE1N 0x0110 | ||
129 | MX28_PAD_GPMI_CE2N__GPMI_CE2N 0x0120 | ||
130 | MX28_PAD_GPMI_CE3N__GPMI_CE3N 0x0130 | ||
131 | MX28_PAD_GPMI_RDY0__GPMI_READY0 0x0140 | ||
132 | MX28_PAD_GPMI_RDY1__GPMI_READY1 0x0150 | ||
133 | MX28_PAD_GPMI_RDY2__GPMI_READY2 0x0160 | ||
134 | MX28_PAD_GPMI_RDY3__GPMI_READY3 0x0170 | ||
135 | MX28_PAD_GPMI_RDN__GPMI_RDN 0x0180 | ||
136 | MX28_PAD_GPMI_WRN__GPMI_WRN 0x0190 | ||
137 | MX28_PAD_GPMI_ALE__GPMI_ALE 0x01a0 | ||
138 | MX28_PAD_GPMI_CLE__GPMI_CLE 0x01b0 | ||
139 | MX28_PAD_GPMI_RESETN__GPMI_RESETN 0x01c0 | ||
140 | MX28_PAD_LCD_D00__LCD_D0 0x1000 | ||
141 | MX28_PAD_LCD_D01__LCD_D1 0x1010 | ||
142 | MX28_PAD_LCD_D02__LCD_D2 0x1020 | ||
143 | MX28_PAD_LCD_D03__LCD_D3 0x1030 | ||
144 | MX28_PAD_LCD_D04__LCD_D4 0x1040 | ||
145 | MX28_PAD_LCD_D05__LCD_D5 0x1050 | ||
146 | MX28_PAD_LCD_D06__LCD_D6 0x1060 | ||
147 | MX28_PAD_LCD_D07__LCD_D7 0x1070 | ||
148 | MX28_PAD_LCD_D08__LCD_D8 0x1080 | ||
149 | MX28_PAD_LCD_D09__LCD_D9 0x1090 | ||
150 | MX28_PAD_LCD_D10__LCD_D10 0x10a0 | ||
151 | MX28_PAD_LCD_D11__LCD_D11 0x10b0 | ||
152 | MX28_PAD_LCD_D12__LCD_D12 0x10c0 | ||
153 | MX28_PAD_LCD_D13__LCD_D13 0x10d0 | ||
154 | MX28_PAD_LCD_D14__LCD_D14 0x10e0 | ||
155 | MX28_PAD_LCD_D15__LCD_D15 0x10f0 | ||
156 | MX28_PAD_LCD_D16__LCD_D16 0x1100 | ||
157 | MX28_PAD_LCD_D17__LCD_D17 0x1110 | ||
158 | MX28_PAD_LCD_D18__LCD_D18 0x1120 | ||
159 | MX28_PAD_LCD_D19__LCD_D19 0x1130 | ||
160 | MX28_PAD_LCD_D20__LCD_D20 0x1140 | ||
161 | MX28_PAD_LCD_D21__LCD_D21 0x1150 | ||
162 | MX28_PAD_LCD_D22__LCD_D22 0x1160 | ||
163 | MX28_PAD_LCD_D23__LCD_D23 0x1170 | ||
164 | MX28_PAD_LCD_RD_E__LCD_RD_E 0x1180 | ||
165 | MX28_PAD_LCD_WR_RWN__LCD_WR_RWN 0x1190 | ||
166 | MX28_PAD_LCD_RS__LCD_RS 0x11a0 | ||
167 | MX28_PAD_LCD_CS__LCD_CS 0x11b0 | ||
168 | MX28_PAD_LCD_VSYNC__LCD_VSYNC 0x11c0 | ||
169 | MX28_PAD_LCD_HSYNC__LCD_HSYNC 0x11d0 | ||
170 | MX28_PAD_LCD_DOTCLK__LCD_DOTCLK 0x11e0 | ||
171 | MX28_PAD_LCD_ENABLE__LCD_ENABLE 0x11f0 | ||
172 | MX28_PAD_SSP0_DATA0__SSP0_D0 0x2000 | ||
173 | MX28_PAD_SSP0_DATA1__SSP0_D1 0x2010 | ||
174 | MX28_PAD_SSP0_DATA2__SSP0_D2 0x2020 | ||
175 | MX28_PAD_SSP0_DATA3__SSP0_D3 0x2030 | ||
176 | MX28_PAD_SSP0_DATA4__SSP0_D4 0x2040 | ||
177 | MX28_PAD_SSP0_DATA5__SSP0_D5 0x2050 | ||
178 | MX28_PAD_SSP0_DATA6__SSP0_D6 0x2060 | ||
179 | MX28_PAD_SSP0_DATA7__SSP0_D7 0x2070 | ||
180 | MX28_PAD_SSP0_CMD__SSP0_CMD 0x2080 | ||
181 | MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT 0x2090 | ||
182 | MX28_PAD_SSP0_SCK__SSP0_SCK 0x20a0 | ||
183 | MX28_PAD_SSP1_SCK__SSP1_SCK 0x20c0 | ||
184 | MX28_PAD_SSP1_CMD__SSP1_CMD 0x20d0 | ||
185 | MX28_PAD_SSP1_DATA0__SSP1_D0 0x20e0 | ||
186 | MX28_PAD_SSP1_DATA3__SSP1_D3 0x20f0 | ||
187 | MX28_PAD_SSP2_SCK__SSP2_SCK 0x2100 | ||
188 | MX28_PAD_SSP2_MOSI__SSP2_CMD 0x2110 | ||
189 | MX28_PAD_SSP2_MISO__SSP2_D0 0x2120 | ||
190 | MX28_PAD_SSP2_SS0__SSP2_D3 0x2130 | ||
191 | MX28_PAD_SSP2_SS1__SSP2_D4 0x2140 | ||
192 | MX28_PAD_SSP2_SS2__SSP2_D5 0x2150 | ||
193 | MX28_PAD_SSP3_SCK__SSP3_SCK 0x2180 | ||
194 | MX28_PAD_SSP3_MOSI__SSP3_CMD 0x2190 | ||
195 | MX28_PAD_SSP3_MISO__SSP3_D0 0x21a0 | ||
196 | MX28_PAD_SSP3_SS0__SSP3_D3 0x21b0 | ||
197 | MX28_PAD_AUART0_RX__AUART0_RX 0x3000 | ||
198 | MX28_PAD_AUART0_TX__AUART0_TX 0x3010 | ||
199 | MX28_PAD_AUART0_CTS__AUART0_CTS 0x3020 | ||
200 | MX28_PAD_AUART0_RTS__AUART0_RTS 0x3030 | ||
201 | MX28_PAD_AUART1_RX__AUART1_RX 0x3040 | ||
202 | MX28_PAD_AUART1_TX__AUART1_TX 0x3050 | ||
203 | MX28_PAD_AUART1_CTS__AUART1_CTS 0x3060 | ||
204 | MX28_PAD_AUART1_RTS__AUART1_RTS 0x3070 | ||
205 | MX28_PAD_AUART2_RX__AUART2_RX 0x3080 | ||
206 | MX28_PAD_AUART2_TX__AUART2_TX 0x3090 | ||
207 | MX28_PAD_AUART2_CTS__AUART2_CTS 0x30a0 | ||
208 | MX28_PAD_AUART2_RTS__AUART2_RTS 0x30b0 | ||
209 | MX28_PAD_AUART3_RX__AUART3_RX 0x30c0 | ||
210 | MX28_PAD_AUART3_TX__AUART3_TX 0x30d0 | ||
211 | MX28_PAD_AUART3_CTS__AUART3_CTS 0x30e0 | ||
212 | MX28_PAD_AUART3_RTS__AUART3_RTS 0x30f0 | ||
213 | MX28_PAD_PWM0__PWM_0 0x3100 | ||
214 | MX28_PAD_PWM1__PWM_1 0x3110 | ||
215 | MX28_PAD_PWM2__PWM_2 0x3120 | ||
216 | MX28_PAD_SAIF0_MCLK__SAIF0_MCLK 0x3140 | ||
217 | MX28_PAD_SAIF0_LRCLK__SAIF0_LRCLK 0x3150 | ||
218 | MX28_PAD_SAIF0_BITCLK__SAIF0_BITCLK 0x3160 | ||
219 | MX28_PAD_SAIF0_SDATA0__SAIF0_SDATA0 0x3170 | ||
220 | MX28_PAD_I2C0_SCL__I2C0_SCL 0x3180 | ||
221 | MX28_PAD_I2C0_SDA__I2C0_SDA 0x3190 | ||
222 | MX28_PAD_SAIF1_SDATA0__SAIF1_SDATA0 0x31a0 | ||
223 | MX28_PAD_SPDIF__SPDIF_TX 0x31b0 | ||
224 | MX28_PAD_PWM3__PWM_3 0x31c0 | ||
225 | MX28_PAD_PWM4__PWM_4 0x31d0 | ||
226 | MX28_PAD_LCD_RESET__LCD_RESET 0x31e0 | ||
227 | MX28_PAD_ENET0_MDC__ENET0_MDC 0x4000 | ||
228 | MX28_PAD_ENET0_MDIO__ENET0_MDIO 0x4010 | ||
229 | MX28_PAD_ENET0_RX_EN__ENET0_RX_EN 0x4020 | ||
230 | MX28_PAD_ENET0_RXD0__ENET0_RXD0 0x4030 | ||
231 | MX28_PAD_ENET0_RXD1__ENET0_RXD1 0x4040 | ||
232 | MX28_PAD_ENET0_TX_CLK__ENET0_TX_CLK 0x4050 | ||
233 | MX28_PAD_ENET0_TX_EN__ENET0_TX_EN 0x4060 | ||
234 | MX28_PAD_ENET0_TXD0__ENET0_TXD0 0x4070 | ||
235 | MX28_PAD_ENET0_TXD1__ENET0_TXD1 0x4080 | ||
236 | MX28_PAD_ENET0_RXD2__ENET0_RXD2 0x4090 | ||
237 | MX28_PAD_ENET0_RXD3__ENET0_RXD3 0x40a0 | ||
238 | MX28_PAD_ENET0_TXD2__ENET0_TXD2 0x40b0 | ||
239 | MX28_PAD_ENET0_TXD3__ENET0_TXD3 0x40c0 | ||
240 | MX28_PAD_ENET0_RX_CLK__ENET0_RX_CLK 0x40d0 | ||
241 | MX28_PAD_ENET0_COL__ENET0_COL 0x40e0 | ||
242 | MX28_PAD_ENET0_CRS__ENET0_CRS 0x40f0 | ||
243 | MX28_PAD_ENET_CLK__CLKCTRL_ENET 0x4100 | ||
244 | MX28_PAD_JTAG_RTCK__JTAG_RTCK 0x4140 | ||
245 | MX28_PAD_EMI_D00__EMI_DATA0 0x5000 | ||
246 | MX28_PAD_EMI_D01__EMI_DATA1 0x5010 | ||
247 | MX28_PAD_EMI_D02__EMI_DATA2 0x5020 | ||
248 | MX28_PAD_EMI_D03__EMI_DATA3 0x5030 | ||
249 | MX28_PAD_EMI_D04__EMI_DATA4 0x5040 | ||
250 | MX28_PAD_EMI_D05__EMI_DATA5 0x5050 | ||
251 | MX28_PAD_EMI_D06__EMI_DATA6 0x5060 | ||
252 | MX28_PAD_EMI_D07__EMI_DATA7 0x5070 | ||
253 | MX28_PAD_EMI_D08__EMI_DATA8 0x5080 | ||
254 | MX28_PAD_EMI_D09__EMI_DATA9 0x5090 | ||
255 | MX28_PAD_EMI_D10__EMI_DATA10 0x50a0 | ||
256 | MX28_PAD_EMI_D11__EMI_DATA11 0x50b0 | ||
257 | MX28_PAD_EMI_D12__EMI_DATA12 0x50c0 | ||
258 | MX28_PAD_EMI_D13__EMI_DATA13 0x50d0 | ||
259 | MX28_PAD_EMI_D14__EMI_DATA14 0x50e0 | ||
260 | MX28_PAD_EMI_D15__EMI_DATA15 0x50f0 | ||
261 | MX28_PAD_EMI_ODT0__EMI_ODT0 0x5100 | ||
262 | MX28_PAD_EMI_DQM0__EMI_DQM0 0x5110 | ||
263 | MX28_PAD_EMI_ODT1__EMI_ODT1 0x5120 | ||
264 | MX28_PAD_EMI_DQM1__EMI_DQM1 0x5130 | ||
265 | MX28_PAD_EMI_DDR_OPEN_FB__EMI_DDR_OPEN_FEEDBACK 0x5140 | ||
266 | MX28_PAD_EMI_CLK__EMI_CLK 0x5150 | ||
267 | MX28_PAD_EMI_DQS0__EMI_DQS0 0x5160 | ||
268 | MX28_PAD_EMI_DQS1__EMI_DQS1 0x5170 | ||
269 | MX28_PAD_EMI_DDR_OPEN__EMI_DDR_OPEN 0x51a0 | ||
270 | MX28_PAD_EMI_A00__EMI_ADDR0 0x6000 | ||
271 | MX28_PAD_EMI_A01__EMI_ADDR1 0x6010 | ||
272 | MX28_PAD_EMI_A02__EMI_ADDR2 0x6020 | ||
273 | MX28_PAD_EMI_A03__EMI_ADDR3 0x6030 | ||
274 | MX28_PAD_EMI_A04__EMI_ADDR4 0x6040 | ||
275 | MX28_PAD_EMI_A05__EMI_ADDR5 0x6050 | ||
276 | MX28_PAD_EMI_A06__EMI_ADDR6 0x6060 | ||
277 | MX28_PAD_EMI_A07__EMI_ADDR7 0x6070 | ||
278 | MX28_PAD_EMI_A08__EMI_ADDR8 0x6080 | ||
279 | MX28_PAD_EMI_A09__EMI_ADDR9 0x6090 | ||
280 | MX28_PAD_EMI_A10__EMI_ADDR10 0x60a0 | ||
281 | MX28_PAD_EMI_A11__EMI_ADDR11 0x60b0 | ||
282 | MX28_PAD_EMI_A12__EMI_ADDR12 0x60c0 | ||
283 | MX28_PAD_EMI_A13__EMI_ADDR13 0x60d0 | ||
284 | MX28_PAD_EMI_A14__EMI_ADDR14 0x60e0 | ||
285 | MX28_PAD_EMI_BA0__EMI_BA0 0x6100 | ||
286 | MX28_PAD_EMI_BA1__EMI_BA1 0x6110 | ||
287 | MX28_PAD_EMI_BA2__EMI_BA2 0x6120 | ||
288 | MX28_PAD_EMI_CASN__EMI_CASN 0x6130 | ||
289 | MX28_PAD_EMI_RASN__EMI_RASN 0x6140 | ||
290 | MX28_PAD_EMI_WEN__EMI_WEN 0x6150 | ||
291 | MX28_PAD_EMI_CE0N__EMI_CE0N 0x6160 | ||
292 | MX28_PAD_EMI_CE1N__EMI_CE1N 0x6170 | ||
293 | MX28_PAD_EMI_CKE__EMI_CKE 0x6180 | ||
294 | MX28_PAD_GPMI_D00__SSP1_D0 0x0001 | ||
295 | MX28_PAD_GPMI_D01__SSP1_D1 0x0011 | ||
296 | MX28_PAD_GPMI_D02__SSP1_D2 0x0021 | ||
297 | MX28_PAD_GPMI_D03__SSP1_D3 0x0031 | ||
298 | MX28_PAD_GPMI_D04__SSP1_D4 0x0041 | ||
299 | MX28_PAD_GPMI_D05__SSP1_D5 0x0051 | ||
300 | MX28_PAD_GPMI_D06__SSP1_D6 0x0061 | ||
301 | MX28_PAD_GPMI_D07__SSP1_D7 0x0071 | ||
302 | MX28_PAD_GPMI_CE0N__SSP3_D0 0x0101 | ||
303 | MX28_PAD_GPMI_CE1N__SSP3_D3 0x0111 | ||
304 | MX28_PAD_GPMI_CE2N__CAN1_TX 0x0121 | ||
305 | MX28_PAD_GPMI_CE3N__CAN1_RX 0x0131 | ||
306 | MX28_PAD_GPMI_RDY0__SSP1_CARD_DETECT 0x0141 | ||
307 | MX28_PAD_GPMI_RDY1__SSP1_CMD 0x0151 | ||
308 | MX28_PAD_GPMI_RDY2__CAN0_TX 0x0161 | ||
309 | MX28_PAD_GPMI_RDY3__CAN0_RX 0x0171 | ||
310 | MX28_PAD_GPMI_RDN__SSP3_SCK 0x0181 | ||
311 | MX28_PAD_GPMI_WRN__SSP1_SCK 0x0191 | ||
312 | MX28_PAD_GPMI_ALE__SSP3_D1 0x01a1 | ||
313 | MX28_PAD_GPMI_CLE__SSP3_D2 0x01b1 | ||
314 | MX28_PAD_GPMI_RESETN__SSP3_CMD 0x01c1 | ||
315 | MX28_PAD_LCD_D03__ETM_DA8 0x1031 | ||
316 | MX28_PAD_LCD_D04__ETM_DA9 0x1041 | ||
317 | MX28_PAD_LCD_D08__ETM_DA3 0x1081 | ||
318 | MX28_PAD_LCD_D09__ETM_DA4 0x1091 | ||
319 | MX28_PAD_LCD_D20__ENET1_1588_EVENT2_OUT 0x1141 | ||
320 | MX28_PAD_LCD_D21__ENET1_1588_EVENT2_IN 0x1151 | ||
321 | MX28_PAD_LCD_D22__ENET1_1588_EVENT3_OUT 0x1161 | ||
322 | MX28_PAD_LCD_D23__ENET1_1588_EVENT3_IN 0x1171 | ||
323 | MX28_PAD_LCD_RD_E__LCD_VSYNC 0x1181 | ||
324 | MX28_PAD_LCD_WR_RWN__LCD_HSYNC 0x1191 | ||
325 | MX28_PAD_LCD_RS__LCD_DOTCLK 0x11a1 | ||
326 | MX28_PAD_LCD_CS__LCD_ENABLE 0x11b1 | ||
327 | MX28_PAD_LCD_VSYNC__SAIF1_SDATA0 0x11c1 | ||
328 | MX28_PAD_LCD_HSYNC__SAIF1_SDATA1 0x11d1 | ||
329 | MX28_PAD_LCD_DOTCLK__SAIF1_MCLK 0x11e1 | ||
330 | MX28_PAD_SSP0_DATA4__SSP2_D0 0x2041 | ||
331 | MX28_PAD_SSP0_DATA5__SSP2_D3 0x2051 | ||
332 | MX28_PAD_SSP0_DATA6__SSP2_CMD 0x2061 | ||
333 | MX28_PAD_SSP0_DATA7__SSP2_SCK 0x2071 | ||
334 | MX28_PAD_SSP1_SCK__SSP2_D1 0x20c1 | ||
335 | MX28_PAD_SSP1_CMD__SSP2_D2 0x20d1 | ||
336 | MX28_PAD_SSP1_DATA0__SSP2_D6 0x20e1 | ||
337 | MX28_PAD_SSP1_DATA3__SSP2_D7 0x20f1 | ||
338 | MX28_PAD_SSP2_SCK__AUART2_RX 0x2101 | ||
339 | MX28_PAD_SSP2_MOSI__AUART2_TX 0x2111 | ||
340 | MX28_PAD_SSP2_MISO__AUART3_RX 0x2121 | ||
341 | MX28_PAD_SSP2_SS0__AUART3_TX 0x2131 | ||
342 | MX28_PAD_SSP2_SS1__SSP2_D1 0x2141 | ||
343 | MX28_PAD_SSP2_SS2__SSP2_D2 0x2151 | ||
344 | MX28_PAD_SSP3_SCK__AUART4_TX 0x2181 | ||
345 | MX28_PAD_SSP3_MOSI__AUART4_RX 0x2191 | ||
346 | MX28_PAD_SSP3_MISO__AUART4_RTS 0x21a1 | ||
347 | MX28_PAD_SSP3_SS0__AUART4_CTS 0x21b1 | ||
348 | MX28_PAD_AUART0_RX__I2C0_SCL 0x3001 | ||
349 | MX28_PAD_AUART0_TX__I2C0_SDA 0x3011 | ||
350 | MX28_PAD_AUART0_CTS__AUART4_RX 0x3021 | ||
351 | MX28_PAD_AUART0_RTS__AUART4_TX 0x3031 | ||
352 | MX28_PAD_AUART1_RX__SSP2_CARD_DETECT 0x3041 | ||
353 | MX28_PAD_AUART1_TX__SSP3_CARD_DETECT 0x3051 | ||
354 | MX28_PAD_AUART1_CTS__USB0_OVERCURRENT 0x3061 | ||
355 | MX28_PAD_AUART1_RTS__USB0_ID 0x3071 | ||
356 | MX28_PAD_AUART2_RX__SSP3_D1 0x3081 | ||
357 | MX28_PAD_AUART2_TX__SSP3_D2 0x3091 | ||
358 | MX28_PAD_AUART2_CTS__I2C1_SCL 0x30a1 | ||
359 | MX28_PAD_AUART2_RTS__I2C1_SDA 0x30b1 | ||
360 | MX28_PAD_AUART3_RX__CAN0_TX 0x30c1 | ||
361 | MX28_PAD_AUART3_TX__CAN0_RX 0x30d1 | ||
362 | MX28_PAD_AUART3_CTS__CAN1_TX 0x30e1 | ||
363 | MX28_PAD_AUART3_RTS__CAN1_RX 0x30f1 | ||
364 | MX28_PAD_PWM0__I2C1_SCL 0x3101 | ||
365 | MX28_PAD_PWM1__I2C1_SDA 0x3111 | ||
366 | MX28_PAD_PWM2__USB0_ID 0x3121 | ||
367 | MX28_PAD_SAIF0_MCLK__PWM_3 0x3141 | ||
368 | MX28_PAD_SAIF0_LRCLK__PWM_4 0x3151 | ||
369 | MX28_PAD_SAIF0_BITCLK__PWM_5 0x3161 | ||
370 | MX28_PAD_SAIF0_SDATA0__PWM_6 0x3171 | ||
371 | MX28_PAD_I2C0_SCL__TIMROT_ROTARYA 0x3181 | ||
372 | MX28_PAD_I2C0_SDA__TIMROT_ROTARYB 0x3191 | ||
373 | MX28_PAD_SAIF1_SDATA0__PWM_7 0x31a1 | ||
374 | MX28_PAD_LCD_RESET__LCD_VSYNC 0x31e1 | ||
375 | MX28_PAD_ENET0_MDC__GPMI_CE4N 0x4001 | ||
376 | MX28_PAD_ENET0_MDIO__GPMI_CE5N 0x4011 | ||
377 | MX28_PAD_ENET0_RX_EN__GPMI_CE6N 0x4021 | ||
378 | MX28_PAD_ENET0_RXD0__GPMI_CE7N 0x4031 | ||
379 | MX28_PAD_ENET0_RXD1__GPMI_READY4 0x4041 | ||
380 | MX28_PAD_ENET0_TX_CLK__HSADC_TRIGGER 0x4051 | ||
381 | MX28_PAD_ENET0_TX_EN__GPMI_READY5 0x4061 | ||
382 | MX28_PAD_ENET0_TXD0__GPMI_READY6 0x4071 | ||
383 | MX28_PAD_ENET0_TXD1__GPMI_READY7 0x4081 | ||
384 | MX28_PAD_ENET0_RXD2__ENET1_RXD0 0x4091 | ||
385 | MX28_PAD_ENET0_RXD3__ENET1_RXD1 0x40a1 | ||
386 | MX28_PAD_ENET0_TXD2__ENET1_TXD0 0x40b1 | ||
387 | MX28_PAD_ENET0_TXD3__ENET1_TXD1 0x40c1 | ||
388 | MX28_PAD_ENET0_RX_CLK__ENET0_RX_ER 0x40d1 | ||
389 | MX28_PAD_ENET0_COL__ENET1_TX_EN 0x40e1 | ||
390 | MX28_PAD_ENET0_CRS__ENET1_RX_EN 0x40f1 | ||
391 | MX28_PAD_GPMI_CE2N__ENET0_RX_ER 0x0122 | ||
392 | MX28_PAD_GPMI_CE3N__SAIF1_MCLK 0x0132 | ||
393 | MX28_PAD_GPMI_RDY0__USB0_ID 0x0142 | ||
394 | MX28_PAD_GPMI_RDY2__ENET0_TX_ER 0x0162 | ||
395 | MX28_PAD_GPMI_RDY3__HSADC_TRIGGER 0x0172 | ||
396 | MX28_PAD_GPMI_ALE__SSP3_D4 0x01a2 | ||
397 | MX28_PAD_GPMI_CLE__SSP3_D5 0x01b2 | ||
398 | MX28_PAD_LCD_D00__ETM_DA0 0x1002 | ||
399 | MX28_PAD_LCD_D01__ETM_DA1 0x1012 | ||
400 | MX28_PAD_LCD_D02__ETM_DA2 0x1022 | ||
401 | MX28_PAD_LCD_D03__ETM_DA3 0x1032 | ||
402 | MX28_PAD_LCD_D04__ETM_DA4 0x1042 | ||
403 | MX28_PAD_LCD_D05__ETM_DA5 0x1052 | ||
404 | MX28_PAD_LCD_D06__ETM_DA6 0x1062 | ||
405 | MX28_PAD_LCD_D07__ETM_DA7 0x1072 | ||
406 | MX28_PAD_LCD_D08__ETM_DA8 0x1082 | ||
407 | MX28_PAD_LCD_D09__ETM_DA9 0x1092 | ||
408 | MX28_PAD_LCD_D10__ETM_DA10 0x10a2 | ||
409 | MX28_PAD_LCD_D11__ETM_DA11 0x10b2 | ||
410 | MX28_PAD_LCD_D12__ETM_DA12 0x10c2 | ||
411 | MX28_PAD_LCD_D13__ETM_DA13 0x10d2 | ||
412 | MX28_PAD_LCD_D14__ETM_DA14 0x10e2 | ||
413 | MX28_PAD_LCD_D15__ETM_DA15 0x10f2 | ||
414 | MX28_PAD_LCD_D16__ETM_DA7 0x1102 | ||
415 | MX28_PAD_LCD_D17__ETM_DA6 0x1112 | ||
416 | MX28_PAD_LCD_D18__ETM_DA5 0x1122 | ||
417 | MX28_PAD_LCD_D19__ETM_DA4 0x1132 | ||
418 | MX28_PAD_LCD_D20__ETM_DA3 0x1142 | ||
419 | MX28_PAD_LCD_D21__ETM_DA2 0x1152 | ||
420 | MX28_PAD_LCD_D22__ETM_DA1 0x1162 | ||
421 | MX28_PAD_LCD_D23__ETM_DA0 0x1172 | ||
422 | MX28_PAD_LCD_RD_E__ETM_TCTL 0x1182 | ||
423 | MX28_PAD_LCD_WR_RWN__ETM_TCLK 0x1192 | ||
424 | MX28_PAD_LCD_HSYNC__ETM_TCTL 0x11d2 | ||
425 | MX28_PAD_LCD_DOTCLK__ETM_TCLK 0x11e2 | ||
426 | MX28_PAD_SSP1_SCK__ENET0_1588_EVENT2_OUT 0x20c2 | ||
427 | MX28_PAD_SSP1_CMD__ENET0_1588_EVENT2_IN 0x20d2 | ||
428 | MX28_PAD_SSP1_DATA0__ENET0_1588_EVENT3_OUT 0x20e2 | ||
429 | MX28_PAD_SSP1_DATA3__ENET0_1588_EVENT3_IN 0x20f2 | ||
430 | MX28_PAD_SSP2_SCK__SAIF0_SDATA1 0x2102 | ||
431 | MX28_PAD_SSP2_MOSI__SAIF0_SDATA2 0x2112 | ||
432 | MX28_PAD_SSP2_MISO__SAIF1_SDATA1 0x2122 | ||
433 | MX28_PAD_SSP2_SS0__SAIF1_SDATA2 0x2132 | ||
434 | MX28_PAD_SSP2_SS1__USB1_OVERCURRENT 0x2142 | ||
435 | MX28_PAD_SSP2_SS2__USB0_OVERCURRENT 0x2152 | ||
436 | MX28_PAD_SSP3_SCK__ENET1_1588_EVENT0_OUT 0x2182 | ||
437 | MX28_PAD_SSP3_MOSI__ENET1_1588_EVENT0_IN 0x2192 | ||
438 | MX28_PAD_SSP3_MISO__ENET1_1588_EVENT1_OUT 0x21a2 | ||
439 | MX28_PAD_SSP3_SS0__ENET1_1588_EVENT1_IN 0x21b2 | ||
440 | MX28_PAD_AUART0_RX__DUART_CTS 0x3002 | ||
441 | MX28_PAD_AUART0_TX__DUART_RTS 0x3012 | ||
442 | MX28_PAD_AUART0_CTS__DUART_RX 0x3022 | ||
443 | MX28_PAD_AUART0_RTS__DUART_TX 0x3032 | ||
444 | MX28_PAD_AUART1_RX__PWM_0 0x3042 | ||
445 | MX28_PAD_AUART1_TX__PWM_1 0x3052 | ||
446 | MX28_PAD_AUART1_CTS__TIMROT_ROTARYA 0x3062 | ||
447 | MX28_PAD_AUART1_RTS__TIMROT_ROTARYB 0x3072 | ||
448 | MX28_PAD_AUART2_RX__SSP3_D4 0x3082 | ||
449 | MX28_PAD_AUART2_TX__SSP3_D5 0x3092 | ||
450 | MX28_PAD_AUART2_CTS__SAIF1_BITCLK 0x30a2 | ||
451 | MX28_PAD_AUART2_RTS__SAIF1_LRCLK 0x30b2 | ||
452 | MX28_PAD_AUART3_RX__ENET0_1588_EVENT0_OUT 0x30c2 | ||
453 | MX28_PAD_AUART3_TX__ENET0_1588_EVENT0_IN 0x30d2 | ||
454 | MX28_PAD_AUART3_CTS__ENET0_1588_EVENT1_OUT 0x30e2 | ||
455 | MX28_PAD_AUART3_RTS__ENET0_1588_EVENT1_IN 0x30f2 | ||
456 | MX28_PAD_PWM0__DUART_RX 0x3102 | ||
457 | MX28_PAD_PWM1__DUART_TX 0x3112 | ||
458 | MX28_PAD_PWM2__USB1_OVERCURRENT 0x3122 | ||
459 | MX28_PAD_SAIF0_MCLK__AUART4_CTS 0x3142 | ||
460 | MX28_PAD_SAIF0_LRCLK__AUART4_RTS 0x3152 | ||
461 | MX28_PAD_SAIF0_BITCLK__AUART4_RX 0x3162 | ||
462 | MX28_PAD_SAIF0_SDATA0__AUART4_TX 0x3172 | ||
463 | MX28_PAD_I2C0_SCL__DUART_RX 0x3182 | ||
464 | MX28_PAD_I2C0_SDA__DUART_TX 0x3192 | ||
465 | MX28_PAD_SAIF1_SDATA0__SAIF0_SDATA1 0x31a2 | ||
466 | MX28_PAD_SPDIF__ENET1_RX_ER 0x31b2 | ||
467 | MX28_PAD_ENET0_MDC__SAIF0_SDATA1 0x4002 | ||
468 | MX28_PAD_ENET0_MDIO__SAIF0_SDATA2 0x4012 | ||
469 | MX28_PAD_ENET0_RX_EN__SAIF1_SDATA1 0x4022 | ||
470 | MX28_PAD_ENET0_RXD0__SAIF1_SDATA2 0x4032 | ||
471 | MX28_PAD_ENET0_TX_CLK__ENET0_1588_EVENT2_OUT 0x4052 | ||
472 | MX28_PAD_ENET0_RXD2__ENET0_1588_EVENT0_OUT 0x4092 | ||
473 | MX28_PAD_ENET0_RXD3__ENET0_1588_EVENT0_IN 0x40a2 | ||
474 | MX28_PAD_ENET0_TXD2__ENET0_1588_EVENT1_OUT 0x40b2 | ||
475 | MX28_PAD_ENET0_TXD3__ENET0_1588_EVENT1_IN 0x40c2 | ||
476 | MX28_PAD_ENET0_RX_CLK__ENET0_1588_EVENT2_IN 0x40d2 | ||
477 | MX28_PAD_ENET0_COL__ENET0_1588_EVENT3_OUT 0x40e2 | ||
478 | MX28_PAD_ENET0_CRS__ENET0_1588_EVENT3_IN 0x40f2 | ||
479 | MX28_PAD_GPMI_D00__GPIO_0_0 0x0003 | ||
480 | MX28_PAD_GPMI_D01__GPIO_0_1 0x0013 | ||
481 | MX28_PAD_GPMI_D02__GPIO_0_2 0x0023 | ||
482 | MX28_PAD_GPMI_D03__GPIO_0_3 0x0033 | ||
483 | MX28_PAD_GPMI_D04__GPIO_0_4 0x0043 | ||
484 | MX28_PAD_GPMI_D05__GPIO_0_5 0x0053 | ||
485 | MX28_PAD_GPMI_D06__GPIO_0_6 0x0063 | ||
486 | MX28_PAD_GPMI_D07__GPIO_0_7 0x0073 | ||
487 | MX28_PAD_GPMI_CE0N__GPIO_0_16 0x0103 | ||
488 | MX28_PAD_GPMI_CE1N__GPIO_0_17 0x0113 | ||
489 | MX28_PAD_GPMI_CE2N__GPIO_0_18 0x0123 | ||
490 | MX28_PAD_GPMI_CE3N__GPIO_0_19 0x0133 | ||
491 | MX28_PAD_GPMI_RDY0__GPIO_0_20 0x0143 | ||
492 | MX28_PAD_GPMI_RDY1__GPIO_0_21 0x0153 | ||
493 | MX28_PAD_GPMI_RDY2__GPIO_0_22 0x0163 | ||
494 | MX28_PAD_GPMI_RDY3__GPIO_0_23 0x0173 | ||
495 | MX28_PAD_GPMI_RDN__GPIO_0_24 0x0183 | ||
496 | MX28_PAD_GPMI_WRN__GPIO_0_25 0x0193 | ||
497 | MX28_PAD_GPMI_ALE__GPIO_0_26 0x01a3 | ||
498 | MX28_PAD_GPMI_CLE__GPIO_0_27 0x01b3 | ||
499 | MX28_PAD_GPMI_RESETN__GPIO_0_28 0x01c3 | ||
500 | MX28_PAD_LCD_D00__GPIO_1_0 0x1003 | ||
501 | MX28_PAD_LCD_D01__GPIO_1_1 0x1013 | ||
502 | MX28_PAD_LCD_D02__GPIO_1_2 0x1023 | ||
503 | MX28_PAD_LCD_D03__GPIO_1_3 0x1033 | ||
504 | MX28_PAD_LCD_D04__GPIO_1_4 0x1043 | ||
505 | MX28_PAD_LCD_D05__GPIO_1_5 0x1053 | ||
506 | MX28_PAD_LCD_D06__GPIO_1_6 0x1063 | ||
507 | MX28_PAD_LCD_D07__GPIO_1_7 0x1073 | ||
508 | MX28_PAD_LCD_D08__GPIO_1_8 0x1083 | ||
509 | MX28_PAD_LCD_D09__GPIO_1_9 0x1093 | ||
510 | MX28_PAD_LCD_D10__GPIO_1_10 0x10a3 | ||
511 | MX28_PAD_LCD_D11__GPIO_1_11 0x10b3 | ||
512 | MX28_PAD_LCD_D12__GPIO_1_12 0x10c3 | ||
513 | MX28_PAD_LCD_D13__GPIO_1_13 0x10d3 | ||
514 | MX28_PAD_LCD_D14__GPIO_1_14 0x10e3 | ||
515 | MX28_PAD_LCD_D15__GPIO_1_15 0x10f3 | ||
516 | MX28_PAD_LCD_D16__GPIO_1_16 0x1103 | ||
517 | MX28_PAD_LCD_D17__GPIO_1_17 0x1113 | ||
518 | MX28_PAD_LCD_D18__GPIO_1_18 0x1123 | ||
519 | MX28_PAD_LCD_D19__GPIO_1_19 0x1133 | ||
520 | MX28_PAD_LCD_D20__GPIO_1_20 0x1143 | ||
521 | MX28_PAD_LCD_D21__GPIO_1_21 0x1153 | ||
522 | MX28_PAD_LCD_D22__GPIO_1_22 0x1163 | ||
523 | MX28_PAD_LCD_D23__GPIO_1_23 0x1173 | ||
524 | MX28_PAD_LCD_RD_E__GPIO_1_24 0x1183 | ||
525 | MX28_PAD_LCD_WR_RWN__GPIO_1_25 0x1193 | ||
526 | MX28_PAD_LCD_RS__GPIO_1_26 0x11a3 | ||
527 | MX28_PAD_LCD_CS__GPIO_1_27 0x11b3 | ||
528 | MX28_PAD_LCD_VSYNC__GPIO_1_28 0x11c3 | ||
529 | MX28_PAD_LCD_HSYNC__GPIO_1_29 0x11d3 | ||
530 | MX28_PAD_LCD_DOTCLK__GPIO_1_30 0x11e3 | ||
531 | MX28_PAD_LCD_ENABLE__GPIO_1_31 0x11f3 | ||
532 | MX28_PAD_SSP0_DATA0__GPIO_2_0 0x2003 | ||
533 | MX28_PAD_SSP0_DATA1__GPIO_2_1 0x2013 | ||
534 | MX28_PAD_SSP0_DATA2__GPIO_2_2 0x2023 | ||
535 | MX28_PAD_SSP0_DATA3__GPIO_2_3 0x2033 | ||
536 | MX28_PAD_SSP0_DATA4__GPIO_2_4 0x2043 | ||
537 | MX28_PAD_SSP0_DATA5__GPIO_2_5 0x2053 | ||
538 | MX28_PAD_SSP0_DATA6__GPIO_2_6 0x2063 | ||
539 | MX28_PAD_SSP0_DATA7__GPIO_2_7 0x2073 | ||
540 | MX28_PAD_SSP0_CMD__GPIO_2_8 0x2083 | ||
541 | MX28_PAD_SSP0_DETECT__GPIO_2_9 0x2093 | ||
542 | MX28_PAD_SSP0_SCK__GPIO_2_10 0x20a3 | ||
543 | MX28_PAD_SSP1_SCK__GPIO_2_12 0x20c3 | ||
544 | MX28_PAD_SSP1_CMD__GPIO_2_13 0x20d3 | ||
545 | MX28_PAD_SSP1_DATA0__GPIO_2_14 0x20e3 | ||
546 | MX28_PAD_SSP1_DATA3__GPIO_2_15 0x20f3 | ||
547 | MX28_PAD_SSP2_SCK__GPIO_2_16 0x2103 | ||
548 | MX28_PAD_SSP2_MOSI__GPIO_2_17 0x2113 | ||
549 | MX28_PAD_SSP2_MISO__GPIO_2_18 0x2123 | ||
550 | MX28_PAD_SSP2_SS0__GPIO_2_19 0x2133 | ||
551 | MX28_PAD_SSP2_SS1__GPIO_2_20 0x2143 | ||
552 | MX28_PAD_SSP2_SS2__GPIO_2_21 0x2153 | ||
553 | MX28_PAD_SSP3_SCK__GPIO_2_24 0x2183 | ||
554 | MX28_PAD_SSP3_MOSI__GPIO_2_25 0x2193 | ||
555 | MX28_PAD_SSP3_MISO__GPIO_2_26 0x21a3 | ||
556 | MX28_PAD_SSP3_SS0__GPIO_2_27 0x21b3 | ||
557 | MX28_PAD_AUART0_RX__GPIO_3_0 0x3003 | ||
558 | MX28_PAD_AUART0_TX__GPIO_3_1 0x3013 | ||
559 | MX28_PAD_AUART0_CTS__GPIO_3_2 0x3023 | ||
560 | MX28_PAD_AUART0_RTS__GPIO_3_3 0x3033 | ||
561 | MX28_PAD_AUART1_RX__GPIO_3_4 0x3043 | ||
562 | MX28_PAD_AUART1_TX__GPIO_3_5 0x3053 | ||
563 | MX28_PAD_AUART1_CTS__GPIO_3_6 0x3063 | ||
564 | MX28_PAD_AUART1_RTS__GPIO_3_7 0x3073 | ||
565 | MX28_PAD_AUART2_RX__GPIO_3_8 0x3083 | ||
566 | MX28_PAD_AUART2_TX__GPIO_3_9 0x3093 | ||
567 | MX28_PAD_AUART2_CTS__GPIO_3_10 0x30a3 | ||
568 | MX28_PAD_AUART2_RTS__GPIO_3_11 0x30b3 | ||
569 | MX28_PAD_AUART3_RX__GPIO_3_12 0x30c3 | ||
570 | MX28_PAD_AUART3_TX__GPIO_3_13 0x30d3 | ||
571 | MX28_PAD_AUART3_CTS__GPIO_3_14 0x30e3 | ||
572 | MX28_PAD_AUART3_RTS__GPIO_3_15 0x30f3 | ||
573 | MX28_PAD_PWM0__GPIO_3_16 0x3103 | ||
574 | MX28_PAD_PWM1__GPIO_3_17 0x3113 | ||
575 | MX28_PAD_PWM2__GPIO_3_18 0x3123 | ||
576 | MX28_PAD_SAIF0_MCLK__GPIO_3_20 0x3143 | ||
577 | MX28_PAD_SAIF0_LRCLK__GPIO_3_21 0x3153 | ||
578 | MX28_PAD_SAIF0_BITCLK__GPIO_3_22 0x3163 | ||
579 | MX28_PAD_SAIF0_SDATA0__GPIO_3_23 0x3173 | ||
580 | MX28_PAD_I2C0_SCL__GPIO_3_24 0x3183 | ||
581 | MX28_PAD_I2C0_SDA__GPIO_3_25 0x3193 | ||
582 | MX28_PAD_SAIF1_SDATA0__GPIO_3_26 0x31a3 | ||
583 | MX28_PAD_SPDIF__GPIO_3_27 0x31b3 | ||
584 | MX28_PAD_PWM3__GPIO_3_28 0x31c3 | ||
585 | MX28_PAD_PWM4__GPIO_3_29 0x31d3 | ||
586 | MX28_PAD_LCD_RESET__GPIO_3_30 0x31e3 | ||
587 | MX28_PAD_ENET0_MDC__GPIO_4_0 0x4003 | ||
588 | MX28_PAD_ENET0_MDIO__GPIO_4_1 0x4013 | ||
589 | MX28_PAD_ENET0_RX_EN__GPIO_4_2 0x4023 | ||
590 | MX28_PAD_ENET0_RXD0__GPIO_4_3 0x4033 | ||
591 | MX28_PAD_ENET0_RXD1__GPIO_4_4 0x4043 | ||
592 | MX28_PAD_ENET0_TX_CLK__GPIO_4_5 0x4053 | ||
593 | MX28_PAD_ENET0_TX_EN__GPIO_4_6 0x4063 | ||
594 | MX28_PAD_ENET0_TXD0__GPIO_4_7 0x4073 | ||
595 | MX28_PAD_ENET0_TXD1__GPIO_4_8 0x4083 | ||
596 | MX28_PAD_ENET0_RXD2__GPIO_4_9 0x4093 | ||
597 | MX28_PAD_ENET0_RXD3__GPIO_4_10 0x40a3 | ||
598 | MX28_PAD_ENET0_TXD2__GPIO_4_11 0x40b3 | ||
599 | MX28_PAD_ENET0_TXD3__GPIO_4_12 0x40c3 | ||
600 | MX28_PAD_ENET0_RX_CLK__GPIO_4_13 0x40d3 | ||
601 | MX28_PAD_ENET0_COL__GPIO_4_14 0x40e3 | ||
602 | MX28_PAD_ENET0_CRS__GPIO_4_15 0x40f3 | ||
603 | MX28_PAD_ENET_CLK__GPIO_4_16 0x4103 | ||
604 | MX28_PAD_JTAG_RTCK__GPIO_4_20 0x4143 | ||
605 | |||
606 | Valid values for i.MX23 pinmux-id: | ||
607 | |||
608 | pinmux id | ||
609 | ------ -- | ||
610 | MX23_PAD_GPMI_D00__GPMI_D00 0x0000 | ||
611 | MX23_PAD_GPMI_D01__GPMI_D01 0x0010 | ||
612 | MX23_PAD_GPMI_D02__GPMI_D02 0x0020 | ||
613 | MX23_PAD_GPMI_D03__GPMI_D03 0x0030 | ||
614 | MX23_PAD_GPMI_D04__GPMI_D04 0x0040 | ||
615 | MX23_PAD_GPMI_D05__GPMI_D05 0x0050 | ||
616 | MX23_PAD_GPMI_D06__GPMI_D06 0x0060 | ||
617 | MX23_PAD_GPMI_D07__GPMI_D07 0x0070 | ||
618 | MX23_PAD_GPMI_D08__GPMI_D08 0x0080 | ||
619 | MX23_PAD_GPMI_D09__GPMI_D09 0x0090 | ||
620 | MX23_PAD_GPMI_D10__GPMI_D10 0x00a0 | ||
621 | MX23_PAD_GPMI_D11__GPMI_D11 0x00b0 | ||
622 | MX23_PAD_GPMI_D12__GPMI_D12 0x00c0 | ||
623 | MX23_PAD_GPMI_D13__GPMI_D13 0x00d0 | ||
624 | MX23_PAD_GPMI_D14__GPMI_D14 0x00e0 | ||
625 | MX23_PAD_GPMI_D15__GPMI_D15 0x00f0 | ||
626 | MX23_PAD_GPMI_CLE__GPMI_CLE 0x0100 | ||
627 | MX23_PAD_GPMI_ALE__GPMI_ALE 0x0110 | ||
628 | MX23_PAD_GPMI_CE2N__GPMI_CE2N 0x0120 | ||
629 | MX23_PAD_GPMI_RDY0__GPMI_RDY0 0x0130 | ||
630 | MX23_PAD_GPMI_RDY1__GPMI_RDY1 0x0140 | ||
631 | MX23_PAD_GPMI_RDY2__GPMI_RDY2 0x0150 | ||
632 | MX23_PAD_GPMI_RDY3__GPMI_RDY3 0x0160 | ||
633 | MX23_PAD_GPMI_WPN__GPMI_WPN 0x0170 | ||
634 | MX23_PAD_GPMI_WRN__GPMI_WRN 0x0180 | ||
635 | MX23_PAD_GPMI_RDN__GPMI_RDN 0x0190 | ||
636 | MX23_PAD_AUART1_CTS__AUART1_CTS 0x01a0 | ||
637 | MX23_PAD_AUART1_RTS__AUART1_RTS 0x01b0 | ||
638 | MX23_PAD_AUART1_RX__AUART1_RX 0x01c0 | ||
639 | MX23_PAD_AUART1_TX__AUART1_TX 0x01d0 | ||
640 | MX23_PAD_I2C_SCL__I2C_SCL 0x01e0 | ||
641 | MX23_PAD_I2C_SDA__I2C_SDA 0x01f0 | ||
642 | MX23_PAD_LCD_D00__LCD_D00 0x1000 | ||
643 | MX23_PAD_LCD_D01__LCD_D01 0x1010 | ||
644 | MX23_PAD_LCD_D02__LCD_D02 0x1020 | ||
645 | MX23_PAD_LCD_D03__LCD_D03 0x1030 | ||
646 | MX23_PAD_LCD_D04__LCD_D04 0x1040 | ||
647 | MX23_PAD_LCD_D05__LCD_D05 0x1050 | ||
648 | MX23_PAD_LCD_D06__LCD_D06 0x1060 | ||
649 | MX23_PAD_LCD_D07__LCD_D07 0x1070 | ||
650 | MX23_PAD_LCD_D08__LCD_D08 0x1080 | ||
651 | MX23_PAD_LCD_D09__LCD_D09 0x1090 | ||
652 | MX23_PAD_LCD_D10__LCD_D10 0x10a0 | ||
653 | MX23_PAD_LCD_D11__LCD_D11 0x10b0 | ||
654 | MX23_PAD_LCD_D12__LCD_D12 0x10c0 | ||
655 | MX23_PAD_LCD_D13__LCD_D13 0x10d0 | ||
656 | MX23_PAD_LCD_D14__LCD_D14 0x10e0 | ||
657 | MX23_PAD_LCD_D15__LCD_D15 0x10f0 | ||
658 | MX23_PAD_LCD_D16__LCD_D16 0x1100 | ||
659 | MX23_PAD_LCD_D17__LCD_D17 0x1110 | ||
660 | MX23_PAD_LCD_RESET__LCD_RESET 0x1120 | ||
661 | MX23_PAD_LCD_RS__LCD_RS 0x1130 | ||
662 | MX23_PAD_LCD_WR__LCD_WR 0x1140 | ||
663 | MX23_PAD_LCD_CS__LCD_CS 0x1150 | ||
664 | MX23_PAD_LCD_DOTCK__LCD_DOTCK 0x1160 | ||
665 | MX23_PAD_LCD_ENABLE__LCD_ENABLE 0x1170 | ||
666 | MX23_PAD_LCD_HSYNC__LCD_HSYNC 0x1180 | ||
667 | MX23_PAD_LCD_VSYNC__LCD_VSYNC 0x1190 | ||
668 | MX23_PAD_PWM0__PWM0 0x11a0 | ||
669 | MX23_PAD_PWM1__PWM1 0x11b0 | ||
670 | MX23_PAD_PWM2__PWM2 0x11c0 | ||
671 | MX23_PAD_PWM3__PWM3 0x11d0 | ||
672 | MX23_PAD_PWM4__PWM4 0x11e0 | ||
673 | MX23_PAD_SSP1_CMD__SSP1_CMD 0x2000 | ||
674 | MX23_PAD_SSP1_DETECT__SSP1_DETECT 0x2010 | ||
675 | MX23_PAD_SSP1_DATA0__SSP1_DATA0 0x2020 | ||
676 | MX23_PAD_SSP1_DATA1__SSP1_DATA1 0x2030 | ||
677 | MX23_PAD_SSP1_DATA2__SSP1_DATA2 0x2040 | ||
678 | MX23_PAD_SSP1_DATA3__SSP1_DATA3 0x2050 | ||
679 | MX23_PAD_SSP1_SCK__SSP1_SCK 0x2060 | ||
680 | MX23_PAD_ROTARYA__ROTARYA 0x2070 | ||
681 | MX23_PAD_ROTARYB__ROTARYB 0x2080 | ||
682 | MX23_PAD_EMI_A00__EMI_A00 0x2090 | ||
683 | MX23_PAD_EMI_A01__EMI_A01 0x20a0 | ||
684 | MX23_PAD_EMI_A02__EMI_A02 0x20b0 | ||
685 | MX23_PAD_EMI_A03__EMI_A03 0x20c0 | ||
686 | MX23_PAD_EMI_A04__EMI_A04 0x20d0 | ||
687 | MX23_PAD_EMI_A05__EMI_A05 0x20e0 | ||
688 | MX23_PAD_EMI_A06__EMI_A06 0x20f0 | ||
689 | MX23_PAD_EMI_A07__EMI_A07 0x2100 | ||
690 | MX23_PAD_EMI_A08__EMI_A08 0x2110 | ||
691 | MX23_PAD_EMI_A09__EMI_A09 0x2120 | ||
692 | MX23_PAD_EMI_A10__EMI_A10 0x2130 | ||
693 | MX23_PAD_EMI_A11__EMI_A11 0x2140 | ||
694 | MX23_PAD_EMI_A12__EMI_A12 0x2150 | ||
695 | MX23_PAD_EMI_BA0__EMI_BA0 0x2160 | ||
696 | MX23_PAD_EMI_BA1__EMI_BA1 0x2170 | ||
697 | MX23_PAD_EMI_CASN__EMI_CASN 0x2180 | ||
698 | MX23_PAD_EMI_CE0N__EMI_CE0N 0x2190 | ||
699 | MX23_PAD_EMI_CE1N__EMI_CE1N 0x21a0 | ||
700 | MX23_PAD_GPMI_CE1N__GPMI_CE1N 0x21b0 | ||
701 | MX23_PAD_GPMI_CE0N__GPMI_CE0N 0x21c0 | ||
702 | MX23_PAD_EMI_CKE__EMI_CKE 0x21d0 | ||
703 | MX23_PAD_EMI_RASN__EMI_RASN 0x21e0 | ||
704 | MX23_PAD_EMI_WEN__EMI_WEN 0x21f0 | ||
705 | MX23_PAD_EMI_D00__EMI_D00 0x3000 | ||
706 | MX23_PAD_EMI_D01__EMI_D01 0x3010 | ||
707 | MX23_PAD_EMI_D02__EMI_D02 0x3020 | ||
708 | MX23_PAD_EMI_D03__EMI_D03 0x3030 | ||
709 | MX23_PAD_EMI_D04__EMI_D04 0x3040 | ||
710 | MX23_PAD_EMI_D05__EMI_D05 0x3050 | ||
711 | MX23_PAD_EMI_D06__EMI_D06 0x3060 | ||
712 | MX23_PAD_EMI_D07__EMI_D07 0x3070 | ||
713 | MX23_PAD_EMI_D08__EMI_D08 0x3080 | ||
714 | MX23_PAD_EMI_D09__EMI_D09 0x3090 | ||
715 | MX23_PAD_EMI_D10__EMI_D10 0x30a0 | ||
716 | MX23_PAD_EMI_D11__EMI_D11 0x30b0 | ||
717 | MX23_PAD_EMI_D12__EMI_D12 0x30c0 | ||
718 | MX23_PAD_EMI_D13__EMI_D13 0x30d0 | ||
719 | MX23_PAD_EMI_D14__EMI_D14 0x30e0 | ||
720 | MX23_PAD_EMI_D15__EMI_D15 0x30f0 | ||
721 | MX23_PAD_EMI_DQM0__EMI_DQM0 0x3100 | ||
722 | MX23_PAD_EMI_DQM1__EMI_DQM1 0x3110 | ||
723 | MX23_PAD_EMI_DQS0__EMI_DQS0 0x3120 | ||
724 | MX23_PAD_EMI_DQS1__EMI_DQS1 0x3130 | ||
725 | MX23_PAD_EMI_CLK__EMI_CLK 0x3140 | ||
726 | MX23_PAD_EMI_CLKN__EMI_CLKN 0x3150 | ||
727 | MX23_PAD_GPMI_D00__LCD_D8 0x0001 | ||
728 | MX23_PAD_GPMI_D01__LCD_D9 0x0011 | ||
729 | MX23_PAD_GPMI_D02__LCD_D10 0x0021 | ||
730 | MX23_PAD_GPMI_D03__LCD_D11 0x0031 | ||
731 | MX23_PAD_GPMI_D04__LCD_D12 0x0041 | ||
732 | MX23_PAD_GPMI_D05__LCD_D13 0x0051 | ||
733 | MX23_PAD_GPMI_D06__LCD_D14 0x0061 | ||
734 | MX23_PAD_GPMI_D07__LCD_D15 0x0071 | ||
735 | MX23_PAD_GPMI_D08__LCD_D18 0x0081 | ||
736 | MX23_PAD_GPMI_D09__LCD_D19 0x0091 | ||
737 | MX23_PAD_GPMI_D10__LCD_D20 0x00a1 | ||
738 | MX23_PAD_GPMI_D11__LCD_D21 0x00b1 | ||
739 | MX23_PAD_GPMI_D12__LCD_D22 0x00c1 | ||
740 | MX23_PAD_GPMI_D13__LCD_D23 0x00d1 | ||
741 | MX23_PAD_GPMI_D14__AUART2_RX 0x00e1 | ||
742 | MX23_PAD_GPMI_D15__AUART2_TX 0x00f1 | ||
743 | MX23_PAD_GPMI_CLE__LCD_D16 0x0101 | ||
744 | MX23_PAD_GPMI_ALE__LCD_D17 0x0111 | ||
745 | MX23_PAD_GPMI_CE2N__ATA_A2 0x0121 | ||
746 | MX23_PAD_AUART1_RTS__IR_CLK 0x01b1 | ||
747 | MX23_PAD_AUART1_RX__IR_RX 0x01c1 | ||
748 | MX23_PAD_AUART1_TX__IR_TX 0x01d1 | ||
749 | MX23_PAD_I2C_SCL__GPMI_RDY2 0x01e1 | ||
750 | MX23_PAD_I2C_SDA__GPMI_CE2N 0x01f1 | ||
751 | MX23_PAD_LCD_D00__ETM_DA8 0x1001 | ||
752 | MX23_PAD_LCD_D01__ETM_DA9 0x1011 | ||
753 | MX23_PAD_LCD_D02__ETM_DA10 0x1021 | ||
754 | MX23_PAD_LCD_D03__ETM_DA11 0x1031 | ||
755 | MX23_PAD_LCD_D04__ETM_DA12 0x1041 | ||
756 | MX23_PAD_LCD_D05__ETM_DA13 0x1051 | ||
757 | MX23_PAD_LCD_D06__ETM_DA14 0x1061 | ||
758 | MX23_PAD_LCD_D07__ETM_DA15 0x1071 | ||
759 | MX23_PAD_LCD_D08__ETM_DA0 0x1081 | ||
760 | MX23_PAD_LCD_D09__ETM_DA1 0x1091 | ||
761 | MX23_PAD_LCD_D10__ETM_DA2 0x10a1 | ||
762 | MX23_PAD_LCD_D11__ETM_DA3 0x10b1 | ||
763 | MX23_PAD_LCD_D12__ETM_DA4 0x10c1 | ||
764 | MX23_PAD_LCD_D13__ETM_DA5 0x10d1 | ||
765 | MX23_PAD_LCD_D14__ETM_DA6 0x10e1 | ||
766 | MX23_PAD_LCD_D15__ETM_DA7 0x10f1 | ||
767 | MX23_PAD_LCD_RESET__ETM_TCTL 0x1121 | ||
768 | MX23_PAD_LCD_RS__ETM_TCLK 0x1131 | ||
769 | MX23_PAD_LCD_DOTCK__GPMI_RDY3 0x1161 | ||
770 | MX23_PAD_LCD_ENABLE__I2C_SCL 0x1171 | ||
771 | MX23_PAD_LCD_HSYNC__I2C_SDA 0x1181 | ||
772 | MX23_PAD_LCD_VSYNC__LCD_BUSY 0x1191 | ||
773 | MX23_PAD_PWM0__ROTARYA 0x11a1 | ||
774 | MX23_PAD_PWM1__ROTARYB 0x11b1 | ||
775 | MX23_PAD_PWM2__GPMI_RDY3 0x11c1 | ||
776 | MX23_PAD_PWM3__ETM_TCTL 0x11d1 | ||
777 | MX23_PAD_PWM4__ETM_TCLK 0x11e1 | ||
778 | MX23_PAD_SSP1_DETECT__GPMI_CE3N 0x2011 | ||
779 | MX23_PAD_SSP1_DATA1__I2C_SCL 0x2031 | ||
780 | MX23_PAD_SSP1_DATA2__I2C_SDA 0x2041 | ||
781 | MX23_PAD_ROTARYA__AUART2_RTS 0x2071 | ||
782 | MX23_PAD_ROTARYB__AUART2_CTS 0x2081 | ||
783 | MX23_PAD_GPMI_D00__SSP2_DATA0 0x0002 | ||
784 | MX23_PAD_GPMI_D01__SSP2_DATA1 0x0012 | ||
785 | MX23_PAD_GPMI_D02__SSP2_DATA2 0x0022 | ||
786 | MX23_PAD_GPMI_D03__SSP2_DATA3 0x0032 | ||
787 | MX23_PAD_GPMI_D04__SSP2_DATA4 0x0042 | ||
788 | MX23_PAD_GPMI_D05__SSP2_DATA5 0x0052 | ||
789 | MX23_PAD_GPMI_D06__SSP2_DATA6 0x0062 | ||
790 | MX23_PAD_GPMI_D07__SSP2_DATA7 0x0072 | ||
791 | MX23_PAD_GPMI_D08__SSP1_DATA4 0x0082 | ||
792 | MX23_PAD_GPMI_D09__SSP1_DATA5 0x0092 | ||
793 | MX23_PAD_GPMI_D10__SSP1_DATA6 0x00a2 | ||
794 | MX23_PAD_GPMI_D11__SSP1_DATA7 0x00b2 | ||
795 | MX23_PAD_GPMI_D15__GPMI_CE3N 0x00f2 | ||
796 | MX23_PAD_GPMI_RDY0__SSP2_DETECT 0x0132 | ||
797 | MX23_PAD_GPMI_RDY1__SSP2_CMD 0x0142 | ||
798 | MX23_PAD_GPMI_WRN__SSP2_SCK 0x0182 | ||
799 | MX23_PAD_AUART1_CTS__SSP1_DATA4 0x01a2 | ||
800 | MX23_PAD_AUART1_RTS__SSP1_DATA5 0x01b2 | ||
801 | MX23_PAD_AUART1_RX__SSP1_DATA6 0x01c2 | ||
802 | MX23_PAD_AUART1_TX__SSP1_DATA7 0x01d2 | ||
803 | MX23_PAD_I2C_SCL__AUART1_TX 0x01e2 | ||
804 | MX23_PAD_I2C_SDA__AUART1_RX 0x01f2 | ||
805 | MX23_PAD_LCD_D08__SAIF2_SDATA0 0x1082 | ||
806 | MX23_PAD_LCD_D09__SAIF1_SDATA0 0x1092 | ||
807 | MX23_PAD_LCD_D10__SAIF_MCLK_BITCLK 0x10a2 | ||
808 | MX23_PAD_LCD_D11__SAIF_LRCLK 0x10b2 | ||
809 | MX23_PAD_LCD_D12__SAIF2_SDATA1 0x10c2 | ||
810 | MX23_PAD_LCD_D13__SAIF2_SDATA2 0x10d2 | ||
811 | MX23_PAD_LCD_D14__SAIF1_SDATA2 0x10e2 | ||
812 | MX23_PAD_LCD_D15__SAIF1_SDATA1 0x10f2 | ||
813 | MX23_PAD_LCD_D16__SAIF_ALT_BITCLK 0x1102 | ||
814 | MX23_PAD_LCD_RESET__GPMI_CE3N 0x1122 | ||
815 | MX23_PAD_PWM0__DUART_RX 0x11a2 | ||
816 | MX23_PAD_PWM1__DUART_TX 0x11b2 | ||
817 | MX23_PAD_PWM3__AUART1_CTS 0x11d2 | ||
818 | MX23_PAD_PWM4__AUART1_RTS 0x11e2 | ||
819 | MX23_PAD_SSP1_CMD__JTAG_TDO 0x2002 | ||
820 | MX23_PAD_SSP1_DETECT__USB_OTG_ID 0x2012 | ||
821 | MX23_PAD_SSP1_DATA0__JTAG_TDI 0x2022 | ||
822 | MX23_PAD_SSP1_DATA1__JTAG_TCLK 0x2032 | ||
823 | MX23_PAD_SSP1_DATA2__JTAG_RTCK 0x2042 | ||
824 | MX23_PAD_SSP1_DATA3__JTAG_TMS 0x2052 | ||
825 | MX23_PAD_SSP1_SCK__JTAG_TRST 0x2062 | ||
826 | MX23_PAD_ROTARYA__SPDIF 0x2072 | ||
827 | MX23_PAD_ROTARYB__GPMI_CE3N 0x2082 | ||
828 | MX23_PAD_GPMI_D00__GPIO_0_0 0x0003 | ||
829 | MX23_PAD_GPMI_D01__GPIO_0_1 0x0013 | ||
830 | MX23_PAD_GPMI_D02__GPIO_0_2 0x0023 | ||
831 | MX23_PAD_GPMI_D03__GPIO_0_3 0x0033 | ||
832 | MX23_PAD_GPMI_D04__GPIO_0_4 0x0043 | ||
833 | MX23_PAD_GPMI_D05__GPIO_0_5 0x0053 | ||
834 | MX23_PAD_GPMI_D06__GPIO_0_6 0x0063 | ||
835 | MX23_PAD_GPMI_D07__GPIO_0_7 0x0073 | ||
836 | MX23_PAD_GPMI_D08__GPIO_0_8 0x0083 | ||
837 | MX23_PAD_GPMI_D09__GPIO_0_9 0x0093 | ||
838 | MX23_PAD_GPMI_D10__GPIO_0_10 0x00a3 | ||
839 | MX23_PAD_GPMI_D11__GPIO_0_11 0x00b3 | ||
840 | MX23_PAD_GPMI_D12__GPIO_0_12 0x00c3 | ||
841 | MX23_PAD_GPMI_D13__GPIO_0_13 0x00d3 | ||
842 | MX23_PAD_GPMI_D14__GPIO_0_14 0x00e3 | ||
843 | MX23_PAD_GPMI_D15__GPIO_0_15 0x00f3 | ||
844 | MX23_PAD_GPMI_CLE__GPIO_0_16 0x0103 | ||
845 | MX23_PAD_GPMI_ALE__GPIO_0_17 0x0113 | ||
846 | MX23_PAD_GPMI_CE2N__GPIO_0_18 0x0123 | ||
847 | MX23_PAD_GPMI_RDY0__GPIO_0_19 0x0133 | ||
848 | MX23_PAD_GPMI_RDY1__GPIO_0_20 0x0143 | ||
849 | MX23_PAD_GPMI_RDY2__GPIO_0_21 0x0153 | ||
850 | MX23_PAD_GPMI_RDY3__GPIO_0_22 0x0163 | ||
851 | MX23_PAD_GPMI_WPN__GPIO_0_23 0x0173 | ||
852 | MX23_PAD_GPMI_WRN__GPIO_0_24 0x0183 | ||
853 | MX23_PAD_GPMI_RDN__GPIO_0_25 0x0193 | ||
854 | MX23_PAD_AUART1_CTS__GPIO_0_26 0x01a3 | ||
855 | MX23_PAD_AUART1_RTS__GPIO_0_27 0x01b3 | ||
856 | MX23_PAD_AUART1_RX__GPIO_0_28 0x01c3 | ||
857 | MX23_PAD_AUART1_TX__GPIO_0_29 0x01d3 | ||
858 | MX23_PAD_I2C_SCL__GPIO_0_30 0x01e3 | ||
859 | MX23_PAD_I2C_SDA__GPIO_0_31 0x01f3 | ||
860 | MX23_PAD_LCD_D00__GPIO_1_0 0x1003 | ||
861 | MX23_PAD_LCD_D01__GPIO_1_1 0x1013 | ||
862 | MX23_PAD_LCD_D02__GPIO_1_2 0x1023 | ||
863 | MX23_PAD_LCD_D03__GPIO_1_3 0x1033 | ||
864 | MX23_PAD_LCD_D04__GPIO_1_4 0x1043 | ||
865 | MX23_PAD_LCD_D05__GPIO_1_5 0x1053 | ||
866 | MX23_PAD_LCD_D06__GPIO_1_6 0x1063 | ||
867 | MX23_PAD_LCD_D07__GPIO_1_7 0x1073 | ||
868 | MX23_PAD_LCD_D08__GPIO_1_8 0x1083 | ||
869 | MX23_PAD_LCD_D09__GPIO_1_9 0x1093 | ||
870 | MX23_PAD_LCD_D10__GPIO_1_10 0x10a3 | ||
871 | MX23_PAD_LCD_D11__GPIO_1_11 0x10b3 | ||
872 | MX23_PAD_LCD_D12__GPIO_1_12 0x10c3 | ||
873 | MX23_PAD_LCD_D13__GPIO_1_13 0x10d3 | ||
874 | MX23_PAD_LCD_D14__GPIO_1_14 0x10e3 | ||
875 | MX23_PAD_LCD_D15__GPIO_1_15 0x10f3 | ||
876 | MX23_PAD_LCD_D16__GPIO_1_16 0x1103 | ||
877 | MX23_PAD_LCD_D17__GPIO_1_17 0x1113 | ||
878 | MX23_PAD_LCD_RESET__GPIO_1_18 0x1123 | ||
879 | MX23_PAD_LCD_RS__GPIO_1_19 0x1133 | ||
880 | MX23_PAD_LCD_WR__GPIO_1_20 0x1143 | ||
881 | MX23_PAD_LCD_CS__GPIO_1_21 0x1153 | ||
882 | MX23_PAD_LCD_DOTCK__GPIO_1_22 0x1163 | ||
883 | MX23_PAD_LCD_ENABLE__GPIO_1_23 0x1173 | ||
884 | MX23_PAD_LCD_HSYNC__GPIO_1_24 0x1183 | ||
885 | MX23_PAD_LCD_VSYNC__GPIO_1_25 0x1193 | ||
886 | MX23_PAD_PWM0__GPIO_1_26 0x11a3 | ||
887 | MX23_PAD_PWM1__GPIO_1_27 0x11b3 | ||
888 | MX23_PAD_PWM2__GPIO_1_28 0x11c3 | ||
889 | MX23_PAD_PWM3__GPIO_1_29 0x11d3 | ||
890 | MX23_PAD_PWM4__GPIO_1_30 0x11e3 | ||
891 | MX23_PAD_SSP1_CMD__GPIO_2_0 0x2003 | ||
892 | MX23_PAD_SSP1_DETECT__GPIO_2_1 0x2013 | ||
893 | MX23_PAD_SSP1_DATA0__GPIO_2_2 0x2023 | ||
894 | MX23_PAD_SSP1_DATA1__GPIO_2_3 0x2033 | ||
895 | MX23_PAD_SSP1_DATA2__GPIO_2_4 0x2043 | ||
896 | MX23_PAD_SSP1_DATA3__GPIO_2_5 0x2053 | ||
897 | MX23_PAD_SSP1_SCK__GPIO_2_6 0x2063 | ||
898 | MX23_PAD_ROTARYA__GPIO_2_7 0x2073 | ||
899 | MX23_PAD_ROTARYB__GPIO_2_8 0x2083 | ||
900 | MX23_PAD_EMI_A00__GPIO_2_9 0x2093 | ||
901 | MX23_PAD_EMI_A01__GPIO_2_10 0x20a3 | ||
902 | MX23_PAD_EMI_A02__GPIO_2_11 0x20b3 | ||
903 | MX23_PAD_EMI_A03__GPIO_2_12 0x20c3 | ||
904 | MX23_PAD_EMI_A04__GPIO_2_13 0x20d3 | ||
905 | MX23_PAD_EMI_A05__GPIO_2_14 0x20e3 | ||
906 | MX23_PAD_EMI_A06__GPIO_2_15 0x20f3 | ||
907 | MX23_PAD_EMI_A07__GPIO_2_16 0x2103 | ||
908 | MX23_PAD_EMI_A08__GPIO_2_17 0x2113 | ||
909 | MX23_PAD_EMI_A09__GPIO_2_18 0x2123 | ||
910 | MX23_PAD_EMI_A10__GPIO_2_19 0x2133 | ||
911 | MX23_PAD_EMI_A11__GPIO_2_20 0x2143 | ||
912 | MX23_PAD_EMI_A12__GPIO_2_21 0x2153 | ||
913 | MX23_PAD_EMI_BA0__GPIO_2_22 0x2163 | ||
914 | MX23_PAD_EMI_BA1__GPIO_2_23 0x2173 | ||
915 | MX23_PAD_EMI_CASN__GPIO_2_24 0x2183 | ||
916 | MX23_PAD_EMI_CE0N__GPIO_2_25 0x2193 | ||
917 | MX23_PAD_EMI_CE1N__GPIO_2_26 0x21a3 | ||
918 | MX23_PAD_GPMI_CE1N__GPIO_2_27 0x21b3 | ||
919 | MX23_PAD_GPMI_CE0N__GPIO_2_28 0x21c3 | ||
920 | MX23_PAD_EMI_CKE__GPIO_2_29 0x21d3 | ||
921 | MX23_PAD_EMI_RASN__GPIO_2_30 0x21e3 | ||
922 | MX23_PAD_EMI_WEN__GPIO_2_31 0x21f3 | ||
diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt index 5a02e30dd262..7069a0b84e3a 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-single.txt | |||
@@ -72,6 +72,13 @@ Optional properties: | |||
72 | /* pin base, nr pins & gpio function */ | 72 | /* pin base, nr pins & gpio function */ |
73 | pinctrl-single,gpio-range = <&range 0 3 0 &range 3 9 1>; | 73 | pinctrl-single,gpio-range = <&range 0 3 0 &range 3 9 1>; |
74 | 74 | ||
75 | - interrupt-controller : standard interrupt controller binding if using | ||
76 | interrupts for wake-up events for example. In this case pinctrl-single | ||
77 | is set up as a chained interrupt controller and the wake-up interrupts | ||
78 | can be requested by the drivers using request_irq(). | ||
79 | |||
80 | - #interrupt-cells : standard interrupt binding if using interrupts | ||
81 | |||
75 | This driver assumes that there is only one register for each pin (unless the | 82 | This driver assumes that there is only one register for each pin (unless the |
76 | pinctrl-single,bit-per-mux is set), and uses the common pinctrl bindings as | 83 | pinctrl-single,bit-per-mux is set), and uses the common pinctrl bindings as |
77 | specified in the pinctrl-bindings.txt document in this directory. | 84 | specified in the pinctrl-bindings.txt document in this directory. |
@@ -121,6 +128,8 @@ pmx_core: pinmux@4a100040 { | |||
121 | reg = <0x4a100040 0x0196>; | 128 | reg = <0x4a100040 0x0196>; |
122 | #address-cells = <1>; | 129 | #address-cells = <1>; |
123 | #size-cells = <0>; | 130 | #size-cells = <0>; |
131 | #interrupt-cells = <1>; | ||
132 | interrupt-controller; | ||
124 | pinctrl-single,register-width = <16>; | 133 | pinctrl-single,register-width = <16>; |
125 | pinctrl-single,function-mask = <0xffff>; | 134 | pinctrl-single,function-mask = <0xffff>; |
126 | }; | 135 | }; |
@@ -131,6 +140,8 @@ pmx_wkup: pinmux@4a31e040 { | |||
131 | reg = <0x4a31e040 0x0038>; | 140 | reg = <0x4a31e040 0x0038>; |
132 | #address-cells = <1>; | 141 | #address-cells = <1>; |
133 | #size-cells = <0>; | 142 | #size-cells = <0>; |
143 | #interrupt-cells = <1>; | ||
144 | interrupt-controller; | ||
134 | pinctrl-single,register-width = <16>; | 145 | pinctrl-single,register-width = <16>; |
135 | pinctrl-single,function-mask = <0xffff>; | 146 | pinctrl-single,function-mask = <0xffff>; |
136 | }; | 147 | }; |
diff --git a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt index 46882058b59b..ee05dc390694 100644 --- a/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt +++ b/Documentation/devicetree/bindings/staging/iio/adc/mxs-lradc.txt | |||
@@ -1,7 +1,8 @@ | |||
1 | * Freescale i.MX28 LRADC device driver | 1 | * Freescale i.MX28 LRADC device driver |
2 | 2 | ||
3 | Required properties: | 3 | Required properties: |
4 | - compatible: Should be "fsl,imx28-lradc" | 4 | - compatible: Should be "fsl,imx23-lradc" for i.MX23 SoC and "fsl,imx28-lradc" |
5 | for i.MX28 SoC | ||
5 | - reg: Address and length of the register set for the device | 6 | - reg: Address and length of the register set for the device |
6 | - interrupts: Should contain the LRADC interrupts | 7 | - interrupts: Should contain the LRADC interrupts |
7 | 8 | ||
@@ -9,13 +10,38 @@ Optional properties: | |||
9 | - fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen | 10 | - fsl,lradc-touchscreen-wires: Number of wires used to connect the touchscreen |
10 | to LRADC. Valid value is either 4 or 5. If this | 11 | to LRADC. Valid value is either 4 or 5. If this |
11 | property is not present, then the touchscreen is | 12 | property is not present, then the touchscreen is |
12 | disabled. | 13 | disabled. 5 wires is valid for i.MX28 SoC only. |
14 | - fsl,ave-ctrl: number of samples per direction to calculate an average value. | ||
15 | Allowed value is 1 ... 31, default is 4 | ||
16 | - fsl,ave-delay: delay between consecutive samples. Allowed value is | ||
17 | 1 ... 2047. It is used if 'fsl,ave-ctrl' > 1, counts at | ||
18 | 2 kHz and its default is 2 (= 1 ms) | ||
19 | - fsl,settling: delay between plate switch to next sample. Allowed value is | ||
20 | 1 ... 2047. It counts at 2 kHz and its default is | ||
21 | 10 (= 5 ms) | ||
13 | 22 | ||
14 | Examples: | 23 | Example for i.MX23 SoC: |
24 | |||
25 | lradc@80050000 { | ||
26 | compatible = "fsl,imx23-lradc"; | ||
27 | reg = <0x80050000 0x2000>; | ||
28 | interrupts = <36 37 38 39 40 41 42 43 44>; | ||
29 | status = "okay"; | ||
30 | fsl,lradc-touchscreen-wires = <4>; | ||
31 | fsl,ave-ctrl = <4>; | ||
32 | fsl,ave-delay = <2>; | ||
33 | fsl,settling = <10>; | ||
34 | }; | ||
35 | |||
36 | Example for i.MX28 SoC: | ||
15 | 37 | ||
16 | lradc@80050000 { | 38 | lradc@80050000 { |
17 | compatible = "fsl,imx28-lradc"; | 39 | compatible = "fsl,imx28-lradc"; |
18 | reg = <0x80050000 0x2000>; | 40 | reg = <0x80050000 0x2000>; |
19 | interrupts = <10 14 15 16 17 18 19 | 41 | interrupts = <10 14 15 16 17 18 19 20 21 22 23 24 25>; |
20 | 20 21 22 23 24 25>; | 42 | status = "okay"; |
43 | fsl,lradc-touchscreen-wires = <5>; | ||
44 | fsl,ave-ctrl = <4>; | ||
45 | fsl,ave-delay = <2>; | ||
46 | fsl,settling = <10>; | ||
21 | }; | 47 | }; |
diff --git a/Documentation/devicetree/bindings/usb/msm-hsusb.txt b/Documentation/devicetree/bindings/usb/msm-hsusb.txt new file mode 100644 index 000000000000..5ea26c631e3a --- /dev/null +++ b/Documentation/devicetree/bindings/usb/msm-hsusb.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | MSM SoC HSUSB controllers | ||
2 | |||
3 | EHCI | ||
4 | |||
5 | Required properties: | ||
6 | - compatible: Should contain "qcom,ehci-host" | ||
7 | - regs: offset and length of the register set in the memory map | ||
8 | - usb-phy: phandle for the PHY device | ||
9 | |||
10 | Example EHCI controller device node: | ||
11 | |||
12 | ehci: ehci@f9a55000 { | ||
13 | compatible = "qcom,ehci-host"; | ||
14 | reg = <0xf9a55000 0x400>; | ||
15 | usb-phy = <&usb_otg>; | ||
16 | }; | ||
17 | |||
diff --git a/Documentation/devicetree/bindings/usb/omap-usb.txt b/Documentation/devicetree/bindings/usb/omap-usb.txt index 9088ab09e200..090e5e22bd2b 100644 --- a/Documentation/devicetree/bindings/usb/omap-usb.txt +++ b/Documentation/devicetree/bindings/usb/omap-usb.txt | |||
@@ -3,9 +3,6 @@ OMAP GLUE AND OTHER OMAP SPECIFIC COMPONENTS | |||
3 | OMAP MUSB GLUE | 3 | OMAP MUSB GLUE |
4 | - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb" | 4 | - compatible : Should be "ti,omap4-musb" or "ti,omap3-musb" |
5 | - ti,hwmods : must be "usb_otg_hs" | 5 | - ti,hwmods : must be "usb_otg_hs" |
6 | - ti,has-mailbox : to specify that omap uses an external mailbox | ||
7 | (in control module) to communicate with the musb core during device connect | ||
8 | and disconnect. | ||
9 | - multipoint : Should be "1" indicating the musb controller supports | 6 | - multipoint : Should be "1" indicating the musb controller supports |
10 | multipoint. This is a MUSB configuration-specific setting. | 7 | multipoint. This is a MUSB configuration-specific setting. |
11 | - num-eps : Specifies the number of endpoints. This is also a | 8 | - num-eps : Specifies the number of endpoints. This is also a |
@@ -19,6 +16,9 @@ OMAP MUSB GLUE | |||
19 | - power : Should be "50". This signifies the controller can supply up to | 16 | - power : Should be "50". This signifies the controller can supply up to |
20 | 100mA when operating in host mode. | 17 | 100mA when operating in host mode. |
21 | - usb-phy : the phandle for the PHY device | 18 | - usb-phy : the phandle for the PHY device |
19 | - phys : the phandle for the PHY device (used by generic PHY framework) | ||
20 | - phy-names : the names of the PHY corresponding to the PHYs present in the | ||
21 | *phy* phandle. | ||
22 | 22 | ||
23 | Optional properties: | 23 | Optional properties: |
24 | - ctrl-module : phandle of the control module this glue uses to write to | 24 | - ctrl-module : phandle of the control module this glue uses to write to |
@@ -28,11 +28,12 @@ SOC specific device node entry | |||
28 | usb_otg_hs: usb_otg_hs@4a0ab000 { | 28 | usb_otg_hs: usb_otg_hs@4a0ab000 { |
29 | compatible = "ti,omap4-musb"; | 29 | compatible = "ti,omap4-musb"; |
30 | ti,hwmods = "usb_otg_hs"; | 30 | ti,hwmods = "usb_otg_hs"; |
31 | ti,has-mailbox; | ||
32 | multipoint = <1>; | 31 | multipoint = <1>; |
33 | num-eps = <16>; | 32 | num-eps = <16>; |
34 | ram-bits = <12>; | 33 | ram-bits = <12>; |
35 | ctrl-module = <&omap_control_usb>; | 34 | ctrl-module = <&omap_control_usb>; |
35 | phys = <&usb2_phy>; | ||
36 | phy-names = "usb2-phy"; | ||
36 | }; | 37 | }; |
37 | 38 | ||
38 | Board specific device node entry | 39 | Board specific device node entry |
@@ -78,22 +79,22 @@ omap_dwc3 { | |||
78 | OMAP CONTROL USB | 79 | OMAP CONTROL USB |
79 | 80 | ||
80 | Required properties: | 81 | Required properties: |
81 | - compatible: Should be "ti,omap-control-usb" | 82 | - compatible: Should be one of |
83 | "ti,control-phy-otghs" - if it has otghs_control mailbox register as on OMAP4. | ||
84 | "ti,control-phy-usb2" - if it has Power down bit in control_dev_conf register | ||
85 | e.g. USB2_PHY on OMAP5. | ||
86 | "ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control | ||
87 | e.g. USB3 PHY and SATA PHY on OMAP5. | ||
88 | "ti,control-phy-dra7usb2" - if it has power down register like USB2 PHY on | ||
89 | DRA7 platform. | ||
82 | - reg : Address and length of the register set for the device. It contains | 90 | - reg : Address and length of the register set for the device. It contains |
83 | the address of "control_dev_conf" and "otghs_control" or "phy_power_usb" | 91 | the address of "otghs_control" for control-phy-otghs or "power" register |
84 | depending upon omap4 or omap5. | 92 | for other types. |
85 | - reg-names: The names of the register addresses corresponding to the registers | 93 | - reg-names: should be "otghs_control" control-phy-otghs and "power" for |
86 | filled in "reg". | 94 | other types. |
87 | - ti,type: This is used to differentiate whether the control module has | ||
88 | usb mailbox or usb3 phy power. omap4 has usb mailbox in control module to | ||
89 | notify events to the musb core and omap5 has usb3 phy power register to | ||
90 | power on usb3 phy. Should be "1" if it has mailbox and "2" if it has usb3 | ||
91 | phy power. | ||
92 | 95 | ||
93 | omap_control_usb: omap-control-usb@4a002300 { | 96 | omap_control_usb: omap-control-usb@4a002300 { |
94 | compatible = "ti,omap-control-usb"; | 97 | compatible = "ti,control-phy-otghs"; |
95 | reg = <0x4a002300 0x4>, | 98 | reg = <0x4a00233c 0x4>; |
96 | <0x4a00233c 0x4>; | 99 | reg-names = "otghs_control"; |
97 | reg-names = "control_dev_conf", "otghs_control"; | ||
98 | ti,type = <1>; | ||
99 | }; | 100 | }; |
diff --git a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt index d7e272671c7e..1bd37faba05b 100644 --- a/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt +++ b/Documentation/devicetree/bindings/usb/usb-nop-xceiv.txt | |||
@@ -15,7 +15,7 @@ Optional properties: | |||
15 | 15 | ||
16 | - vcc-supply: phandle to the regulator that provides RESET to the PHY. | 16 | - vcc-supply: phandle to the regulator that provides RESET to the PHY. |
17 | 17 | ||
18 | - reset-supply: phandle to the regulator that provides power to the PHY. | 18 | - reset-gpios: Should specify the GPIO for reset. |
19 | 19 | ||
20 | Example: | 20 | Example: |
21 | 21 | ||
@@ -25,10 +25,9 @@ Example: | |||
25 | clocks = <&osc 0>; | 25 | clocks = <&osc 0>; |
26 | clock-names = "main_clk"; | 26 | clock-names = "main_clk"; |
27 | vcc-supply = <&hsusb1_vcc_regulator>; | 27 | vcc-supply = <&hsusb1_vcc_regulator>; |
28 | reset-supply = <&hsusb1_reset_regulator>; | 28 | reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; |
29 | }; | 29 | }; |
30 | 30 | ||
31 | hsusb1_phy is a NOP USB PHY device that gets its clock from an oscillator | 31 | hsusb1_phy is a NOP USB PHY device that gets its clock from an oscillator |
32 | and expects that clock to be configured to 19.2MHz by the NOP PHY driver. | 32 | and expects that clock to be configured to 19.2MHz by the NOP PHY driver. |
33 | hsusb1_vcc_regulator provides power to the PHY and hsusb1_reset_regulator | 33 | hsusb1_vcc_regulator provides power to the PHY and GPIO 7 controls RESET. |
34 | controls RESET. | ||
diff --git a/Documentation/devicetree/bindings/usb/usb-phy.txt b/Documentation/devicetree/bindings/usb/usb-phy.txt index 61496f5cb095..c0245c888982 100644 --- a/Documentation/devicetree/bindings/usb/usb-phy.txt +++ b/Documentation/devicetree/bindings/usb/usb-phy.txt | |||
@@ -5,6 +5,8 @@ OMAP USB2 PHY | |||
5 | Required properties: | 5 | Required properties: |
6 | - compatible: Should be "ti,omap-usb2" | 6 | - compatible: Should be "ti,omap-usb2" |
7 | - reg : Address and length of the register set for the device. | 7 | - reg : Address and length of the register set for the device. |
8 | - #phy-cells: determine the number of cells that should be given in the | ||
9 | phandle while referencing this phy. | ||
8 | 10 | ||
9 | Optional properties: | 11 | Optional properties: |
10 | - ctrl-module : phandle of the control module used by PHY driver to power on | 12 | - ctrl-module : phandle of the control module used by PHY driver to power on |
@@ -16,6 +18,7 @@ usb2phy@4a0ad080 { | |||
16 | compatible = "ti,omap-usb2"; | 18 | compatible = "ti,omap-usb2"; |
17 | reg = <0x4a0ad080 0x58>; | 19 | reg = <0x4a0ad080 0x58>; |
18 | ctrl-module = <&omap_control_usb>; | 20 | ctrl-module = <&omap_control_usb>; |
21 | #phy-cells = <0>; | ||
19 | }; | 22 | }; |
20 | 23 | ||
21 | OMAP USB3 PHY | 24 | OMAP USB3 PHY |
@@ -25,6 +28,8 @@ Required properties: | |||
25 | - reg : Address and length of the register set for the device. | 28 | - reg : Address and length of the register set for the device. |
26 | - reg-names: The names of the register addresses corresponding to the registers | 29 | - reg-names: The names of the register addresses corresponding to the registers |
27 | filled in "reg". | 30 | filled in "reg". |
31 | - #phy-cells: determine the number of cells that should be given in the | ||
32 | phandle while referencing this phy. | ||
28 | 33 | ||
29 | Optional properties: | 34 | Optional properties: |
30 | - ctrl-module : phandle of the control module used by PHY driver to power on | 35 | - ctrl-module : phandle of the control module used by PHY driver to power on |
@@ -39,4 +44,5 @@ usb3phy@4a084400 { | |||
39 | <0x4a084c00 0x40>; | 44 | <0x4a084c00 0x40>; |
40 | reg-names = "phy_rx", "phy_tx", "pll_ctrl"; | 45 | reg-names = "phy_rx", "phy_tx", "pll_ctrl"; |
41 | ctrl-module = <&omap_control_usb>; | 46 | ctrl-module = <&omap_control_usb>; |
47 | #phy-cells = <0>; | ||
42 | }; | 48 | }; |
diff --git a/Documentation/devicetree/bindings/usb/ux500-usb.txt b/Documentation/devicetree/bindings/usb/ux500-usb.txt index 330d6ec15401..439a41c79afa 100644 --- a/Documentation/devicetree/bindings/usb/ux500-usb.txt +++ b/Documentation/devicetree/bindings/usb/ux500-usb.txt | |||
@@ -15,7 +15,7 @@ Optional properties: | |||
15 | Example: | 15 | Example: |
16 | 16 | ||
17 | usb_per5@a03e0000 { | 17 | usb_per5@a03e0000 { |
18 | compatible = "stericsson,db8500-musb", "mentor,musb"; | 18 | compatible = "stericsson,db8500-musb"; |
19 | reg = <0xa03e0000 0x10000>; | 19 | reg = <0xa03e0000 0x10000>; |
20 | interrupts = <0 23 0x4>; | 20 | interrupts = <0 23 0x4>; |
21 | interrupt-names = "mc"; | 21 | interrupt-names = "mc"; |
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index 2956800f0240..04eab45dd148 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt | |||
@@ -15,6 +15,7 @@ atmel Atmel Corporation | |||
15 | avago Avago Technologies | 15 | avago Avago Technologies |
16 | bosch Bosch Sensortec GmbH | 16 | bosch Bosch Sensortec GmbH |
17 | brcm Broadcom Corporation | 17 | brcm Broadcom Corporation |
18 | capella Capella Microsystems, Inc | ||
18 | cavium Cavium, Inc. | 19 | cavium Cavium, Inc. |
19 | chrp Common Hardware Reference Platform | 20 | chrp Common Hardware Reference Platform |
20 | cirrus Cirrus Logic, Inc. | 21 | cirrus Cirrus Logic, Inc. |
diff --git a/Documentation/devicetree/bindings/video/exynos_dp.txt b/Documentation/devicetree/bindings/video/exynos_dp.txt index 84f10c16cb38..3289d76a21d0 100644 --- a/Documentation/devicetree/bindings/video/exynos_dp.txt +++ b/Documentation/devicetree/bindings/video/exynos_dp.txt | |||
@@ -6,10 +6,10 @@ We use two nodes: | |||
6 | -dptx-phy node(defined inside dp-controller node) | 6 | -dptx-phy node(defined inside dp-controller node) |
7 | 7 | ||
8 | For the DP-PHY initialization, we use the dptx-phy node. | 8 | For the DP-PHY initialization, we use the dptx-phy node. |
9 | Required properties for dptx-phy: | 9 | Required properties for dptx-phy: deprecated, use phys and phy-names |
10 | -reg: | 10 | -reg: deprecated |
11 | Base address of DP PHY register. | 11 | Base address of DP PHY register. |
12 | -samsung,enable-mask: | 12 | -samsung,enable-mask: deprecated |
13 | The bit-mask used to enable/disable DP PHY. | 13 | The bit-mask used to enable/disable DP PHY. |
14 | 14 | ||
15 | For the Panel initialization, we read data from dp-controller node. | 15 | For the Panel initialization, we read data from dp-controller node. |
@@ -27,6 +27,10 @@ Required properties for dp-controller: | |||
27 | from common clock binding: Shall be "dp". | 27 | from common clock binding: Shall be "dp". |
28 | -interrupt-parent: | 28 | -interrupt-parent: |
29 | phandle to Interrupt combiner node. | 29 | phandle to Interrupt combiner node. |
30 | -phys: | ||
31 | from general PHY binding: the phandle for the PHY device. | ||
32 | -phy-names: | ||
33 | from general PHY binding: Should be "dp". | ||
30 | -samsung,color-space: | 34 | -samsung,color-space: |
31 | input video data format. | 35 | input video data format. |
32 | COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2 | 36 | COLOR_RGB = 0, COLOR_YCBCR422 = 1, COLOR_YCBCR444 = 2 |
@@ -68,11 +72,8 @@ SOC specific portion: | |||
68 | clocks = <&clock 342>; | 72 | clocks = <&clock 342>; |
69 | clock-names = "dp"; | 73 | clock-names = "dp"; |
70 | 74 | ||
71 | dptx-phy { | 75 | phys = <&dp_phy>; |
72 | reg = <0x10040720>; | 76 | phy-names = "dp"; |
73 | samsung,enable-mask = <1>; | ||
74 | }; | ||
75 | |||
76 | }; | 77 | }; |
77 | 78 | ||
78 | Board Specific portion: | 79 | Board Specific portion: |
diff --git a/Documentation/devicetree/bindings/video/exynos_hdmi.txt b/Documentation/devicetree/bindings/video/exynos_hdmi.txt index 323983be3c30..50decf8e1b90 100644 --- a/Documentation/devicetree/bindings/video/exynos_hdmi.txt +++ b/Documentation/devicetree/bindings/video/exynos_hdmi.txt | |||
@@ -12,7 +12,19 @@ Required properties: | |||
12 | a) phandle of the gpio controller node. | 12 | a) phandle of the gpio controller node. |
13 | b) pin number within the gpio controller. | 13 | b) pin number within the gpio controller. |
14 | c) optional flags and pull up/down. | 14 | c) optional flags and pull up/down. |
15 | 15 | - clocks: list of clock IDs from SoC clock driver. | |
16 | a) hdmi: Gate of HDMI IP bus clock. | ||
17 | b) sclk_hdmi: Gate of HDMI special clock. | ||
18 | c) sclk_pixel: Pixel special clock, one of the two possible inputs of | ||
19 | HDMI clock mux. | ||
20 | d) sclk_hdmiphy: HDMI PHY clock output, one of two possible inputs of | ||
21 | HDMI clock mux. | ||
22 | e) mout_hdmi: It is required by the driver to switch between the 2 | ||
23 | parents i.e. sclk_pixel and sclk_hdmiphy. If hdmiphy is stable | ||
24 | after configuration, parent is set to sclk_hdmiphy else | ||
25 | sclk_pixel. | ||
26 | - clock-names: aliases as per driver requirements for above clock IDs: | ||
27 | "hdmi", "sclk_hdmi", "sclk_pixel", "sclk_hdmiphy" and "mout_hdmi". | ||
16 | Example: | 28 | Example: |
17 | 29 | ||
18 | hdmi { | 30 | hdmi { |
diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt index 3334b0a8e343..7bfde9c9d658 100644 --- a/Documentation/devicetree/bindings/video/exynos_mixer.txt +++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt | |||
@@ -10,6 +10,10 @@ Required properties: | |||
10 | - reg: physical base address of the mixer and length of memory mapped | 10 | - reg: physical base address of the mixer and length of memory mapped |
11 | region. | 11 | region. |
12 | - interrupts: interrupt number to the cpu. | 12 | - interrupts: interrupt number to the cpu. |
13 | - clocks: list of clock IDs from SoC clock driver. | ||
14 | a) mixer: Gate of Mixer IP bus clock. | ||
15 | b) sclk_hdmi: HDMI Special clock, one of the two possible inputs of | ||
16 | mixer mux. | ||
13 | 17 | ||
14 | Example: | 18 | Example: |
15 | 19 | ||
diff --git a/Documentation/extcon/porting-android-switch-class b/Documentation/extcon/porting-android-switch-class index eb0fa5f4fe88..5377f6317961 100644 --- a/Documentation/extcon/porting-android-switch-class +++ b/Documentation/extcon/porting-android-switch-class | |||
@@ -25,8 +25,10 @@ MyungJoo Ham <myungjoo.ham@samsung.com> | |||
25 | @print_state: no change but type change (switch_dev->extcon_dev) | 25 | @print_state: no change but type change (switch_dev->extcon_dev) |
26 | 26 | ||
27 | - switch_dev_register(sdev, dev) | 27 | - switch_dev_register(sdev, dev) |
28 | => extcon_dev_register(edev, dev) | 28 | => extcon_dev_register(edev) |
29 | : no change but type change (sdev->edev) | 29 | : type change (sdev->edev) |
30 | : remove second param('dev'). if edev has parent device, should store | ||
31 | 'dev' to 'edev.dev.parent' before registering extcon device | ||
30 | - switch_dev_unregister(sdev) | 32 | - switch_dev_unregister(sdev) |
31 | => extcon_dev_unregister(edev) | 33 | => extcon_dev_unregister(edev) |
32 | : no change but type change (sdev->edev) | 34 | : no change but type change (sdev->edev) |
diff --git a/Documentation/filesystems/caching/netfs-api.txt b/Documentation/filesystems/caching/netfs-api.txt index 11a0a40ce445..aed6b94160b1 100644 --- a/Documentation/filesystems/caching/netfs-api.txt +++ b/Documentation/filesystems/caching/netfs-api.txt | |||
@@ -29,15 +29,16 @@ This document contains the following sections: | |||
29 | (6) Index registration | 29 | (6) Index registration |
30 | (7) Data file registration | 30 | (7) Data file registration |
31 | (8) Miscellaneous object registration | 31 | (8) Miscellaneous object registration |
32 | (9) Setting the data file size | 32 | (9) Setting the data file size |
33 | (10) Page alloc/read/write | 33 | (10) Page alloc/read/write |
34 | (11) Page uncaching | 34 | (11) Page uncaching |
35 | (12) Index and data file consistency | 35 | (12) Index and data file consistency |
36 | (13) Miscellaneous cookie operations | 36 | (13) Cookie enablement |
37 | (14) Cookie unregistration | 37 | (14) Miscellaneous cookie operations |
38 | (15) Index invalidation | 38 | (15) Cookie unregistration |
39 | (16) Data file invalidation | 39 | (16) Index invalidation |
40 | (17) FS-Cache specific page flags. | 40 | (17) Data file invalidation |
41 | (18) FS-Cache specific page flags. | ||
41 | 42 | ||
42 | 43 | ||
43 | ============================= | 44 | ============================= |
@@ -334,7 +335,8 @@ the path to the file: | |||
334 | struct fscache_cookie * | 335 | struct fscache_cookie * |
335 | fscache_acquire_cookie(struct fscache_cookie *parent, | 336 | fscache_acquire_cookie(struct fscache_cookie *parent, |
336 | const struct fscache_object_def *def, | 337 | const struct fscache_object_def *def, |
337 | void *netfs_data); | 338 | void *netfs_data, |
339 | bool enable); | ||
338 | 340 | ||
339 | This function creates an index entry in the index represented by parent, | 341 | This function creates an index entry in the index represented by parent, |
340 | filling in the index entry by calling the operations pointed to by def. | 342 | filling in the index entry by calling the operations pointed to by def. |
@@ -350,6 +352,10 @@ object needs to be created somewhere down the hierarchy. Furthermore, an index | |||
350 | may be created in several different caches independently at different times. | 352 | may be created in several different caches independently at different times. |
351 | This is all handled transparently, and the netfs doesn't see any of it. | 353 | This is all handled transparently, and the netfs doesn't see any of it. |
352 | 354 | ||
355 | A cookie will be created in the disabled state if enabled is false. A cookie | ||
356 | must be enabled to do anything with it. A disabled cookie can be enabled by | ||
357 | calling fscache_enable_cookie() (see below). | ||
358 | |||
353 | For example, with AFS, a cell would be added to the primary index. This index | 359 | For example, with AFS, a cell would be added to the primary index. This index |
354 | entry would have a dependent inode containing a volume location index for the | 360 | entry would have a dependent inode containing a volume location index for the |
355 | volume mappings within this cell: | 361 | volume mappings within this cell: |
@@ -357,7 +363,7 @@ volume mappings within this cell: | |||
357 | cell->cache = | 363 | cell->cache = |
358 | fscache_acquire_cookie(afs_cache_netfs.primary_index, | 364 | fscache_acquire_cookie(afs_cache_netfs.primary_index, |
359 | &afs_cell_cache_index_def, | 365 | &afs_cell_cache_index_def, |
360 | cell); | 366 | cell, true); |
361 | 367 | ||
362 | Then when a volume location was accessed, it would be entered into the cell's | 368 | Then when a volume location was accessed, it would be entered into the cell's |
363 | index and an inode would be allocated that acts as a volume type and hash chain | 369 | index and an inode would be allocated that acts as a volume type and hash chain |
@@ -366,7 +372,7 @@ combination: | |||
366 | vlocation->cache = | 372 | vlocation->cache = |
367 | fscache_acquire_cookie(cell->cache, | 373 | fscache_acquire_cookie(cell->cache, |
368 | &afs_vlocation_cache_index_def, | 374 | &afs_vlocation_cache_index_def, |
369 | vlocation); | 375 | vlocation, true); |
370 | 376 | ||
371 | And then a particular flavour of volume (R/O for example) could be added to | 377 | And then a particular flavour of volume (R/O for example) could be added to |
372 | that index, creating another index for vnodes (AFS inode equivalents): | 378 | that index, creating another index for vnodes (AFS inode equivalents): |
@@ -374,7 +380,7 @@ that index, creating another index for vnodes (AFS inode equivalents): | |||
374 | volume->cache = | 380 | volume->cache = |
375 | fscache_acquire_cookie(vlocation->cache, | 381 | fscache_acquire_cookie(vlocation->cache, |
376 | &afs_volume_cache_index_def, | 382 | &afs_volume_cache_index_def, |
377 | volume); | 383 | volume, true); |
378 | 384 | ||
379 | 385 | ||
380 | ====================== | 386 | ====================== |
@@ -388,7 +394,7 @@ the object definition should be something other than index type. | |||
388 | vnode->cache = | 394 | vnode->cache = |
389 | fscache_acquire_cookie(volume->cache, | 395 | fscache_acquire_cookie(volume->cache, |
390 | &afs_vnode_cache_object_def, | 396 | &afs_vnode_cache_object_def, |
391 | vnode); | 397 | vnode, true); |
392 | 398 | ||
393 | 399 | ||
394 | ================================= | 400 | ================================= |
@@ -404,7 +410,7 @@ it would be some other type of object such as a data file. | |||
404 | xattr->cache = | 410 | xattr->cache = |
405 | fscache_acquire_cookie(vnode->cache, | 411 | fscache_acquire_cookie(vnode->cache, |
406 | &afs_xattr_cache_object_def, | 412 | &afs_xattr_cache_object_def, |
407 | xattr); | 413 | xattr, true); |
408 | 414 | ||
409 | Miscellaneous objects might be used to store extended attributes or directory | 415 | Miscellaneous objects might be used to store extended attributes or directory |
410 | entries for example. | 416 | entries for example. |
@@ -733,6 +739,47 @@ Note that partial updates may happen automatically at other times, such as when | |||
733 | data blocks are added to a data file object. | 739 | data blocks are added to a data file object. |
734 | 740 | ||
735 | 741 | ||
742 | ================= | ||
743 | COOKIE ENABLEMENT | ||
744 | ================= | ||
745 | |||
746 | Cookies exist in one of two states: enabled and disabled. If a cookie is | ||
747 | disabled, it ignores all attempts to acquire child cookies; check, update or | ||
748 | invalidate its state; allocate, read or write backing pages - though it is | ||
749 | still possible to uncache pages and relinquish the cookie. | ||
750 | |||
751 | The initial enablement state is set by fscache_acquire_cookie(), but the cookie | ||
752 | can be enabled or disabled later. To disable a cookie, call: | ||
753 | |||
754 | void fscache_disable_cookie(struct fscache_cookie *cookie, | ||
755 | bool invalidate); | ||
756 | |||
757 | If the cookie is not already disabled, this locks the cookie against other | ||
758 | enable and disable ops, marks the cookie as being disabled, discards or | ||
759 | invalidates any backing objects and waits for cessation of activity on any | ||
760 | associated object before unlocking the cookie. | ||
761 | |||
762 | All possible failures are handled internally. The caller should consider | ||
763 | calling fscache_uncache_all_inode_pages() afterwards to make sure all page | ||
764 | markings are cleared up. | ||
765 | |||
766 | Cookies can be enabled or reenabled with: | ||
767 | |||
768 | void fscache_enable_cookie(struct fscache_cookie *cookie, | ||
769 | bool (*can_enable)(void *data), | ||
770 | void *data) | ||
771 | |||
772 | If the cookie is not already enabled, this locks the cookie against other | ||
773 | enable and disable ops, invokes can_enable() and, if the cookie is not an index | ||
774 | cookie, will begin the procedure of acquiring backing objects. | ||
775 | |||
776 | The optional can_enable() function is passed the data argument and returns a | ||
777 | ruling as to whether or not enablement should actually be permitted to begin. | ||
778 | |||
779 | All possible failures are handled internally. The cookie will only be marked | ||
780 | as enabled if provisional backing objects are allocated. | ||
781 | |||
782 | |||
736 | =============================== | 783 | =============================== |
737 | MISCELLANEOUS COOKIE OPERATIONS | 784 | MISCELLANEOUS COOKIE OPERATIONS |
738 | =============================== | 785 | =============================== |
@@ -778,7 +825,7 @@ COOKIE UNREGISTRATION | |||
778 | To get rid of a cookie, this function should be called. | 825 | To get rid of a cookie, this function should be called. |
779 | 826 | ||
780 | void fscache_relinquish_cookie(struct fscache_cookie *cookie, | 827 | void fscache_relinquish_cookie(struct fscache_cookie *cookie, |
781 | int retire); | 828 | bool retire); |
782 | 829 | ||
783 | If retire is non-zero, then the object will be marked for recycling, and all | 830 | If retire is non-zero, then the object will be marked for recycling, and all |
784 | copies of it will be removed from all active caches in which it is present. | 831 | copies of it will be removed from all active caches in which it is present. |
diff --git a/Documentation/mic/mic_overview.txt b/Documentation/mic/mic_overview.txt new file mode 100644 index 000000000000..b41929224804 --- /dev/null +++ b/Documentation/mic/mic_overview.txt | |||
@@ -0,0 +1,51 @@ | |||
1 | An Intel MIC X100 device is a PCIe form factor add-in coprocessor | ||
2 | card based on the Intel Many Integrated Core (MIC) architecture | ||
3 | that runs a Linux OS. It is a PCIe endpoint in a platform and therefore | ||
4 | implements the three required standard address spaces i.e. configuration, | ||
5 | memory and I/O. The host OS loads a device driver as is typical for | ||
6 | PCIe devices. The card itself runs a bootstrap after reset that | ||
7 | transfers control to the card OS downloaded from the host driver. The | ||
8 | host driver supports OSPM suspend and resume operations. It shuts down | ||
9 | the card during suspend and reboots the card OS during resume. | ||
10 | The card OS as shipped by Intel is a Linux kernel with modifications | ||
11 | for the X100 devices. | ||
12 | |||
13 | Since it is a PCIe card, it does not have the ability to host hardware | ||
14 | devices for networking, storage and console. We provide these devices | ||
15 | on X100 coprocessors thus enabling a self-bootable equivalent environment | ||
16 | for applications. A key benefit of our solution is that it leverages | ||
17 | the standard virtio framework for network, disk and console devices, | ||
18 | though in our case the virtio framework is used across a PCIe bus. | ||
19 | |||
20 | Here is a block diagram of the various components described above. The | ||
21 | virtio backends are situated on the host rather than the card given better | ||
22 | single threaded performance for the host compared to MIC, the ability of | ||
23 | the host to initiate DMA's to/from the card using the MIC DMA engine and | ||
24 | the fact that the virtio block storage backend can only be on the host. | ||
25 | |||
26 | | | ||
27 | +----------+ | +----------+ | ||
28 | | Card OS | | | Host OS | | ||
29 | +----------+ | +----------+ | ||
30 | | | ||
31 | +-------+ +--------+ +------+ | +---------+ +--------+ +--------+ | ||
32 | | Virtio| |Virtio | |Virtio| | |Virtio | |Virtio | |Virtio | | ||
33 | | Net | |Console | |Block | | |Net | |Console | |Block | | ||
34 | | Driver| |Driver | |Driver| | |backend | |backend | |backend | | ||
35 | +-------+ +--------+ +------+ | +---------+ +--------+ +--------+ | ||
36 | | | | | | | | | ||
37 | | | | |User | | | | ||
38 | | | | |------|------------|---------|------- | ||
39 | +-------------------+ |Kernel +--------------------------+ | ||
40 | | | | Virtio over PCIe IOCTLs | | ||
41 | | | +--------------------------+ | ||
42 | +--------------+ | | | ||
43 | |Intel MIC | | +---------------+ | ||
44 | |Card Driver | | |Intel MIC | | ||
45 | +--------------+ | |Host Driver | | ||
46 | | | +---------------+ | ||
47 | | | | | ||
48 | +-------------------------------------------------------------+ | ||
49 | | | | ||
50 | | PCIe Bus | | ||
51 | +-------------------------------------------------------------+ | ||
diff --git a/Documentation/mic/mpssd/.gitignore b/Documentation/mic/mpssd/.gitignore new file mode 100644 index 000000000000..8b7c72f07c92 --- /dev/null +++ b/Documentation/mic/mpssd/.gitignore | |||
@@ -0,0 +1 @@ | |||
mpssd | |||
diff --git a/Documentation/mic/mpssd/Makefile b/Documentation/mic/mpssd/Makefile new file mode 100644 index 000000000000..eb860a7d152e --- /dev/null +++ b/Documentation/mic/mpssd/Makefile | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # Makefile - Intel MIC User Space Tools. | ||
3 | # Copyright(c) 2013, Intel Corporation. | ||
4 | # | ||
5 | ifdef DEBUG | ||
6 | CFLAGS += $(USERWARNFLAGS) -I. -g -Wall -DDEBUG=$(DEBUG) | ||
7 | else | ||
8 | CFLAGS += $(USERWARNFLAGS) -I. -g -Wall | ||
9 | endif | ||
10 | |||
11 | mpssd: mpssd.o sysfs.o | ||
12 | $(CC) $(CFLAGS) -o $@ $^ -lpthread | ||
13 | |||
14 | install: | ||
15 | install mpssd /usr/sbin/mpssd | ||
16 | install micctrl /usr/sbin/micctrl | ||
17 | |||
18 | clean: | ||
19 | rm -f mpssd *.o | ||
diff --git a/Documentation/mic/mpssd/micctrl b/Documentation/mic/mpssd/micctrl new file mode 100755 index 000000000000..8f2629b41c5f --- /dev/null +++ b/Documentation/mic/mpssd/micctrl | |||
@@ -0,0 +1,173 @@ | |||
1 | #!/bin/bash | ||
2 | # Intel MIC Platform Software Stack (MPSS) | ||
3 | # | ||
4 | # Copyright(c) 2013 Intel Corporation. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License, version 2, as | ||
8 | # published by the Free Software Foundation. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # The full GNU General Public License is included in this distribution in | ||
16 | # the file called "COPYING". | ||
17 | # | ||
18 | # Intel MIC User Space Tools. | ||
19 | # | ||
20 | # micctrl - Controls MIC boot/start/stop. | ||
21 | # | ||
22 | # chkconfig: 2345 95 05 | ||
23 | # description: start MPSS stack processing. | ||
24 | # | ||
25 | ### BEGIN INIT INFO | ||
26 | # Provides: micctrl | ||
27 | ### END INIT INFO | ||
28 | |||
29 | # Source function library. | ||
30 | . /etc/init.d/functions | ||
31 | |||
32 | sysfs="/sys/class/mic" | ||
33 | |||
34 | _status() | ||
35 | { | ||
36 | f=$sysfs/$1 | ||
37 | echo -e $1 state: "`cat $f/state`" shutdown_status: "`cat $f/shutdown_status`" | ||
38 | } | ||
39 | |||
40 | status() | ||
41 | { | ||
42 | if [ "`echo $1 | head -c3`" == "mic" ]; then | ||
43 | _status $1 | ||
44 | return $? | ||
45 | fi | ||
46 | for f in $sysfs/* | ||
47 | do | ||
48 | _status `basename $f` | ||
49 | RETVAL=$? | ||
50 | [ $RETVAL -ne 0 ] && return $RETVAL | ||
51 | done | ||
52 | return 0 | ||
53 | } | ||
54 | |||
55 | _reset() | ||
56 | { | ||
57 | f=$sysfs/$1 | ||
58 | echo reset > $f/state | ||
59 | } | ||
60 | |||
61 | reset() | ||
62 | { | ||
63 | if [ "`echo $1 | head -c3`" == "mic" ]; then | ||
64 | _reset $1 | ||
65 | return $? | ||
66 | fi | ||
67 | for f in $sysfs/* | ||
68 | do | ||
69 | _reset `basename $f` | ||
70 | RETVAL=$? | ||
71 | [ $RETVAL -ne 0 ] && return $RETVAL | ||
72 | done | ||
73 | return 0 | ||
74 | } | ||
75 | |||
76 | _boot() | ||
77 | { | ||
78 | f=$sysfs/$1 | ||
79 | echo "linux" > $f/bootmode | ||
80 | echo "mic/uos.img" > $f/firmware | ||
81 | echo "mic/$1.image" > $f/ramdisk | ||
82 | echo "boot" > $f/state | ||
83 | } | ||
84 | |||
85 | boot() | ||
86 | { | ||
87 | if [ "`echo $1 | head -c3`" == "mic" ]; then | ||
88 | _boot $1 | ||
89 | return $? | ||
90 | fi | ||
91 | for f in $sysfs/* | ||
92 | do | ||
93 | _boot `basename $f` | ||
94 | RETVAL=$? | ||
95 | [ $RETVAL -ne 0 ] && return $RETVAL | ||
96 | done | ||
97 | return 0 | ||
98 | } | ||
99 | |||
100 | _shutdown() | ||
101 | { | ||
102 | f=$sysfs/$1 | ||
103 | echo shutdown > $f/state | ||
104 | } | ||
105 | |||
106 | shutdown() | ||
107 | { | ||
108 | if [ "`echo $1 | head -c3`" == "mic" ]; then | ||
109 | _shutdown $1 | ||
110 | return $? | ||
111 | fi | ||
112 | for f in $sysfs/* | ||
113 | do | ||
114 | _shutdown `basename $f` | ||
115 | RETVAL=$? | ||
116 | [ $RETVAL -ne 0 ] && return $RETVAL | ||
117 | done | ||
118 | return 0 | ||
119 | } | ||
120 | |||
121 | _wait() | ||
122 | { | ||
123 | f=$sysfs/$1 | ||
124 | while [ "`cat $f/state`" != "offline" -a "`cat $f/state`" != "online" ] | ||
125 | do | ||
126 | sleep 1 | ||
127 | echo -e "Waiting for $1 to go offline" | ||
128 | done | ||
129 | } | ||
130 | |||
131 | wait() | ||
132 | { | ||
133 | if [ "`echo $1 | head -c3`" == "mic" ]; then | ||
134 | _wait $1 | ||
135 | return $? | ||
136 | fi | ||
137 | # Wait for the cards to go offline | ||
138 | for f in $sysfs/* | ||
139 | do | ||
140 | _wait `basename $f` | ||
141 | RETVAL=$? | ||
142 | [ $RETVAL -ne 0 ] && return $RETVAL | ||
143 | done | ||
144 | return 0 | ||
145 | } | ||
146 | |||
147 | if [ ! -d "$sysfs" ]; then | ||
148 | echo -e $"Module unloaded " | ||
149 | exit 3 | ||
150 | fi | ||
151 | |||
152 | case $1 in | ||
153 | -s) | ||
154 | status $2 | ||
155 | ;; | ||
156 | -r) | ||
157 | reset $2 | ||
158 | ;; | ||
159 | -b) | ||
160 | boot $2 | ||
161 | ;; | ||
162 | -S) | ||
163 | shutdown $2 | ||
164 | ;; | ||
165 | -w) | ||
166 | wait $2 | ||
167 | ;; | ||
168 | *) | ||
169 | echo $"Usage: $0 {-s (status) |-r (reset) |-b (boot) |-S (shutdown) |-w (wait)}" | ||
170 | exit 2 | ||
171 | esac | ||
172 | |||
173 | exit $? | ||
diff --git a/Documentation/mic/mpssd/mpss b/Documentation/mic/mpssd/mpss new file mode 100755 index 000000000000..3136c68dad0b --- /dev/null +++ b/Documentation/mic/mpssd/mpss | |||
@@ -0,0 +1,202 @@ | |||
1 | #!/bin/bash | ||
2 | # Intel MIC Platform Software Stack (MPSS) | ||
3 | # | ||
4 | # Copyright(c) 2013 Intel Corporation. | ||
5 | # | ||
6 | # This program is free software; you can redistribute it and/or modify | ||
7 | # it under the terms of the GNU General Public License, version 2, as | ||
8 | # published by the Free Software Foundation. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, but | ||
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | # General Public License for more details. | ||
14 | # | ||
15 | # The full GNU General Public License is included in this distribution in | ||
16 | # the file called "COPYING". | ||
17 | # | ||
18 | # Intel MIC User Space Tools. | ||
19 | # | ||
20 | # mpss Start mpssd. | ||
21 | # | ||
22 | # chkconfig: 2345 95 05 | ||
23 | # description: start MPSS stack processing. | ||
24 | # | ||
25 | ### BEGIN INIT INFO | ||
26 | # Provides: mpss | ||
27 | # Required-Start: | ||
28 | # Required-Stop: | ||
29 | # Short-Description: MPSS stack control | ||
30 | # Description: MPSS stack control | ||
31 | ### END INIT INFO | ||
32 | |||
33 | # Source function library. | ||
34 | . /etc/init.d/functions | ||
35 | |||
36 | exec=/usr/sbin/mpssd | ||
37 | sysfs="/sys/class/mic" | ||
38 | |||
39 | start() | ||
40 | { | ||
41 | [ -x $exec ] || exit 5 | ||
42 | |||
43 | if [ "`ps -e | awk '{print $4}' | grep mpssd | head -1`" = "mpssd" ]; then | ||
44 | echo -e $"MPSSD already running! " | ||
45 | success | ||
46 | echo | ||
47 | return 0 | ||
48 | fi | ||
49 | |||
50 | echo -e $"Starting MPSS Stack" | ||
51 | echo -e $"Loading MIC_HOST Module" | ||
52 | |||
53 | # Ensure the driver is loaded | ||
54 | if [ ! -d "$sysfs" ]; then | ||
55 | modprobe mic_host | ||
56 | RETVAL=$? | ||
57 | if [ $RETVAL -ne 0 ]; then | ||
58 | failure | ||
59 | echo | ||
60 | return $RETVAL | ||
61 | fi | ||
62 | fi | ||
63 | |||
64 | # Start the daemon | ||
65 | echo -n $"Starting MPSSD " | ||
66 | $exec | ||
67 | RETVAL=$? | ||
68 | if [ $RETVAL -ne 0 ]; then | ||
69 | failure | ||
70 | echo | ||
71 | return $RETVAL | ||
72 | fi | ||
73 | success | ||
74 | echo | ||
75 | |||
76 | sleep 5 | ||
77 | |||
78 | # Boot the cards | ||
79 | micctrl -b | ||
80 | |||
81 | # Wait till ping works | ||
82 | for f in $sysfs/* | ||
83 | do | ||
84 | count=100 | ||
85 | ipaddr=`cat $f/cmdline` | ||
86 | ipaddr=${ipaddr#*address,} | ||
87 | ipaddr=`echo $ipaddr | cut -d, -f1 | cut -d\; -f1` | ||
88 | while [ $count -ge 0 ] | ||
89 | do | ||
90 | echo -e "Pinging "`basename $f`" " | ||
91 | ping -c 1 $ipaddr &> /dev/null | ||
92 | RETVAL=$? | ||
93 | if [ $RETVAL -eq 0 ]; then | ||
94 | success | ||
95 | break | ||
96 | fi | ||
97 | sleep 1 | ||
98 | count=`expr $count - 1` | ||
99 | done | ||
100 | [ $RETVAL -ne 0 ] && failure || success | ||
101 | echo | ||
102 | done | ||
103 | return $RETVAL | ||
104 | } | ||
105 | |||
106 | stop() | ||
107 | { | ||
108 | echo -e $"Shutting down MPSS Stack: " | ||
109 | |||
110 | # Bail out if module is unloaded | ||
111 | if [ ! -d "$sysfs" ]; then | ||
112 | echo -n $"Module unloaded " | ||
113 | success | ||
114 | echo | ||
115 | return 0 | ||
116 | fi | ||
117 | |||
118 | # Shut down the cards. | ||
119 | micctrl -S | ||
120 | |||
121 | # Wait for the cards to go offline | ||
122 | for f in $sysfs/* | ||
123 | do | ||
124 | while [ "`cat $f/state`" != "offline" ] | ||
125 | do | ||
126 | sleep 1 | ||
127 | echo -e "Waiting for "`basename $f`" to go offline" | ||
128 | done | ||
129 | done | ||
130 | |||
131 | # Display the status of the cards | ||
132 | micctrl -s | ||
133 | |||
134 | # Kill MPSSD now | ||
135 | echo -n $"Killing MPSSD" | ||
136 | killall -9 mpssd 2>/dev/null | ||
137 | RETVAL=$? | ||
138 | [ $RETVAL -ne 0 ] && failure || success | ||
139 | echo | ||
140 | return $RETVAL | ||
141 | } | ||
142 | |||
143 | restart() | ||
144 | { | ||
145 | stop | ||
146 | sleep 5 | ||
147 | start | ||
148 | } | ||
149 | |||
150 | status() | ||
151 | { | ||
152 | micctrl -s | ||
153 | if [ "`ps -e | awk '{print $4}' | grep mpssd | head -n 1`" = "mpssd" ]; then | ||
154 | echo "mpssd is running" | ||
155 | else | ||
156 | echo "mpssd is stopped" | ||
157 | fi | ||
158 | return 0 | ||
159 | } | ||
160 | |||
161 | unload() | ||
162 | { | ||
163 | if [ ! -d "$sysfs" ]; then | ||
164 | echo -n $"No MIC_HOST Module: " | ||
165 | success | ||
166 | echo | ||
167 | return | ||
168 | fi | ||
169 | |||
170 | stop | ||
171 | |||
172 | sleep 5 | ||
173 | echo -n $"Removing MIC_HOST Module: " | ||
174 | modprobe -r mic_host | ||
175 | RETVAL=$? | ||
176 | [ $RETVAL -ne 0 ] && failure || success | ||
177 | echo | ||
178 | return $RETVAL | ||
179 | } | ||
180 | |||
181 | case $1 in | ||
182 | start) | ||
183 | start | ||
184 | ;; | ||
185 | stop) | ||
186 | stop | ||
187 | ;; | ||
188 | restart) | ||
189 | restart | ||
190 | ;; | ||
191 | status) | ||
192 | status | ||
193 | ;; | ||
194 | unload) | ||
195 | unload | ||
196 | ;; | ||
197 | *) | ||
198 | echo $"Usage: $0 {start|stop|restart|status|unload}" | ||
199 | exit 2 | ||
200 | esac | ||
201 | |||
202 | exit $? | ||
diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c new file mode 100644 index 000000000000..0c980ad40b17 --- /dev/null +++ b/Documentation/mic/mpssd/mpssd.c | |||
@@ -0,0 +1,1721 @@ | |||
1 | /* | ||
2 | * Intel MIC Platform Software Stack (MPSS) | ||
3 | * | ||
4 | * Copyright(c) 2013 Intel Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License, version 2, as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | * | ||
15 | * The full GNU General Public License is included in this distribution in | ||
16 | * the file called "COPYING". | ||
17 | * | ||
18 | * Intel MIC User Space Tools. | ||
19 | */ | ||
20 | |||
21 | #define _GNU_SOURCE | ||
22 | |||
23 | #include <stdlib.h> | ||
24 | #include <fcntl.h> | ||
25 | #include <getopt.h> | ||
26 | #include <assert.h> | ||
27 | #include <unistd.h> | ||
28 | #include <stdbool.h> | ||
29 | #include <signal.h> | ||
30 | #include <poll.h> | ||
31 | #include <features.h> | ||
32 | #include <sys/types.h> | ||
33 | #include <sys/stat.h> | ||
34 | #include <sys/mman.h> | ||
35 | #include <sys/socket.h> | ||
36 | #include <linux/virtio_ring.h> | ||
37 | #include <linux/virtio_net.h> | ||
38 | #include <linux/virtio_console.h> | ||
39 | #include <linux/virtio_blk.h> | ||
40 | #include <linux/version.h> | ||
41 | #include "mpssd.h" | ||
42 | #include <linux/mic_ioctl.h> | ||
43 | #include <linux/mic_common.h> | ||
44 | |||
45 | static void init_mic(struct mic_info *mic); | ||
46 | |||
47 | static FILE *logfp; | ||
48 | static struct mic_info mic_list; | ||
49 | |||
50 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | ||
51 | |||
52 | #define min_t(type, x, y) ({ \ | ||
53 | type __min1 = (x); \ | ||
54 | type __min2 = (y); \ | ||
55 | __min1 < __min2 ? __min1 : __min2; }) | ||
56 | |||
57 | /* align addr on a size boundary - adjust address up/down if needed */ | ||
58 | #define _ALIGN_DOWN(addr, size) ((addr)&(~((size)-1))) | ||
59 | #define _ALIGN_UP(addr, size) _ALIGN_DOWN(addr + size - 1, size) | ||
60 | |||
61 | /* align addr on a size boundary - adjust address up if needed */ | ||
62 | #define _ALIGN(addr, size) _ALIGN_UP(addr, size) | ||
63 | |||
64 | /* to align the pointer to the (next) page boundary */ | ||
65 | #define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) | ||
66 | |||
67 | #define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) | ||
68 | |||
69 | #define GSO_ENABLED 1 | ||
70 | #define MAX_GSO_SIZE (64 * 1024) | ||
71 | #define ETH_H_LEN 14 | ||
72 | #define MAX_NET_PKT_SIZE (_ALIGN_UP(MAX_GSO_SIZE + ETH_H_LEN, 64)) | ||
73 | #define MIC_DEVICE_PAGE_END 0x1000 | ||
74 | |||
75 | #ifndef VIRTIO_NET_HDR_F_DATA_VALID | ||
76 | #define VIRTIO_NET_HDR_F_DATA_VALID 2 /* Csum is valid */ | ||
77 | #endif | ||
78 | |||
79 | static struct { | ||
80 | struct mic_device_desc dd; | ||
81 | struct mic_vqconfig vqconfig[2]; | ||
82 | __u32 host_features, guest_acknowledgements; | ||
83 | struct virtio_console_config cons_config; | ||
84 | } virtcons_dev_page = { | ||
85 | .dd = { | ||
86 | .type = VIRTIO_ID_CONSOLE, | ||
87 | .num_vq = ARRAY_SIZE(virtcons_dev_page.vqconfig), | ||
88 | .feature_len = sizeof(virtcons_dev_page.host_features), | ||
89 | .config_len = sizeof(virtcons_dev_page.cons_config), | ||
90 | }, | ||
91 | .vqconfig[0] = { | ||
92 | .num = htole16(MIC_VRING_ENTRIES), | ||
93 | }, | ||
94 | .vqconfig[1] = { | ||
95 | .num = htole16(MIC_VRING_ENTRIES), | ||
96 | }, | ||
97 | }; | ||
98 | |||
99 | static struct { | ||
100 | struct mic_device_desc dd; | ||
101 | struct mic_vqconfig vqconfig[2]; | ||
102 | __u32 host_features, guest_acknowledgements; | ||
103 | struct virtio_net_config net_config; | ||
104 | } virtnet_dev_page = { | ||
105 | .dd = { | ||
106 | .type = VIRTIO_ID_NET, | ||
107 | .num_vq = ARRAY_SIZE(virtnet_dev_page.vqconfig), | ||
108 | .feature_len = sizeof(virtnet_dev_page.host_features), | ||
109 | .config_len = sizeof(virtnet_dev_page.net_config), | ||
110 | }, | ||
111 | .vqconfig[0] = { | ||
112 | .num = htole16(MIC_VRING_ENTRIES), | ||
113 | }, | ||
114 | .vqconfig[1] = { | ||
115 | .num = htole16(MIC_VRING_ENTRIES), | ||
116 | }, | ||
117 | #if GSO_ENABLED | ||
118 | .host_features = htole32( | ||
119 | 1 << VIRTIO_NET_F_CSUM | | ||
120 | 1 << VIRTIO_NET_F_GSO | | ||
121 | 1 << VIRTIO_NET_F_GUEST_TSO4 | | ||
122 | 1 << VIRTIO_NET_F_GUEST_TSO6 | | ||
123 | 1 << VIRTIO_NET_F_GUEST_ECN | | ||
124 | 1 << VIRTIO_NET_F_GUEST_UFO), | ||
125 | #else | ||
126 | .host_features = 0, | ||
127 | #endif | ||
128 | }; | ||
129 | |||
130 | static const char *mic_config_dir = "/etc/sysconfig/mic"; | ||
131 | static const char *virtblk_backend = "VIRTBLK_BACKEND"; | ||
132 | static struct { | ||
133 | struct mic_device_desc dd; | ||
134 | struct mic_vqconfig vqconfig[1]; | ||
135 | __u32 host_features, guest_acknowledgements; | ||
136 | struct virtio_blk_config blk_config; | ||
137 | } virtblk_dev_page = { | ||
138 | .dd = { | ||
139 | .type = VIRTIO_ID_BLOCK, | ||
140 | .num_vq = ARRAY_SIZE(virtblk_dev_page.vqconfig), | ||
141 | .feature_len = sizeof(virtblk_dev_page.host_features), | ||
142 | .config_len = sizeof(virtblk_dev_page.blk_config), | ||
143 | }, | ||
144 | .vqconfig[0] = { | ||
145 | .num = htole16(MIC_VRING_ENTRIES), | ||
146 | }, | ||
147 | .host_features = | ||
148 | htole32(1<<VIRTIO_BLK_F_SEG_MAX), | ||
149 | .blk_config = { | ||
150 | .seg_max = htole32(MIC_VRING_ENTRIES - 2), | ||
151 | .capacity = htole64(0), | ||
152 | } | ||
153 | }; | ||
154 | |||
155 | static char *myname; | ||
156 | |||
157 | static int | ||
158 | tap_configure(struct mic_info *mic, char *dev) | ||
159 | { | ||
160 | pid_t pid; | ||
161 | char *ifargv[7]; | ||
162 | char ipaddr[IFNAMSIZ]; | ||
163 | int ret = 0; | ||
164 | |||
165 | pid = fork(); | ||
166 | if (pid == 0) { | ||
167 | ifargv[0] = "ip"; | ||
168 | ifargv[1] = "link"; | ||
169 | ifargv[2] = "set"; | ||
170 | ifargv[3] = dev; | ||
171 | ifargv[4] = "up"; | ||
172 | ifargv[5] = NULL; | ||
173 | mpsslog("Configuring %s\n", dev); | ||
174 | ret = execvp("ip", ifargv); | ||
175 | if (ret < 0) { | ||
176 | mpsslog("%s execvp failed errno %s\n", | ||
177 | mic->name, strerror(errno)); | ||
178 | return ret; | ||
179 | } | ||
180 | } | ||
181 | if (pid < 0) { | ||
182 | mpsslog("%s fork failed errno %s\n", | ||
183 | mic->name, strerror(errno)); | ||
184 | return ret; | ||
185 | } | ||
186 | |||
187 | ret = waitpid(pid, NULL, 0); | ||
188 | if (ret < 0) { | ||
189 | mpsslog("%s waitpid failed errno %s\n", | ||
190 | mic->name, strerror(errno)); | ||
191 | return ret; | ||
192 | } | ||
193 | |||
194 | snprintf(ipaddr, IFNAMSIZ, "172.31.%d.254/24", mic->id); | ||
195 | |||
196 | pid = fork(); | ||
197 | if (pid == 0) { | ||
198 | ifargv[0] = "ip"; | ||
199 | ifargv[1] = "addr"; | ||
200 | ifargv[2] = "add"; | ||
201 | ifargv[3] = ipaddr; | ||
202 | ifargv[4] = "dev"; | ||
203 | ifargv[5] = dev; | ||
204 | ifargv[6] = NULL; | ||
205 | mpsslog("Configuring %s ipaddr %s\n", dev, ipaddr); | ||
206 | ret = execvp("ip", ifargv); | ||
207 | if (ret < 0) { | ||
208 | mpsslog("%s execvp failed errno %s\n", | ||
209 | mic->name, strerror(errno)); | ||
210 | return ret; | ||
211 | } | ||
212 | } | ||
213 | if (pid < 0) { | ||
214 | mpsslog("%s fork failed errno %s\n", | ||
215 | mic->name, strerror(errno)); | ||
216 | return ret; | ||
217 | } | ||
218 | |||
219 | ret = waitpid(pid, NULL, 0); | ||
220 | if (ret < 0) { | ||
221 | mpsslog("%s waitpid failed errno %s\n", | ||
222 | mic->name, strerror(errno)); | ||
223 | return ret; | ||
224 | } | ||
225 | mpsslog("MIC name %s %s %d DONE!\n", | ||
226 | mic->name, __func__, __LINE__); | ||
227 | return 0; | ||
228 | } | ||
229 | |||
230 | static int tun_alloc(struct mic_info *mic, char *dev) | ||
231 | { | ||
232 | struct ifreq ifr; | ||
233 | int fd, err; | ||
234 | #if GSO_ENABLED | ||
235 | unsigned offload; | ||
236 | #endif | ||
237 | fd = open("/dev/net/tun", O_RDWR); | ||
238 | if (fd < 0) { | ||
239 | mpsslog("Could not open /dev/net/tun %s\n", strerror(errno)); | ||
240 | goto done; | ||
241 | } | ||
242 | |||
243 | memset(&ifr, 0, sizeof(ifr)); | ||
244 | |||
245 | ifr.ifr_flags = IFF_TAP | IFF_NO_PI | IFF_VNET_HDR; | ||
246 | if (*dev) | ||
247 | strncpy(ifr.ifr_name, dev, IFNAMSIZ); | ||
248 | |||
249 | err = ioctl(fd, TUNSETIFF, (void *)&ifr); | ||
250 | if (err < 0) { | ||
251 | mpsslog("%s %s %d TUNSETIFF failed %s\n", | ||
252 | mic->name, __func__, __LINE__, strerror(errno)); | ||
253 | close(fd); | ||
254 | return err; | ||
255 | } | ||
256 | #if GSO_ENABLED | ||
257 | offload = TUN_F_CSUM | TUN_F_TSO4 | TUN_F_TSO6 | | ||
258 | TUN_F_TSO_ECN | TUN_F_UFO; | ||
259 | |||
260 | err = ioctl(fd, TUNSETOFFLOAD, offload); | ||
261 | if (err < 0) { | ||
262 | mpsslog("%s %s %d TUNSETOFFLOAD failed %s\n", | ||
263 | mic->name, __func__, __LINE__, strerror(errno)); | ||
264 | close(fd); | ||
265 | return err; | ||
266 | } | ||
267 | #endif | ||
268 | strcpy(dev, ifr.ifr_name); | ||
269 | mpsslog("Created TAP %s\n", dev); | ||
270 | done: | ||
271 | return fd; | ||
272 | } | ||
273 | |||
274 | #define NET_FD_VIRTIO_NET 0 | ||
275 | #define NET_FD_TUN 1 | ||
276 | #define MAX_NET_FD 2 | ||
277 | |||
278 | static void set_dp(struct mic_info *mic, int type, void *dp) | ||
279 | { | ||
280 | switch (type) { | ||
281 | case VIRTIO_ID_CONSOLE: | ||
282 | mic->mic_console.console_dp = dp; | ||
283 | return; | ||
284 | case VIRTIO_ID_NET: | ||
285 | mic->mic_net.net_dp = dp; | ||
286 | return; | ||
287 | case VIRTIO_ID_BLOCK: | ||
288 | mic->mic_virtblk.block_dp = dp; | ||
289 | return; | ||
290 | } | ||
291 | mpsslog("%s %s %d not found\n", mic->name, __func__, type); | ||
292 | assert(0); | ||
293 | } | ||
294 | |||
295 | static void *get_dp(struct mic_info *mic, int type) | ||
296 | { | ||
297 | switch (type) { | ||
298 | case VIRTIO_ID_CONSOLE: | ||
299 | return mic->mic_console.console_dp; | ||
300 | case VIRTIO_ID_NET: | ||
301 | return mic->mic_net.net_dp; | ||
302 | case VIRTIO_ID_BLOCK: | ||
303 | return mic->mic_virtblk.block_dp; | ||
304 | } | ||
305 | mpsslog("%s %s %d not found\n", mic->name, __func__, type); | ||
306 | assert(0); | ||
307 | return NULL; | ||
308 | } | ||
309 | |||
310 | static struct mic_device_desc *get_device_desc(struct mic_info *mic, int type) | ||
311 | { | ||
312 | struct mic_device_desc *d; | ||
313 | int i; | ||
314 | void *dp = get_dp(mic, type); | ||
315 | |||
316 | for (i = mic_aligned_size(struct mic_bootparam); i < PAGE_SIZE; | ||
317 | i += mic_total_desc_size(d)) { | ||
318 | d = dp + i; | ||
319 | |||
320 | /* End of list */ | ||
321 | if (d->type == 0) | ||
322 | break; | ||
323 | |||
324 | if (d->type == -1) | ||
325 | continue; | ||
326 | |||
327 | mpsslog("%s %s d-> type %d d %p\n", | ||
328 | mic->name, __func__, d->type, d); | ||
329 | |||
330 | if (d->type == (__u8)type) | ||
331 | return d; | ||
332 | } | ||
333 | mpsslog("%s %s %d not found\n", mic->name, __func__, type); | ||
334 | assert(0); | ||
335 | return NULL; | ||
336 | } | ||
337 | |||
338 | /* See comments in vhost.c for explanation of next_desc() */ | ||
339 | static unsigned next_desc(struct vring_desc *desc) | ||
340 | { | ||
341 | unsigned int next; | ||
342 | |||
343 | if (!(le16toh(desc->flags) & VRING_DESC_F_NEXT)) | ||
344 | return -1U; | ||
345 | next = le16toh(desc->next); | ||
346 | return next; | ||
347 | } | ||
348 | |||
349 | /* Sum up all the IOVEC length */ | ||
350 | static ssize_t | ||
351 | sum_iovec_len(struct mic_copy_desc *copy) | ||
352 | { | ||
353 | ssize_t sum = 0; | ||
354 | int i; | ||
355 | |||
356 | for (i = 0; i < copy->iovcnt; i++) | ||
357 | sum += copy->iov[i].iov_len; | ||
358 | return sum; | ||
359 | } | ||
360 | |||
361 | static inline void verify_out_len(struct mic_info *mic, | ||
362 | struct mic_copy_desc *copy) | ||
363 | { | ||
364 | if (copy->out_len != sum_iovec_len(copy)) { | ||
365 | mpsslog("%s %s %d BUG copy->out_len 0x%x len 0x%zx\n", | ||
366 | mic->name, __func__, __LINE__, | ||
367 | copy->out_len, sum_iovec_len(copy)); | ||
368 | assert(copy->out_len == sum_iovec_len(copy)); | ||
369 | } | ||
370 | } | ||
371 | |||
372 | /* Display an iovec */ | ||
373 | static void | ||
374 | disp_iovec(struct mic_info *mic, struct mic_copy_desc *copy, | ||
375 | const char *s, int line) | ||
376 | { | ||
377 | int i; | ||
378 | |||
379 | for (i = 0; i < copy->iovcnt; i++) | ||
380 | mpsslog("%s %s %d copy->iov[%d] addr %p len 0x%zx\n", | ||
381 | mic->name, s, line, i, | ||
382 | copy->iov[i].iov_base, copy->iov[i].iov_len); | ||
383 | } | ||
384 | |||
385 | static inline __u16 read_avail_idx(struct mic_vring *vr) | ||
386 | { | ||
387 | return ACCESS_ONCE(vr->info->avail_idx); | ||
388 | } | ||
389 | |||
390 | static inline void txrx_prepare(int type, bool tx, struct mic_vring *vr, | ||
391 | struct mic_copy_desc *copy, ssize_t len) | ||
392 | { | ||
393 | copy->vr_idx = tx ? 0 : 1; | ||
394 | copy->update_used = true; | ||
395 | if (type == VIRTIO_ID_NET) | ||
396 | copy->iov[1].iov_len = len - sizeof(struct virtio_net_hdr); | ||
397 | else | ||
398 | copy->iov[0].iov_len = len; | ||
399 | } | ||
400 | |||
401 | /* Central API which triggers the copies */ | ||
402 | static int | ||
403 | mic_virtio_copy(struct mic_info *mic, int fd, | ||
404 | struct mic_vring *vr, struct mic_copy_desc *copy) | ||
405 | { | ||
406 | int ret; | ||
407 | |||
408 | ret = ioctl(fd, MIC_VIRTIO_COPY_DESC, copy); | ||
409 | if (ret) { | ||
410 | mpsslog("%s %s %d errno %s ret %d\n", | ||
411 | mic->name, __func__, __LINE__, | ||
412 | strerror(errno), ret); | ||
413 | } | ||
414 | return ret; | ||
415 | } | ||
416 | |||
417 | /* | ||
418 | * This initialization routine requires at least one | ||
419 | * vring i.e. vr0. vr1 is optional. | ||
420 | */ | ||
421 | static void * | ||
422 | init_vr(struct mic_info *mic, int fd, int type, | ||
423 | struct mic_vring *vr0, struct mic_vring *vr1, int num_vq) | ||
424 | { | ||
425 | int vr_size; | ||
426 | char *va; | ||
427 | |||
428 | vr_size = PAGE_ALIGN(vring_size(MIC_VRING_ENTRIES, | ||
429 | MIC_VIRTIO_RING_ALIGN) + sizeof(struct _mic_vring_info)); | ||
430 | va = mmap(NULL, MIC_DEVICE_PAGE_END + vr_size * num_vq, | ||
431 | PROT_READ, MAP_SHARED, fd, 0); | ||
432 | if (MAP_FAILED == va) { | ||
433 | mpsslog("%s %s %d mmap failed errno %s\n", | ||
434 | mic->name, __func__, __LINE__, | ||
435 | strerror(errno)); | ||
436 | goto done; | ||
437 | } | ||
438 | set_dp(mic, type, va); | ||
439 | vr0->va = (struct mic_vring *)&va[MIC_DEVICE_PAGE_END]; | ||
440 | vr0->info = vr0->va + | ||
441 | vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN); | ||
442 | vring_init(&vr0->vr, | ||
443 | MIC_VRING_ENTRIES, vr0->va, MIC_VIRTIO_RING_ALIGN); | ||
444 | mpsslog("%s %s vr0 %p vr0->info %p vr_size 0x%x vring 0x%x ", | ||
445 | __func__, mic->name, vr0->va, vr0->info, vr_size, | ||
446 | vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN)); | ||
447 | mpsslog("magic 0x%x expected 0x%x\n", | ||
448 | vr0->info->magic, MIC_MAGIC + type); | ||
449 | assert(vr0->info->magic == MIC_MAGIC + type); | ||
450 | if (vr1) { | ||
451 | vr1->va = (struct mic_vring *) | ||
452 | &va[MIC_DEVICE_PAGE_END + vr_size]; | ||
453 | vr1->info = vr1->va + vring_size(MIC_VRING_ENTRIES, | ||
454 | MIC_VIRTIO_RING_ALIGN); | ||
455 | vring_init(&vr1->vr, | ||
456 | MIC_VRING_ENTRIES, vr1->va, MIC_VIRTIO_RING_ALIGN); | ||
457 | mpsslog("%s %s vr1 %p vr1->info %p vr_size 0x%x vring 0x%x ", | ||
458 | __func__, mic->name, vr1->va, vr1->info, vr_size, | ||
459 | vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN)); | ||
460 | mpsslog("magic 0x%x expected 0x%x\n", | ||
461 | vr1->info->magic, MIC_MAGIC + type + 1); | ||
462 | assert(vr1->info->magic == MIC_MAGIC + type + 1); | ||
463 | } | ||
464 | done: | ||
465 | return va; | ||
466 | } | ||
467 | |||
468 | static void | ||
469 | wait_for_card_driver(struct mic_info *mic, int fd, int type) | ||
470 | { | ||
471 | struct pollfd pollfd; | ||
472 | int err; | ||
473 | struct mic_device_desc *desc = get_device_desc(mic, type); | ||
474 | |||
475 | pollfd.fd = fd; | ||
476 | mpsslog("%s %s Waiting .... desc-> type %d status 0x%x\n", | ||
477 | mic->name, __func__, type, desc->status); | ||
478 | while (1) { | ||
479 | pollfd.events = POLLIN; | ||
480 | pollfd.revents = 0; | ||
481 | err = poll(&pollfd, 1, -1); | ||
482 | if (err < 0) { | ||
483 | mpsslog("%s %s poll failed %s\n", | ||
484 | mic->name, __func__, strerror(errno)); | ||
485 | continue; | ||
486 | } | ||
487 | |||
488 | if (pollfd.revents) { | ||
489 | mpsslog("%s %s Waiting... desc-> type %d status 0x%x\n", | ||
490 | mic->name, __func__, type, desc->status); | ||
491 | if (desc->status & VIRTIO_CONFIG_S_DRIVER_OK) { | ||
492 | mpsslog("%s %s poll.revents %d\n", | ||
493 | mic->name, __func__, pollfd.revents); | ||
494 | mpsslog("%s %s desc-> type %d status 0x%x\n", | ||
495 | mic->name, __func__, type, | ||
496 | desc->status); | ||
497 | break; | ||
498 | } | ||
499 | } | ||
500 | } | ||
501 | } | ||
502 | |||
503 | /* Spin till we have some descriptors */ | ||
504 | static void | ||
505 | spin_for_descriptors(struct mic_info *mic, struct mic_vring *vr) | ||
506 | { | ||
507 | __u16 avail_idx = read_avail_idx(vr); | ||
508 | |||
509 | while (avail_idx == le16toh(ACCESS_ONCE(vr->vr.avail->idx))) { | ||
510 | #ifdef DEBUG | ||
511 | mpsslog("%s %s waiting for desc avail %d info_avail %d\n", | ||
512 | mic->name, __func__, | ||
513 | le16toh(vr->vr.avail->idx), vr->info->avail_idx); | ||
514 | #endif | ||
515 | sched_yield(); | ||
516 | } | ||
517 | } | ||
518 | |||
519 | static void * | ||
520 | virtio_net(void *arg) | ||
521 | { | ||
522 | static __u8 vnet_hdr[2][sizeof(struct virtio_net_hdr)]; | ||
523 | static __u8 vnet_buf[2][MAX_NET_PKT_SIZE] __aligned(64); | ||
524 | struct iovec vnet_iov[2][2] = { | ||
525 | { { .iov_base = vnet_hdr[0], .iov_len = sizeof(vnet_hdr[0]) }, | ||
526 | { .iov_base = vnet_buf[0], .iov_len = sizeof(vnet_buf[0]) } }, | ||
527 | { { .iov_base = vnet_hdr[1], .iov_len = sizeof(vnet_hdr[1]) }, | ||
528 | { .iov_base = vnet_buf[1], .iov_len = sizeof(vnet_buf[1]) } }, | ||
529 | }; | ||
530 | struct iovec *iov0 = vnet_iov[0], *iov1 = vnet_iov[1]; | ||
531 | struct mic_info *mic = (struct mic_info *)arg; | ||
532 | char if_name[IFNAMSIZ]; | ||
533 | struct pollfd net_poll[MAX_NET_FD]; | ||
534 | struct mic_vring tx_vr, rx_vr; | ||
535 | struct mic_copy_desc copy; | ||
536 | struct mic_device_desc *desc; | ||
537 | int err; | ||
538 | |||
539 | snprintf(if_name, IFNAMSIZ, "mic%d", mic->id); | ||
540 | mic->mic_net.tap_fd = tun_alloc(mic, if_name); | ||
541 | if (mic->mic_net.tap_fd < 0) | ||
542 | goto done; | ||
543 | |||
544 | if (tap_configure(mic, if_name)) | ||
545 | goto done; | ||
546 | mpsslog("MIC name %s id %d\n", mic->name, mic->id); | ||
547 | |||
548 | net_poll[NET_FD_VIRTIO_NET].fd = mic->mic_net.virtio_net_fd; | ||
549 | net_poll[NET_FD_VIRTIO_NET].events = POLLIN; | ||
550 | net_poll[NET_FD_TUN].fd = mic->mic_net.tap_fd; | ||
551 | net_poll[NET_FD_TUN].events = POLLIN; | ||
552 | |||
553 | if (MAP_FAILED == init_vr(mic, mic->mic_net.virtio_net_fd, | ||
554 | VIRTIO_ID_NET, &tx_vr, &rx_vr, | ||
555 | virtnet_dev_page.dd.num_vq)) { | ||
556 | mpsslog("%s init_vr failed %s\n", | ||
557 | mic->name, strerror(errno)); | ||
558 | goto done; | ||
559 | } | ||
560 | |||
561 | copy.iovcnt = 2; | ||
562 | desc = get_device_desc(mic, VIRTIO_ID_NET); | ||
563 | |||
564 | while (1) { | ||
565 | ssize_t len; | ||
566 | |||
567 | net_poll[NET_FD_VIRTIO_NET].revents = 0; | ||
568 | net_poll[NET_FD_TUN].revents = 0; | ||
569 | |||
570 | /* Start polling for data from tap and virtio net */ | ||
571 | err = poll(net_poll, 2, -1); | ||
572 | if (err < 0) { | ||
573 | mpsslog("%s poll failed %s\n", | ||
574 | __func__, strerror(errno)); | ||
575 | continue; | ||
576 | } | ||
577 | if (!(desc->status & VIRTIO_CONFIG_S_DRIVER_OK)) | ||
578 | wait_for_card_driver(mic, mic->mic_net.virtio_net_fd, | ||
579 | VIRTIO_ID_NET); | ||
580 | /* | ||
581 | * Check if there is data to be read from TUN and write to | ||
582 | * virtio net fd if there is. | ||
583 | */ | ||
584 | if (net_poll[NET_FD_TUN].revents & POLLIN) { | ||
585 | copy.iov = iov0; | ||
586 | len = readv(net_poll[NET_FD_TUN].fd, | ||
587 | copy.iov, copy.iovcnt); | ||
588 | if (len > 0) { | ||
589 | struct virtio_net_hdr *hdr | ||
590 | = (struct virtio_net_hdr *)vnet_hdr[0]; | ||
591 | |||
592 | /* Disable checksums on the card since we are on | ||
593 | a reliable PCIe link */ | ||
594 | hdr->flags |= VIRTIO_NET_HDR_F_DATA_VALID; | ||
595 | #ifdef DEBUG | ||
596 | mpsslog("%s %s %d hdr->flags 0x%x ", mic->name, | ||
597 | __func__, __LINE__, hdr->flags); | ||
598 | mpsslog("copy.out_len %d hdr->gso_type 0x%x\n", | ||
599 | copy.out_len, hdr->gso_type); | ||
600 | #endif | ||
601 | #ifdef DEBUG | ||
602 | disp_iovec(mic, copy, __func__, __LINE__); | ||
603 | mpsslog("%s %s %d read from tap 0x%lx\n", | ||
604 | mic->name, __func__, __LINE__, | ||
605 | len); | ||
606 | #endif | ||
607 | spin_for_descriptors(mic, &tx_vr); | ||
608 | txrx_prepare(VIRTIO_ID_NET, 1, &tx_vr, ©, | ||
609 | len); | ||
610 | |||
611 | err = mic_virtio_copy(mic, | ||
612 | mic->mic_net.virtio_net_fd, &tx_vr, | ||
613 | ©); | ||
614 | if (err < 0) { | ||
615 | mpsslog("%s %s %d mic_virtio_copy %s\n", | ||
616 | mic->name, __func__, __LINE__, | ||
617 | strerror(errno)); | ||
618 | } | ||
619 | if (!err) | ||
620 | verify_out_len(mic, ©); | ||
621 | #ifdef DEBUG | ||
622 | disp_iovec(mic, copy, __func__, __LINE__); | ||
623 | mpsslog("%s %s %d wrote to net 0x%lx\n", | ||
624 | mic->name, __func__, __LINE__, | ||
625 | sum_iovec_len(©)); | ||
626 | #endif | ||
627 | /* Reinitialize IOV for next run */ | ||
628 | iov0[1].iov_len = MAX_NET_PKT_SIZE; | ||
629 | } else if (len < 0) { | ||
630 | disp_iovec(mic, ©, __func__, __LINE__); | ||
631 | mpsslog("%s %s %d read failed %s ", mic->name, | ||
632 | __func__, __LINE__, strerror(errno)); | ||
633 | mpsslog("cnt %d sum %zd\n", | ||
634 | copy.iovcnt, sum_iovec_len(©)); | ||
635 | } | ||
636 | } | ||
637 | |||
638 | /* | ||
639 | * Check if there is data to be read from virtio net and | ||
640 | * write to TUN if there is. | ||
641 | */ | ||
642 | if (net_poll[NET_FD_VIRTIO_NET].revents & POLLIN) { | ||
643 | while (rx_vr.info->avail_idx != | ||
644 | le16toh(rx_vr.vr.avail->idx)) { | ||
645 | copy.iov = iov1; | ||
646 | txrx_prepare(VIRTIO_ID_NET, 0, &rx_vr, ©, | ||
647 | MAX_NET_PKT_SIZE | ||
648 | + sizeof(struct virtio_net_hdr)); | ||
649 | |||
650 | err = mic_virtio_copy(mic, | ||
651 | mic->mic_net.virtio_net_fd, &rx_vr, | ||
652 | ©); | ||
653 | if (!err) { | ||
654 | #ifdef DEBUG | ||
655 | struct virtio_net_hdr *hdr | ||
656 | = (struct virtio_net_hdr *) | ||
657 | vnet_hdr[1]; | ||
658 | |||
659 | mpsslog("%s %s %d hdr->flags 0x%x, ", | ||
660 | mic->name, __func__, __LINE__, | ||
661 | hdr->flags); | ||
662 | mpsslog("out_len %d gso_type 0x%x\n", | ||
663 | copy.out_len, | ||
664 | hdr->gso_type); | ||
665 | #endif | ||
666 | /* Set the correct output iov_len */ | ||
667 | iov1[1].iov_len = copy.out_len - | ||
668 | sizeof(struct virtio_net_hdr); | ||
669 | verify_out_len(mic, ©); | ||
670 | #ifdef DEBUG | ||
671 | disp_iovec(mic, copy, __func__, | ||
672 | __LINE__); | ||
673 | mpsslog("%s %s %d ", | ||
674 | mic->name, __func__, __LINE__); | ||
675 | mpsslog("read from net 0x%lx\n", | ||
676 | sum_iovec_len(copy)); | ||
677 | #endif | ||
678 | len = writev(net_poll[NET_FD_TUN].fd, | ||
679 | copy.iov, copy.iovcnt); | ||
680 | if (len != sum_iovec_len(©)) { | ||
681 | mpsslog("Tun write failed %s ", | ||
682 | strerror(errno)); | ||
683 | mpsslog("len 0x%zx ", len); | ||
684 | mpsslog("read_len 0x%zx\n", | ||
685 | sum_iovec_len(©)); | ||
686 | } else { | ||
687 | #ifdef DEBUG | ||
688 | disp_iovec(mic, ©, __func__, | ||
689 | __LINE__); | ||
690 | mpsslog("%s %s %d ", | ||
691 | mic->name, __func__, | ||
692 | __LINE__); | ||
693 | mpsslog("wrote to tap 0x%lx\n", | ||
694 | len); | ||
695 | #endif | ||
696 | } | ||
697 | } else { | ||
698 | mpsslog("%s %s %d mic_virtio_copy %s\n", | ||
699 | mic->name, __func__, __LINE__, | ||
700 | strerror(errno)); | ||
701 | break; | ||
702 | } | ||
703 | } | ||
704 | } | ||
705 | if (net_poll[NET_FD_VIRTIO_NET].revents & POLLERR) | ||
706 | mpsslog("%s: %s: POLLERR\n", __func__, mic->name); | ||
707 | } | ||
708 | done: | ||
709 | pthread_exit(NULL); | ||
710 | } | ||
711 | |||
712 | /* virtio_console */ | ||
713 | #define VIRTIO_CONSOLE_FD 0 | ||
714 | #define MONITOR_FD (VIRTIO_CONSOLE_FD + 1) | ||
715 | #define MAX_CONSOLE_FD (MONITOR_FD + 1) /* must be the last one + 1 */ | ||
716 | #define MAX_BUFFER_SIZE PAGE_SIZE | ||
717 | |||
718 | static void * | ||
719 | virtio_console(void *arg) | ||
720 | { | ||
721 | static __u8 vcons_buf[2][PAGE_SIZE]; | ||
722 | struct iovec vcons_iov[2] = { | ||
723 | { .iov_base = vcons_buf[0], .iov_len = sizeof(vcons_buf[0]) }, | ||
724 | { .iov_base = vcons_buf[1], .iov_len = sizeof(vcons_buf[1]) }, | ||
725 | }; | ||
726 | struct iovec *iov0 = &vcons_iov[0], *iov1 = &vcons_iov[1]; | ||
727 | struct mic_info *mic = (struct mic_info *)arg; | ||
728 | int err; | ||
729 | struct pollfd console_poll[MAX_CONSOLE_FD]; | ||
730 | int pty_fd; | ||
731 | char *pts_name; | ||
732 | ssize_t len; | ||
733 | struct mic_vring tx_vr, rx_vr; | ||
734 | struct mic_copy_desc copy; | ||
735 | struct mic_device_desc *desc; | ||
736 | |||
737 | pty_fd = posix_openpt(O_RDWR); | ||
738 | if (pty_fd < 0) { | ||
739 | mpsslog("can't open a pseudoterminal master device: %s\n", | ||
740 | strerror(errno)); | ||
741 | goto _return; | ||
742 | } | ||
743 | pts_name = ptsname(pty_fd); | ||
744 | if (pts_name == NULL) { | ||
745 | mpsslog("can't get pts name\n"); | ||
746 | goto _close_pty; | ||
747 | } | ||
748 | printf("%s console message goes to %s\n", mic->name, pts_name); | ||
749 | mpsslog("%s console message goes to %s\n", mic->name, pts_name); | ||
750 | err = grantpt(pty_fd); | ||
751 | if (err < 0) { | ||
752 | mpsslog("can't grant access: %s %s\n", | ||
753 | pts_name, strerror(errno)); | ||
754 | goto _close_pty; | ||
755 | } | ||
756 | err = unlockpt(pty_fd); | ||
757 | if (err < 0) { | ||
758 | mpsslog("can't unlock a pseudoterminal: %s %s\n", | ||
759 | pts_name, strerror(errno)); | ||
760 | goto _close_pty; | ||
761 | } | ||
762 | console_poll[MONITOR_FD].fd = pty_fd; | ||
763 | console_poll[MONITOR_FD].events = POLLIN; | ||
764 | |||
765 | console_poll[VIRTIO_CONSOLE_FD].fd = mic->mic_console.virtio_console_fd; | ||
766 | console_poll[VIRTIO_CONSOLE_FD].events = POLLIN; | ||
767 | |||
768 | if (MAP_FAILED == init_vr(mic, mic->mic_console.virtio_console_fd, | ||
769 | VIRTIO_ID_CONSOLE, &tx_vr, &rx_vr, | ||
770 | virtcons_dev_page.dd.num_vq)) { | ||
771 | mpsslog("%s init_vr failed %s\n", | ||
772 | mic->name, strerror(errno)); | ||
773 | goto _close_pty; | ||
774 | } | ||
775 | |||
776 | copy.iovcnt = 1; | ||
777 | desc = get_device_desc(mic, VIRTIO_ID_CONSOLE); | ||
778 | |||
779 | for (;;) { | ||
780 | console_poll[MONITOR_FD].revents = 0; | ||
781 | console_poll[VIRTIO_CONSOLE_FD].revents = 0; | ||
782 | err = poll(console_poll, MAX_CONSOLE_FD, -1); | ||
783 | if (err < 0) { | ||
784 | mpsslog("%s %d: poll failed: %s\n", __func__, __LINE__, | ||
785 | strerror(errno)); | ||
786 | continue; | ||
787 | } | ||
788 | if (!(desc->status & VIRTIO_CONFIG_S_DRIVER_OK)) | ||
789 | wait_for_card_driver(mic, | ||
790 | mic->mic_console.virtio_console_fd, | ||
791 | VIRTIO_ID_CONSOLE); | ||
792 | |||
793 | if (console_poll[MONITOR_FD].revents & POLLIN) { | ||
794 | copy.iov = iov0; | ||
795 | len = readv(pty_fd, copy.iov, copy.iovcnt); | ||
796 | if (len > 0) { | ||
797 | #ifdef DEBUG | ||
798 | disp_iovec(mic, copy, __func__, __LINE__); | ||
799 | mpsslog("%s %s %d read from tap 0x%lx\n", | ||
800 | mic->name, __func__, __LINE__, | ||
801 | len); | ||
802 | #endif | ||
803 | spin_for_descriptors(mic, &tx_vr); | ||
804 | txrx_prepare(VIRTIO_ID_CONSOLE, 1, &tx_vr, | ||
805 | ©, len); | ||
806 | |||
807 | err = mic_virtio_copy(mic, | ||
808 | mic->mic_console.virtio_console_fd, | ||
809 | &tx_vr, ©); | ||
810 | if (err < 0) { | ||
811 | mpsslog("%s %s %d mic_virtio_copy %s\n", | ||
812 | mic->name, __func__, __LINE__, | ||
813 | strerror(errno)); | ||
814 | } | ||
815 | if (!err) | ||
816 | verify_out_len(mic, ©); | ||
817 | #ifdef DEBUG | ||
818 | disp_iovec(mic, copy, __func__, __LINE__); | ||
819 | mpsslog("%s %s %d wrote to net 0x%lx\n", | ||
820 | mic->name, __func__, __LINE__, | ||
821 | sum_iovec_len(copy)); | ||
822 | #endif | ||
823 | /* Reinitialize IOV for next run */ | ||
824 | iov0->iov_len = PAGE_SIZE; | ||
825 | } else if (len < 0) { | ||
826 | disp_iovec(mic, ©, __func__, __LINE__); | ||
827 | mpsslog("%s %s %d read failed %s ", | ||
828 | mic->name, __func__, __LINE__, | ||
829 | strerror(errno)); | ||
830 | mpsslog("cnt %d sum %zd\n", | ||
831 | copy.iovcnt, sum_iovec_len(©)); | ||
832 | } | ||
833 | } | ||
834 | |||
835 | if (console_poll[VIRTIO_CONSOLE_FD].revents & POLLIN) { | ||
836 | while (rx_vr.info->avail_idx != | ||
837 | le16toh(rx_vr.vr.avail->idx)) { | ||
838 | copy.iov = iov1; | ||
839 | txrx_prepare(VIRTIO_ID_CONSOLE, 0, &rx_vr, | ||
840 | ©, PAGE_SIZE); | ||
841 | |||
842 | err = mic_virtio_copy(mic, | ||
843 | mic->mic_console.virtio_console_fd, | ||
844 | &rx_vr, ©); | ||
845 | if (!err) { | ||
846 | /* Set the correct output iov_len */ | ||
847 | iov1->iov_len = copy.out_len; | ||
848 | verify_out_len(mic, ©); | ||
849 | #ifdef DEBUG | ||
850 | disp_iovec(mic, copy, __func__, | ||
851 | __LINE__); | ||
852 | mpsslog("%s %s %d ", | ||
853 | mic->name, __func__, __LINE__); | ||
854 | mpsslog("read from net 0x%lx\n", | ||
855 | sum_iovec_len(copy)); | ||
856 | #endif | ||
857 | len = writev(pty_fd, | ||
858 | copy.iov, copy.iovcnt); | ||
859 | if (len != sum_iovec_len(©)) { | ||
860 | mpsslog("Tun write failed %s ", | ||
861 | strerror(errno)); | ||
862 | mpsslog("len 0x%zx ", len); | ||
863 | mpsslog("read_len 0x%zx\n", | ||
864 | sum_iovec_len(©)); | ||
865 | } else { | ||
866 | #ifdef DEBUG | ||
867 | disp_iovec(mic, copy, __func__, | ||
868 | __LINE__); | ||
869 | mpsslog("%s %s %d ", | ||
870 | mic->name, __func__, | ||
871 | __LINE__); | ||
872 | mpsslog("wrote to tap 0x%lx\n", | ||
873 | len); | ||
874 | #endif | ||
875 | } | ||
876 | } else { | ||
877 | mpsslog("%s %s %d mic_virtio_copy %s\n", | ||
878 | mic->name, __func__, __LINE__, | ||
879 | strerror(errno)); | ||
880 | break; | ||
881 | } | ||
882 | } | ||
883 | } | ||
884 | if (console_poll[NET_FD_VIRTIO_NET].revents & POLLERR) | ||
885 | mpsslog("%s: %s: POLLERR\n", __func__, mic->name); | ||
886 | } | ||
887 | _close_pty: | ||
888 | close(pty_fd); | ||
889 | _return: | ||
890 | pthread_exit(NULL); | ||
891 | } | ||
892 | |||
893 | static void | ||
894 | add_virtio_device(struct mic_info *mic, struct mic_device_desc *dd) | ||
895 | { | ||
896 | char path[PATH_MAX]; | ||
897 | int fd, err; | ||
898 | |||
899 | snprintf(path, PATH_MAX, "/dev/mic%d", mic->id); | ||
900 | fd = open(path, O_RDWR); | ||
901 | if (fd < 0) { | ||
902 | mpsslog("Could not open %s %s\n", path, strerror(errno)); | ||
903 | return; | ||
904 | } | ||
905 | |||
906 | err = ioctl(fd, MIC_VIRTIO_ADD_DEVICE, dd); | ||
907 | if (err < 0) { | ||
908 | mpsslog("Could not add %d %s\n", dd->type, strerror(errno)); | ||
909 | close(fd); | ||
910 | return; | ||
911 | } | ||
912 | switch (dd->type) { | ||
913 | case VIRTIO_ID_NET: | ||
914 | mic->mic_net.virtio_net_fd = fd; | ||
915 | mpsslog("Added VIRTIO_ID_NET for %s\n", mic->name); | ||
916 | break; | ||
917 | case VIRTIO_ID_CONSOLE: | ||
918 | mic->mic_console.virtio_console_fd = fd; | ||
919 | mpsslog("Added VIRTIO_ID_CONSOLE for %s\n", mic->name); | ||
920 | break; | ||
921 | case VIRTIO_ID_BLOCK: | ||
922 | mic->mic_virtblk.virtio_block_fd = fd; | ||
923 | mpsslog("Added VIRTIO_ID_BLOCK for %s\n", mic->name); | ||
924 | break; | ||
925 | } | ||
926 | } | ||
927 | |||
928 | static bool | ||
929 | set_backend_file(struct mic_info *mic) | ||
930 | { | ||
931 | FILE *config; | ||
932 | char buff[PATH_MAX], *line, *evv, *p; | ||
933 | |||
934 | snprintf(buff, PATH_MAX, "%s/mpssd%03d.conf", mic_config_dir, mic->id); | ||
935 | config = fopen(buff, "r"); | ||
936 | if (config == NULL) | ||
937 | return false; | ||
938 | do { /* look for "virtblk_backend=XXXX" */ | ||
939 | line = fgets(buff, PATH_MAX, config); | ||
940 | if (line == NULL) | ||
941 | break; | ||
942 | if (*line == '#') | ||
943 | continue; | ||
944 | p = strchr(line, '\n'); | ||
945 | if (p) | ||
946 | *p = '\0'; | ||
947 | } while (strncmp(line, virtblk_backend, strlen(virtblk_backend)) != 0); | ||
948 | fclose(config); | ||
949 | if (line == NULL) | ||
950 | return false; | ||
951 | evv = strchr(line, '='); | ||
952 | if (evv == NULL) | ||
953 | return false; | ||
954 | mic->mic_virtblk.backend_file = malloc(strlen(evv) + 1); | ||
955 | if (mic->mic_virtblk.backend_file == NULL) { | ||
956 | mpsslog("%s %d can't allocate memory\n", mic->name, mic->id); | ||
957 | return false; | ||
958 | } | ||
959 | strcpy(mic->mic_virtblk.backend_file, evv + 1); | ||
960 | return true; | ||
961 | } | ||
962 | |||
963 | #define SECTOR_SIZE 512 | ||
964 | static bool | ||
965 | set_backend_size(struct mic_info *mic) | ||
966 | { | ||
967 | mic->mic_virtblk.backend_size = lseek(mic->mic_virtblk.backend, 0, | ||
968 | SEEK_END); | ||
969 | if (mic->mic_virtblk.backend_size < 0) { | ||
970 | mpsslog("%s: can't seek: %s\n", | ||
971 | mic->name, mic->mic_virtblk.backend_file); | ||
972 | return false; | ||
973 | } | ||
974 | virtblk_dev_page.blk_config.capacity = | ||
975 | mic->mic_virtblk.backend_size / SECTOR_SIZE; | ||
976 | if ((mic->mic_virtblk.backend_size % SECTOR_SIZE) != 0) | ||
977 | virtblk_dev_page.blk_config.capacity++; | ||
978 | |||
979 | virtblk_dev_page.blk_config.capacity = | ||
980 | htole64(virtblk_dev_page.blk_config.capacity); | ||
981 | |||
982 | return true; | ||
983 | } | ||
984 | |||
985 | static bool | ||
986 | open_backend(struct mic_info *mic) | ||
987 | { | ||
988 | if (!set_backend_file(mic)) | ||
989 | goto _error_exit; | ||
990 | mic->mic_virtblk.backend = open(mic->mic_virtblk.backend_file, O_RDWR); | ||
991 | if (mic->mic_virtblk.backend < 0) { | ||
992 | mpsslog("%s: can't open: %s\n", mic->name, | ||
993 | mic->mic_virtblk.backend_file); | ||
994 | goto _error_free; | ||
995 | } | ||
996 | if (!set_backend_size(mic)) | ||
997 | goto _error_close; | ||
998 | mic->mic_virtblk.backend_addr = mmap(NULL, | ||
999 | mic->mic_virtblk.backend_size, | ||
1000 | PROT_READ|PROT_WRITE, MAP_SHARED, | ||
1001 | mic->mic_virtblk.backend, 0L); | ||
1002 | if (mic->mic_virtblk.backend_addr == MAP_FAILED) { | ||
1003 | mpsslog("%s: can't map: %s %s\n", | ||
1004 | mic->name, mic->mic_virtblk.backend_file, | ||
1005 | strerror(errno)); | ||
1006 | goto _error_close; | ||
1007 | } | ||
1008 | return true; | ||
1009 | |||
1010 | _error_close: | ||
1011 | close(mic->mic_virtblk.backend); | ||
1012 | _error_free: | ||
1013 | free(mic->mic_virtblk.backend_file); | ||
1014 | _error_exit: | ||
1015 | return false; | ||
1016 | } | ||
1017 | |||
1018 | static void | ||
1019 | close_backend(struct mic_info *mic) | ||
1020 | { | ||
1021 | munmap(mic->mic_virtblk.backend_addr, mic->mic_virtblk.backend_size); | ||
1022 | close(mic->mic_virtblk.backend); | ||
1023 | free(mic->mic_virtblk.backend_file); | ||
1024 | } | ||
1025 | |||
1026 | static bool | ||
1027 | start_virtblk(struct mic_info *mic, struct mic_vring *vring) | ||
1028 | { | ||
1029 | if (((unsigned long)&virtblk_dev_page.blk_config % 8) != 0) { | ||
1030 | mpsslog("%s: blk_config is not 8 byte aligned.\n", | ||
1031 | mic->name); | ||
1032 | return false; | ||
1033 | } | ||
1034 | add_virtio_device(mic, &virtblk_dev_page.dd); | ||
1035 | if (MAP_FAILED == init_vr(mic, mic->mic_virtblk.virtio_block_fd, | ||
1036 | VIRTIO_ID_BLOCK, vring, NULL, | ||
1037 | virtblk_dev_page.dd.num_vq)) { | ||
1038 | mpsslog("%s init_vr failed %s\n", | ||
1039 | mic->name, strerror(errno)); | ||
1040 | return false; | ||
1041 | } | ||
1042 | return true; | ||
1043 | } | ||
1044 | |||
1045 | static void | ||
1046 | stop_virtblk(struct mic_info *mic) | ||
1047 | { | ||
1048 | int vr_size, ret; | ||
1049 | |||
1050 | vr_size = PAGE_ALIGN(vring_size(MIC_VRING_ENTRIES, | ||
1051 | MIC_VIRTIO_RING_ALIGN) + sizeof(struct _mic_vring_info)); | ||
1052 | ret = munmap(mic->mic_virtblk.block_dp, | ||
1053 | MIC_DEVICE_PAGE_END + vr_size * virtblk_dev_page.dd.num_vq); | ||
1054 | if (ret < 0) | ||
1055 | mpsslog("%s munmap errno %d\n", mic->name, errno); | ||
1056 | close(mic->mic_virtblk.virtio_block_fd); | ||
1057 | } | ||
1058 | |||
1059 | static __u8 | ||
1060 | header_error_check(struct vring_desc *desc) | ||
1061 | { | ||
1062 | if (le32toh(desc->len) != sizeof(struct virtio_blk_outhdr)) { | ||
1063 | mpsslog("%s() %d: length is not sizeof(virtio_blk_outhd)\n", | ||
1064 | __func__, __LINE__); | ||
1065 | return -EIO; | ||
1066 | } | ||
1067 | if (!(le16toh(desc->flags) & VRING_DESC_F_NEXT)) { | ||
1068 | mpsslog("%s() %d: alone\n", | ||
1069 | __func__, __LINE__); | ||
1070 | return -EIO; | ||
1071 | } | ||
1072 | if (le16toh(desc->flags) & VRING_DESC_F_WRITE) { | ||
1073 | mpsslog("%s() %d: not read\n", | ||
1074 | __func__, __LINE__); | ||
1075 | return -EIO; | ||
1076 | } | ||
1077 | return 0; | ||
1078 | } | ||
1079 | |||
1080 | static int | ||
1081 | read_header(int fd, struct virtio_blk_outhdr *hdr, __u32 desc_idx) | ||
1082 | { | ||
1083 | struct iovec iovec; | ||
1084 | struct mic_copy_desc copy; | ||
1085 | |||
1086 | iovec.iov_len = sizeof(*hdr); | ||
1087 | iovec.iov_base = hdr; | ||
1088 | copy.iov = &iovec; | ||
1089 | copy.iovcnt = 1; | ||
1090 | copy.vr_idx = 0; /* only one vring on virtio_block */ | ||
1091 | copy.update_used = false; /* do not update used index */ | ||
1092 | return ioctl(fd, MIC_VIRTIO_COPY_DESC, ©); | ||
1093 | } | ||
1094 | |||
1095 | static int | ||
1096 | transfer_blocks(int fd, struct iovec *iovec, __u32 iovcnt) | ||
1097 | { | ||
1098 | struct mic_copy_desc copy; | ||
1099 | |||
1100 | copy.iov = iovec; | ||
1101 | copy.iovcnt = iovcnt; | ||
1102 | copy.vr_idx = 0; /* only one vring on virtio_block */ | ||
1103 | copy.update_used = false; /* do not update used index */ | ||
1104 | return ioctl(fd, MIC_VIRTIO_COPY_DESC, ©); | ||
1105 | } | ||
1106 | |||
1107 | static __u8 | ||
1108 | status_error_check(struct vring_desc *desc) | ||
1109 | { | ||
1110 | if (le32toh(desc->len) != sizeof(__u8)) { | ||
1111 | mpsslog("%s() %d: length is not sizeof(status)\n", | ||
1112 | __func__, __LINE__); | ||
1113 | return -EIO; | ||
1114 | } | ||
1115 | return 0; | ||
1116 | } | ||
1117 | |||
1118 | static int | ||
1119 | write_status(int fd, __u8 *status) | ||
1120 | { | ||
1121 | struct iovec iovec; | ||
1122 | struct mic_copy_desc copy; | ||
1123 | |||
1124 | iovec.iov_base = status; | ||
1125 | iovec.iov_len = sizeof(*status); | ||
1126 | copy.iov = &iovec; | ||
1127 | copy.iovcnt = 1; | ||
1128 | copy.vr_idx = 0; /* only one vring on virtio_block */ | ||
1129 | copy.update_used = true; /* Update used index */ | ||
1130 | return ioctl(fd, MIC_VIRTIO_COPY_DESC, ©); | ||
1131 | } | ||
1132 | |||
1133 | static void * | ||
1134 | virtio_block(void *arg) | ||
1135 | { | ||
1136 | struct mic_info *mic = (struct mic_info *)arg; | ||
1137 | int ret; | ||
1138 | struct pollfd block_poll; | ||
1139 | struct mic_vring vring; | ||
1140 | __u16 avail_idx; | ||
1141 | __u32 desc_idx; | ||
1142 | struct vring_desc *desc; | ||
1143 | struct iovec *iovec, *piov; | ||
1144 | __u8 status; | ||
1145 | __u32 buffer_desc_idx; | ||
1146 | struct virtio_blk_outhdr hdr; | ||
1147 | void *fos; | ||
1148 | |||
1149 | for (;;) { /* forever */ | ||
1150 | if (!open_backend(mic)) { /* No virtblk */ | ||
1151 | for (mic->mic_virtblk.signaled = 0; | ||
1152 | !mic->mic_virtblk.signaled;) | ||
1153 | sleep(1); | ||
1154 | continue; | ||
1155 | } | ||
1156 | |||
1157 | /* backend file is specified. */ | ||
1158 | if (!start_virtblk(mic, &vring)) | ||
1159 | goto _close_backend; | ||
1160 | iovec = malloc(sizeof(*iovec) * | ||
1161 | le32toh(virtblk_dev_page.blk_config.seg_max)); | ||
1162 | if (!iovec) { | ||
1163 | mpsslog("%s: can't alloc iovec: %s\n", | ||
1164 | mic->name, strerror(ENOMEM)); | ||
1165 | goto _stop_virtblk; | ||
1166 | } | ||
1167 | |||
1168 | block_poll.fd = mic->mic_virtblk.virtio_block_fd; | ||
1169 | block_poll.events = POLLIN; | ||
1170 | for (mic->mic_virtblk.signaled = 0; | ||
1171 | !mic->mic_virtblk.signaled;) { | ||
1172 | block_poll.revents = 0; | ||
1173 | /* timeout in 1 sec to see signaled */ | ||
1174 | ret = poll(&block_poll, 1, 1000); | ||
1175 | if (ret < 0) { | ||
1176 | mpsslog("%s %d: poll failed: %s\n", | ||
1177 | __func__, __LINE__, | ||
1178 | strerror(errno)); | ||
1179 | continue; | ||
1180 | } | ||
1181 | |||
1182 | if (!(block_poll.revents & POLLIN)) { | ||
1183 | #ifdef DEBUG | ||
1184 | mpsslog("%s %d: block_poll.revents=0x%x\n", | ||
1185 | __func__, __LINE__, block_poll.revents); | ||
1186 | #endif | ||
1187 | continue; | ||
1188 | } | ||
1189 | |||
1190 | /* POLLIN */ | ||
1191 | while (vring.info->avail_idx != | ||
1192 | le16toh(vring.vr.avail->idx)) { | ||
1193 | /* read header element */ | ||
1194 | avail_idx = | ||
1195 | vring.info->avail_idx & | ||
1196 | (vring.vr.num - 1); | ||
1197 | desc_idx = le16toh( | ||
1198 | vring.vr.avail->ring[avail_idx]); | ||
1199 | desc = &vring.vr.desc[desc_idx]; | ||
1200 | #ifdef DEBUG | ||
1201 | mpsslog("%s() %d: avail_idx=%d ", | ||
1202 | __func__, __LINE__, | ||
1203 | vring.info->avail_idx); | ||
1204 | mpsslog("vring.vr.num=%d desc=%p\n", | ||
1205 | vring.vr.num, desc); | ||
1206 | #endif | ||
1207 | status = header_error_check(desc); | ||
1208 | ret = read_header( | ||
1209 | mic->mic_virtblk.virtio_block_fd, | ||
1210 | &hdr, desc_idx); | ||
1211 | if (ret < 0) { | ||
1212 | mpsslog("%s() %d %s: ret=%d %s\n", | ||
1213 | __func__, __LINE__, | ||
1214 | mic->name, ret, | ||
1215 | strerror(errno)); | ||
1216 | break; | ||
1217 | } | ||
1218 | /* buffer element */ | ||
1219 | piov = iovec; | ||
1220 | status = 0; | ||
1221 | fos = mic->mic_virtblk.backend_addr + | ||
1222 | (hdr.sector * SECTOR_SIZE); | ||
1223 | buffer_desc_idx = next_desc(desc); | ||
1224 | desc_idx = buffer_desc_idx; | ||
1225 | for (desc = &vring.vr.desc[buffer_desc_idx]; | ||
1226 | desc->flags & VRING_DESC_F_NEXT; | ||
1227 | desc_idx = next_desc(desc), | ||
1228 | desc = &vring.vr.desc[desc_idx]) { | ||
1229 | piov->iov_len = desc->len; | ||
1230 | piov->iov_base = fos; | ||
1231 | piov++; | ||
1232 | fos += desc->len; | ||
1233 | } | ||
1234 | /* Returning NULLs for VIRTIO_BLK_T_GET_ID. */ | ||
1235 | if (hdr.type & ~(VIRTIO_BLK_T_OUT | | ||
1236 | VIRTIO_BLK_T_GET_ID)) { | ||
1237 | /* | ||
1238 | VIRTIO_BLK_T_IN - does not do | ||
1239 | anything. Probably for documenting. | ||
1240 | VIRTIO_BLK_T_SCSI_CMD - for | ||
1241 | virtio_scsi. | ||
1242 | VIRTIO_BLK_T_FLUSH - turned off in | ||
1243 | config space. | ||
1244 | VIRTIO_BLK_T_BARRIER - defined but not | ||
1245 | used in anywhere. | ||
1246 | */ | ||
1247 | mpsslog("%s() %d: type %x ", | ||
1248 | __func__, __LINE__, | ||
1249 | hdr.type); | ||
1250 | mpsslog("is not supported\n"); | ||
1251 | status = -ENOTSUP; | ||
1252 | |||
1253 | } else { | ||
1254 | ret = transfer_blocks( | ||
1255 | mic->mic_virtblk.virtio_block_fd, | ||
1256 | iovec, | ||
1257 | piov - iovec); | ||
1258 | if (ret < 0 && | ||
1259 | status != 0) | ||
1260 | status = ret; | ||
1261 | } | ||
1262 | /* write status and update used pointer */ | ||
1263 | if (status != 0) | ||
1264 | status = status_error_check(desc); | ||
1265 | ret = write_status( | ||
1266 | mic->mic_virtblk.virtio_block_fd, | ||
1267 | &status); | ||
1268 | #ifdef DEBUG | ||
1269 | mpsslog("%s() %d: write status=%d on desc=%p\n", | ||
1270 | __func__, __LINE__, | ||
1271 | status, desc); | ||
1272 | #endif | ||
1273 | } | ||
1274 | } | ||
1275 | free(iovec); | ||
1276 | _stop_virtblk: | ||
1277 | stop_virtblk(mic); | ||
1278 | _close_backend: | ||
1279 | close_backend(mic); | ||
1280 | } /* forever */ | ||
1281 | |||
1282 | pthread_exit(NULL); | ||
1283 | } | ||
1284 | |||
1285 | static void | ||
1286 | reset(struct mic_info *mic) | ||
1287 | { | ||
1288 | #define RESET_TIMEOUT 120 | ||
1289 | int i = RESET_TIMEOUT; | ||
1290 | setsysfs(mic->name, "state", "reset"); | ||
1291 | while (i) { | ||
1292 | char *state; | ||
1293 | state = readsysfs(mic->name, "state"); | ||
1294 | if (!state) | ||
1295 | goto retry; | ||
1296 | mpsslog("%s: %s %d state %s\n", | ||
1297 | mic->name, __func__, __LINE__, state); | ||
1298 | |||
1299 | /* | ||
1300 | * If the shutdown was initiated by OSPM, the state stays | ||
1301 | * in "suspended" which is also a valid condition for reset. | ||
1302 | */ | ||
1303 | if ((!strcmp(state, "offline")) || | ||
1304 | (!strcmp(state, "suspended"))) { | ||
1305 | free(state); | ||
1306 | break; | ||
1307 | } | ||
1308 | free(state); | ||
1309 | retry: | ||
1310 | sleep(1); | ||
1311 | i--; | ||
1312 | } | ||
1313 | } | ||
1314 | |||
1315 | static int | ||
1316 | get_mic_shutdown_status(struct mic_info *mic, char *shutdown_status) | ||
1317 | { | ||
1318 | if (!strcmp(shutdown_status, "nop")) | ||
1319 | return MIC_NOP; | ||
1320 | if (!strcmp(shutdown_status, "crashed")) | ||
1321 | return MIC_CRASHED; | ||
1322 | if (!strcmp(shutdown_status, "halted")) | ||
1323 | return MIC_HALTED; | ||
1324 | if (!strcmp(shutdown_status, "poweroff")) | ||
1325 | return MIC_POWER_OFF; | ||
1326 | if (!strcmp(shutdown_status, "restart")) | ||
1327 | return MIC_RESTART; | ||
1328 | mpsslog("%s: BUG invalid status %s\n", mic->name, shutdown_status); | ||
1329 | /* Invalid state */ | ||
1330 | assert(0); | ||
1331 | }; | ||
1332 | |||
1333 | static int get_mic_state(struct mic_info *mic, char *state) | ||
1334 | { | ||
1335 | if (!strcmp(state, "offline")) | ||
1336 | return MIC_OFFLINE; | ||
1337 | if (!strcmp(state, "online")) | ||
1338 | return MIC_ONLINE; | ||
1339 | if (!strcmp(state, "shutting_down")) | ||
1340 | return MIC_SHUTTING_DOWN; | ||
1341 | if (!strcmp(state, "reset_failed")) | ||
1342 | return MIC_RESET_FAILED; | ||
1343 | if (!strcmp(state, "suspending")) | ||
1344 | return MIC_SUSPENDING; | ||
1345 | if (!strcmp(state, "suspended")) | ||
1346 | return MIC_SUSPENDED; | ||
1347 | mpsslog("%s: BUG invalid state %s\n", mic->name, state); | ||
1348 | /* Invalid state */ | ||
1349 | assert(0); | ||
1350 | }; | ||
1351 | |||
1352 | static void mic_handle_shutdown(struct mic_info *mic) | ||
1353 | { | ||
1354 | #define SHUTDOWN_TIMEOUT 60 | ||
1355 | int i = SHUTDOWN_TIMEOUT, ret, stat = 0; | ||
1356 | char *shutdown_status; | ||
1357 | while (i) { | ||
1358 | shutdown_status = readsysfs(mic->name, "shutdown_status"); | ||
1359 | if (!shutdown_status) | ||
1360 | continue; | ||
1361 | mpsslog("%s: %s %d shutdown_status %s\n", | ||
1362 | mic->name, __func__, __LINE__, shutdown_status); | ||
1363 | switch (get_mic_shutdown_status(mic, shutdown_status)) { | ||
1364 | case MIC_RESTART: | ||
1365 | mic->restart = 1; | ||
1366 | case MIC_HALTED: | ||
1367 | case MIC_POWER_OFF: | ||
1368 | case MIC_CRASHED: | ||
1369 | free(shutdown_status); | ||
1370 | goto reset; | ||
1371 | default: | ||
1372 | break; | ||
1373 | } | ||
1374 | free(shutdown_status); | ||
1375 | sleep(1); | ||
1376 | i--; | ||
1377 | } | ||
1378 | reset: | ||
1379 | ret = kill(mic->pid, SIGTERM); | ||
1380 | mpsslog("%s: %s %d kill pid %d ret %d\n", | ||
1381 | mic->name, __func__, __LINE__, | ||
1382 | mic->pid, ret); | ||
1383 | if (!ret) { | ||
1384 | ret = waitpid(mic->pid, &stat, | ||
1385 | WIFSIGNALED(stat)); | ||
1386 | mpsslog("%s: %s %d waitpid ret %d pid %d\n", | ||
1387 | mic->name, __func__, __LINE__, | ||
1388 | ret, mic->pid); | ||
1389 | } | ||
1390 | if (ret == mic->pid) | ||
1391 | reset(mic); | ||
1392 | } | ||
1393 | |||
1394 | static void * | ||
1395 | mic_config(void *arg) | ||
1396 | { | ||
1397 | struct mic_info *mic = (struct mic_info *)arg; | ||
1398 | char *state = NULL; | ||
1399 | char pathname[PATH_MAX]; | ||
1400 | int fd, ret; | ||
1401 | struct pollfd ufds[1]; | ||
1402 | char value[4096]; | ||
1403 | |||
1404 | snprintf(pathname, PATH_MAX - 1, "%s/%s/%s", | ||
1405 | MICSYSFSDIR, mic->name, "state"); | ||
1406 | |||
1407 | fd = open(pathname, O_RDONLY); | ||
1408 | if (fd < 0) { | ||
1409 | mpsslog("%s: opening file %s failed %s\n", | ||
1410 | mic->name, pathname, strerror(errno)); | ||
1411 | goto error; | ||
1412 | } | ||
1413 | |||
1414 | do { | ||
1415 | ret = read(fd, value, sizeof(value)); | ||
1416 | if (ret < 0) { | ||
1417 | mpsslog("%s: Failed to read sysfs entry '%s': %s\n", | ||
1418 | mic->name, pathname, strerror(errno)); | ||
1419 | goto close_error1; | ||
1420 | } | ||
1421 | retry: | ||
1422 | state = readsysfs(mic->name, "state"); | ||
1423 | if (!state) | ||
1424 | goto retry; | ||
1425 | mpsslog("%s: %s %d state %s\n", | ||
1426 | mic->name, __func__, __LINE__, state); | ||
1427 | switch (get_mic_state(mic, state)) { | ||
1428 | case MIC_SHUTTING_DOWN: | ||
1429 | mic_handle_shutdown(mic); | ||
1430 | goto close_error; | ||
1431 | case MIC_SUSPENDING: | ||
1432 | mic->boot_on_resume = 1; | ||
1433 | setsysfs(mic->name, "state", "suspend"); | ||
1434 | mic_handle_shutdown(mic); | ||
1435 | goto close_error; | ||
1436 | case MIC_OFFLINE: | ||
1437 | if (mic->boot_on_resume) { | ||
1438 | setsysfs(mic->name, "state", "boot"); | ||
1439 | mic->boot_on_resume = 0; | ||
1440 | } | ||
1441 | break; | ||
1442 | default: | ||
1443 | break; | ||
1444 | } | ||
1445 | free(state); | ||
1446 | |||
1447 | ufds[0].fd = fd; | ||
1448 | ufds[0].events = POLLERR | POLLPRI; | ||
1449 | ret = poll(ufds, 1, -1); | ||
1450 | if (ret < 0) { | ||
1451 | mpsslog("%s: poll failed %s\n", | ||
1452 | mic->name, strerror(errno)); | ||
1453 | goto close_error1; | ||
1454 | } | ||
1455 | } while (1); | ||
1456 | close_error: | ||
1457 | free(state); | ||
1458 | close_error1: | ||
1459 | close(fd); | ||
1460 | error: | ||
1461 | init_mic(mic); | ||
1462 | pthread_exit(NULL); | ||
1463 | } | ||
1464 | |||
1465 | static void | ||
1466 | set_cmdline(struct mic_info *mic) | ||
1467 | { | ||
1468 | char buffer[PATH_MAX]; | ||
1469 | int len; | ||
1470 | |||
1471 | len = snprintf(buffer, PATH_MAX, | ||
1472 | "clocksource=tsc highres=off nohz=off "); | ||
1473 | len += snprintf(buffer + len, PATH_MAX, | ||
1474 | "cpufreq_on;corec6_off;pc3_off;pc6_off "); | ||
1475 | len += snprintf(buffer + len, PATH_MAX, | ||
1476 | "ifcfg=static;address,172.31.%d.1;netmask,255.255.255.0", | ||
1477 | mic->id); | ||
1478 | |||
1479 | setsysfs(mic->name, "cmdline", buffer); | ||
1480 | mpsslog("%s: Command line: \"%s\"\n", mic->name, buffer); | ||
1481 | snprintf(buffer, PATH_MAX, "172.31.%d.1", mic->id); | ||
1482 | mpsslog("%s: IPADDR: \"%s\"\n", mic->name, buffer); | ||
1483 | } | ||
1484 | |||
1485 | static void | ||
1486 | set_log_buf_info(struct mic_info *mic) | ||
1487 | { | ||
1488 | int fd; | ||
1489 | off_t len; | ||
1490 | char system_map[] = "/lib/firmware/mic/System.map"; | ||
1491 | char *map, *temp, log_buf[17] = {'\0'}; | ||
1492 | |||
1493 | fd = open(system_map, O_RDONLY); | ||
1494 | if (fd < 0) { | ||
1495 | mpsslog("%s: Opening System.map failed: %d\n", | ||
1496 | mic->name, errno); | ||
1497 | return; | ||
1498 | } | ||
1499 | len = lseek(fd, 0, SEEK_END); | ||
1500 | if (len < 0) { | ||
1501 | mpsslog("%s: Reading System.map size failed: %d\n", | ||
1502 | mic->name, errno); | ||
1503 | close(fd); | ||
1504 | return; | ||
1505 | } | ||
1506 | map = mmap(NULL, len, PROT_READ, MAP_PRIVATE, fd, 0); | ||
1507 | if (map == MAP_FAILED) { | ||
1508 | mpsslog("%s: mmap of System.map failed: %d\n", | ||
1509 | mic->name, errno); | ||
1510 | close(fd); | ||
1511 | return; | ||
1512 | } | ||
1513 | temp = strstr(map, "__log_buf"); | ||
1514 | if (!temp) { | ||
1515 | mpsslog("%s: __log_buf not found: %d\n", mic->name, errno); | ||
1516 | munmap(map, len); | ||
1517 | close(fd); | ||
1518 | return; | ||
1519 | } | ||
1520 | strncpy(log_buf, temp - 19, 16); | ||
1521 | setsysfs(mic->name, "log_buf_addr", log_buf); | ||
1522 | mpsslog("%s: log_buf_addr: %s\n", mic->name, log_buf); | ||
1523 | temp = strstr(map, "log_buf_len"); | ||
1524 | if (!temp) { | ||
1525 | mpsslog("%s: log_buf_len not found: %d\n", mic->name, errno); | ||
1526 | munmap(map, len); | ||
1527 | close(fd); | ||
1528 | return; | ||
1529 | } | ||
1530 | strncpy(log_buf, temp - 19, 16); | ||
1531 | setsysfs(mic->name, "log_buf_len", log_buf); | ||
1532 | mpsslog("%s: log_buf_len: %s\n", mic->name, log_buf); | ||
1533 | munmap(map, len); | ||
1534 | close(fd); | ||
1535 | } | ||
1536 | |||
1537 | static void init_mic(struct mic_info *mic); | ||
1538 | |||
1539 | static void | ||
1540 | change_virtblk_backend(int x, siginfo_t *siginfo, void *p) | ||
1541 | { | ||
1542 | struct mic_info *mic; | ||
1543 | |||
1544 | for (mic = mic_list.next; mic != NULL; mic = mic->next) | ||
1545 | mic->mic_virtblk.signaled = 1/* true */; | ||
1546 | } | ||
1547 | |||
1548 | static void | ||
1549 | init_mic(struct mic_info *mic) | ||
1550 | { | ||
1551 | struct sigaction ignore = { | ||
1552 | .sa_flags = 0, | ||
1553 | .sa_handler = SIG_IGN | ||
1554 | }; | ||
1555 | struct sigaction act = { | ||
1556 | .sa_flags = SA_SIGINFO, | ||
1557 | .sa_sigaction = change_virtblk_backend, | ||
1558 | }; | ||
1559 | char buffer[PATH_MAX]; | ||
1560 | int err; | ||
1561 | |||
1562 | /* | ||
1563 | * Currently, one virtio block device is supported for each MIC card | ||
1564 | * at a time. Any user (or test) can send a SIGUSR1 to the MIC daemon. | ||
1565 | * The signal informs the virtio block backend about a change in the | ||
1566 | * configuration file which specifies the virtio backend file name on | ||
1567 | * the host. Virtio block backend then re-reads the configuration file | ||
1568 | * and switches to the new block device. This signalling mechanism may | ||
1569 | * not be required once multiple virtio block devices are supported by | ||
1570 | * the MIC daemon. | ||
1571 | */ | ||
1572 | sigaction(SIGUSR1, &ignore, NULL); | ||
1573 | |||
1574 | mic->pid = fork(); | ||
1575 | switch (mic->pid) { | ||
1576 | case 0: | ||
1577 | set_log_buf_info(mic); | ||
1578 | set_cmdline(mic); | ||
1579 | add_virtio_device(mic, &virtcons_dev_page.dd); | ||
1580 | add_virtio_device(mic, &virtnet_dev_page.dd); | ||
1581 | err = pthread_create(&mic->mic_console.console_thread, NULL, | ||
1582 | virtio_console, mic); | ||
1583 | if (err) | ||
1584 | mpsslog("%s virtcons pthread_create failed %s\n", | ||
1585 | mic->name, strerror(err)); | ||
1586 | err = pthread_create(&mic->mic_net.net_thread, NULL, | ||
1587 | virtio_net, mic); | ||
1588 | if (err) | ||
1589 | mpsslog("%s virtnet pthread_create failed %s\n", | ||
1590 | mic->name, strerror(err)); | ||
1591 | err = pthread_create(&mic->mic_virtblk.block_thread, NULL, | ||
1592 | virtio_block, mic); | ||
1593 | if (err) | ||
1594 | mpsslog("%s virtblk pthread_create failed %s\n", | ||
1595 | mic->name, strerror(err)); | ||
1596 | sigemptyset(&act.sa_mask); | ||
1597 | err = sigaction(SIGUSR1, &act, NULL); | ||
1598 | if (err) | ||
1599 | mpsslog("%s sigaction SIGUSR1 failed %s\n", | ||
1600 | mic->name, strerror(errno)); | ||
1601 | while (1) | ||
1602 | sleep(60); | ||
1603 | case -1: | ||
1604 | mpsslog("fork failed MIC name %s id %d errno %d\n", | ||
1605 | mic->name, mic->id, errno); | ||
1606 | break; | ||
1607 | default: | ||
1608 | if (mic->restart) { | ||
1609 | snprintf(buffer, PATH_MAX, "boot"); | ||
1610 | setsysfs(mic->name, "state", buffer); | ||
1611 | mpsslog("%s restarting mic %d\n", | ||
1612 | mic->name, mic->restart); | ||
1613 | mic->restart = 0; | ||
1614 | } | ||
1615 | pthread_create(&mic->config_thread, NULL, mic_config, mic); | ||
1616 | } | ||
1617 | } | ||
1618 | |||
1619 | static void | ||
1620 | start_daemon(void) | ||
1621 | { | ||
1622 | struct mic_info *mic; | ||
1623 | |||
1624 | for (mic = mic_list.next; mic != NULL; mic = mic->next) | ||
1625 | init_mic(mic); | ||
1626 | |||
1627 | while (1) | ||
1628 | sleep(60); | ||
1629 | } | ||
1630 | |||
1631 | static int | ||
1632 | init_mic_list(void) | ||
1633 | { | ||
1634 | struct mic_info *mic = &mic_list; | ||
1635 | struct dirent *file; | ||
1636 | DIR *dp; | ||
1637 | int cnt = 0; | ||
1638 | |||
1639 | dp = opendir(MICSYSFSDIR); | ||
1640 | if (!dp) | ||
1641 | return 0; | ||
1642 | |||
1643 | while ((file = readdir(dp)) != NULL) { | ||
1644 | if (!strncmp(file->d_name, "mic", 3)) { | ||
1645 | mic->next = calloc(1, sizeof(struct mic_info)); | ||
1646 | if (mic->next) { | ||
1647 | mic = mic->next; | ||
1648 | mic->id = atoi(&file->d_name[3]); | ||
1649 | mic->name = malloc(strlen(file->d_name) + 16); | ||
1650 | if (mic->name) | ||
1651 | strcpy(mic->name, file->d_name); | ||
1652 | mpsslog("MIC name %s id %d\n", mic->name, | ||
1653 | mic->id); | ||
1654 | cnt++; | ||
1655 | } | ||
1656 | } | ||
1657 | } | ||
1658 | |||
1659 | closedir(dp); | ||
1660 | return cnt; | ||
1661 | } | ||
1662 | |||
1663 | void | ||
1664 | mpsslog(char *format, ...) | ||
1665 | { | ||
1666 | va_list args; | ||
1667 | char buffer[4096]; | ||
1668 | char ts[52], *ts1; | ||
1669 | time_t t; | ||
1670 | |||
1671 | if (logfp == NULL) | ||
1672 | return; | ||
1673 | |||
1674 | va_start(args, format); | ||
1675 | vsprintf(buffer, format, args); | ||
1676 | va_end(args); | ||
1677 | |||
1678 | time(&t); | ||
1679 | ts1 = ctime_r(&t, ts); | ||
1680 | ts1[strlen(ts1) - 1] = '\0'; | ||
1681 | fprintf(logfp, "%s: %s", ts1, buffer); | ||
1682 | |||
1683 | fflush(logfp); | ||
1684 | } | ||
1685 | |||
1686 | int | ||
1687 | main(int argc, char *argv[]) | ||
1688 | { | ||
1689 | int cnt; | ||
1690 | pid_t pid; | ||
1691 | |||
1692 | myname = argv[0]; | ||
1693 | |||
1694 | logfp = fopen(LOGFILE_NAME, "a+"); | ||
1695 | if (!logfp) { | ||
1696 | fprintf(stderr, "cannot open logfile '%s'\n", LOGFILE_NAME); | ||
1697 | exit(1); | ||
1698 | } | ||
1699 | pid = fork(); | ||
1700 | switch (pid) { | ||
1701 | case 0: | ||
1702 | break; | ||
1703 | case -1: | ||
1704 | exit(2); | ||
1705 | default: | ||
1706 | exit(0); | ||
1707 | } | ||
1708 | |||
1709 | mpsslog("MIC Daemon start\n"); | ||
1710 | |||
1711 | cnt = init_mic_list(); | ||
1712 | if (cnt == 0) { | ||
1713 | mpsslog("MIC module not loaded\n"); | ||
1714 | exit(3); | ||
1715 | } | ||
1716 | mpsslog("MIC found %d devices\n", cnt); | ||
1717 | |||
1718 | start_daemon(); | ||
1719 | |||
1720 | exit(0); | ||
1721 | } | ||
diff --git a/Documentation/mic/mpssd/mpssd.h b/Documentation/mic/mpssd/mpssd.h new file mode 100644 index 000000000000..f5f18b15d9a0 --- /dev/null +++ b/Documentation/mic/mpssd/mpssd.h | |||
@@ -0,0 +1,102 @@ | |||
1 | /* | ||
2 | * Intel MIC Platform Software Stack (MPSS) | ||
3 | * | ||
4 | * Copyright(c) 2013 Intel Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License, version 2, as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | * | ||
15 | * The full GNU General Public License is included in this distribution in | ||
16 | * the file called "COPYING". | ||
17 | * | ||
18 | * Intel MIC User Space Tools. | ||
19 | */ | ||
20 | #ifndef _MPSSD_H_ | ||
21 | #define _MPSSD_H_ | ||
22 | |||
23 | #include <stdio.h> | ||
24 | #include <stdlib.h> | ||
25 | #include <string.h> | ||
26 | #include <fcntl.h> | ||
27 | #include <unistd.h> | ||
28 | #include <dirent.h> | ||
29 | #include <libgen.h> | ||
30 | #include <pthread.h> | ||
31 | #include <stdarg.h> | ||
32 | #include <time.h> | ||
33 | #include <errno.h> | ||
34 | #include <sys/dir.h> | ||
35 | #include <sys/ioctl.h> | ||
36 | #include <sys/poll.h> | ||
37 | #include <sys/types.h> | ||
38 | #include <sys/socket.h> | ||
39 | #include <sys/stat.h> | ||
40 | #include <sys/types.h> | ||
41 | #include <sys/mman.h> | ||
42 | #include <sys/utsname.h> | ||
43 | #include <sys/wait.h> | ||
44 | #include <netinet/in.h> | ||
45 | #include <arpa/inet.h> | ||
46 | #include <netdb.h> | ||
47 | #include <pthread.h> | ||
48 | #include <signal.h> | ||
49 | #include <limits.h> | ||
50 | #include <syslog.h> | ||
51 | #include <getopt.h> | ||
52 | #include <net/if.h> | ||
53 | #include <linux/if_tun.h> | ||
54 | #include <linux/if_tun.h> | ||
55 | #include <linux/virtio_ids.h> | ||
56 | |||
57 | #define MICSYSFSDIR "/sys/class/mic" | ||
58 | #define LOGFILE_NAME "/var/log/mpssd" | ||
59 | #define PAGE_SIZE 4096 | ||
60 | |||
61 | struct mic_console_info { | ||
62 | pthread_t console_thread; | ||
63 | int virtio_console_fd; | ||
64 | void *console_dp; | ||
65 | }; | ||
66 | |||
67 | struct mic_net_info { | ||
68 | pthread_t net_thread; | ||
69 | int virtio_net_fd; | ||
70 | int tap_fd; | ||
71 | void *net_dp; | ||
72 | }; | ||
73 | |||
74 | struct mic_virtblk_info { | ||
75 | pthread_t block_thread; | ||
76 | int virtio_block_fd; | ||
77 | void *block_dp; | ||
78 | volatile sig_atomic_t signaled; | ||
79 | char *backend_file; | ||
80 | int backend; | ||
81 | void *backend_addr; | ||
82 | long backend_size; | ||
83 | }; | ||
84 | |||
85 | struct mic_info { | ||
86 | int id; | ||
87 | char *name; | ||
88 | pthread_t config_thread; | ||
89 | pid_t pid; | ||
90 | struct mic_console_info mic_console; | ||
91 | struct mic_net_info mic_net; | ||
92 | struct mic_virtblk_info mic_virtblk; | ||
93 | int restart; | ||
94 | int boot_on_resume; | ||
95 | struct mic_info *next; | ||
96 | }; | ||
97 | |||
98 | __attribute__((format(printf, 1, 2))) | ||
99 | void mpsslog(char *format, ...); | ||
100 | char *readsysfs(char *dir, char *entry); | ||
101 | int setsysfs(char *dir, char *entry, char *value); | ||
102 | #endif | ||
diff --git a/Documentation/mic/mpssd/sysfs.c b/Documentation/mic/mpssd/sysfs.c new file mode 100644 index 000000000000..8dd326936083 --- /dev/null +++ b/Documentation/mic/mpssd/sysfs.c | |||
@@ -0,0 +1,102 @@ | |||
1 | /* | ||
2 | * Intel MIC Platform Software Stack (MPSS) | ||
3 | * | ||
4 | * Copyright(c) 2013 Intel Corporation. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License, version 2, as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, but | ||
11 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
13 | * General Public License for more details. | ||
14 | * | ||
15 | * The full GNU General Public License is included in this distribution in | ||
16 | * the file called "COPYING". | ||
17 | * | ||
18 | * Intel MIC User Space Tools. | ||
19 | */ | ||
20 | |||
21 | #include "mpssd.h" | ||
22 | |||
23 | #define PAGE_SIZE 4096 | ||
24 | |||
25 | char * | ||
26 | readsysfs(char *dir, char *entry) | ||
27 | { | ||
28 | char filename[PATH_MAX]; | ||
29 | char value[PAGE_SIZE]; | ||
30 | char *string = NULL; | ||
31 | int fd; | ||
32 | int len; | ||
33 | |||
34 | if (dir == NULL) | ||
35 | snprintf(filename, PATH_MAX, "%s/%s", MICSYSFSDIR, entry); | ||
36 | else | ||
37 | snprintf(filename, PATH_MAX, | ||
38 | "%s/%s/%s", MICSYSFSDIR, dir, entry); | ||
39 | |||
40 | fd = open(filename, O_RDONLY); | ||
41 | if (fd < 0) { | ||
42 | mpsslog("Failed to open sysfs entry '%s': %s\n", | ||
43 | filename, strerror(errno)); | ||
44 | return NULL; | ||
45 | } | ||
46 | |||
47 | len = read(fd, value, sizeof(value)); | ||
48 | if (len < 0) { | ||
49 | mpsslog("Failed to read sysfs entry '%s': %s\n", | ||
50 | filename, strerror(errno)); | ||
51 | goto readsys_ret; | ||
52 | } | ||
53 | if (len == 0) | ||
54 | goto readsys_ret; | ||
55 | |||
56 | value[len - 1] = '\0'; | ||
57 | |||
58 | string = malloc(strlen(value) + 1); | ||
59 | if (string) | ||
60 | strcpy(string, value); | ||
61 | |||
62 | readsys_ret: | ||
63 | close(fd); | ||
64 | return string; | ||
65 | } | ||
66 | |||
67 | int | ||
68 | setsysfs(char *dir, char *entry, char *value) | ||
69 | { | ||
70 | char filename[PATH_MAX]; | ||
71 | char *oldvalue; | ||
72 | int fd, ret = 0; | ||
73 | |||
74 | if (dir == NULL) | ||
75 | snprintf(filename, PATH_MAX, "%s/%s", MICSYSFSDIR, entry); | ||
76 | else | ||
77 | snprintf(filename, PATH_MAX, "%s/%s/%s", | ||
78 | MICSYSFSDIR, dir, entry); | ||
79 | |||
80 | oldvalue = readsysfs(dir, entry); | ||
81 | |||
82 | fd = open(filename, O_RDWR); | ||
83 | if (fd < 0) { | ||
84 | ret = errno; | ||
85 | mpsslog("Failed to open sysfs entry '%s': %s\n", | ||
86 | filename, strerror(errno)); | ||
87 | goto done; | ||
88 | } | ||
89 | |||
90 | if (!oldvalue || strcmp(value, oldvalue)) { | ||
91 | if (write(fd, value, strlen(value)) < 0) { | ||
92 | ret = errno; | ||
93 | mpsslog("Failed to write new sysfs entry '%s': %s\n", | ||
94 | filename, strerror(errno)); | ||
95 | } | ||
96 | } | ||
97 | close(fd); | ||
98 | done: | ||
99 | if (oldvalue) | ||
100 | free(oldvalue); | ||
101 | return ret; | ||
102 | } | ||
diff --git a/Documentation/networking/dccp.txt b/Documentation/networking/dccp.txt index d718bc2ff1cf..bf5dbe3ab8c5 100644 --- a/Documentation/networking/dccp.txt +++ b/Documentation/networking/dccp.txt | |||
@@ -18,8 +18,8 @@ Introduction | |||
18 | Datagram Congestion Control Protocol (DCCP) is an unreliable, connection | 18 | Datagram Congestion Control Protocol (DCCP) is an unreliable, connection |
19 | oriented protocol designed to solve issues present in UDP and TCP, particularly | 19 | oriented protocol designed to solve issues present in UDP and TCP, particularly |
20 | for real-time and multimedia (streaming) traffic. | 20 | for real-time and multimedia (streaming) traffic. |
21 | It divides into a base protocol (RFC 4340) and plugable congestion control | 21 | It divides into a base protocol (RFC 4340) and pluggable congestion control |
22 | modules called CCIDs. Like plugable TCP congestion control, at least one CCID | 22 | modules called CCIDs. Like pluggable TCP congestion control, at least one CCID |
23 | needs to be enabled in order for the protocol to function properly. In the Linux | 23 | needs to be enabled in order for the protocol to function properly. In the Linux |
24 | implementation, this is the TCP-like CCID2 (RFC 4341). Additional CCIDs, such as | 24 | implementation, this is the TCP-like CCID2 (RFC 4341). Additional CCIDs, such as |
25 | the TCP-friendly CCID3 (RFC 4342), are optional. | 25 | the TCP-friendly CCID3 (RFC 4342), are optional. |
diff --git a/Documentation/networking/e100.txt b/Documentation/networking/e100.txt index 13a32124bca0..f862cf3aff34 100644 --- a/Documentation/networking/e100.txt +++ b/Documentation/networking/e100.txt | |||
@@ -103,7 +103,7 @@ Additional Configurations | |||
103 | PRO/100 Family of Adapters is e100. | 103 | PRO/100 Family of Adapters is e100. |
104 | 104 | ||
105 | As an example, if you install the e100 driver for two PRO/100 adapters | 105 | As an example, if you install the e100 driver for two PRO/100 adapters |
106 | (eth0 and eth1), add the following to a configuraton file in /etc/modprobe.d/ | 106 | (eth0 and eth1), add the following to a configuration file in /etc/modprobe.d/ |
107 | 107 | ||
108 | alias eth0 e100 | 108 | alias eth0 e100 |
109 | alias eth1 e100 | 109 | alias eth1 e100 |
diff --git a/Documentation/networking/ieee802154.txt b/Documentation/networking/ieee802154.txt index 09eb57329f11..22bbc7225f8e 100644 --- a/Documentation/networking/ieee802154.txt +++ b/Documentation/networking/ieee802154.txt | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | Introduction | 5 | Introduction |
6 | ============ | 6 | ============ |
7 | The IEEE 802.15.4 working group focuses on standartization of bottom | 7 | The IEEE 802.15.4 working group focuses on standardization of bottom |
8 | two layers: Medium Access Control (MAC) and Physical (PHY). And there | 8 | two layers: Medium Access Control (MAC) and Physical (PHY). And there |
9 | are mainly two options available for upper layers: | 9 | are mainly two options available for upper layers: |
10 | - ZigBee - proprietary protocol from ZigBee Alliance | 10 | - ZigBee - proprietary protocol from ZigBee Alliance |
@@ -66,7 +66,7 @@ net_device, with .type = ARPHRD_IEEE802154. Data is exchanged with socket family | |||
66 | code via plain sk_buffs. On skb reception skb->cb must contain additional | 66 | code via plain sk_buffs. On skb reception skb->cb must contain additional |
67 | info as described in the struct ieee802154_mac_cb. During packet transmission | 67 | info as described in the struct ieee802154_mac_cb. During packet transmission |
68 | the skb->cb is used to provide additional data to device's header_ops->create | 68 | the skb->cb is used to provide additional data to device's header_ops->create |
69 | function. Be aware, that this data can be overriden later (when socket code | 69 | function. Be aware that this data can be overridden later (when socket code |
70 | submits skb to qdisc), so if you need something from that cb later, you should | 70 | submits skb to qdisc), so if you need something from that cb later, you should |
71 | store info in the skb->data on your own. | 71 | store info in the skb->data on your own. |
72 | 72 | ||
diff --git a/Documentation/networking/l2tp.txt b/Documentation/networking/l2tp.txt index e63fc1f7bf87..c74434de2fa5 100644 --- a/Documentation/networking/l2tp.txt +++ b/Documentation/networking/l2tp.txt | |||
@@ -197,7 +197,7 @@ state information because the file format is subject to change. It is | |||
197 | implemented to provide extra debug information to help diagnose | 197 | implemented to provide extra debug information to help diagnose |
198 | problems.) Users should use the netlink API. | 198 | problems.) Users should use the netlink API. |
199 | 199 | ||
200 | /proc/net/pppol2tp is also provided for backwards compaibility with | 200 | /proc/net/pppol2tp is also provided for backwards compatibility with |
201 | the original pppol2tp driver. It lists information about L2TPv2 | 201 | the original pppol2tp driver. It lists information about L2TPv2 |
202 | tunnels and sessions only. Its use is discouraged. | 202 | tunnels and sessions only. Its use is discouraged. |
203 | 203 | ||
diff --git a/Documentation/networking/netdev-FAQ.txt b/Documentation/networking/netdev-FAQ.txt index d9112f01c44a..0fe1c6e0dbcd 100644 --- a/Documentation/networking/netdev-FAQ.txt +++ b/Documentation/networking/netdev-FAQ.txt | |||
@@ -4,23 +4,23 @@ Information you need to know about netdev | |||
4 | 4 | ||
5 | Q: What is netdev? | 5 | Q: What is netdev? |
6 | 6 | ||
7 | A: It is a mailing list for all network related linux stuff. This includes | 7 | A: It is a mailing list for all network-related Linux stuff. This includes |
8 | anything found under net/ (i.e. core code like IPv6) and drivers/net | 8 | anything found under net/ (i.e. core code like IPv6) and drivers/net |
9 | (i.e. hardware specific drivers) in the linux source tree. | 9 | (i.e. hardware specific drivers) in the Linux source tree. |
10 | 10 | ||
11 | Note that some subsystems (e.g. wireless drivers) which have a high volume | 11 | Note that some subsystems (e.g. wireless drivers) which have a high volume |
12 | of traffic have their own specific mailing lists. | 12 | of traffic have their own specific mailing lists. |
13 | 13 | ||
14 | The netdev list is managed (like many other linux mailing lists) through | 14 | The netdev list is managed (like many other Linux mailing lists) through |
15 | VGER ( http://vger.kernel.org/ ) and archives can be found below: | 15 | VGER ( http://vger.kernel.org/ ) and archives can be found below: |
16 | 16 | ||
17 | http://marc.info/?l=linux-netdev | 17 | http://marc.info/?l=linux-netdev |
18 | http://www.spinics.net/lists/netdev/ | 18 | http://www.spinics.net/lists/netdev/ |
19 | 19 | ||
20 | Aside from subsystems like that mentioned above, all network related linux | 20 | Aside from subsystems like that mentioned above, all network-related Linux |
21 | development (i.e. RFC, review, comments, etc) takes place on netdev. | 21 | development (i.e. RFC, review, comments, etc.) takes place on netdev. |
22 | 22 | ||
23 | Q: How do the changes posted to netdev make their way into linux? | 23 | Q: How do the changes posted to netdev make their way into Linux? |
24 | 24 | ||
25 | A: There are always two trees (git repositories) in play. Both are driven | 25 | A: There are always two trees (git repositories) in play. Both are driven |
26 | by David Miller, the main network maintainer. There is the "net" tree, | 26 | by David Miller, the main network maintainer. There is the "net" tree, |
@@ -35,7 +35,7 @@ A: There are always two trees (git repositories) in play. Both are driven | |||
35 | Q: How often do changes from these trees make it to the mainline Linus tree? | 35 | Q: How often do changes from these trees make it to the mainline Linus tree? |
36 | 36 | ||
37 | A: To understand this, you need to know a bit of background information | 37 | A: To understand this, you need to know a bit of background information |
38 | on the cadence of linux development. Each new release starts off with | 38 | on the cadence of Linux development. Each new release starts off with |
39 | a two week "merge window" where the main maintainers feed their new | 39 | a two week "merge window" where the main maintainers feed their new |
40 | stuff to Linus for merging into the mainline tree. After the two weeks, | 40 | stuff to Linus for merging into the mainline tree. After the two weeks, |
41 | the merge window is closed, and it is called/tagged "-rc1". No new | 41 | the merge window is closed, and it is called/tagged "-rc1". No new |
@@ -46,7 +46,7 @@ A: To understand this, you need to know a bit of background information | |||
46 | things are in a state of churn), and a week after the last vX.Y-rcN | 46 | things are in a state of churn), and a week after the last vX.Y-rcN |
47 | was done, the official "vX.Y" is released. | 47 | was done, the official "vX.Y" is released. |
48 | 48 | ||
49 | Relating that to netdev: At the beginning of the 2 week merge window, | 49 | Relating that to netdev: At the beginning of the 2-week merge window, |
50 | the net-next tree will be closed - no new changes/features. The | 50 | the net-next tree will be closed - no new changes/features. The |
51 | accumulated new content of the past ~10 weeks will be passed onto | 51 | accumulated new content of the past ~10 weeks will be passed onto |
52 | mainline/Linus via a pull request for vX.Y -- at the same time, | 52 | mainline/Linus via a pull request for vX.Y -- at the same time, |
@@ -59,16 +59,16 @@ A: To understand this, you need to know a bit of background information | |||
59 | IMPORTANT: Do not send new net-next content to netdev during the | 59 | IMPORTANT: Do not send new net-next content to netdev during the |
60 | period during which net-next tree is closed. | 60 | period during which net-next tree is closed. |
61 | 61 | ||
62 | Shortly after the two weeks have passed, (and vX.Y-rc1 is released) the | 62 | Shortly after the two weeks have passed (and vX.Y-rc1 is released), the |
63 | tree for net-next reopens to collect content for the next (vX.Y+1) release. | 63 | tree for net-next reopens to collect content for the next (vX.Y+1) release. |
64 | 64 | ||
65 | If you aren't subscribed to netdev and/or are simply unsure if net-next | 65 | If you aren't subscribed to netdev and/or are simply unsure if net-next |
66 | has re-opened yet, simply check the net-next git repository link above for | 66 | has re-opened yet, simply check the net-next git repository link above for |
67 | any new networking related commits. | 67 | any new networking-related commits. |
68 | 68 | ||
69 | The "net" tree continues to collect fixes for the vX.Y content, and | 69 | The "net" tree continues to collect fixes for the vX.Y content, and |
70 | is fed back to Linus at regular (~weekly) intervals. Meaning that the | 70 | is fed back to Linus at regular (~weekly) intervals. Meaning that the |
71 | focus for "net" is on stablilization and bugfixes. | 71 | focus for "net" is on stabilization and bugfixes. |
72 | 72 | ||
73 | Finally, the vX.Y gets released, and the whole cycle starts over. | 73 | Finally, the vX.Y gets released, and the whole cycle starts over. |
74 | 74 | ||
@@ -217,7 +217,7 @@ A: Attention to detail. Re-read your own work as if you were the | |||
217 | to why it happens, and then if necessary, explain why the fix proposed | 217 | to why it happens, and then if necessary, explain why the fix proposed |
218 | is the best way to get things done. Don't mangle whitespace, and as | 218 | is the best way to get things done. Don't mangle whitespace, and as |
219 | is common, don't mis-indent function arguments that span multiple lines. | 219 | is common, don't mis-indent function arguments that span multiple lines. |
220 | If it is your 1st patch, mail it to yourself so you can test apply | 220 | If it is your first patch, mail it to yourself so you can test apply |
221 | it to an unpatched tree to confirm infrastructure didn't mangle it. | 221 | it to an unpatched tree to confirm infrastructure didn't mangle it. |
222 | 222 | ||
223 | Finally, go back and read Documentation/SubmittingPatches to be | 223 | Finally, go back and read Documentation/SubmittingPatches to be |
diff --git a/Documentation/networking/netlink_mmap.txt b/Documentation/networking/netlink_mmap.txt index 533378839546..b26122973525 100644 --- a/Documentation/networking/netlink_mmap.txt +++ b/Documentation/networking/netlink_mmap.txt | |||
@@ -45,7 +45,7 @@ processing. | |||
45 | 45 | ||
46 | Conversion of the reception path involves calling poll() on the file | 46 | Conversion of the reception path involves calling poll() on the file |
47 | descriptor, once the socket is readable the frames from the ring are | 47 | descriptor, once the socket is readable the frames from the ring are |
48 | processsed in order until no more messages are available, as indicated by | 48 | processed in order until no more messages are available, as indicated by |
49 | a status word in the frame header. | 49 | a status word in the frame header. |
50 | 50 | ||
51 | On kernel side, in order to make use of memory mapped I/O on receive, the | 51 | On kernel side, in order to make use of memory mapped I/O on receive, the |
@@ -56,7 +56,7 @@ Dumps of kernel databases automatically support memory mapped I/O. | |||
56 | 56 | ||
57 | Conversion of the transmit path involves changing message construction to | 57 | Conversion of the transmit path involves changing message construction to |
58 | use memory from the TX ring instead of (usually) a buffer declared on the | 58 | use memory from the TX ring instead of (usually) a buffer declared on the |
59 | stack and setting up the frame header approriately. Optionally poll() can | 59 | stack and setting up the frame header appropriately. Optionally poll() can |
60 | be used to wait for free frames in the TX ring. | 60 | be used to wait for free frames in the TX ring. |
61 | 61 | ||
62 | Structured and definitions for using memory mapped I/O are contained in | 62 | Structured and definitions for using memory mapped I/O are contained in |
@@ -231,7 +231,7 @@ Ring setup: | |||
231 | if (setsockopt(fd, NETLINK_TX_RING, &req, sizeof(req)) < 0) | 231 | if (setsockopt(fd, NETLINK_TX_RING, &req, sizeof(req)) < 0) |
232 | exit(1) | 232 | exit(1) |
233 | 233 | ||
234 | /* Calculate size of each invididual ring */ | 234 | /* Calculate size of each individual ring */ |
235 | ring_size = req.nm_block_nr * req.nm_block_size; | 235 | ring_size = req.nm_block_nr * req.nm_block_size; |
236 | 236 | ||
237 | /* Map RX/TX rings. The TX ring is located after the RX ring */ | 237 | /* Map RX/TX rings. The TX ring is located after the RX ring */ |
diff --git a/Documentation/networking/operstates.txt b/Documentation/networking/operstates.txt index 97694572338b..355c6d8ef8ad 100644 --- a/Documentation/networking/operstates.txt +++ b/Documentation/networking/operstates.txt | |||
@@ -89,8 +89,8 @@ packets. The name 'carrier' and the inversion are historical, think of | |||
89 | it as lower layer. | 89 | it as lower layer. |
90 | 90 | ||
91 | Note that for certain kind of soft-devices, which are not managing any | 91 | Note that for certain kind of soft-devices, which are not managing any |
92 | real hardware, there is possible to set this bit from userpsace. | 92 | real hardware, it is possible to set this bit from userspace. One |
93 | One should use TVL IFLA_CARRIER to do so. | 93 | should use TVL IFLA_CARRIER to do so. |
94 | 94 | ||
95 | netif_carrier_ok() can be used to query that bit. | 95 | netif_carrier_ok() can be used to query that bit. |
96 | 96 | ||
diff --git a/Documentation/networking/rxrpc.txt b/Documentation/networking/rxrpc.txt index 60d05eb77c64..b89bc82eed46 100644 --- a/Documentation/networking/rxrpc.txt +++ b/Documentation/networking/rxrpc.txt | |||
@@ -144,7 +144,7 @@ An overview of the RxRPC protocol: | |||
144 | (*) Calls use ACK packets to handle reliability. Data packets are also | 144 | (*) Calls use ACK packets to handle reliability. Data packets are also |
145 | explicitly sequenced per call. | 145 | explicitly sequenced per call. |
146 | 146 | ||
147 | (*) There are two types of positive acknowledgement: hard-ACKs and soft-ACKs. | 147 | (*) There are two types of positive acknowledgment: hard-ACKs and soft-ACKs. |
148 | A hard-ACK indicates to the far side that all the data received to a point | 148 | A hard-ACK indicates to the far side that all the data received to a point |
149 | has been received and processed; a soft-ACK indicates that the data has | 149 | has been received and processed; a soft-ACK indicates that the data has |
150 | been received but may yet be discarded and re-requested. The sender may | 150 | been received but may yet be discarded and re-requested. The sender may |
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt index 457b8bbafb08..cdd916da838d 100644 --- a/Documentation/networking/stmmac.txt +++ b/Documentation/networking/stmmac.txt | |||
@@ -160,7 +160,7 @@ Where: | |||
160 | o pmt: core has the embedded power module (optional). | 160 | o pmt: core has the embedded power module (optional). |
161 | o force_sf_dma_mode: force DMA to use the Store and Forward mode | 161 | o force_sf_dma_mode: force DMA to use the Store and Forward mode |
162 | instead of the Threshold. | 162 | instead of the Threshold. |
163 | o force_thresh_dma_mode: force DMA to use the Shreshold mode other than | 163 | o force_thresh_dma_mode: force DMA to use the Threshold mode other than |
164 | the Store and Forward mode. | 164 | the Store and Forward mode. |
165 | o riwt_off: force to disable the RX watchdog feature and switch to NAPI mode. | 165 | o riwt_off: force to disable the RX watchdog feature and switch to NAPI mode. |
166 | o fix_mac_speed: this callback is used for modifying some syscfg registers | 166 | o fix_mac_speed: this callback is used for modifying some syscfg registers |
@@ -175,7 +175,7 @@ Where: | |||
175 | registers. | 175 | registers. |
176 | o custom_cfg/custom_data: this is a custom configuration that can be passed | 176 | o custom_cfg/custom_data: this is a custom configuration that can be passed |
177 | while initializing the resources. | 177 | while initializing the resources. |
178 | o bsp_priv: another private poiter. | 178 | o bsp_priv: another private pointer. |
179 | 179 | ||
180 | For MDIO bus The we have: | 180 | For MDIO bus The we have: |
181 | 181 | ||
@@ -271,7 +271,7 @@ reset procedure etc). | |||
271 | o dwmac1000_dma.c: dma functions for the GMAC chip; | 271 | o dwmac1000_dma.c: dma functions for the GMAC chip; |
272 | o dwmac1000.h: specific header file for the GMAC; | 272 | o dwmac1000.h: specific header file for the GMAC; |
273 | o dwmac100_core: MAC 100 core and dma code; | 273 | o dwmac100_core: MAC 100 core and dma code; |
274 | o dwmac100_dma.c: dma funtions for the MAC chip; | 274 | o dwmac100_dma.c: dma functions for the MAC chip; |
275 | o dwmac1000.h: specific header file for the MAC; | 275 | o dwmac1000.h: specific header file for the MAC; |
276 | o dwmac_lib.c: generic DMA functions shared among chips; | 276 | o dwmac_lib.c: generic DMA functions shared among chips; |
277 | o enh_desc.c: functions for handling enhanced descriptors; | 277 | o enh_desc.c: functions for handling enhanced descriptors; |
@@ -364,4 +364,4 @@ Auto-negotiated Link Parter Ability. | |||
364 | 10) TODO: | 364 | 10) TODO: |
365 | o XGMAC is not supported. | 365 | o XGMAC is not supported. |
366 | o Complete the TBI & RTBI support. | 366 | o Complete the TBI & RTBI support. |
367 | o extened VLAN support for 3.70a SYNP GMAC. | 367 | o extend VLAN support for 3.70a SYNP GMAC. |
diff --git a/Documentation/networking/vortex.txt b/Documentation/networking/vortex.txt index 9a8041dcbb53..97282da82b75 100644 --- a/Documentation/networking/vortex.txt +++ b/Documentation/networking/vortex.txt | |||
@@ -68,7 +68,7 @@ Module parameters | |||
68 | 68 | ||
69 | There are several parameters which may be provided to the driver when | 69 | There are several parameters which may be provided to the driver when |
70 | its module is loaded. These are usually placed in /etc/modprobe.d/*.conf | 70 | its module is loaded. These are usually placed in /etc/modprobe.d/*.conf |
71 | configuretion files. Example: | 71 | configuration files. Example: |
72 | 72 | ||
73 | options 3c59x debug=3 rx_copybreak=300 | 73 | options 3c59x debug=3 rx_copybreak=300 |
74 | 74 | ||
@@ -178,7 +178,7 @@ max_interrupt_work=N | |||
178 | 178 | ||
179 | The driver's interrupt service routine can handle many receive and | 179 | The driver's interrupt service routine can handle many receive and |
180 | transmit packets in a single invocation. It does this in a loop. | 180 | transmit packets in a single invocation. It does this in a loop. |
181 | The value of max_interrupt_work governs how mnay times the interrupt | 181 | The value of max_interrupt_work governs how many times the interrupt |
182 | service routine will loop. The default value is 32 loops. If this | 182 | service routine will loop. The default value is 32 loops. If this |
183 | is exceeded the interrupt service routine gives up and generates a | 183 | is exceeded the interrupt service routine gives up and generates a |
184 | warning message "eth0: Too much work in interrupt". | 184 | warning message "eth0: Too much work in interrupt". |
diff --git a/Documentation/networking/x25-iface.txt b/Documentation/networking/x25-iface.txt index 78f662ee0622..7f213b556e85 100644 --- a/Documentation/networking/x25-iface.txt +++ b/Documentation/networking/x25-iface.txt | |||
@@ -105,7 +105,7 @@ reduced by the following measures or a combination thereof: | |||
105 | later. | 105 | later. |
106 | The lapb module interface was modified to support this. Its | 106 | The lapb module interface was modified to support this. Its |
107 | data_indication() method should now transparently pass the | 107 | data_indication() method should now transparently pass the |
108 | netif_rx() return value to the (lapb mopdule) caller. | 108 | netif_rx() return value to the (lapb module) caller. |
109 | (2) Drivers for kernel versions 2.2.x should always check the global | 109 | (2) Drivers for kernel versions 2.2.x should always check the global |
110 | variable netdev_dropping when a new frame is received. The driver | 110 | variable netdev_dropping when a new frame is received. The driver |
111 | should only call netif_rx() if netdev_dropping is zero. Otherwise | 111 | should only call netif_rx() if netdev_dropping is zero. Otherwise |
diff --git a/Documentation/phy.txt b/Documentation/phy.txt new file mode 100644 index 000000000000..0103e4b15b0e --- /dev/null +++ b/Documentation/phy.txt | |||
@@ -0,0 +1,166 @@ | |||
1 | PHY SUBSYSTEM | ||
2 | Kishon Vijay Abraham I <kishon@ti.com> | ||
3 | |||
4 | This document explains the Generic PHY Framework along with the APIs provided, | ||
5 | and how-to-use. | ||
6 | |||
7 | 1. Introduction | ||
8 | |||
9 | *PHY* is the abbreviation for physical layer. It is used to connect a device | ||
10 | to the physical medium e.g., the USB controller has a PHY to provide functions | ||
11 | such as serialization, de-serialization, encoding, decoding and is responsible | ||
12 | for obtaining the required data transmission rate. Note that some USB | ||
13 | controllers have PHY functionality embedded into it and others use an external | ||
14 | PHY. Other peripherals that use PHY include Wireless LAN, Ethernet, | ||
15 | SATA etc. | ||
16 | |||
17 | The intention of creating this framework is to bring the PHY drivers spread | ||
18 | all over the Linux kernel to drivers/phy to increase code re-use and for | ||
19 | better code maintainability. | ||
20 | |||
21 | This framework will be of use only to devices that use external PHY (PHY | ||
22 | functionality is not embedded within the controller). | ||
23 | |||
24 | 2. Registering/Unregistering the PHY provider | ||
25 | |||
26 | PHY provider refers to an entity that implements one or more PHY instances. | ||
27 | For the simple case where the PHY provider implements only a single instance of | ||
28 | the PHY, the framework provides its own implementation of of_xlate in | ||
29 | of_phy_simple_xlate. If the PHY provider implements multiple instances, it | ||
30 | should provide its own implementation of of_xlate. of_xlate is used only for | ||
31 | dt boot case. | ||
32 | |||
33 | #define of_phy_provider_register(dev, xlate) \ | ||
34 | __of_phy_provider_register((dev), THIS_MODULE, (xlate)) | ||
35 | |||
36 | #define devm_of_phy_provider_register(dev, xlate) \ | ||
37 | __devm_of_phy_provider_register((dev), THIS_MODULE, (xlate)) | ||
38 | |||
39 | of_phy_provider_register and devm_of_phy_provider_register macros can be used to | ||
40 | register the phy_provider and it takes device and of_xlate as | ||
41 | arguments. For the dt boot case, all PHY providers should use one of the above | ||
42 | 2 macros to register the PHY provider. | ||
43 | |||
44 | void devm_of_phy_provider_unregister(struct device *dev, | ||
45 | struct phy_provider *phy_provider); | ||
46 | void of_phy_provider_unregister(struct phy_provider *phy_provider); | ||
47 | |||
48 | devm_of_phy_provider_unregister and of_phy_provider_unregister can be used to | ||
49 | unregister the PHY. | ||
50 | |||
51 | 3. Creating the PHY | ||
52 | |||
53 | The PHY driver should create the PHY in order for other peripheral controllers | ||
54 | to make use of it. The PHY framework provides 2 APIs to create the PHY. | ||
55 | |||
56 | struct phy *phy_create(struct device *dev, const struct phy_ops *ops, | ||
57 | struct phy_init_data *init_data); | ||
58 | struct phy *devm_phy_create(struct device *dev, const struct phy_ops *ops, | ||
59 | struct phy_init_data *init_data); | ||
60 | |||
61 | The PHY drivers can use one of the above 2 APIs to create the PHY by passing | ||
62 | the device pointer, phy ops and init_data. | ||
63 | phy_ops is a set of function pointers for performing PHY operations such as | ||
64 | init, exit, power_on and power_off. *init_data* is mandatory to get a reference | ||
65 | to the PHY in the case of non-dt boot. See section *Board File Initialization* | ||
66 | on how init_data should be used. | ||
67 | |||
68 | Inorder to dereference the private data (in phy_ops), the phy provider driver | ||
69 | can use phy_set_drvdata() after creating the PHY and use phy_get_drvdata() in | ||
70 | phy_ops to get back the private data. | ||
71 | |||
72 | 4. Getting a reference to the PHY | ||
73 | |||
74 | Before the controller can make use of the PHY, it has to get a reference to | ||
75 | it. This framework provides the following APIs to get a reference to the PHY. | ||
76 | |||
77 | struct phy *phy_get(struct device *dev, const char *string); | ||
78 | struct phy *devm_phy_get(struct device *dev, const char *string); | ||
79 | |||
80 | phy_get and devm_phy_get can be used to get the PHY. In the case of dt boot, | ||
81 | the string arguments should contain the phy name as given in the dt data and | ||
82 | in the case of non-dt boot, it should contain the label of the PHY. | ||
83 | The only difference between the two APIs is that devm_phy_get associates the | ||
84 | device with the PHY using devres on successful PHY get. On driver detach, | ||
85 | release function is invoked on the the devres data and devres data is freed. | ||
86 | |||
87 | 5. Releasing a reference to the PHY | ||
88 | |||
89 | When the controller no longer needs the PHY, it has to release the reference | ||
90 | to the PHY it has obtained using the APIs mentioned in the above section. The | ||
91 | PHY framework provides 2 APIs to release a reference to the PHY. | ||
92 | |||
93 | void phy_put(struct phy *phy); | ||
94 | void devm_phy_put(struct device *dev, struct phy *phy); | ||
95 | |||
96 | Both these APIs are used to release a reference to the PHY and devm_phy_put | ||
97 | destroys the devres associated with this PHY. | ||
98 | |||
99 | 6. Destroying the PHY | ||
100 | |||
101 | When the driver that created the PHY is unloaded, it should destroy the PHY it | ||
102 | created using one of the following 2 APIs. | ||
103 | |||
104 | void phy_destroy(struct phy *phy); | ||
105 | void devm_phy_destroy(struct device *dev, struct phy *phy); | ||
106 | |||
107 | Both these APIs destroy the PHY and devm_phy_destroy destroys the devres | ||
108 | associated with this PHY. | ||
109 | |||
110 | 7. PM Runtime | ||
111 | |||
112 | This subsystem is pm runtime enabled. So while creating the PHY, | ||
113 | pm_runtime_enable of the phy device created by this subsystem is called and | ||
114 | while destroying the PHY, pm_runtime_disable is called. Note that the phy | ||
115 | device created by this subsystem will be a child of the device that calls | ||
116 | phy_create (PHY provider device). | ||
117 | |||
118 | So pm_runtime_get_sync of the phy_device created by this subsystem will invoke | ||
119 | pm_runtime_get_sync of PHY provider device because of parent-child relationship. | ||
120 | It should also be noted that phy_power_on and phy_power_off performs | ||
121 | phy_pm_runtime_get_sync and phy_pm_runtime_put respectively. | ||
122 | There are exported APIs like phy_pm_runtime_get, phy_pm_runtime_get_sync, | ||
123 | phy_pm_runtime_put, phy_pm_runtime_put_sync, phy_pm_runtime_allow and | ||
124 | phy_pm_runtime_forbid for performing PM operations. | ||
125 | |||
126 | 8. Board File Initialization | ||
127 | |||
128 | Certain board file initialization is necessary in order to get a reference | ||
129 | to the PHY in the case of non-dt boot. | ||
130 | Say we have a single device that implements 3 PHYs that of USB, SATA and PCIe, | ||
131 | then in the board file the following initialization should be done. | ||
132 | |||
133 | struct phy_consumer consumers[] = { | ||
134 | PHY_CONSUMER("dwc3.0", "usb"), | ||
135 | PHY_CONSUMER("pcie.0", "pcie"), | ||
136 | PHY_CONSUMER("sata.0", "sata"), | ||
137 | }; | ||
138 | PHY_CONSUMER takes 2 parameters, first is the device name of the controller | ||
139 | (PHY consumer) and second is the port name. | ||
140 | |||
141 | struct phy_init_data init_data = { | ||
142 | .consumers = consumers, | ||
143 | .num_consumers = ARRAY_SIZE(consumers), | ||
144 | }; | ||
145 | |||
146 | static const struct platform_device pipe3_phy_dev = { | ||
147 | .name = "pipe3-phy", | ||
148 | .id = -1, | ||
149 | .dev = { | ||
150 | .platform_data = { | ||
151 | .init_data = &init_data, | ||
152 | }, | ||
153 | }, | ||
154 | }; | ||
155 | |||
156 | then, while doing phy_create, the PHY driver should pass this init_data | ||
157 | phy_create(dev, ops, pdata->init_data); | ||
158 | |||
159 | and the controller driver (phy consumer) should pass the port name along with | ||
160 | the device to get a reference to the PHY | ||
161 | phy_get(dev, "pcie"); | ||
162 | |||
163 | 9. DeviceTree Binding | ||
164 | |||
165 | The documentation for PHY dt binding can be found @ | ||
166 | Documentation/devicetree/bindings/phy/phy-bindings.txt | ||
diff --git a/Documentation/pps/pps.txt b/Documentation/pps/pps.txt index d35dcdd82ff6..c03b1be5eb15 100644 --- a/Documentation/pps/pps.txt +++ b/Documentation/pps/pps.txt | |||
@@ -66,6 +66,21 @@ In LinuxPPS the PPS sources are simply char devices usually mapped | |||
66 | into files /dev/pps0, /dev/pps1, etc.. | 66 | into files /dev/pps0, /dev/pps1, etc.. |
67 | 67 | ||
68 | 68 | ||
69 | PPS with USB to serial devices | ||
70 | ------------------------------ | ||
71 | |||
72 | It is possible to grab the PPS from an USB to serial device. However, | ||
73 | you should take into account the latencies and jitter introduced by | ||
74 | the USB stack. Users has reported clock instability around +-1ms when | ||
75 | synchronized with PPS through USB. This isn't suited for time server | ||
76 | synchronization. | ||
77 | |||
78 | If your device doesn't report PPS, you can check that the feature is | ||
79 | supported by its driver. Most of the time, you only need to add a call | ||
80 | to usb_serial_handle_dcd_change after checking the DCD status (see | ||
81 | ch341 and pl2303 examples). | ||
82 | |||
83 | |||
69 | Coding example | 84 | Coding example |
70 | -------------- | 85 | -------------- |
71 | 86 | ||
diff --git a/Documentation/s390/s390dbf.txt b/Documentation/s390/s390dbf.txt index fcaf0b4efba2..3da163383c93 100644 --- a/Documentation/s390/s390dbf.txt +++ b/Documentation/s390/s390dbf.txt | |||
@@ -158,6 +158,16 @@ Return Value: none | |||
158 | Description: Sets new actual debug level if new_level is valid. | 158 | Description: Sets new actual debug level if new_level is valid. |
159 | 159 | ||
160 | --------------------------------------------------------------------------- | 160 | --------------------------------------------------------------------------- |
161 | bool debug_level_enabled (debug_info_t * id, int level); | ||
162 | |||
163 | Parameter: id: handle for debug log | ||
164 | level: debug level | ||
165 | |||
166 | Return Value: True if level is less or equal to the current debug level. | ||
167 | |||
168 | Description: Returns true if debug events for the specified level would be | ||
169 | logged. Otherwise returns false. | ||
170 | --------------------------------------------------------------------------- | ||
161 | void debug_stop_all(void); | 171 | void debug_stop_all(void); |
162 | 172 | ||
163 | Parameter: none | 173 | Parameter: none |
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index 067c47d46917..c3a7689a90e6 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
@@ -264,10 +264,6 @@ hardware. | |||
264 | Locking: none. | 264 | Locking: none. |
265 | Interrupts: caller dependent. | 265 | Interrupts: caller dependent. |
266 | 266 | ||
267 | set_wake(port,state) | ||
268 | Enable/disable power management wakeup on serial activity. Not | ||
269 | currently implemented. | ||
270 | |||
271 | type(port) | 267 | type(port) |
272 | Return a pointer to a string constant describing the specified | 268 | Return a pointer to a string constant describing the specified |
273 | port, or return NULL, in which case the string 'unknown' is | 269 | port, or return NULL, in which case the string 'unknown' is |
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index 8cb4d7842a5f..0e307c94809a 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
@@ -11,27 +11,29 @@ regardless of whatever else it is doing, unless it is completely locked up. | |||
11 | You need to say "yes" to 'Magic SysRq key (CONFIG_MAGIC_SYSRQ)' when | 11 | You need to say "yes" to 'Magic SysRq key (CONFIG_MAGIC_SYSRQ)' when |
12 | configuring the kernel. When running a kernel with SysRq compiled in, | 12 | configuring the kernel. When running a kernel with SysRq compiled in, |
13 | /proc/sys/kernel/sysrq controls the functions allowed to be invoked via | 13 | /proc/sys/kernel/sysrq controls the functions allowed to be invoked via |
14 | the SysRq key. By default the file contains 1 which means that every | 14 | the SysRq key. The default value in this file is set by the |
15 | possible SysRq request is allowed (in older versions SysRq was disabled | 15 | CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE config symbol, which itself defaults |
16 | by default, and you were required to specifically enable it at run-time | 16 | to 1. Here is the list of possible values in /proc/sys/kernel/sysrq: |
17 | but this is not the case any more). Here is the list of possible values | ||
18 | in /proc/sys/kernel/sysrq: | ||
19 | 0 - disable sysrq completely | 17 | 0 - disable sysrq completely |
20 | 1 - enable all functions of sysrq | 18 | 1 - enable all functions of sysrq |
21 | >1 - bitmask of allowed sysrq functions (see below for detailed function | 19 | >1 - bitmask of allowed sysrq functions (see below for detailed function |
22 | description): | 20 | description): |
23 | 2 - enable control of console logging level | 21 | 2 = 0x2 - enable control of console logging level |
24 | 4 - enable control of keyboard (SAK, unraw) | 22 | 4 = 0x4 - enable control of keyboard (SAK, unraw) |
25 | 8 - enable debugging dumps of processes etc. | 23 | 8 = 0x8 - enable debugging dumps of processes etc. |
26 | 16 - enable sync command | 24 | 16 = 0x10 - enable sync command |
27 | 32 - enable remount read-only | 25 | 32 = 0x20 - enable remount read-only |
28 | 64 - enable signalling of processes (term, kill, oom-kill) | 26 | 64 = 0x40 - enable signalling of processes (term, kill, oom-kill) |
29 | 128 - allow reboot/poweroff | 27 | 128 = 0x80 - allow reboot/poweroff |
30 | 256 - allow nicing of all RT tasks | 28 | 256 = 0x100 - allow nicing of all RT tasks |
31 | 29 | ||
32 | You can set the value in the file by the following command: | 30 | You can set the value in the file by the following command: |
33 | echo "number" >/proc/sys/kernel/sysrq | 31 | echo "number" >/proc/sys/kernel/sysrq |
34 | 32 | ||
33 | The number may be written here either as decimal or as hexadecimal | ||
34 | with the 0x prefix. CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE must always be | ||
35 | written in hexadecimal. | ||
36 | |||
35 | Note that the value of /proc/sys/kernel/sysrq influences only the invocation | 37 | Note that the value of /proc/sys/kernel/sysrq influences only the invocation |
36 | via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always | 38 | via a keyboard. Invocation of any operation via /proc/sysrq-trigger is always |
37 | allowed (by a user with admin privileges). | 39 | allowed (by a user with admin privileges). |