diff options
Diffstat (limited to 'Documentation')
43 files changed, 2771 insertions, 1236 deletions
diff --git a/Documentation/HOWTO b/Documentation/HOWTO index 0291ade44c17..619e8caf30db 100644 --- a/Documentation/HOWTO +++ b/Documentation/HOWTO | |||
@@ -377,7 +377,7 @@ Bug Reporting | |||
377 | bugzilla.kernel.org is where the Linux kernel developers track kernel | 377 | bugzilla.kernel.org is where the Linux kernel developers track kernel |
378 | bugs. Users are encouraged to report all bugs that they find in this | 378 | bugs. Users are encouraged to report all bugs that they find in this |
379 | tool. For details on how to use the kernel bugzilla, please see: | 379 | tool. For details on how to use the kernel bugzilla, please see: |
380 | http://test.kernel.org/bugzilla/faq.html | 380 | http://bugzilla.kernel.org/page.cgi?id=faq.html |
381 | 381 | ||
382 | The file REPORTING-BUGS in the main kernel source directory has a good | 382 | The file REPORTING-BUGS in the main kernel source directory has a good |
383 | template for how to report a possible kernel bug, and details what kind | 383 | template for how to report a possible kernel bug, and details what kind |
diff --git a/Documentation/accounting/taskstats-struct.txt b/Documentation/accounting/taskstats-struct.txt index 8aa7529f8258..cd784f46bf8a 100644 --- a/Documentation/accounting/taskstats-struct.txt +++ b/Documentation/accounting/taskstats-struct.txt | |||
@@ -24,6 +24,8 @@ There are three different groups of fields in the struct taskstats: | |||
24 | 24 | ||
25 | 4) Per-task and per-thread context switch count statistics | 25 | 4) Per-task and per-thread context switch count statistics |
26 | 26 | ||
27 | 5) Time accounting for SMT machines | ||
28 | |||
27 | Future extension should add fields to the end of the taskstats struct, and | 29 | Future extension should add fields to the end of the taskstats struct, and |
28 | should not change the relative position of each field within the struct. | 30 | should not change the relative position of each field within the struct. |
29 | 31 | ||
@@ -164,4 +166,8 @@ struct taskstats { | |||
164 | __u64 nvcsw; /* Context voluntary switch counter */ | 166 | __u64 nvcsw; /* Context voluntary switch counter */ |
165 | __u64 nivcsw; /* Context involuntary switch counter */ | 167 | __u64 nivcsw; /* Context involuntary switch counter */ |
166 | 168 | ||
169 | 5) Time accounting for SMT machines | ||
170 | __u64 ac_utimescaled; /* utime scaled on frequency etc */ | ||
171 | __u64 ac_stimescaled; /* stime scaled on frequency etc */ | ||
172 | __u64 cpu_scaled_run_real_total; /* scaled cpu_run_real_total */ | ||
167 | } | 173 | } |
diff --git a/Documentation/auxdisplay/cfag12864b b/Documentation/auxdisplay/cfag12864b index b714183d4125..eb7be393a510 100644 --- a/Documentation/auxdisplay/cfag12864b +++ b/Documentation/auxdisplay/cfag12864b | |||
@@ -3,7 +3,7 @@ | |||
3 | =================================== | 3 | =================================== |
4 | 4 | ||
5 | License: GPLv2 | 5 | License: GPLv2 |
6 | Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com> | 6 | Author & Maintainer: Miguel Ojeda Sandonis |
7 | Date: 2006-10-27 | 7 | Date: 2006-10-27 |
8 | 8 | ||
9 | 9 | ||
@@ -22,7 +22,7 @@ Date: 2006-10-27 | |||
22 | 1. DRIVER INFORMATION | 22 | 1. DRIVER INFORMATION |
23 | --------------------- | 23 | --------------------- |
24 | 24 | ||
25 | This driver support one cfag12864b display at time. | 25 | This driver supports a cfag12864b LCD. |
26 | 26 | ||
27 | 27 | ||
28 | --------------------- | 28 | --------------------- |
diff --git a/Documentation/auxdisplay/cfag12864b-example.c b/Documentation/auxdisplay/cfag12864b-example.c index 7bfac354d4c9..2caeea5e4993 100644 --- a/Documentation/auxdisplay/cfag12864b-example.c +++ b/Documentation/auxdisplay/cfag12864b-example.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * Description: cfag12864b LCD userspace example program | 4 | * Description: cfag12864b LCD userspace example program |
5 | * License: GPLv2 | 5 | * License: GPLv2 |
6 | * | 6 | * |
7 | * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com> | 7 | * Author: Copyright (C) Miguel Ojeda Sandonis |
8 | * Date: 2006-10-31 | 8 | * Date: 2006-10-31 |
9 | * | 9 | * |
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
diff --git a/Documentation/auxdisplay/ks0108 b/Documentation/auxdisplay/ks0108 index 92b03b60c613..8ddda0c8ceef 100644 --- a/Documentation/auxdisplay/ks0108 +++ b/Documentation/auxdisplay/ks0108 | |||
@@ -3,7 +3,7 @@ | |||
3 | ========================================== | 3 | ========================================== |
4 | 4 | ||
5 | License: GPLv2 | 5 | License: GPLv2 |
6 | Author & Maintainer: Miguel Ojeda Sandonis <maxextreme@gmail.com> | 6 | Author & Maintainer: Miguel Ojeda Sandonis |
7 | Date: 2006-10-27 | 7 | Date: 2006-10-27 |
8 | 8 | ||
9 | 9 | ||
@@ -21,7 +21,7 @@ Date: 2006-10-27 | |||
21 | 1. DRIVER INFORMATION | 21 | 1. DRIVER INFORMATION |
22 | --------------------- | 22 | --------------------- |
23 | 23 | ||
24 | This driver support the ks0108 LCD controller. | 24 | This driver supports the ks0108 LCD controller. |
25 | 25 | ||
26 | 26 | ||
27 | --------------------- | 27 | --------------------- |
diff --git a/Documentation/cgroups.txt b/Documentation/cgroups.txt index 824fc0274471..d9014aa0eb68 100644 --- a/Documentation/cgroups.txt +++ b/Documentation/cgroups.txt | |||
@@ -390,6 +390,10 @@ If you have several tasks to attach, you have to do it one after another: | |||
390 | ... | 390 | ... |
391 | # /bin/echo PIDn > tasks | 391 | # /bin/echo PIDn > tasks |
392 | 392 | ||
393 | You can attach the current shell task by echoing 0: | ||
394 | |||
395 | # echo 0 > tasks | ||
396 | |||
393 | 3. Kernel API | 397 | 3. Kernel API |
394 | ============= | 398 | ============= |
395 | 399 | ||
diff --git a/Documentation/controllers/devices.txt b/Documentation/controllers/devices.txt index 4dcea42432c2..7cc6e6a60672 100644 --- a/Documentation/controllers/devices.txt +++ b/Documentation/controllers/devices.txt | |||
@@ -13,7 +13,7 @@ either an integer or * for all. Access is a composition of r | |||
13 | The root device cgroup starts with rwm to 'all'. A child device | 13 | The root device cgroup starts with rwm to 'all'. A child device |
14 | cgroup gets a copy of the parent. Administrators can then remove | 14 | cgroup gets a copy of the parent. Administrators can then remove |
15 | devices from the whitelist or add new entries. A child cgroup can | 15 | devices from the whitelist or add new entries. A child cgroup can |
16 | never receive a device access which is denied its parent. However | 16 | never receive a device access which is denied by its parent. However |
17 | when a device access is removed from a parent it will not also be | 17 | when a device access is removed from a parent it will not also be |
18 | removed from the child(ren). | 18 | removed from the child(ren). |
19 | 19 | ||
@@ -29,7 +29,11 @@ allows cgroup 1 to read and mknod the device usually known as | |||
29 | 29 | ||
30 | echo a > /cgroups/1/devices.deny | 30 | echo a > /cgroups/1/devices.deny |
31 | 31 | ||
32 | will remove the default 'a *:* mrw' entry. | 32 | will remove the default 'a *:* rwm' entry. Doing |
33 | |||
34 | echo a > /cgroups/1/devices.allow | ||
35 | |||
36 | will add the 'a *:* rwm' entry to the whitelist. | ||
33 | 37 | ||
34 | 3. Security | 38 | 3. Security |
35 | 39 | ||
diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index 353504de3084..1f5a924d1e56 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt | |||
@@ -154,13 +154,15 @@ browsing and modifying the cpusets presently known to the kernel. No | |||
154 | new system calls are added for cpusets - all support for querying and | 154 | new system calls are added for cpusets - all support for querying and |
155 | modifying cpusets is via this cpuset file system. | 155 | modifying cpusets is via this cpuset file system. |
156 | 156 | ||
157 | The /proc/<pid>/status file for each task has two added lines, | 157 | The /proc/<pid>/status file for each task has four added lines, |
158 | displaying the tasks cpus_allowed (on which CPUs it may be scheduled) | 158 | displaying the tasks cpus_allowed (on which CPUs it may be scheduled) |
159 | and mems_allowed (on which Memory Nodes it may obtain memory), | 159 | and mems_allowed (on which Memory Nodes it may obtain memory), |
160 | in the format seen in the following example: | 160 | in the two formats seen in the following example: |
161 | 161 | ||
162 | Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff | 162 | Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff |
163 | Cpus_allowed_list: 0-127 | ||
163 | Mems_allowed: ffffffff,ffffffff | 164 | Mems_allowed: ffffffff,ffffffff |
165 | Mems_allowed_list: 0-63 | ||
164 | 166 | ||
165 | Each cpuset is represented by a directory in the cgroup file system | 167 | Each cpuset is represented by a directory in the cgroup file system |
166 | containing (on top of the standard cgroup files) the following | 168 | containing (on top of the standard cgroup files) the following |
@@ -544,6 +546,9 @@ otherwise initial value -1 that indicates the cpuset has no request. | |||
544 | ( 4 : search nodes in a chunk of node [on NUMA system] ) | 546 | ( 4 : search nodes in a chunk of node [on NUMA system] ) |
545 | ( 5 : search system wide [on NUMA system] ) | 547 | ( 5 : search system wide [on NUMA system] ) |
546 | 548 | ||
549 | The system default is architecture dependent. The system default | ||
550 | can be changed using the relax_domain_level= boot parameter. | ||
551 | |||
547 | This file is per-cpuset and affect the sched domain where the cpuset | 552 | This file is per-cpuset and affect the sched domain where the cpuset |
548 | belongs to. Therefore if the flag 'sched_load_balance' of a cpuset | 553 | belongs to. Therefore if the flag 'sched_load_balance' of a cpuset |
549 | is disabled, then 'sched_relax_domain_level' have no effect since | 554 | is disabled, then 'sched_relax_domain_level' have no effect since |
diff --git a/Documentation/ftrace.txt b/Documentation/ftrace.txt new file mode 100644 index 000000000000..13e4bf054c38 --- /dev/null +++ b/Documentation/ftrace.txt | |||
@@ -0,0 +1,1353 @@ | |||
1 | ftrace - Function Tracer | ||
2 | ======================== | ||
3 | |||
4 | Copyright 2008 Red Hat Inc. | ||
5 | Author: Steven Rostedt <srostedt@redhat.com> | ||
6 | |||
7 | |||
8 | Introduction | ||
9 | ------------ | ||
10 | |||
11 | Ftrace is an internal tracer designed to help out developers and | ||
12 | designers of systems to find what is going on inside the kernel. | ||
13 | It can be used for debugging or analyzing latencies and performance | ||
14 | issues that take place outside of user-space. | ||
15 | |||
16 | Although ftrace is the function tracer, it also includes an | ||
17 | infrastructure that allows for other types of tracing. Some of the | ||
18 | tracers that are currently in ftrace is a tracer to trace | ||
19 | context switches, the time it takes for a high priority task to | ||
20 | run after it was woken up, the time interrupts are disabled, and | ||
21 | more. | ||
22 | |||
23 | |||
24 | The File System | ||
25 | --------------- | ||
26 | |||
27 | Ftrace uses the debugfs file system to hold the control files as well | ||
28 | as the files to display output. | ||
29 | |||
30 | To mount the debugfs system: | ||
31 | |||
32 | # mkdir /debug | ||
33 | # mount -t debugfs nodev /debug | ||
34 | |||
35 | |||
36 | That's it! (assuming that you have ftrace configured into your kernel) | ||
37 | |||
38 | After mounting the debugfs, you can see a directory called | ||
39 | "tracing". This directory contains the control and output files | ||
40 | of ftrace. Here is a list of some of the key files: | ||
41 | |||
42 | |||
43 | Note: all time values are in microseconds. | ||
44 | |||
45 | current_tracer : This is used to set or display the current tracer | ||
46 | that is configured. | ||
47 | |||
48 | available_tracers : This holds the different types of tracers that | ||
49 | has been compiled into the kernel. The tracers | ||
50 | listed here can be configured by echoing in their | ||
51 | name into current_tracer. | ||
52 | |||
53 | tracing_enabled : This sets or displays whether the current_tracer | ||
54 | is activated and tracing or not. Echo 0 into this | ||
55 | file to disable the tracer or 1 (or non-zero) to | ||
56 | enable it. | ||
57 | |||
58 | trace : This file holds the output of the trace in a human readable | ||
59 | format. | ||
60 | |||
61 | latency_trace : This file shows the same trace but the information | ||
62 | is organized more to display possible latencies | ||
63 | in the system. | ||
64 | |||
65 | trace_pipe : The output is the same as the "trace" file but this | ||
66 | file is meant to be streamed with live tracing. | ||
67 | Reads from this file will block until new data | ||
68 | is retrieved. Unlike the "trace" and "latency_trace" | ||
69 | files, this file is a consumer. This means reading | ||
70 | from this file causes sequential reads to display | ||
71 | more current data. Once data is read from this | ||
72 | file, it is consumed, and will not be read | ||
73 | again with a sequential read. The "trace" and | ||
74 | "latency_trace" files are static, and if the | ||
75 | tracer isn't adding more data, they will display | ||
76 | the same information every time they are read. | ||
77 | |||
78 | iter_ctrl : This file lets the user control the amount of data | ||
79 | that is displayed in one of the above output | ||
80 | files. | ||
81 | |||
82 | trace_max_latency : Some of the tracers record the max latency. | ||
83 | For example, the time interrupts are disabled. | ||
84 | This time is saved in this file. The max trace | ||
85 | will also be stored, and displayed by either | ||
86 | "trace" or "latency_trace". A new max trace will | ||
87 | only be recorded if the latency is greater than | ||
88 | the value in this file. (in microseconds) | ||
89 | |||
90 | trace_entries : This sets or displays the number of trace | ||
91 | entries each CPU buffer can hold. The tracer buffers | ||
92 | are the same size for each CPU, so care must be | ||
93 | taken when modifying the trace_entries. The number | ||
94 | of actually entries will be the number given | ||
95 | times the number of possible CPUS. The buffers | ||
96 | are saved as individual pages, and the actual entries | ||
97 | will always be rounded up to entries per page. | ||
98 | |||
99 | This can only be updated when the current_tracer | ||
100 | is set to "none". | ||
101 | |||
102 | NOTE: It is planned on changing the allocated buffers | ||
103 | from being the number of possible CPUS to | ||
104 | the number of online CPUS. | ||
105 | |||
106 | tracing_cpumask : This is a mask that lets the user only trace | ||
107 | on specified CPUS. The format is a hex string | ||
108 | representing the CPUS. | ||
109 | |||
110 | set_ftrace_filter : When dynamic ftrace is configured in, the | ||
111 | code is dynamically modified to disable calling | ||
112 | of the function profiler (mcount). This lets | ||
113 | tracing be configured in with practically no overhead | ||
114 | in performance. This also has a side effect of | ||
115 | enabling or disabling specific functions to be | ||
116 | traced. Echoing in names of functions into this | ||
117 | file will limit the trace to only those files. | ||
118 | |||
119 | set_ftrace_notrace: This has the opposite effect that | ||
120 | set_ftrace_filter has. Any function that is added | ||
121 | here will not be traced. If a function exists | ||
122 | in both set_ftrace_filter and set_ftrace_notrace | ||
123 | the function will _not_ bet traced. | ||
124 | |||
125 | available_filter_functions : When a function is encountered the first | ||
126 | time by the dynamic tracer, it is recorded and | ||
127 | later the call is converted into a nop. This file | ||
128 | lists the functions that have been recorded | ||
129 | by the dynamic tracer and these functions can | ||
130 | be used to set the ftrace filter by the above | ||
131 | "set_ftrace_filter" file. | ||
132 | |||
133 | |||
134 | The Tracers | ||
135 | ----------- | ||
136 | |||
137 | Here are the list of current tracers that can be configured. | ||
138 | |||
139 | ftrace - function tracer that uses mcount to trace all functions. | ||
140 | It is possible to filter out which functions that are | ||
141 | traced when dynamic ftrace is configured in. | ||
142 | |||
143 | sched_switch - traces the context switches between tasks. | ||
144 | |||
145 | irqsoff - traces the areas that disable interrupts and saves off | ||
146 | the trace with the longest max latency. | ||
147 | See tracing_max_latency. When a new max is recorded, | ||
148 | it replaces the old trace. It is best to view this | ||
149 | trace with the latency_trace file. | ||
150 | |||
151 | preemptoff - Similar to irqsoff but traces and records the time | ||
152 | preemption is disabled. | ||
153 | |||
154 | preemptirqsoff - Similar to irqsoff and preemptoff, but traces and | ||
155 | records the largest time irqs and/or preemption is | ||
156 | disabled. | ||
157 | |||
158 | wakeup - Traces and records the max latency that it takes for | ||
159 | the highest priority task to get scheduled after | ||
160 | it has been woken up. | ||
161 | |||
162 | none - This is not a tracer. To remove all tracers from tracing | ||
163 | simply echo "none" into current_tracer. | ||
164 | |||
165 | |||
166 | Examples of using the tracer | ||
167 | ---------------------------- | ||
168 | |||
169 | Here are typical examples of using the tracers with only controlling | ||
170 | them with the debugfs interface (without using any user-land utilities). | ||
171 | |||
172 | Output format: | ||
173 | -------------- | ||
174 | |||
175 | Here's an example of the output format of the file "trace" | ||
176 | |||
177 | -------- | ||
178 | # tracer: ftrace | ||
179 | # | ||
180 | # TASK-PID CPU# TIMESTAMP FUNCTION | ||
181 | # | | | | | | ||
182 | bash-4251 [01] 10152.583854: path_put <-path_walk | ||
183 | bash-4251 [01] 10152.583855: dput <-path_put | ||
184 | bash-4251 [01] 10152.583855: _atomic_dec_and_lock <-dput | ||
185 | -------- | ||
186 | |||
187 | A header is printed with the trace that is represented. In this case | ||
188 | the tracer is "ftrace". Then a header showing the format. Task name | ||
189 | "bash", the task PID "4251", the CPU that it was running on | ||
190 | "01", the timestamp in <secs>.<usecs> format, the function name that was | ||
191 | traced "path_put" and the parent function that called this function | ||
192 | "path_walk". | ||
193 | |||
194 | The sched_switch tracer also includes tracing of task wake ups and | ||
195 | context switches. | ||
196 | |||
197 | ksoftirqd/1-7 [01] 1453.070013: 7:115:R + 2916:115:S | ||
198 | ksoftirqd/1-7 [01] 1453.070013: 7:115:R + 10:115:S | ||
199 | ksoftirqd/1-7 [01] 1453.070013: 7:115:R ==> 10:115:R | ||
200 | events/1-10 [01] 1453.070013: 10:115:S ==> 2916:115:R | ||
201 | kondemand/1-2916 [01] 1453.070013: 2916:115:S ==> 7:115:R | ||
202 | ksoftirqd/1-7 [01] 1453.070013: 7:115:S ==> 0:140:R | ||
203 | |||
204 | Wake ups are represented by a "+" and the context switches show | ||
205 | "==>". The format is: | ||
206 | |||
207 | Context switches: | ||
208 | |||
209 | Previous task Next Task | ||
210 | |||
211 | <pid>:<prio>:<state> ==> <pid>:<prio>:<state> | ||
212 | |||
213 | Wake ups: | ||
214 | |||
215 | Current task Task waking up | ||
216 | |||
217 | <pid>:<prio>:<state> + <pid>:<prio>:<state> | ||
218 | |||
219 | The prio is the internal kernel priority, which is inverse to the | ||
220 | priority that is usually displayed by user-space tools. Zero represents | ||
221 | the highest priority (99). Prio 100 starts the "nice" priorities with | ||
222 | 100 being equal to nice -20 and 139 being nice 19. The prio "140" is | ||
223 | reserved for the idle task which is the lowest priority thread (pid 0). | ||
224 | |||
225 | |||
226 | Latency trace format | ||
227 | -------------------- | ||
228 | |||
229 | For traces that display latency times, the latency_trace file gives | ||
230 | a bit more information to see why a latency happened. Here's a typical | ||
231 | trace. | ||
232 | |||
233 | # tracer: irqsoff | ||
234 | # | ||
235 | irqsoff latency trace v1.1.5 on 2.6.26-rc8 | ||
236 | -------------------------------------------------------------------- | ||
237 | latency: 97 us, #3/3, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2) | ||
238 | ----------------- | ||
239 | | task: swapper-0 (uid:0 nice:0 policy:0 rt_prio:0) | ||
240 | ----------------- | ||
241 | => started at: apic_timer_interrupt | ||
242 | => ended at: do_softirq | ||
243 | |||
244 | # _------=> CPU# | ||
245 | # / _-----=> irqs-off | ||
246 | # | / _----=> need-resched | ||
247 | # || / _---=> hardirq/softirq | ||
248 | # ||| / _--=> preempt-depth | ||
249 | # |||| / | ||
250 | # ||||| delay | ||
251 | # cmd pid ||||| time | caller | ||
252 | # \ / ||||| \ | / | ||
253 | <idle>-0 0d..1 0us+: trace_hardirqs_off_thunk (apic_timer_interrupt) | ||
254 | <idle>-0 0d.s. 97us : __do_softirq (do_softirq) | ||
255 | <idle>-0 0d.s1 98us : trace_hardirqs_on (do_softirq) | ||
256 | |||
257 | |||
258 | vim:ft=help | ||
259 | |||
260 | |||
261 | This shows that the current tracer is "irqsoff" tracing the time | ||
262 | interrupts are disabled. It gives the trace version and the kernel | ||
263 | this was executed on (2.6.26-rc8). Then it displays the max latency | ||
264 | in microsecs (97 us). The number of trace entries displayed | ||
265 | by the total number recorded (both are three: #3/3). The type of | ||
266 | preemption that was used (PREEMPT). VP, KP, SP, and HP are always zero | ||
267 | and reserved for later use. #P is the number of online CPUS (#P:2). | ||
268 | |||
269 | The task is the process that was running when the latency happened. | ||
270 | (swapper pid: 0). | ||
271 | |||
272 | The start and stop that caused the latencies: | ||
273 | |||
274 | apic_timer_interrupt is where the interrupts were disabled. | ||
275 | do_softirq is where they were enabled again. | ||
276 | |||
277 | The next lines after the header are the trace itself. The header | ||
278 | explains which is which. | ||
279 | |||
280 | cmd: The name of the process in the trace. | ||
281 | |||
282 | pid: The PID of that process. | ||
283 | |||
284 | CPU#: The CPU that the process was running on. | ||
285 | |||
286 | irqs-off: 'd' interrupts are disabled. '.' otherwise. | ||
287 | |||
288 | need-resched: 'N' task need_resched is set, '.' otherwise. | ||
289 | |||
290 | hardirq/softirq: | ||
291 | 'H' - hard irq happened inside a softirq. | ||
292 | 'h' - hard irq is running | ||
293 | 's' - soft irq is running | ||
294 | '.' - normal context. | ||
295 | |||
296 | preempt-depth: The level of preempt_disabled | ||
297 | |||
298 | The above is mostly meaningful for kernel developers. | ||
299 | |||
300 | time: This differs from the trace output where as the trace output | ||
301 | contained a absolute timestamp. This timestamp is relative | ||
302 | to the start of the first entry in the the trace. | ||
303 | |||
304 | delay: This is just to help catch your eye a bit better. And | ||
305 | needs to be fixed to be only relative to the same CPU. | ||
306 | The marks is determined by the difference between this | ||
307 | current trace and the next trace. | ||
308 | '!' - greater than preempt_mark_thresh (default 100) | ||
309 | '+' - greater than 1 microsecond | ||
310 | ' ' - less than or equal to 1 microsecond. | ||
311 | |||
312 | The rest is the same as the 'trace' file. | ||
313 | |||
314 | |||
315 | iter_ctrl | ||
316 | --------- | ||
317 | |||
318 | The iter_ctrl file is used to control what gets printed in the trace | ||
319 | output. To see what is available, simply cat the file: | ||
320 | |||
321 | cat /debug/tracing/iter_ctrl | ||
322 | print-parent nosym-offset nosym-addr noverbose noraw nohex nobin \ | ||
323 | noblock nostacktrace nosched-tree | ||
324 | |||
325 | To disable one of the options, echo in the option appended with "no". | ||
326 | |||
327 | echo noprint-parent > /debug/tracing/iter_ctrl | ||
328 | |||
329 | To enable an option, leave off the "no". | ||
330 | |||
331 | echo sym-offest > /debug/tracing/iter_ctrl | ||
332 | |||
333 | Here are the available options: | ||
334 | |||
335 | print-parent - On function traces, display the calling function | ||
336 | as well as the function being traced. | ||
337 | |||
338 | print-parent: | ||
339 | bash-4000 [01] 1477.606694: simple_strtoul <-strict_strtoul | ||
340 | |||
341 | noprint-parent: | ||
342 | bash-4000 [01] 1477.606694: simple_strtoul | ||
343 | |||
344 | |||
345 | sym-offset - Display not only the function name, but also the offset | ||
346 | in the function. For example, instead of seeing just | ||
347 | "ktime_get" you will see "ktime_get+0xb/0x20" | ||
348 | |||
349 | sym-offset: | ||
350 | bash-4000 [01] 1477.606694: simple_strtoul+0x6/0xa0 | ||
351 | |||
352 | sym-addr - this will also display the function address as well as | ||
353 | the function name. | ||
354 | |||
355 | sym-addr: | ||
356 | bash-4000 [01] 1477.606694: simple_strtoul <c0339346> | ||
357 | |||
358 | verbose - This deals with the latency_trace file. | ||
359 | |||
360 | bash 4000 1 0 00000000 00010a95 [58127d26] 1720.415ms \ | ||
361 | (+0.000ms): simple_strtoul (strict_strtoul) | ||
362 | |||
363 | raw - This will display raw numbers. This option is best for use with | ||
364 | user applications that can translate the raw numbers better than | ||
365 | having it done in the kernel. | ||
366 | |||
367 | hex - similar to raw, but the numbers will be in a hexadecimal format. | ||
368 | |||
369 | bin - This will print out the formats in raw binary. | ||
370 | |||
371 | block - TBD (needs update) | ||
372 | |||
373 | stacktrace - This is one of the options that changes the trace itself. | ||
374 | When a trace is recorded, so is the stack of functions. | ||
375 | This allows for back traces of trace sites. | ||
376 | |||
377 | sched-tree - TBD (any users??) | ||
378 | |||
379 | |||
380 | sched_switch | ||
381 | ------------ | ||
382 | |||
383 | This tracer simply records schedule switches. Here's an example | ||
384 | on how to implement it. | ||
385 | |||
386 | # echo sched_switch > /debug/tracing/current_tracer | ||
387 | # echo 1 > /debug/tracing/tracing_enabled | ||
388 | # sleep 1 | ||
389 | # echo 0 > /debug/tracing/tracing_enabled | ||
390 | # cat /debug/tracing/trace | ||
391 | |||
392 | # tracer: sched_switch | ||
393 | # | ||
394 | # TASK-PID CPU# TIMESTAMP FUNCTION | ||
395 | # | | | | | | ||
396 | bash-3997 [01] 240.132281: 3997:120:R + 4055:120:R | ||
397 | bash-3997 [01] 240.132284: 3997:120:R ==> 4055:120:R | ||
398 | sleep-4055 [01] 240.132371: 4055:120:S ==> 3997:120:R | ||
399 | bash-3997 [01] 240.132454: 3997:120:R + 4055:120:S | ||
400 | bash-3997 [01] 240.132457: 3997:120:R ==> 4055:120:R | ||
401 | sleep-4055 [01] 240.132460: 4055:120:D ==> 3997:120:R | ||
402 | bash-3997 [01] 240.132463: 3997:120:R + 4055:120:D | ||
403 | bash-3997 [01] 240.132465: 3997:120:R ==> 4055:120:R | ||
404 | <idle>-0 [00] 240.132589: 0:140:R + 4:115:S | ||
405 | <idle>-0 [00] 240.132591: 0:140:R ==> 4:115:R | ||
406 | ksoftirqd/0-4 [00] 240.132595: 4:115:S ==> 0:140:R | ||
407 | <idle>-0 [00] 240.132598: 0:140:R + 4:115:S | ||
408 | <idle>-0 [00] 240.132599: 0:140:R ==> 4:115:R | ||
409 | ksoftirqd/0-4 [00] 240.132603: 4:115:S ==> 0:140:R | ||
410 | sleep-4055 [01] 240.133058: 4055:120:S ==> 3997:120:R | ||
411 | [...] | ||
412 | |||
413 | |||
414 | As we have discussed previously about this format, the header shows | ||
415 | the name of the trace and points to the options. The "FUNCTION" | ||
416 | is a misnomer since here it represents the wake ups and context | ||
417 | switches. | ||
418 | |||
419 | The sched_switch only lists the wake ups (represented with '+') | ||
420 | and context switches ('==>') with the previous task or current | ||
421 | first followed by the next task or task waking up. The format for both | ||
422 | of these is PID:KERNEL-PRIO:TASK-STATE. Remember that the KERNEL-PRIO | ||
423 | is the inverse of the actual priority with zero (0) being the highest | ||
424 | priority and the nice values starting at 100 (nice -20). Below is | ||
425 | a quick chart to map the kernel priority to user land priorities. | ||
426 | |||
427 | Kernel priority: 0 to 99 ==> user RT priority 99 to 0 | ||
428 | Kernel priority: 100 to 139 ==> user nice -20 to 19 | ||
429 | Kernel priority: 140 ==> idle task priority | ||
430 | |||
431 | The task states are: | ||
432 | |||
433 | R - running : wants to run, may not actually be running | ||
434 | S - sleep : process is waiting to be woken up (handles signals) | ||
435 | D - deep sleep : process must be woken up (ignores signals) | ||
436 | T - stopped : process suspended | ||
437 | t - traced : process is being traced (with something like gdb) | ||
438 | Z - zombie : process waiting to be cleaned up | ||
439 | X - unknown | ||
440 | |||
441 | |||
442 | ftrace_enabled | ||
443 | -------------- | ||
444 | |||
445 | The following tracers give different output depending on whether | ||
446 | or not the sysctl ftrace_enabled is set. To set ftrace_enabled, | ||
447 | one can either use the sysctl function or set it via the proc | ||
448 | file system interface. | ||
449 | |||
450 | sysctl kernel.ftrace_enabled=1 | ||
451 | |||
452 | or | ||
453 | |||
454 | echo 1 > /proc/sys/kernel/ftrace_enabled | ||
455 | |||
456 | To disable ftrace_enabled simply replace the '1' with '0' in | ||
457 | the above commands. | ||
458 | |||
459 | When ftrace_enabled is set the tracers will also record the functions | ||
460 | that are within the trace. The descriptions of the tracers | ||
461 | will also show an example with ftrace enabled. | ||
462 | |||
463 | |||
464 | irqsoff | ||
465 | ------- | ||
466 | |||
467 | When interrupts are disabled, the CPU can not react to any other | ||
468 | external event (besides NMIs and SMIs). This prevents the timer | ||
469 | interrupt from triggering or the mouse interrupt from letting the | ||
470 | kernel know of a new mouse event. The result is a latency with the | ||
471 | reaction time. | ||
472 | |||
473 | The irqsoff tracer tracks the time interrupts are disabled and when | ||
474 | they are re-enabled. When a new maximum latency is hit, it saves off | ||
475 | the trace so that it may be retrieved at a later time. Every time a | ||
476 | new maximum in reached, the old saved trace is discarded and the new | ||
477 | trace is saved. | ||
478 | |||
479 | To reset the maximum, echo 0 into tracing_max_latency. Here's an | ||
480 | example: | ||
481 | |||
482 | # echo irqsoff > /debug/tracing/current_tracer | ||
483 | # echo 0 > /debug/tracing/tracing_max_latency | ||
484 | # echo 1 > /debug/tracing/tracing_enabled | ||
485 | # ls -ltr | ||
486 | [...] | ||
487 | # echo 0 > /debug/tracing/tracing_enabled | ||
488 | # cat /debug/tracing/latency_trace | ||
489 | # tracer: irqsoff | ||
490 | # | ||
491 | irqsoff latency trace v1.1.5 on 2.6.26-rc8 | ||
492 | -------------------------------------------------------------------- | ||
493 | latency: 6 us, #3/3, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2) | ||
494 | ----------------- | ||
495 | | task: bash-4269 (uid:0 nice:0 policy:0 rt_prio:0) | ||
496 | ----------------- | ||
497 | => started at: copy_page_range | ||
498 | => ended at: copy_page_range | ||
499 | |||
500 | # _------=> CPU# | ||
501 | # / _-----=> irqs-off | ||
502 | # | / _----=> need-resched | ||
503 | # || / _---=> hardirq/softirq | ||
504 | # ||| / _--=> preempt-depth | ||
505 | # |||| / | ||
506 | # ||||| delay | ||
507 | # cmd pid ||||| time | caller | ||
508 | # \ / ||||| \ | / | ||
509 | bash-4269 1...1 0us+: _spin_lock (copy_page_range) | ||
510 | bash-4269 1...1 7us : _spin_unlock (copy_page_range) | ||
511 | bash-4269 1...2 7us : trace_preempt_on (copy_page_range) | ||
512 | |||
513 | |||
514 | vim:ft=help | ||
515 | |||
516 | Here we see that that we had a latency of 6 microsecs (which is | ||
517 | very good). The spin_lock in copy_page_range disabled interrupts. | ||
518 | The difference between the 6 and the displayed timestamp 7us is | ||
519 | because the clock must have incremented between the time of recording | ||
520 | the max latency and recording the function that had that latency. | ||
521 | |||
522 | Note the above had ftrace_enabled not set. If we set the ftrace_enabled | ||
523 | we get a much larger output: | ||
524 | |||
525 | # tracer: irqsoff | ||
526 | # | ||
527 | irqsoff latency trace v1.1.5 on 2.6.26-rc8 | ||
528 | -------------------------------------------------------------------- | ||
529 | latency: 50 us, #101/101, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2) | ||
530 | ----------------- | ||
531 | | task: ls-4339 (uid:0 nice:0 policy:0 rt_prio:0) | ||
532 | ----------------- | ||
533 | => started at: __alloc_pages_internal | ||
534 | => ended at: __alloc_pages_internal | ||
535 | |||
536 | # _------=> CPU# | ||
537 | # / _-----=> irqs-off | ||
538 | # | / _----=> need-resched | ||
539 | # || / _---=> hardirq/softirq | ||
540 | # ||| / _--=> preempt-depth | ||
541 | # |||| / | ||
542 | # ||||| delay | ||
543 | # cmd pid ||||| time | caller | ||
544 | # \ / ||||| \ | / | ||
545 | ls-4339 0...1 0us+: get_page_from_freelist (__alloc_pages_internal) | ||
546 | ls-4339 0d..1 3us : rmqueue_bulk (get_page_from_freelist) | ||
547 | ls-4339 0d..1 3us : _spin_lock (rmqueue_bulk) | ||
548 | ls-4339 0d..1 4us : add_preempt_count (_spin_lock) | ||
549 | ls-4339 0d..2 4us : __rmqueue (rmqueue_bulk) | ||
550 | ls-4339 0d..2 5us : __rmqueue_smallest (__rmqueue) | ||
551 | ls-4339 0d..2 5us : __mod_zone_page_state (__rmqueue_smallest) | ||
552 | ls-4339 0d..2 6us : __rmqueue (rmqueue_bulk) | ||
553 | ls-4339 0d..2 6us : __rmqueue_smallest (__rmqueue) | ||
554 | ls-4339 0d..2 7us : __mod_zone_page_state (__rmqueue_smallest) | ||
555 | ls-4339 0d..2 7us : __rmqueue (rmqueue_bulk) | ||
556 | ls-4339 0d..2 8us : __rmqueue_smallest (__rmqueue) | ||
557 | [...] | ||
558 | ls-4339 0d..2 46us : __rmqueue_smallest (__rmqueue) | ||
559 | ls-4339 0d..2 47us : __mod_zone_page_state (__rmqueue_smallest) | ||
560 | ls-4339 0d..2 47us : __rmqueue (rmqueue_bulk) | ||
561 | ls-4339 0d..2 48us : __rmqueue_smallest (__rmqueue) | ||
562 | ls-4339 0d..2 48us : __mod_zone_page_state (__rmqueue_smallest) | ||
563 | ls-4339 0d..2 49us : _spin_unlock (rmqueue_bulk) | ||
564 | ls-4339 0d..2 49us : sub_preempt_count (_spin_unlock) | ||
565 | ls-4339 0d..1 50us : get_page_from_freelist (__alloc_pages_internal) | ||
566 | ls-4339 0d..2 51us : trace_hardirqs_on (__alloc_pages_internal) | ||
567 | |||
568 | |||
569 | vim:ft=help | ||
570 | |||
571 | |||
572 | Here we traced a 50 microsecond latency. But we also see all the | ||
573 | functions that were called during that time. Note that enabling | ||
574 | function tracing we endure an added overhead. This overhead may | ||
575 | extend the latency times. But never the less, this trace has provided | ||
576 | some very helpful debugging. | ||
577 | |||
578 | |||
579 | preemptoff | ||
580 | ---------- | ||
581 | |||
582 | When preemption is disabled we may be able to receive interrupts but | ||
583 | the task can not be preempted and a higher priority task must wait | ||
584 | for preemption to be enabled again before it can preempt a lower | ||
585 | priority task. | ||
586 | |||
587 | The preemptoff tracer traces the places that disables preemption. | ||
588 | Like the irqsoff, it records the maximum latency that preemption | ||
589 | was disabled. The control of preemptoff is much like the irqsoff. | ||
590 | |||
591 | # echo preemptoff > /debug/tracing/current_tracer | ||
592 | # echo 0 > /debug/tracing/tracing_max_latency | ||
593 | # echo 1 > /debug/tracing/tracing_enabled | ||
594 | # ls -ltr | ||
595 | [...] | ||
596 | # echo 0 > /debug/tracing/tracing_enabled | ||
597 | # cat /debug/tracing/latency_trace | ||
598 | # tracer: preemptoff | ||
599 | # | ||
600 | preemptoff latency trace v1.1.5 on 2.6.26-rc8 | ||
601 | -------------------------------------------------------------------- | ||
602 | latency: 29 us, #3/3, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2) | ||
603 | ----------------- | ||
604 | | task: sshd-4261 (uid:0 nice:0 policy:0 rt_prio:0) | ||
605 | ----------------- | ||
606 | => started at: do_IRQ | ||
607 | => ended at: __do_softirq | ||
608 | |||
609 | # _------=> CPU# | ||
610 | # / _-----=> irqs-off | ||
611 | # | / _----=> need-resched | ||
612 | # || / _---=> hardirq/softirq | ||
613 | # ||| / _--=> preempt-depth | ||
614 | # |||| / | ||
615 | # ||||| delay | ||
616 | # cmd pid ||||| time | caller | ||
617 | # \ / ||||| \ | / | ||
618 | sshd-4261 0d.h. 0us+: irq_enter (do_IRQ) | ||
619 | sshd-4261 0d.s. 29us : _local_bh_enable (__do_softirq) | ||
620 | sshd-4261 0d.s1 30us : trace_preempt_on (__do_softirq) | ||
621 | |||
622 | |||
623 | vim:ft=help | ||
624 | |||
625 | This has some more changes. Preemption was disabled when an interrupt | ||
626 | came in (notice the 'h'), and was enabled while doing a softirq. | ||
627 | (notice the 's'). But we also see that interrupts have been disabled | ||
628 | when entering the preempt off section and leaving it (the 'd'). | ||
629 | We do not know if interrupts were enabled in the mean time. | ||
630 | |||
631 | # tracer: preemptoff | ||
632 | # | ||
633 | preemptoff latency trace v1.1.5 on 2.6.26-rc8 | ||
634 | -------------------------------------------------------------------- | ||
635 | latency: 63 us, #87/87, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2) | ||
636 | ----------------- | ||
637 | | task: sshd-4261 (uid:0 nice:0 policy:0 rt_prio:0) | ||
638 | ----------------- | ||
639 | => started at: remove_wait_queue | ||
640 | => ended at: __do_softirq | ||
641 | |||
642 | # _------=> CPU# | ||
643 | # / _-----=> irqs-off | ||
644 | # | / _----=> need-resched | ||
645 | # || / _---=> hardirq/softirq | ||
646 | # ||| / _--=> preempt-depth | ||
647 | # |||| / | ||
648 | # ||||| delay | ||
649 | # cmd pid ||||| time | caller | ||
650 | # \ / ||||| \ | / | ||
651 | sshd-4261 0d..1 0us : _spin_lock_irqsave (remove_wait_queue) | ||
652 | sshd-4261 0d..1 1us : _spin_unlock_irqrestore (remove_wait_queue) | ||
653 | sshd-4261 0d..1 2us : do_IRQ (common_interrupt) | ||
654 | sshd-4261 0d..1 2us : irq_enter (do_IRQ) | ||
655 | sshd-4261 0d..1 2us : idle_cpu (irq_enter) | ||
656 | sshd-4261 0d..1 3us : add_preempt_count (irq_enter) | ||
657 | sshd-4261 0d.h1 3us : idle_cpu (irq_enter) | ||
658 | sshd-4261 0d.h. 4us : handle_fasteoi_irq (do_IRQ) | ||
659 | [...] | ||
660 | sshd-4261 0d.h. 12us : add_preempt_count (_spin_lock) | ||
661 | sshd-4261 0d.h1 12us : ack_ioapic_quirk_irq (handle_fasteoi_irq) | ||
662 | sshd-4261 0d.h1 13us : move_native_irq (ack_ioapic_quirk_irq) | ||
663 | sshd-4261 0d.h1 13us : _spin_unlock (handle_fasteoi_irq) | ||
664 | sshd-4261 0d.h1 14us : sub_preempt_count (_spin_unlock) | ||
665 | sshd-4261 0d.h1 14us : irq_exit (do_IRQ) | ||
666 | sshd-4261 0d.h1 15us : sub_preempt_count (irq_exit) | ||
667 | sshd-4261 0d..2 15us : do_softirq (irq_exit) | ||
668 | sshd-4261 0d... 15us : __do_softirq (do_softirq) | ||
669 | sshd-4261 0d... 16us : __local_bh_disable (__do_softirq) | ||
670 | sshd-4261 0d... 16us+: add_preempt_count (__local_bh_disable) | ||
671 | sshd-4261 0d.s4 20us : add_preempt_count (__local_bh_disable) | ||
672 | sshd-4261 0d.s4 21us : sub_preempt_count (local_bh_enable) | ||
673 | sshd-4261 0d.s5 21us : sub_preempt_count (local_bh_enable) | ||
674 | [...] | ||
675 | sshd-4261 0d.s6 41us : add_preempt_count (__local_bh_disable) | ||
676 | sshd-4261 0d.s6 42us : sub_preempt_count (local_bh_enable) | ||
677 | sshd-4261 0d.s7 42us : sub_preempt_count (local_bh_enable) | ||
678 | sshd-4261 0d.s5 43us : add_preempt_count (__local_bh_disable) | ||
679 | sshd-4261 0d.s5 43us : sub_preempt_count (local_bh_enable_ip) | ||
680 | sshd-4261 0d.s6 44us : sub_preempt_count (local_bh_enable_ip) | ||
681 | sshd-4261 0d.s5 44us : add_preempt_count (__local_bh_disable) | ||
682 | sshd-4261 0d.s5 45us : sub_preempt_count (local_bh_enable) | ||
683 | [...] | ||
684 | sshd-4261 0d.s. 63us : _local_bh_enable (__do_softirq) | ||
685 | sshd-4261 0d.s1 64us : trace_preempt_on (__do_softirq) | ||
686 | |||
687 | |||
688 | The above is an example of the preemptoff trace with ftrace_enabled | ||
689 | set. Here we see that interrupts were disabled the entire time. | ||
690 | The irq_enter code lets us know that we entered an interrupt 'h'. | ||
691 | Before that, the functions being traced still show that it is not | ||
692 | in an interrupt, but we can see by the functions themselves that | ||
693 | this is not the case. | ||
694 | |||
695 | Notice that the __do_softirq when called doesn't have a preempt_count. | ||
696 | It may seem that we missed a preempt enabled. What really happened | ||
697 | is that the preempt count is held on the threads stack and we | ||
698 | switched to the softirq stack (4K stacks in effect). The code | ||
699 | does not copy the preempt count, but because interrupts are disabled | ||
700 | we don't need to worry about it. Having a tracer like this is good | ||
701 | to let people know what really happens inside the kernel. | ||
702 | |||
703 | |||
704 | preemptirqsoff | ||
705 | -------------- | ||
706 | |||
707 | Knowing the locations that have interrupts disabled or preemption | ||
708 | disabled for the longest times is helpful. But sometimes we would | ||
709 | like to know when either preemption and/or interrupts are disabled. | ||
710 | |||
711 | The following code: | ||
712 | |||
713 | local_irq_disable(); | ||
714 | call_function_with_irqs_off(); | ||
715 | preempt_disable(); | ||
716 | call_function_with_irqs_and_preemption_off(); | ||
717 | local_irq_enable(); | ||
718 | call_function_with_preemption_off(); | ||
719 | preempt_enable(); | ||
720 | |||
721 | The irqsoff tracer will record the total length of | ||
722 | call_function_with_irqs_off() and | ||
723 | call_function_with_irqs_and_preemption_off(). | ||
724 | |||
725 | The preemptoff tracer will record the total length of | ||
726 | call_function_with_irqs_and_preemption_off() and | ||
727 | call_function_with_preemption_off(). | ||
728 | |||
729 | But neither will trace the time that interrupts and/or preemption | ||
730 | is disabled. This total time is the time that we can not schedule. | ||
731 | To record this time, use the preemptirqsoff tracer. | ||
732 | |||
733 | Again, using this trace is much like the irqsoff and preemptoff tracers. | ||
734 | |||
735 | # echo preemptoff > /debug/tracing/current_tracer | ||
736 | # echo 0 > /debug/tracing/tracing_max_latency | ||
737 | # echo 1 > /debug/tracing/tracing_enabled | ||
738 | # ls -ltr | ||
739 | [...] | ||
740 | # echo 0 > /debug/tracing/tracing_enabled | ||
741 | # cat /debug/tracing/latency_trace | ||
742 | # tracer: preemptirqsoff | ||
743 | # | ||
744 | preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8 | ||
745 | -------------------------------------------------------------------- | ||
746 | latency: 293 us, #3/3, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2) | ||
747 | ----------------- | ||
748 | | task: ls-4860 (uid:0 nice:0 policy:0 rt_prio:0) | ||
749 | ----------------- | ||
750 | => started at: apic_timer_interrupt | ||
751 | => ended at: __do_softirq | ||
752 | |||
753 | # _------=> CPU# | ||
754 | # / _-----=> irqs-off | ||
755 | # | / _----=> need-resched | ||
756 | # || / _---=> hardirq/softirq | ||
757 | # ||| / _--=> preempt-depth | ||
758 | # |||| / | ||
759 | # ||||| delay | ||
760 | # cmd pid ||||| time | caller | ||
761 | # \ / ||||| \ | / | ||
762 | ls-4860 0d... 0us!: trace_hardirqs_off_thunk (apic_timer_interrupt) | ||
763 | ls-4860 0d.s. 294us : _local_bh_enable (__do_softirq) | ||
764 | ls-4860 0d.s1 294us : trace_preempt_on (__do_softirq) | ||
765 | |||
766 | |||
767 | vim:ft=help | ||
768 | |||
769 | |||
770 | The trace_hardirqs_off_thunk is called from assembly on x86 when | ||
771 | interrupts are disabled in the assembly code. Without the function | ||
772 | tracing, we don't know if interrupts were enabled within the preemption | ||
773 | points. We do see that it started with preemption enabled. | ||
774 | |||
775 | Here is a trace with ftrace_enabled set: | ||
776 | |||
777 | |||
778 | # tracer: preemptirqsoff | ||
779 | # | ||
780 | preemptirqsoff latency trace v1.1.5 on 2.6.26-rc8 | ||
781 | -------------------------------------------------------------------- | ||
782 | latency: 105 us, #183/183, CPU#0 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2) | ||
783 | ----------------- | ||
784 | | task: sshd-4261 (uid:0 nice:0 policy:0 rt_prio:0) | ||
785 | ----------------- | ||
786 | => started at: write_chan | ||
787 | => ended at: __do_softirq | ||
788 | |||
789 | # _------=> CPU# | ||
790 | # / _-----=> irqs-off | ||
791 | # | / _----=> need-resched | ||
792 | # || / _---=> hardirq/softirq | ||
793 | # ||| / _--=> preempt-depth | ||
794 | # |||| / | ||
795 | # ||||| delay | ||
796 | # cmd pid ||||| time | caller | ||
797 | # \ / ||||| \ | / | ||
798 | ls-4473 0.N.. 0us : preempt_schedule (write_chan) | ||
799 | ls-4473 0dN.1 1us : _spin_lock (schedule) | ||
800 | ls-4473 0dN.1 2us : add_preempt_count (_spin_lock) | ||
801 | ls-4473 0d..2 2us : put_prev_task_fair (schedule) | ||
802 | [...] | ||
803 | ls-4473 0d..2 13us : set_normalized_timespec (ktime_get_ts) | ||
804 | ls-4473 0d..2 13us : __switch_to (schedule) | ||
805 | sshd-4261 0d..2 14us : finish_task_switch (schedule) | ||
806 | sshd-4261 0d..2 14us : _spin_unlock_irq (finish_task_switch) | ||
807 | sshd-4261 0d..1 15us : add_preempt_count (_spin_lock_irqsave) | ||
808 | sshd-4261 0d..2 16us : _spin_unlock_irqrestore (hrtick_set) | ||
809 | sshd-4261 0d..2 16us : do_IRQ (common_interrupt) | ||
810 | sshd-4261 0d..2 17us : irq_enter (do_IRQ) | ||
811 | sshd-4261 0d..2 17us : idle_cpu (irq_enter) | ||
812 | sshd-4261 0d..2 18us : add_preempt_count (irq_enter) | ||
813 | sshd-4261 0d.h2 18us : idle_cpu (irq_enter) | ||
814 | sshd-4261 0d.h. 18us : handle_fasteoi_irq (do_IRQ) | ||
815 | sshd-4261 0d.h. 19us : _spin_lock (handle_fasteoi_irq) | ||
816 | sshd-4261 0d.h. 19us : add_preempt_count (_spin_lock) | ||
817 | sshd-4261 0d.h1 20us : _spin_unlock (handle_fasteoi_irq) | ||
818 | sshd-4261 0d.h1 20us : sub_preempt_count (_spin_unlock) | ||
819 | [...] | ||
820 | sshd-4261 0d.h1 28us : _spin_unlock (handle_fasteoi_irq) | ||
821 | sshd-4261 0d.h1 29us : sub_preempt_count (_spin_unlock) | ||
822 | sshd-4261 0d.h2 29us : irq_exit (do_IRQ) | ||
823 | sshd-4261 0d.h2 29us : sub_preempt_count (irq_exit) | ||
824 | sshd-4261 0d..3 30us : do_softirq (irq_exit) | ||
825 | sshd-4261 0d... 30us : __do_softirq (do_softirq) | ||
826 | sshd-4261 0d... 31us : __local_bh_disable (__do_softirq) | ||
827 | sshd-4261 0d... 31us+: add_preempt_count (__local_bh_disable) | ||
828 | sshd-4261 0d.s4 34us : add_preempt_count (__local_bh_disable) | ||
829 | [...] | ||
830 | sshd-4261 0d.s3 43us : sub_preempt_count (local_bh_enable_ip) | ||
831 | sshd-4261 0d.s4 44us : sub_preempt_count (local_bh_enable_ip) | ||
832 | sshd-4261 0d.s3 44us : smp_apic_timer_interrupt (apic_timer_interrupt) | ||
833 | sshd-4261 0d.s3 45us : irq_enter (smp_apic_timer_interrupt) | ||
834 | sshd-4261 0d.s3 45us : idle_cpu (irq_enter) | ||
835 | sshd-4261 0d.s3 46us : add_preempt_count (irq_enter) | ||
836 | sshd-4261 0d.H3 46us : idle_cpu (irq_enter) | ||
837 | sshd-4261 0d.H3 47us : hrtimer_interrupt (smp_apic_timer_interrupt) | ||
838 | sshd-4261 0d.H3 47us : ktime_get (hrtimer_interrupt) | ||
839 | [...] | ||
840 | sshd-4261 0d.H3 81us : tick_program_event (hrtimer_interrupt) | ||
841 | sshd-4261 0d.H3 82us : ktime_get (tick_program_event) | ||
842 | sshd-4261 0d.H3 82us : ktime_get_ts (ktime_get) | ||
843 | sshd-4261 0d.H3 83us : getnstimeofday (ktime_get_ts) | ||
844 | sshd-4261 0d.H3 83us : set_normalized_timespec (ktime_get_ts) | ||
845 | sshd-4261 0d.H3 84us : clockevents_program_event (tick_program_event) | ||
846 | sshd-4261 0d.H3 84us : lapic_next_event (clockevents_program_event) | ||
847 | sshd-4261 0d.H3 85us : irq_exit (smp_apic_timer_interrupt) | ||
848 | sshd-4261 0d.H3 85us : sub_preempt_count (irq_exit) | ||
849 | sshd-4261 0d.s4 86us : sub_preempt_count (irq_exit) | ||
850 | sshd-4261 0d.s3 86us : add_preempt_count (__local_bh_disable) | ||
851 | [...] | ||
852 | sshd-4261 0d.s1 98us : sub_preempt_count (net_rx_action) | ||
853 | sshd-4261 0d.s. 99us : add_preempt_count (_spin_lock_irq) | ||
854 | sshd-4261 0d.s1 99us+: _spin_unlock_irq (run_timer_softirq) | ||
855 | sshd-4261 0d.s. 104us : _local_bh_enable (__do_softirq) | ||
856 | sshd-4261 0d.s. 104us : sub_preempt_count (_local_bh_enable) | ||
857 | sshd-4261 0d.s. 105us : _local_bh_enable (__do_softirq) | ||
858 | sshd-4261 0d.s1 105us : trace_preempt_on (__do_softirq) | ||
859 | |||
860 | |||
861 | This is a very interesting trace. It started with the preemption of | ||
862 | the ls task. We see that the task had the "need_resched" bit set | ||
863 | with the 'N' in the trace. Interrupts are disabled in the spin_lock | ||
864 | and the trace started. We see that a schedule took place to run | ||
865 | sshd. When the interrupts were enabled we took an interrupt. | ||
866 | On return of the interrupt the softirq ran. We took another interrupt | ||
867 | while running the softirq as we see with the capital 'H'. | ||
868 | |||
869 | |||
870 | wakeup | ||
871 | ------ | ||
872 | |||
873 | In Real-Time environment it is very important to know the wakeup | ||
874 | time it takes for the highest priority task that wakes up to the | ||
875 | time it executes. This is also known as "schedule latency". | ||
876 | I stress the point that this is about RT tasks. It is also important | ||
877 | to know the scheduling latency of non-RT tasks, but the average | ||
878 | schedule latency is better for non-RT tasks. Tools like | ||
879 | LatencyTop is more appropriate for such measurements. | ||
880 | |||
881 | Real-Time environments is interested in the worst case latency. | ||
882 | That is the longest latency it takes for something to happen, and | ||
883 | not the average. We can have a very fast scheduler that may only | ||
884 | have a large latency once in a while, but that would not work well | ||
885 | with Real-Time tasks. The wakeup tracer was designed to record | ||
886 | the worst case wakeups of RT tasks. Non-RT tasks are not recorded | ||
887 | because the tracer only records one worst case and tracing non-RT | ||
888 | tasks that are unpredictable will overwrite the worst case latency | ||
889 | of RT tasks. | ||
890 | |||
891 | Since this tracer only deals with RT tasks, we will run this slightly | ||
892 | different than we did with the previous tracers. Instead of performing | ||
893 | an 'ls' we will run 'sleep 1' under 'chrt' which changes the | ||
894 | priority of the task. | ||
895 | |||
896 | # echo wakeup > /debug/tracing/current_tracer | ||
897 | # echo 0 > /debug/tracing/tracing_max_latency | ||
898 | # echo 1 > /debug/tracing/tracing_enabled | ||
899 | # chrt -f 5 sleep 1 | ||
900 | # echo 0 > /debug/tracing/tracing_enabled | ||
901 | # cat /debug/tracing/latency_trace | ||
902 | # tracer: wakeup | ||
903 | # | ||
904 | wakeup latency trace v1.1.5 on 2.6.26-rc8 | ||
905 | -------------------------------------------------------------------- | ||
906 | latency: 4 us, #2/2, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2) | ||
907 | ----------------- | ||
908 | | task: sleep-4901 (uid:0 nice:0 policy:1 rt_prio:5) | ||
909 | ----------------- | ||
910 | |||
911 | # _------=> CPU# | ||
912 | # / _-----=> irqs-off | ||
913 | # | / _----=> need-resched | ||
914 | # || / _---=> hardirq/softirq | ||
915 | # ||| / _--=> preempt-depth | ||
916 | # |||| / | ||
917 | # ||||| delay | ||
918 | # cmd pid ||||| time | caller | ||
919 | # \ / ||||| \ | / | ||
920 | <idle>-0 1d.h4 0us+: try_to_wake_up (wake_up_process) | ||
921 | <idle>-0 1d..4 4us : schedule (cpu_idle) | ||
922 | |||
923 | |||
924 | vim:ft=help | ||
925 | |||
926 | |||
927 | Running this on an idle system we see that it only took 4 microseconds | ||
928 | to perform the task switch. Note, since the trace marker in the | ||
929 | schedule is before the actual "switch" we stop the tracing when | ||
930 | the recorded task is about to schedule in. This may change if | ||
931 | we add a new marker at the end of the scheduler. | ||
932 | |||
933 | Notice that the recorded task is 'sleep' with the PID of 4901 and it | ||
934 | has an rt_prio of 5. This priority is user-space priority and not | ||
935 | the internal kernel priority. The policy is 1 for SCHED_FIFO and 2 | ||
936 | for SCHED_RR. | ||
937 | |||
938 | Doing the same with chrt -r 5 and ftrace_enabled set. | ||
939 | |||
940 | # tracer: wakeup | ||
941 | # | ||
942 | wakeup latency trace v1.1.5 on 2.6.26-rc8 | ||
943 | -------------------------------------------------------------------- | ||
944 | latency: 50 us, #60/60, CPU#1 | (M:preempt VP:0, KP:0, SP:0 HP:0 #P:2) | ||
945 | ----------------- | ||
946 | | task: sleep-4068 (uid:0 nice:0 policy:2 rt_prio:5) | ||
947 | ----------------- | ||
948 | |||
949 | # _------=> CPU# | ||
950 | # / _-----=> irqs-off | ||
951 | # | / _----=> need-resched | ||
952 | # || / _---=> hardirq/softirq | ||
953 | # ||| / _--=> preempt-depth | ||
954 | # |||| / | ||
955 | # ||||| delay | ||
956 | # cmd pid ||||| time | caller | ||
957 | # \ / ||||| \ | / | ||
958 | ksoftirq-7 1d.H3 0us : try_to_wake_up (wake_up_process) | ||
959 | ksoftirq-7 1d.H4 1us : sub_preempt_count (marker_probe_cb) | ||
960 | ksoftirq-7 1d.H3 2us : check_preempt_wakeup (try_to_wake_up) | ||
961 | ksoftirq-7 1d.H3 3us : update_curr (check_preempt_wakeup) | ||
962 | ksoftirq-7 1d.H3 4us : calc_delta_mine (update_curr) | ||
963 | ksoftirq-7 1d.H3 5us : __resched_task (check_preempt_wakeup) | ||
964 | ksoftirq-7 1d.H3 6us : task_wake_up_rt (try_to_wake_up) | ||
965 | ksoftirq-7 1d.H3 7us : _spin_unlock_irqrestore (try_to_wake_up) | ||
966 | [...] | ||
967 | ksoftirq-7 1d.H2 17us : irq_exit (smp_apic_timer_interrupt) | ||
968 | ksoftirq-7 1d.H2 18us : sub_preempt_count (irq_exit) | ||
969 | ksoftirq-7 1d.s3 19us : sub_preempt_count (irq_exit) | ||
970 | ksoftirq-7 1..s2 20us : rcu_process_callbacks (__do_softirq) | ||
971 | [...] | ||
972 | ksoftirq-7 1..s2 26us : __rcu_process_callbacks (rcu_process_callbacks) | ||
973 | ksoftirq-7 1d.s2 27us : _local_bh_enable (__do_softirq) | ||
974 | ksoftirq-7 1d.s2 28us : sub_preempt_count (_local_bh_enable) | ||
975 | ksoftirq-7 1.N.3 29us : sub_preempt_count (ksoftirqd) | ||
976 | ksoftirq-7 1.N.2 30us : _cond_resched (ksoftirqd) | ||
977 | ksoftirq-7 1.N.2 31us : __cond_resched (_cond_resched) | ||
978 | ksoftirq-7 1.N.2 32us : add_preempt_count (__cond_resched) | ||
979 | ksoftirq-7 1.N.2 33us : schedule (__cond_resched) | ||
980 | ksoftirq-7 1.N.2 33us : add_preempt_count (schedule) | ||
981 | ksoftirq-7 1.N.3 34us : hrtick_clear (schedule) | ||
982 | ksoftirq-7 1dN.3 35us : _spin_lock (schedule) | ||
983 | ksoftirq-7 1dN.3 36us : add_preempt_count (_spin_lock) | ||
984 | ksoftirq-7 1d..4 37us : put_prev_task_fair (schedule) | ||
985 | ksoftirq-7 1d..4 38us : update_curr (put_prev_task_fair) | ||
986 | [...] | ||
987 | ksoftirq-7 1d..5 47us : _spin_trylock (tracing_record_cmdline) | ||
988 | ksoftirq-7 1d..5 48us : add_preempt_count (_spin_trylock) | ||
989 | ksoftirq-7 1d..6 49us : _spin_unlock (tracing_record_cmdline) | ||
990 | ksoftirq-7 1d..6 49us : sub_preempt_count (_spin_unlock) | ||
991 | ksoftirq-7 1d..4 50us : schedule (__cond_resched) | ||
992 | |||
993 | The interrupt went off while running ksoftirqd. This task runs at | ||
994 | SCHED_OTHER. Why didn't we see the 'N' set early? This may be | ||
995 | a harmless bug with x86_32 and 4K stacks. The need_reched() function | ||
996 | that tests if we need to reschedule looks on the actual stack. | ||
997 | Where as the setting of the NEED_RESCHED bit happens on the | ||
998 | task's stack. But because we are in a hard interrupt, the test | ||
999 | is with the interrupts stack which has that to be false. We don't | ||
1000 | see the 'N' until we switch back to the task's stack. | ||
1001 | |||
1002 | ftrace | ||
1003 | ------ | ||
1004 | |||
1005 | ftrace is not only the name of the tracing infrastructure, but it | ||
1006 | is also a name of one of the tracers. The tracer is the function | ||
1007 | tracer. Enabling the function tracer can be done from the | ||
1008 | debug file system. Make sure the ftrace_enabled is set otherwise | ||
1009 | this tracer is a nop. | ||
1010 | |||
1011 | # sysctl kernel.ftrace_enabled=1 | ||
1012 | # echo ftrace > /debug/tracing/current_tracer | ||
1013 | # echo 1 > /debug/tracing/tracing_enabled | ||
1014 | # usleep 1 | ||
1015 | # echo 0 > /debug/tracing/tracing_enabled | ||
1016 | # cat /debug/tracing/trace | ||
1017 | # tracer: ftrace | ||
1018 | # | ||
1019 | # TASK-PID CPU# TIMESTAMP FUNCTION | ||
1020 | # | | | | | | ||
1021 | bash-4003 [00] 123.638713: finish_task_switch <-schedule | ||
1022 | bash-4003 [00] 123.638714: _spin_unlock_irq <-finish_task_switch | ||
1023 | bash-4003 [00] 123.638714: sub_preempt_count <-_spin_unlock_irq | ||
1024 | bash-4003 [00] 123.638715: hrtick_set <-schedule | ||
1025 | bash-4003 [00] 123.638715: _spin_lock_irqsave <-hrtick_set | ||
1026 | bash-4003 [00] 123.638716: add_preempt_count <-_spin_lock_irqsave | ||
1027 | bash-4003 [00] 123.638716: _spin_unlock_irqrestore <-hrtick_set | ||
1028 | bash-4003 [00] 123.638717: sub_preempt_count <-_spin_unlock_irqrestore | ||
1029 | bash-4003 [00] 123.638717: hrtick_clear <-hrtick_set | ||
1030 | bash-4003 [00] 123.638718: sub_preempt_count <-schedule | ||
1031 | bash-4003 [00] 123.638718: sub_preempt_count <-preempt_schedule | ||
1032 | bash-4003 [00] 123.638719: wait_for_completion <-__stop_machine_run | ||
1033 | bash-4003 [00] 123.638719: wait_for_common <-wait_for_completion | ||
1034 | bash-4003 [00] 123.638720: _spin_lock_irq <-wait_for_common | ||
1035 | bash-4003 [00] 123.638720: add_preempt_count <-_spin_lock_irq | ||
1036 | [...] | ||
1037 | |||
1038 | |||
1039 | Note: It is sometimes better to enable or disable tracing directly from | ||
1040 | a program, because the buffer may be overflowed by the echo commands | ||
1041 | before you get to the point you want to trace. It is also easier to | ||
1042 | stop the tracing at the point that you hit the part that you are | ||
1043 | interested in. Since the ftrace buffer is a ring buffer with the | ||
1044 | oldest data being overwritten, usually it is sufficient to start the | ||
1045 | tracer with an echo command but have you code stop it. Something | ||
1046 | like the following is usually appropriate for this. | ||
1047 | |||
1048 | int trace_fd; | ||
1049 | [...] | ||
1050 | int main(int argc, char *argv[]) { | ||
1051 | [...] | ||
1052 | trace_fd = open("/debug/tracing/tracing_enabled", O_WRONLY); | ||
1053 | [...] | ||
1054 | if (condition_hit()) { | ||
1055 | write(trace_fd, "0", 1); | ||
1056 | } | ||
1057 | [...] | ||
1058 | } | ||
1059 | |||
1060 | |||
1061 | dynamic ftrace | ||
1062 | -------------- | ||
1063 | |||
1064 | If CONFIG_DYNAMIC_FTRACE is set, then the system will run with | ||
1065 | virtually no overhead when function tracing is disabled. The way | ||
1066 | this works is the mcount function call (placed at the start of | ||
1067 | every kernel function, produced by the -pg switch in gcc), starts | ||
1068 | of pointing to a simple return. | ||
1069 | |||
1070 | When dynamic ftrace is initialized, it calls kstop_machine to make it | ||
1071 | act like a uniprocessor so that it can freely modify code without | ||
1072 | worrying about other processors executing that same code. At | ||
1073 | initialization, the mcount calls are change to call a "record_ip" | ||
1074 | function. After this, the first time a kernel function is called, | ||
1075 | it has the calling address saved in a hash table. | ||
1076 | |||
1077 | Later on the ftraced kernel thread is awoken and will again call | ||
1078 | kstop_machine if new functions have been recorded. The ftraced thread | ||
1079 | will change all calls to mcount to "nop". Just calling mcount | ||
1080 | and having mcount return has shown a 10% overhead. By converting | ||
1081 | it to a nop, there is no recordable overhead to the system. | ||
1082 | |||
1083 | One special side-effect to the recording of the functions being | ||
1084 | traced, is that we can now selectively choose which functions we | ||
1085 | want to trace and which ones we want the mcount calls to remain as | ||
1086 | nops. | ||
1087 | |||
1088 | Two files that contain to the enabling and disabling of recorded | ||
1089 | functions are: | ||
1090 | |||
1091 | set_ftrace_filter | ||
1092 | |||
1093 | and | ||
1094 | |||
1095 | set_ftrace_notrace | ||
1096 | |||
1097 | A list of available functions that you can add to this files is listed | ||
1098 | in: | ||
1099 | |||
1100 | available_filter_functions | ||
1101 | |||
1102 | # cat /debug/tracing/available_filter_functions | ||
1103 | put_prev_task_idle | ||
1104 | kmem_cache_create | ||
1105 | pick_next_task_rt | ||
1106 | get_online_cpus | ||
1107 | pick_next_task_fair | ||
1108 | mutex_lock | ||
1109 | [...] | ||
1110 | |||
1111 | If I'm only interested in sys_nanosleep and hrtimer_interrupt: | ||
1112 | |||
1113 | # echo sys_nanosleep hrtimer_interrupt \ | ||
1114 | > /debug/tracing/set_ftrace_filter | ||
1115 | # echo ftrace > /debug/tracing/current_tracer | ||
1116 | # echo 1 > /debug/tracing/tracing_enabled | ||
1117 | # usleep 1 | ||
1118 | # echo 0 > /debug/tracing/tracing_enabled | ||
1119 | # cat /debug/tracing/trace | ||
1120 | # tracer: ftrace | ||
1121 | # | ||
1122 | # TASK-PID CPU# TIMESTAMP FUNCTION | ||
1123 | # | | | | | | ||
1124 | usleep-4134 [00] 1317.070017: hrtimer_interrupt <-smp_apic_timer_interrupt | ||
1125 | usleep-4134 [00] 1317.070111: sys_nanosleep <-syscall_call | ||
1126 | <idle>-0 [00] 1317.070115: hrtimer_interrupt <-smp_apic_timer_interrupt | ||
1127 | |||
1128 | To see what functions are being traced, you can cat the file: | ||
1129 | |||
1130 | # cat /debug/tracing/set_ftrace_filter | ||
1131 | hrtimer_interrupt | ||
1132 | sys_nanosleep | ||
1133 | |||
1134 | |||
1135 | Perhaps this isn't enough. The filters also allow simple wild cards. | ||
1136 | Only the following is currently available | ||
1137 | |||
1138 | <match>* - will match functions that begins with <match> | ||
1139 | *<match> - will match functions that end with <match> | ||
1140 | *<match>* - will match functions that have <match> in it | ||
1141 | |||
1142 | Thats all the wild cards that are allowed. | ||
1143 | |||
1144 | <match>*<match> will not work. | ||
1145 | |||
1146 | # echo hrtimer_* > /debug/tracing/set_ftrace_filter | ||
1147 | |||
1148 | Produces: | ||
1149 | |||
1150 | # tracer: ftrace | ||
1151 | # | ||
1152 | # TASK-PID CPU# TIMESTAMP FUNCTION | ||
1153 | # | | | | | | ||
1154 | bash-4003 [00] 1480.611794: hrtimer_init <-copy_process | ||
1155 | bash-4003 [00] 1480.611941: hrtimer_start <-hrtick_set | ||
1156 | bash-4003 [00] 1480.611956: hrtimer_cancel <-hrtick_clear | ||
1157 | bash-4003 [00] 1480.611956: hrtimer_try_to_cancel <-hrtimer_cancel | ||
1158 | <idle>-0 [00] 1480.612019: hrtimer_get_next_event <-get_next_timer_interrupt | ||
1159 | <idle>-0 [00] 1480.612025: hrtimer_get_next_event <-get_next_timer_interrupt | ||
1160 | <idle>-0 [00] 1480.612032: hrtimer_get_next_event <-get_next_timer_interrupt | ||
1161 | <idle>-0 [00] 1480.612037: hrtimer_get_next_event <-get_next_timer_interrupt | ||
1162 | <idle>-0 [00] 1480.612382: hrtimer_get_next_event <-get_next_timer_interrupt | ||
1163 | |||
1164 | |||
1165 | Notice that we lost the sys_nanosleep. | ||
1166 | |||
1167 | # cat /debug/tracing/set_ftrace_filter | ||
1168 | hrtimer_run_queues | ||
1169 | hrtimer_run_pending | ||
1170 | hrtimer_init | ||
1171 | hrtimer_cancel | ||
1172 | hrtimer_try_to_cancel | ||
1173 | hrtimer_forward | ||
1174 | hrtimer_start | ||
1175 | hrtimer_reprogram | ||
1176 | hrtimer_force_reprogram | ||
1177 | hrtimer_get_next_event | ||
1178 | hrtimer_interrupt | ||
1179 | hrtimer_nanosleep | ||
1180 | hrtimer_wakeup | ||
1181 | hrtimer_get_remaining | ||
1182 | hrtimer_get_res | ||
1183 | hrtimer_init_sleeper | ||
1184 | |||
1185 | |||
1186 | This is because the '>' and '>>' act just like they do in bash. | ||
1187 | To rewrite the filters, use '>' | ||
1188 | To append to the filters, use '>>' | ||
1189 | |||
1190 | To clear out a filter so that all functions will be recorded again. | ||
1191 | |||
1192 | # echo > /debug/tracing/set_ftrace_filter | ||
1193 | # cat /debug/tracing/set_ftrace_filter | ||
1194 | # | ||
1195 | |||
1196 | Again, now we want to append. | ||
1197 | |||
1198 | # echo sys_nanosleep > /debug/tracing/set_ftrace_filter | ||
1199 | # cat /debug/tracing/set_ftrace_filter | ||
1200 | sys_nanosleep | ||
1201 | # echo hrtimer_* >> /debug/tracing/set_ftrace_filter | ||
1202 | # cat /debug/tracing/set_ftrace_filter | ||
1203 | hrtimer_run_queues | ||
1204 | hrtimer_run_pending | ||
1205 | hrtimer_init | ||
1206 | hrtimer_cancel | ||
1207 | hrtimer_try_to_cancel | ||
1208 | hrtimer_forward | ||
1209 | hrtimer_start | ||
1210 | hrtimer_reprogram | ||
1211 | hrtimer_force_reprogram | ||
1212 | hrtimer_get_next_event | ||
1213 | hrtimer_interrupt | ||
1214 | sys_nanosleep | ||
1215 | hrtimer_nanosleep | ||
1216 | hrtimer_wakeup | ||
1217 | hrtimer_get_remaining | ||
1218 | hrtimer_get_res | ||
1219 | hrtimer_init_sleeper | ||
1220 | |||
1221 | |||
1222 | The set_ftrace_notrace prevents those functions from being traced. | ||
1223 | |||
1224 | # echo '*preempt*' '*lock*' > /debug/tracing/set_ftrace_notrace | ||
1225 | |||
1226 | Produces: | ||
1227 | |||
1228 | # tracer: ftrace | ||
1229 | # | ||
1230 | # TASK-PID CPU# TIMESTAMP FUNCTION | ||
1231 | # | | | | | | ||
1232 | bash-4043 [01] 115.281644: finish_task_switch <-schedule | ||
1233 | bash-4043 [01] 115.281645: hrtick_set <-schedule | ||
1234 | bash-4043 [01] 115.281645: hrtick_clear <-hrtick_set | ||
1235 | bash-4043 [01] 115.281646: wait_for_completion <-__stop_machine_run | ||
1236 | bash-4043 [01] 115.281647: wait_for_common <-wait_for_completion | ||
1237 | bash-4043 [01] 115.281647: kthread_stop <-stop_machine_run | ||
1238 | bash-4043 [01] 115.281648: init_waitqueue_head <-kthread_stop | ||
1239 | bash-4043 [01] 115.281648: wake_up_process <-kthread_stop | ||
1240 | bash-4043 [01] 115.281649: try_to_wake_up <-wake_up_process | ||
1241 | |||
1242 | We can see that there's no more lock or preempt tracing. | ||
1243 | |||
1244 | ftraced | ||
1245 | ------- | ||
1246 | |||
1247 | As mentioned above, when dynamic ftrace is configured in, a kernel | ||
1248 | thread wakes up once a second and checks to see if there are mcount | ||
1249 | calls that need to be converted into nops. If there is not, then | ||
1250 | it simply goes back to sleep. But if there is, it will call | ||
1251 | kstop_machine to convert the calls to nops. | ||
1252 | |||
1253 | There may be a case that you do not want this added latency. | ||
1254 | Perhaps you are doing some audio recording and this activity might | ||
1255 | cause skips in the playback. There is an interface to disable | ||
1256 | and enable the ftraced kernel thread. | ||
1257 | |||
1258 | # echo 0 > /debug/tracing/ftraced_enabled | ||
1259 | |||
1260 | This will disable the calling of the kstop_machine to update the | ||
1261 | mcount calls to nops. Remember that there's a large overhead | ||
1262 | to calling mcount. Without this kernel thread, that overhead will | ||
1263 | exist. | ||
1264 | |||
1265 | Any write to the ftraced_enabled file will cause the kstop_machine | ||
1266 | to run if there are recorded calls to mcount. This means that a | ||
1267 | user can manually perform the updates when they want to by simply | ||
1268 | echoing a '0' into the ftraced_enabled file. | ||
1269 | |||
1270 | The updates are also done at the beginning of enabling a tracer | ||
1271 | that uses ftrace function recording. | ||
1272 | |||
1273 | |||
1274 | trace_pipe | ||
1275 | ---------- | ||
1276 | |||
1277 | The trace_pipe outputs the same as trace, but the effect on the | ||
1278 | tracing is different. Every read from trace_pipe is consumed. | ||
1279 | This means that subsequent reads will be different. The trace | ||
1280 | is live. | ||
1281 | |||
1282 | # echo ftrace > /debug/tracing/current_tracer | ||
1283 | # cat /debug/tracing/trace_pipe > /tmp/trace.out & | ||
1284 | [1] 4153 | ||
1285 | # echo 1 > /debug/tracing/tracing_enabled | ||
1286 | # usleep 1 | ||
1287 | # echo 0 > /debug/tracing/tracing_enabled | ||
1288 | # cat /debug/tracing/trace | ||
1289 | # tracer: ftrace | ||
1290 | # | ||
1291 | # TASK-PID CPU# TIMESTAMP FUNCTION | ||
1292 | # | | | | | | ||
1293 | |||
1294 | # | ||
1295 | # cat /tmp/trace.out | ||
1296 | bash-4043 [00] 41.267106: finish_task_switch <-schedule | ||
1297 | bash-4043 [00] 41.267106: hrtick_set <-schedule | ||
1298 | bash-4043 [00] 41.267107: hrtick_clear <-hrtick_set | ||
1299 | bash-4043 [00] 41.267108: wait_for_completion <-__stop_machine_run | ||
1300 | bash-4043 [00] 41.267108: wait_for_common <-wait_for_completion | ||
1301 | bash-4043 [00] 41.267109: kthread_stop <-stop_machine_run | ||
1302 | bash-4043 [00] 41.267109: init_waitqueue_head <-kthread_stop | ||
1303 | bash-4043 [00] 41.267110: wake_up_process <-kthread_stop | ||
1304 | bash-4043 [00] 41.267110: try_to_wake_up <-wake_up_process | ||
1305 | bash-4043 [00] 41.267111: select_task_rq_rt <-try_to_wake_up | ||
1306 | |||
1307 | |||
1308 | Note, reading the trace_pipe will block until more input is added. | ||
1309 | By changing the tracer, trace_pipe will issue an EOF. We needed | ||
1310 | to set the ftrace tracer _before_ cating the trace_pipe file. | ||
1311 | |||
1312 | |||
1313 | trace entries | ||
1314 | ------------- | ||
1315 | |||
1316 | Having too much or not enough data can be troublesome in diagnosing | ||
1317 | some issue in the kernel. The file trace_entries is used to modify | ||
1318 | the size of the internal trace buffers. The numbers listed | ||
1319 | is the number of entries that can be recorded per CPU. To know | ||
1320 | the full size, multiply the number of possible CPUS with the | ||
1321 | number of entries. | ||
1322 | |||
1323 | # cat /debug/tracing/trace_entries | ||
1324 | 65620 | ||
1325 | |||
1326 | Note, to modify this you must have tracing fulling disabled. To do that, | ||
1327 | echo "none" into the current_tracer. | ||
1328 | |||
1329 | # echo none > /debug/tracing/current_tracer | ||
1330 | # echo 100000 > /debug/tracing/trace_entries | ||
1331 | # cat /debug/tracing/trace_entries | ||
1332 | 100045 | ||
1333 | |||
1334 | |||
1335 | Notice that we echoed in 100,000 but the size is 100,045. The entries | ||
1336 | are held by individual pages. It allocates the number of pages it takes | ||
1337 | to fulfill the request. If more entries may fit on the last page | ||
1338 | it will add them. | ||
1339 | |||
1340 | # echo 1 > /debug/tracing/trace_entries | ||
1341 | # cat /debug/tracing/trace_entries | ||
1342 | 85 | ||
1343 | |||
1344 | This shows us that 85 entries can fit on a single page. | ||
1345 | |||
1346 | The number of pages that will be allocated is a percentage of available | ||
1347 | memory. Allocating too much will produces an error. | ||
1348 | |||
1349 | # echo 1000000000000 > /debug/tracing/trace_entries | ||
1350 | -bash: echo: write error: Cannot allocate memory | ||
1351 | # cat /debug/tracing/trace_entries | ||
1352 | 85 | ||
1353 | |||
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index ee75cbace28d..d4cd4126d1ad 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients | |||
@@ -25,12 +25,23 @@ routines, and should be zero-initialized except for fields with data you | |||
25 | provide. A client structure holds device-specific information like the | 25 | provide. A client structure holds device-specific information like the |
26 | driver model device node, and its I2C address. | 26 | driver model device node, and its I2C address. |
27 | 27 | ||
28 | /* iff driver uses driver model ("new style") binding model: */ | ||
29 | |||
30 | static struct i2c_device_id foo_idtable[] = { | ||
31 | { "foo", my_id_for_foo }, | ||
32 | { "bar", my_id_for_bar }, | ||
33 | { } | ||
34 | }; | ||
35 | |||
36 | MODULE_DEVICE_TABLE(i2c, foo_idtable); | ||
37 | |||
28 | static struct i2c_driver foo_driver = { | 38 | static struct i2c_driver foo_driver = { |
29 | .driver = { | 39 | .driver = { |
30 | .name = "foo", | 40 | .name = "foo", |
31 | }, | 41 | }, |
32 | 42 | ||
33 | /* iff driver uses driver model ("new style") binding model: */ | 43 | /* iff driver uses driver model ("new style") binding model: */ |
44 | .id_table = foo_ids, | ||
34 | .probe = foo_probe, | 45 | .probe = foo_probe, |
35 | .remove = foo_remove, | 46 | .remove = foo_remove, |
36 | 47 | ||
@@ -173,10 +184,9 @@ handle may be used during foo_probe(). If foo_probe() reports success | |||
173 | (zero not a negative status code) it may save the handle and use it until | 184 | (zero not a negative status code) it may save the handle and use it until |
174 | foo_remove() returns. That binding model is used by most Linux drivers. | 185 | foo_remove() returns. That binding model is used by most Linux drivers. |
175 | 186 | ||
176 | Drivers match devices when i2c_client.driver_name and the driver name are | 187 | The probe function is called when an entry in the id_table name field |
177 | the same; this approach is used in several other busses that don't have | 188 | matches the device's name. It is passed the entry that was matched so |
178 | device typing support in the hardware. The driver and module name should | 189 | the driver knows which one in the table matched. |
179 | match, so hotplug/coldplug mechanisms will modprobe the driver. | ||
180 | 190 | ||
181 | 191 | ||
182 | Device Creation (Standard driver model) | 192 | Device Creation (Standard driver model) |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index e07c432c731f..b52f47d588b4 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -295,7 +295,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
295 | when initialising the APIC and IO-APIC components. | 295 | when initialising the APIC and IO-APIC components. |
296 | 296 | ||
297 | apm= [APM] Advanced Power Management | 297 | apm= [APM] Advanced Power Management |
298 | See header of arch/i386/kernel/apm.c. | 298 | See header of arch/x86/kernel/apm_32.c. |
299 | 299 | ||
300 | arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards | 300 | arcrimi= [HW,NET] ARCnet - "RIM I" (entirely mem-mapped) cards |
301 | Format: <io>,<irq>,<nodeID> | 301 | Format: <io>,<irq>,<nodeID> |
@@ -638,7 +638,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
638 | 638 | ||
639 | elanfreq= [X86-32] | 639 | elanfreq= [X86-32] |
640 | See comment before function elanfreq_setup() in | 640 | See comment before function elanfreq_setup() in |
641 | arch/i386/kernel/cpu/cpufreq/elanfreq.c. | 641 | arch/x86/kernel/cpu/cpufreq/elanfreq.c. |
642 | 642 | ||
643 | elevator= [IOSCHED] | 643 | elevator= [IOSCHED] |
644 | Format: {"anticipatory" | "cfq" | "deadline" | "noop"} | 644 | Format: {"anticipatory" | "cfq" | "deadline" | "noop"} |
@@ -1679,6 +1679,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
1679 | Format: <reboot_mode>[,<reboot_mode2>[,...]] | 1679 | Format: <reboot_mode>[,<reboot_mode2>[,...]] |
1680 | See arch/*/kernel/reboot.c or arch/*/kernel/process.c | 1680 | See arch/*/kernel/reboot.c or arch/*/kernel/process.c |
1681 | 1681 | ||
1682 | relax_domain_level= | ||
1683 | [KNL, SMP] Set scheduler's default relax_domain_level. | ||
1684 | See Documentation/cpusets.txt. | ||
1685 | |||
1682 | reserve= [KNL,BUGS] Force the kernel to ignore some iomem area | 1686 | reserve= [KNL,BUGS] Force the kernel to ignore some iomem area |
1683 | 1687 | ||
1684 | reservetop= [X86-32] | 1688 | reservetop= [X86-32] |
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index 17a6e46fbd43..946b66e1b652 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -81,23 +81,23 @@ inet_peer_minttl - INTEGER | |||
81 | Minimum time-to-live of entries. Should be enough to cover fragment | 81 | Minimum time-to-live of entries. Should be enough to cover fragment |
82 | time-to-live on the reassembling side. This minimum time-to-live is | 82 | time-to-live on the reassembling side. This minimum time-to-live is |
83 | guaranteed if the pool size is less than inet_peer_threshold. | 83 | guaranteed if the pool size is less than inet_peer_threshold. |
84 | Measured in jiffies(1). | 84 | Measured in seconds. |
85 | 85 | ||
86 | inet_peer_maxttl - INTEGER | 86 | inet_peer_maxttl - INTEGER |
87 | Maximum time-to-live of entries. Unused entries will expire after | 87 | Maximum time-to-live of entries. Unused entries will expire after |
88 | this period of time if there is no memory pressure on the pool (i.e. | 88 | this period of time if there is no memory pressure on the pool (i.e. |
89 | when the number of entries in the pool is very small). | 89 | when the number of entries in the pool is very small). |
90 | Measured in jiffies(1). | 90 | Measured in seconds. |
91 | 91 | ||
92 | inet_peer_gc_mintime - INTEGER | 92 | inet_peer_gc_mintime - INTEGER |
93 | Minimum interval between garbage collection passes. This interval is | 93 | Minimum interval between garbage collection passes. This interval is |
94 | in effect under high memory pressure on the pool. | 94 | in effect under high memory pressure on the pool. |
95 | Measured in jiffies(1). | 95 | Measured in seconds. |
96 | 96 | ||
97 | inet_peer_gc_maxtime - INTEGER | 97 | inet_peer_gc_maxtime - INTEGER |
98 | Minimum interval between garbage collection passes. This interval is | 98 | Minimum interval between garbage collection passes. This interval is |
99 | in effect under low (or absent) memory pressure on the pool. | 99 | in effect under low (or absent) memory pressure on the pool. |
100 | Measured in jiffies(1). | 100 | Measured in seconds. |
101 | 101 | ||
102 | TCP variables: | 102 | TCP variables: |
103 | 103 | ||
@@ -148,9 +148,9 @@ tcp_available_congestion_control - STRING | |||
148 | but not loaded. | 148 | but not loaded. |
149 | 149 | ||
150 | tcp_base_mss - INTEGER | 150 | tcp_base_mss - INTEGER |
151 | The initial value of search_low to be used by Packetization Layer | 151 | The initial value of search_low to be used by the packetization layer |
152 | Path MTU Discovery (MTU probing). If MTU probing is enabled, | 152 | Path MTU discovery (MTU probing). If MTU probing is enabled, |
153 | this is the inital MSS used by the connection. | 153 | this is the initial MSS used by the connection. |
154 | 154 | ||
155 | tcp_congestion_control - STRING | 155 | tcp_congestion_control - STRING |
156 | Set the congestion control algorithm to be used for new | 156 | Set the congestion control algorithm to be used for new |
@@ -185,10 +185,9 @@ tcp_frto - INTEGER | |||
185 | timeouts. It is particularly beneficial in wireless environments | 185 | timeouts. It is particularly beneficial in wireless environments |
186 | where packet loss is typically due to random radio interference | 186 | where packet loss is typically due to random radio interference |
187 | rather than intermediate router congestion. F-RTO is sender-side | 187 | rather than intermediate router congestion. F-RTO is sender-side |
188 | only modification. Therefore it does not require any support from | 188 | only modification. Therefore it does not require any support from |
189 | the peer, but in a typical case, however, where wireless link is | 189 | the peer. |
190 | the local access link and most of the data flows downlink, the | 190 | |
191 | faraway servers should have F-RTO enabled to take advantage of it. | ||
192 | If set to 1, basic version is enabled. 2 enables SACK enhanced | 191 | If set to 1, basic version is enabled. 2 enables SACK enhanced |
193 | F-RTO if flow uses SACK. The basic version can be used also when | 192 | F-RTO if flow uses SACK. The basic version can be used also when |
194 | SACK is in use though scenario(s) with it exists where F-RTO | 193 | SACK is in use though scenario(s) with it exists where F-RTO |
@@ -276,7 +275,7 @@ tcp_mem - vector of 3 INTEGERs: min, pressure, max | |||
276 | memory. | 275 | memory. |
277 | 276 | ||
278 | tcp_moderate_rcvbuf - BOOLEAN | 277 | tcp_moderate_rcvbuf - BOOLEAN |
279 | If set, TCP performs receive buffer autotuning, attempting to | 278 | If set, TCP performs receive buffer auto-tuning, attempting to |
280 | automatically size the buffer (no greater than tcp_rmem[2]) to | 279 | automatically size the buffer (no greater than tcp_rmem[2]) to |
281 | match the size required by the path for full throughput. Enabled by | 280 | match the size required by the path for full throughput. Enabled by |
282 | default. | 281 | default. |
@@ -336,7 +335,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max | |||
336 | pressure. | 335 | pressure. |
337 | Default: 8K | 336 | Default: 8K |
338 | 337 | ||
339 | default: default size of receive buffer used by TCP sockets. | 338 | default: initial size of receive buffer used by TCP sockets. |
340 | This value overrides net.core.rmem_default used by other protocols. | 339 | This value overrides net.core.rmem_default used by other protocols. |
341 | Default: 87380 bytes. This value results in window of 65535 with | 340 | Default: 87380 bytes. This value results in window of 65535 with |
342 | default setting of tcp_adv_win_scale and tcp_app_win:0 and a bit | 341 | default setting of tcp_adv_win_scale and tcp_app_win:0 and a bit |
@@ -344,8 +343,10 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max | |||
344 | 343 | ||
345 | max: maximal size of receive buffer allowed for automatically | 344 | max: maximal size of receive buffer allowed for automatically |
346 | selected receiver buffers for TCP socket. This value does not override | 345 | selected receiver buffers for TCP socket. This value does not override |
347 | net.core.rmem_max, "static" selection via SO_RCVBUF does not use this. | 346 | net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables |
348 | Default: 87380*2 bytes. | 347 | automatic tuning of that socket's receive buffer size, in which |
348 | case this value is ignored. | ||
349 | Default: between 87380B and 4MB, depending on RAM size. | ||
349 | 350 | ||
350 | tcp_sack - BOOLEAN | 351 | tcp_sack - BOOLEAN |
351 | Enable select acknowledgments (SACKS). | 352 | Enable select acknowledgments (SACKS). |
@@ -358,7 +359,7 @@ tcp_slow_start_after_idle - BOOLEAN | |||
358 | Default: 1 | 359 | Default: 1 |
359 | 360 | ||
360 | tcp_stdurg - BOOLEAN | 361 | tcp_stdurg - BOOLEAN |
361 | Use the Host requirements interpretation of the TCP urg pointer field. | 362 | Use the Host requirements interpretation of the TCP urgent pointer field. |
362 | Most hosts use the older BSD interpretation, so if you turn this on | 363 | Most hosts use the older BSD interpretation, so if you turn this on |
363 | Linux might not communicate correctly with them. | 364 | Linux might not communicate correctly with them. |
364 | Default: FALSE | 365 | Default: FALSE |
@@ -371,12 +372,12 @@ tcp_synack_retries - INTEGER | |||
371 | tcp_syncookies - BOOLEAN | 372 | tcp_syncookies - BOOLEAN |
372 | Only valid when the kernel was compiled with CONFIG_SYNCOOKIES | 373 | Only valid when the kernel was compiled with CONFIG_SYNCOOKIES |
373 | Send out syncookies when the syn backlog queue of a socket | 374 | Send out syncookies when the syn backlog queue of a socket |
374 | overflows. This is to prevent against the common 'syn flood attack' | 375 | overflows. This is to prevent against the common 'SYN flood attack' |
375 | Default: FALSE | 376 | Default: FALSE |
376 | 377 | ||
377 | Note, that syncookies is fallback facility. | 378 | Note, that syncookies is fallback facility. |
378 | It MUST NOT be used to help highly loaded servers to stand | 379 | It MUST NOT be used to help highly loaded servers to stand |
379 | against legal connection rate. If you see synflood warnings | 380 | against legal connection rate. If you see SYN flood warnings |
380 | in your logs, but investigation shows that they occur | 381 | in your logs, but investigation shows that they occur |
381 | because of overload with legal connections, you should tune | 382 | because of overload with legal connections, you should tune |
382 | another parameters until this warning disappear. | 383 | another parameters until this warning disappear. |
@@ -386,7 +387,7 @@ tcp_syncookies - BOOLEAN | |||
386 | to use TCP extensions, can result in serious degradation | 387 | to use TCP extensions, can result in serious degradation |
387 | of some services (f.e. SMTP relaying), visible not by you, | 388 | of some services (f.e. SMTP relaying), visible not by you, |
388 | but your clients and relays, contacting you. While you see | 389 | but your clients and relays, contacting you. While you see |
389 | synflood warnings in logs not being really flooded, your server | 390 | SYN flood warnings in logs not being really flooded, your server |
390 | is seriously misconfigured. | 391 | is seriously misconfigured. |
391 | 392 | ||
392 | tcp_syn_retries - INTEGER | 393 | tcp_syn_retries - INTEGER |
@@ -419,19 +420,21 @@ tcp_window_scaling - BOOLEAN | |||
419 | Enable window scaling as defined in RFC1323. | 420 | Enable window scaling as defined in RFC1323. |
420 | 421 | ||
421 | tcp_wmem - vector of 3 INTEGERs: min, default, max | 422 | tcp_wmem - vector of 3 INTEGERs: min, default, max |
422 | min: Amount of memory reserved for send buffers for TCP socket. | 423 | min: Amount of memory reserved for send buffers for TCP sockets. |
423 | Each TCP socket has rights to use it due to fact of its birth. | 424 | Each TCP socket has rights to use it due to fact of its birth. |
424 | Default: 4K | 425 | Default: 4K |
425 | 426 | ||
426 | default: Amount of memory allowed for send buffers for TCP socket | 427 | default: initial size of send buffer used by TCP sockets. This |
427 | by default. This value overrides net.core.wmem_default used | 428 | value overrides net.core.wmem_default used by other protocols. |
428 | by other protocols, it is usually lower than net.core.wmem_default. | 429 | It is usually lower than net.core.wmem_default. |
429 | Default: 16K | 430 | Default: 16K |
430 | 431 | ||
431 | max: Maximal amount of memory allowed for automatically selected | 432 | max: Maximal amount of memory allowed for automatically tuned |
432 | send buffers for TCP socket. This value does not override | 433 | send buffers for TCP sockets. This value does not override |
433 | net.core.wmem_max, "static" selection via SO_SNDBUF does not use this. | 434 | net.core.wmem_max. Calling setsockopt() with SO_SNDBUF disables |
434 | Default: 128K | 435 | automatic tuning of that socket's send buffer size, in which case |
436 | this value is ignored. | ||
437 | Default: between 64K and 4MB, depending on RAM size. | ||
435 | 438 | ||
436 | tcp_workaround_signed_windows - BOOLEAN | 439 | tcp_workaround_signed_windows - BOOLEAN |
437 | If set, assume no receipt of a window scaling option means the | 440 | If set, assume no receipt of a window scaling option means the |
@@ -794,10 +797,6 @@ tag - INTEGER | |||
794 | Allows you to write a number, which can be used as required. | 797 | Allows you to write a number, which can be used as required. |
795 | Default value is 0. | 798 | Default value is 0. |
796 | 799 | ||
797 | (1) Jiffie: internal timeunit for the kernel. On the i386 1/100s, on the | ||
798 | Alpha 1/1024s. See the HZ define in /usr/include/asm/param.h for the exact | ||
799 | value on your system. | ||
800 | |||
801 | Alexey Kuznetsov. | 800 | Alexey Kuznetsov. |
802 | kuznet@ms2.inr.ac.ru | 801 | kuznet@ms2.inr.ac.ru |
803 | 802 | ||
@@ -1064,24 +1063,193 @@ bridge-nf-filter-pppoe-tagged - BOOLEAN | |||
1064 | Default: 1 | 1063 | Default: 1 |
1065 | 1064 | ||
1066 | 1065 | ||
1067 | UNDOCUMENTED: | 1066 | proc/sys/net/sctp/* Variables: |
1067 | |||
1068 | addip_enable - BOOLEAN | ||
1069 | Enable or disable extension of Dynamic Address Reconfiguration | ||
1070 | (ADD-IP) functionality specified in RFC5061. This extension provides | ||
1071 | the ability to dynamically add and remove new addresses for the SCTP | ||
1072 | associations. | ||
1073 | |||
1074 | 1: Enable extension. | ||
1075 | |||
1076 | 0: Disable extension. | ||
1077 | |||
1078 | Default: 0 | ||
1079 | |||
1080 | addip_noauth_enable - BOOLEAN | ||
1081 | Dynamic Address Reconfiguration (ADD-IP) requires the use of | ||
1082 | authentication to protect the operations of adding or removing new | ||
1083 | addresses. This requirement is mandated so that unauthorized hosts | ||
1084 | would not be able to hijack associations. However, older | ||
1085 | implementations may not have implemented this requirement while | ||
1086 | allowing the ADD-IP extension. For reasons of interoperability, | ||
1087 | we provide this variable to control the enforcement of the | ||
1088 | authentication requirement. | ||
1089 | |||
1090 | 1: Allow ADD-IP extension to be used without authentication. This | ||
1091 | should only be set in a closed environment for interoperability | ||
1092 | with older implementations. | ||
1093 | |||
1094 | 0: Enforce the authentication requirement | ||
1095 | |||
1096 | Default: 0 | ||
1097 | |||
1098 | auth_enable - BOOLEAN | ||
1099 | Enable or disable Authenticated Chunks extension. This extension | ||
1100 | provides the ability to send and receive authenticated chunks and is | ||
1101 | required for secure operation of Dynamic Address Reconfiguration | ||
1102 | (ADD-IP) extension. | ||
1103 | |||
1104 | 1: Enable this extension. | ||
1105 | 0: Disable this extension. | ||
1106 | |||
1107 | Default: 0 | ||
1108 | |||
1109 | prsctp_enable - BOOLEAN | ||
1110 | Enable or disable the Partial Reliability extension (RFC3758) which | ||
1111 | is used to notify peers that a given DATA should no longer be expected. | ||
1112 | |||
1113 | 1: Enable extension | ||
1114 | 0: Disable | ||
1115 | |||
1116 | Default: 1 | ||
1117 | |||
1118 | max_burst - INTEGER | ||
1119 | The limit of the number of new packets that can be initially sent. It | ||
1120 | controls how bursty the generated traffic can be. | ||
1121 | |||
1122 | Default: 4 | ||
1123 | |||
1124 | association_max_retrans - INTEGER | ||
1125 | Set the maximum number for retransmissions that an association can | ||
1126 | attempt deciding that the remote end is unreachable. If this value | ||
1127 | is exceeded, the association is terminated. | ||
1128 | |||
1129 | Default: 10 | ||
1130 | |||
1131 | max_init_retransmits - INTEGER | ||
1132 | The maximum number of retransmissions of INIT and COOKIE-ECHO chunks | ||
1133 | that an association will attempt before declaring the destination | ||
1134 | unreachable and terminating. | ||
1135 | |||
1136 | Default: 8 | ||
1137 | |||
1138 | path_max_retrans - INTEGER | ||
1139 | The maximum number of retransmissions that will be attempted on a given | ||
1140 | path. Once this threshold is exceeded, the path is considered | ||
1141 | unreachable, and new traffic will use a different path when the | ||
1142 | association is multihomed. | ||
1143 | |||
1144 | Default: 5 | ||
1145 | |||
1146 | rto_initial - INTEGER | ||
1147 | The initial round trip timeout value in milliseconds that will be used | ||
1148 | in calculating round trip times. This is the initial time interval | ||
1149 | for retransmissions. | ||
1068 | 1150 | ||
1069 | dev_weight FIXME | 1151 | Default: 3000 |
1070 | discovery_slots FIXME | 1152 | |
1071 | discovery_timeout FIXME | 1153 | rto_max - INTEGER |
1072 | fast_poll_increase FIXME | 1154 | The maximum value (in milliseconds) of the round trip timeout. This |
1073 | ip6_queue_maxlen FIXME | 1155 | is the largest time interval that can elapse between retransmissions. |
1074 | lap_keepalive_time FIXME | 1156 | |
1075 | lo_cong FIXME | 1157 | Default: 60000 |
1076 | max_baud_rate FIXME | 1158 | |
1077 | max_dgram_qlen FIXME | 1159 | rto_min - INTEGER |
1078 | max_noreply_time FIXME | 1160 | The minimum value (in milliseconds) of the round trip timeout. This |
1079 | max_tx_data_size FIXME | 1161 | is the smallest time interval the can elapse between retransmissions. |
1080 | max_tx_window FIXME | 1162 | |
1081 | min_tx_turn_time FIXME | 1163 | Default: 1000 |
1082 | mod_cong FIXME | 1164 | |
1083 | no_cong FIXME | 1165 | hb_interval - INTEGER |
1084 | no_cong_thresh FIXME | 1166 | The interval (in milliseconds) between HEARTBEAT chunks. These chunks |
1085 | slot_timeout FIXME | 1167 | are sent at the specified interval on idle paths to probe the state of |
1086 | warn_noreply_time FIXME | 1168 | a given path between 2 associations. |
1169 | |||
1170 | Default: 30000 | ||
1171 | |||
1172 | sack_timeout - INTEGER | ||
1173 | The amount of time (in milliseconds) that the implementation will wait | ||
1174 | to send a SACK. | ||
1175 | |||
1176 | Default: 200 | ||
1177 | |||
1178 | valid_cookie_life - INTEGER | ||
1179 | The default lifetime of the SCTP cookie (in milliseconds). The cookie | ||
1180 | is used during association establishment. | ||
1181 | |||
1182 | Default: 60000 | ||
1183 | |||
1184 | cookie_preserve_enable - BOOLEAN | ||
1185 | Enable or disable the ability to extend the lifetime of the SCTP cookie | ||
1186 | that is used during the establishment phase of SCTP association | ||
1187 | |||
1188 | 1: Enable cookie lifetime extension. | ||
1189 | 0: Disable | ||
1190 | |||
1191 | Default: 1 | ||
1192 | |||
1193 | rcvbuf_policy - INTEGER | ||
1194 | Determines if the receive buffer is attributed to the socket or to | ||
1195 | association. SCTP supports the capability to create multiple | ||
1196 | associations on a single socket. When using this capability, it is | ||
1197 | possible that a single stalled association that's buffering a lot | ||
1198 | of data may block other associations from delivering their data by | ||
1199 | consuming all of the receive buffer space. To work around this, | ||
1200 | the rcvbuf_policy could be set to attribute the receiver buffer space | ||
1201 | to each association instead of the socket. This prevents the described | ||
1202 | blocking. | ||
1203 | |||
1204 | 1: rcvbuf space is per association | ||
1205 | 0: recbuf space is per socket | ||
1206 | |||
1207 | Default: 0 | ||
1208 | |||
1209 | sndbuf_policy - INTEGER | ||
1210 | Similar to rcvbuf_policy above, this applies to send buffer space. | ||
1211 | |||
1212 | 1: Send buffer is tracked per association | ||
1213 | 0: Send buffer is tracked per socket. | ||
1214 | |||
1215 | Default: 0 | ||
1216 | |||
1217 | sctp_mem - vector of 3 INTEGERs: min, pressure, max | ||
1218 | Number of pages allowed for queueing by all SCTP sockets. | ||
1219 | |||
1220 | min: Below this number of pages SCTP is not bothered about its | ||
1221 | memory appetite. When amount of memory allocated by SCTP exceeds | ||
1222 | this number, SCTP starts to moderate memory usage. | ||
1223 | |||
1224 | pressure: This value was introduced to follow format of tcp_mem. | ||
1225 | |||
1226 | max: Number of pages allowed for queueing by all SCTP sockets. | ||
1227 | |||
1228 | Default is calculated at boot time from amount of available memory. | ||
1229 | |||
1230 | sctp_rmem - vector of 3 INTEGERs: min, default, max | ||
1231 | See tcp_rmem for a description. | ||
1232 | |||
1233 | sctp_wmem - vector of 3 INTEGERs: min, default, max | ||
1234 | See tcp_wmem for a description. | ||
1235 | |||
1236 | UNDOCUMENTED: | ||
1087 | 1237 | ||
1238 | /proc/sys/net/core/* | ||
1239 | dev_weight FIXME | ||
1240 | |||
1241 | /proc/sys/net/unix/* | ||
1242 | max_dgram_qlen FIXME | ||
1243 | |||
1244 | /proc/sys/net/irda/* | ||
1245 | fast_poll_increase FIXME | ||
1246 | warn_noreply_time FIXME | ||
1247 | discovery_slots FIXME | ||
1248 | slot_timeout FIXME | ||
1249 | max_baud_rate FIXME | ||
1250 | discovery_timeout FIXME | ||
1251 | lap_keepalive_time FIXME | ||
1252 | max_noreply_time FIXME | ||
1253 | max_tx_data_size FIXME | ||
1254 | max_tx_window FIXME | ||
1255 | min_tx_turn_time FIXME | ||
diff --git a/Documentation/networking/s2io.txt b/Documentation/networking/s2io.txt index 4bde53e85f3f..1e28e2ddb90a 100644 --- a/Documentation/networking/s2io.txt +++ b/Documentation/networking/s2io.txt | |||
@@ -83,9 +83,9 @@ Valid range: Limited by memory on system | |||
83 | Default: 30 | 83 | Default: 30 |
84 | 84 | ||
85 | e. intr_type | 85 | e. intr_type |
86 | Specifies interrupt type. Possible values 1(INTA), 2(MSI), 3(MSI-X) | 86 | Specifies interrupt type. Possible values 0(INTA), 2(MSI-X) |
87 | Valid range: 1-3 | 87 | Valid values: 0, 2 |
88 | Default: 1 | 88 | Default: 2 |
89 | 89 | ||
90 | 5. Performance suggestions | 90 | 5. Performance suggestions |
91 | General: | 91 | General: |
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index b68684d39f96..de2e5c05d6e7 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -41,27 +41,12 @@ Table of Contents | |||
41 | VI - System-on-a-chip devices and nodes | 41 | VI - System-on-a-chip devices and nodes |
42 | 1) Defining child nodes of an SOC | 42 | 1) Defining child nodes of an SOC |
43 | 2) Representing devices without a current OF specification | 43 | 2) Representing devices without a current OF specification |
44 | a) MDIO IO device | 44 | a) PHY nodes |
45 | b) Gianfar-compatible ethernet nodes | 45 | b) Interrupt controllers |
46 | c) PHY nodes | 46 | c) CFI or JEDEC memory-mapped NOR flash |
47 | d) Interrupt controllers | 47 | d) 4xx/Axon EMAC ethernet nodes |
48 | e) I2C | 48 | e) Xilinx IP cores |
49 | f) Freescale SOC USB controllers | 49 | f) USB EHCI controllers |
50 | g) Freescale SOC SEC Security Engines | ||
51 | h) Board Control and Status (BCSR) | ||
52 | i) Freescale QUICC Engine module (QE) | ||
53 | j) CFI or JEDEC memory-mapped NOR flash | ||
54 | k) Global Utilities Block | ||
55 | l) Freescale Communications Processor Module | ||
56 | m) Chipselect/Local Bus | ||
57 | n) 4xx/Axon EMAC ethernet nodes | ||
58 | o) Xilinx IP cores | ||
59 | p) Freescale Synchronous Serial Interface | ||
60 | q) USB EHCI controllers | ||
61 | r) Freescale Display Interface Unit | ||
62 | s) Freescale on board FPGA | ||
63 | t) Freescael MSI interrupt controller | ||
64 | u) Freescale General-purpose Timers Module | ||
65 | 50 | ||
66 | VII - Marvell Discovery mv64[345]6x System Controller chips | 51 | VII - Marvell Discovery mv64[345]6x System Controller chips |
67 | 1) The /system-controller node | 52 | 1) The /system-controller node |
@@ -1250,80 +1235,7 @@ descriptions for the SOC devices for which new nodes have been | |||
1250 | defined; this list will expand as more and more SOC-containing | 1235 | defined; this list will expand as more and more SOC-containing |
1251 | platforms are moved over to use the flattened-device-tree model. | 1236 | platforms are moved over to use the flattened-device-tree model. |
1252 | 1237 | ||
1253 | a) MDIO IO device | 1238 | a) PHY nodes |
1254 | |||
1255 | The MDIO is a bus to which the PHY devices are connected. For each | ||
1256 | device that exists on this bus, a child node should be created. See | ||
1257 | the definition of the PHY node below for an example of how to define | ||
1258 | a PHY. | ||
1259 | |||
1260 | Required properties: | ||
1261 | - reg : Offset and length of the register set for the device | ||
1262 | - compatible : Should define the compatible device type for the | ||
1263 | mdio. Currently, this is most likely to be "fsl,gianfar-mdio" | ||
1264 | |||
1265 | Example: | ||
1266 | |||
1267 | mdio@24520 { | ||
1268 | reg = <24520 20>; | ||
1269 | compatible = "fsl,gianfar-mdio"; | ||
1270 | |||
1271 | ethernet-phy@0 { | ||
1272 | ...... | ||
1273 | }; | ||
1274 | }; | ||
1275 | |||
1276 | |||
1277 | b) Gianfar-compatible ethernet nodes | ||
1278 | |||
1279 | Required properties: | ||
1280 | |||
1281 | - device_type : Should be "network" | ||
1282 | - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC" | ||
1283 | - compatible : Should be "gianfar" | ||
1284 | - reg : Offset and length of the register set for the device | ||
1285 | - mac-address : List of bytes representing the ethernet address of | ||
1286 | this controller | ||
1287 | - interrupts : <a b> where a is the interrupt number and b is a | ||
1288 | field that represents an encoding of the sense and level | ||
1289 | information for the interrupt. This should be encoded based on | ||
1290 | the information in section 2) depending on the type of interrupt | ||
1291 | controller you have. | ||
1292 | - interrupt-parent : the phandle for the interrupt controller that | ||
1293 | services interrupts for this device. | ||
1294 | - phy-handle : The phandle for the PHY connected to this ethernet | ||
1295 | controller. | ||
1296 | - fixed-link : <a b c d e> where a is emulated phy id - choose any, | ||
1297 | but unique to the all specified fixed-links, b is duplex - 0 half, | ||
1298 | 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no | ||
1299 | pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause. | ||
1300 | |||
1301 | Recommended properties: | ||
1302 | |||
1303 | - phy-connection-type : a string naming the controller/PHY interface type, | ||
1304 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii", | ||
1305 | "tbi", or "rtbi". This property is only really needed if the connection | ||
1306 | is of type "rgmii-id", as all other connection types are detected by | ||
1307 | hardware. | ||
1308 | |||
1309 | |||
1310 | Example: | ||
1311 | |||
1312 | ethernet@24000 { | ||
1313 | #size-cells = <0>; | ||
1314 | device_type = "network"; | ||
1315 | model = "TSEC"; | ||
1316 | compatible = "gianfar"; | ||
1317 | reg = <24000 1000>; | ||
1318 | mac-address = [ 00 E0 0C 00 73 00 ]; | ||
1319 | interrupts = <d 3 e 3 12 3>; | ||
1320 | interrupt-parent = <40000>; | ||
1321 | phy-handle = <2452000> | ||
1322 | }; | ||
1323 | |||
1324 | |||
1325 | |||
1326 | c) PHY nodes | ||
1327 | 1239 | ||
1328 | Required properties: | 1240 | Required properties: |
1329 | 1241 | ||
@@ -1351,7 +1263,7 @@ platforms are moved over to use the flattened-device-tree model. | |||
1351 | }; | 1263 | }; |
1352 | 1264 | ||
1353 | 1265 | ||
1354 | d) Interrupt controllers | 1266 | b) Interrupt controllers |
1355 | 1267 | ||
1356 | Some SOC devices contain interrupt controllers that are different | 1268 | Some SOC devices contain interrupt controllers that are different |
1357 | from the standard Open PIC specification. The SOC device nodes for | 1269 | from the standard Open PIC specification. The SOC device nodes for |
@@ -1371,508 +1283,7 @@ platforms are moved over to use the flattened-device-tree model. | |||
1371 | device_type = "open-pic"; | 1283 | device_type = "open-pic"; |
1372 | }; | 1284 | }; |
1373 | 1285 | ||
1374 | 1286 | c) CFI or JEDEC memory-mapped NOR flash | |
1375 | e) I2C | ||
1376 | |||
1377 | Required properties : | ||
1378 | |||
1379 | - device_type : Should be "i2c" | ||
1380 | - reg : Offset and length of the register set for the device | ||
1381 | |||
1382 | Recommended properties : | ||
1383 | |||
1384 | - compatible : Should be "fsl-i2c" for parts compatible with | ||
1385 | Freescale I2C specifications. | ||
1386 | - interrupts : <a b> where a is the interrupt number and b is a | ||
1387 | field that represents an encoding of the sense and level | ||
1388 | information for the interrupt. This should be encoded based on | ||
1389 | the information in section 2) depending on the type of interrupt | ||
1390 | controller you have. | ||
1391 | - interrupt-parent : the phandle for the interrupt controller that | ||
1392 | services interrupts for this device. | ||
1393 | - dfsrr : boolean; if defined, indicates that this I2C device has | ||
1394 | a digital filter sampling rate register | ||
1395 | - fsl5200-clocking : boolean; if defined, indicated that this device | ||
1396 | uses the FSL 5200 clocking mechanism. | ||
1397 | |||
1398 | Example : | ||
1399 | |||
1400 | i2c@3000 { | ||
1401 | interrupt-parent = <40000>; | ||
1402 | interrupts = <1b 3>; | ||
1403 | reg = <3000 18>; | ||
1404 | device_type = "i2c"; | ||
1405 | compatible = "fsl-i2c"; | ||
1406 | dfsrr; | ||
1407 | }; | ||
1408 | |||
1409 | |||
1410 | f) Freescale SOC USB controllers | ||
1411 | |||
1412 | The device node for a USB controller that is part of a Freescale | ||
1413 | SOC is as described in the document "Open Firmware Recommended | ||
1414 | Practice : Universal Serial Bus" with the following modifications | ||
1415 | and additions : | ||
1416 | |||
1417 | Required properties : | ||
1418 | - compatible : Should be "fsl-usb2-mph" for multi port host USB | ||
1419 | controllers, or "fsl-usb2-dr" for dual role USB controllers | ||
1420 | - phy_type : For multi port host USB controllers, should be one of | ||
1421 | "ulpi", or "serial". For dual role USB controllers, should be | ||
1422 | one of "ulpi", "utmi", "utmi_wide", or "serial". | ||
1423 | - reg : Offset and length of the register set for the device | ||
1424 | - port0 : boolean; if defined, indicates port0 is connected for | ||
1425 | fsl-usb2-mph compatible controllers. Either this property or | ||
1426 | "port1" (or both) must be defined for "fsl-usb2-mph" compatible | ||
1427 | controllers. | ||
1428 | - port1 : boolean; if defined, indicates port1 is connected for | ||
1429 | fsl-usb2-mph compatible controllers. Either this property or | ||
1430 | "port0" (or both) must be defined for "fsl-usb2-mph" compatible | ||
1431 | controllers. | ||
1432 | - dr_mode : indicates the working mode for "fsl-usb2-dr" compatible | ||
1433 | controllers. Can be "host", "peripheral", or "otg". Default to | ||
1434 | "host" if not defined for backward compatibility. | ||
1435 | |||
1436 | Recommended properties : | ||
1437 | - interrupts : <a b> where a is the interrupt number and b is a | ||
1438 | field that represents an encoding of the sense and level | ||
1439 | information for the interrupt. This should be encoded based on | ||
1440 | the information in section 2) depending on the type of interrupt | ||
1441 | controller you have. | ||
1442 | - interrupt-parent : the phandle for the interrupt controller that | ||
1443 | services interrupts for this device. | ||
1444 | |||
1445 | Example multi port host USB controller device node : | ||
1446 | usb@22000 { | ||
1447 | compatible = "fsl-usb2-mph"; | ||
1448 | reg = <22000 1000>; | ||
1449 | #address-cells = <1>; | ||
1450 | #size-cells = <0>; | ||
1451 | interrupt-parent = <700>; | ||
1452 | interrupts = <27 1>; | ||
1453 | phy_type = "ulpi"; | ||
1454 | port0; | ||
1455 | port1; | ||
1456 | }; | ||
1457 | |||
1458 | Example dual role USB controller device node : | ||
1459 | usb@23000 { | ||
1460 | compatible = "fsl-usb2-dr"; | ||
1461 | reg = <23000 1000>; | ||
1462 | #address-cells = <1>; | ||
1463 | #size-cells = <0>; | ||
1464 | interrupt-parent = <700>; | ||
1465 | interrupts = <26 1>; | ||
1466 | dr_mode = "otg"; | ||
1467 | phy = "ulpi"; | ||
1468 | }; | ||
1469 | |||
1470 | |||
1471 | g) Freescale SOC SEC Security Engines | ||
1472 | |||
1473 | Required properties: | ||
1474 | |||
1475 | - device_type : Should be "crypto" | ||
1476 | - model : Model of the device. Should be "SEC1" or "SEC2" | ||
1477 | - compatible : Should be "talitos" | ||
1478 | - reg : Offset and length of the register set for the device | ||
1479 | - interrupts : <a b> where a is the interrupt number and b is a | ||
1480 | field that represents an encoding of the sense and level | ||
1481 | information for the interrupt. This should be encoded based on | ||
1482 | the information in section 2) depending on the type of interrupt | ||
1483 | controller you have. | ||
1484 | - interrupt-parent : the phandle for the interrupt controller that | ||
1485 | services interrupts for this device. | ||
1486 | - num-channels : An integer representing the number of channels | ||
1487 | available. | ||
1488 | - channel-fifo-len : An integer representing the number of | ||
1489 | descriptor pointers each channel fetch fifo can hold. | ||
1490 | - exec-units-mask : The bitmask representing what execution units | ||
1491 | (EUs) are available. It's a single 32-bit cell. EU information | ||
1492 | should be encoded following the SEC's Descriptor Header Dword | ||
1493 | EU_SEL0 field documentation, i.e. as follows: | ||
1494 | |||
1495 | bit 0 = reserved - should be 0 | ||
1496 | bit 1 = set if SEC has the ARC4 EU (AFEU) | ||
1497 | bit 2 = set if SEC has the DES/3DES EU (DEU) | ||
1498 | bit 3 = set if SEC has the message digest EU (MDEU) | ||
1499 | bit 4 = set if SEC has the random number generator EU (RNG) | ||
1500 | bit 5 = set if SEC has the public key EU (PKEU) | ||
1501 | bit 6 = set if SEC has the AES EU (AESU) | ||
1502 | bit 7 = set if SEC has the Kasumi EU (KEU) | ||
1503 | |||
1504 | bits 8 through 31 are reserved for future SEC EUs. | ||
1505 | |||
1506 | - descriptor-types-mask : The bitmask representing what descriptors | ||
1507 | are available. It's a single 32-bit cell. Descriptor type | ||
1508 | information should be encoded following the SEC's Descriptor | ||
1509 | Header Dword DESC_TYPE field documentation, i.e. as follows: | ||
1510 | |||
1511 | bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type | ||
1512 | bit 1 = set if SEC supports the ipsec_esp descriptor type | ||
1513 | bit 2 = set if SEC supports the common_nonsnoop desc. type | ||
1514 | bit 3 = set if SEC supports the 802.11i AES ccmp desc. type | ||
1515 | bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type | ||
1516 | bit 5 = set if SEC supports the srtp descriptor type | ||
1517 | bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type | ||
1518 | bit 7 = set if SEC supports the pkeu_assemble descriptor type | ||
1519 | bit 8 = set if SEC supports the aesu_key_expand_output desc.type | ||
1520 | bit 9 = set if SEC supports the pkeu_ptmul descriptor type | ||
1521 | bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type | ||
1522 | bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type | ||
1523 | |||
1524 | ..and so on and so forth. | ||
1525 | |||
1526 | Example: | ||
1527 | |||
1528 | /* MPC8548E */ | ||
1529 | crypto@30000 { | ||
1530 | device_type = "crypto"; | ||
1531 | model = "SEC2"; | ||
1532 | compatible = "talitos"; | ||
1533 | reg = <30000 10000>; | ||
1534 | interrupts = <1d 3>; | ||
1535 | interrupt-parent = <40000>; | ||
1536 | num-channels = <4>; | ||
1537 | channel-fifo-len = <18>; | ||
1538 | exec-units-mask = <000000fe>; | ||
1539 | descriptor-types-mask = <012b0ebf>; | ||
1540 | }; | ||
1541 | |||
1542 | h) Board Control and Status (BCSR) | ||
1543 | |||
1544 | Required properties: | ||
1545 | |||
1546 | - device_type : Should be "board-control" | ||
1547 | - reg : Offset and length of the register set for the device | ||
1548 | |||
1549 | Example: | ||
1550 | |||
1551 | bcsr@f8000000 { | ||
1552 | device_type = "board-control"; | ||
1553 | reg = <f8000000 8000>; | ||
1554 | }; | ||
1555 | |||
1556 | i) Freescale QUICC Engine module (QE) | ||
1557 | This represents qe module that is installed on PowerQUICC II Pro. | ||
1558 | |||
1559 | NOTE: This is an interim binding; it should be updated to fit | ||
1560 | in with the CPM binding later in this document. | ||
1561 | |||
1562 | Basically, it is a bus of devices, that could act more or less | ||
1563 | as a complete entity (UCC, USB etc ). All of them should be siblings on | ||
1564 | the "root" qe node, using the common properties from there. | ||
1565 | The description below applies to the qe of MPC8360 and | ||
1566 | more nodes and properties would be extended in the future. | ||
1567 | |||
1568 | i) Root QE device | ||
1569 | |||
1570 | Required properties: | ||
1571 | - compatible : should be "fsl,qe"; | ||
1572 | - model : precise model of the QE, Can be "QE", "CPM", or "CPM2" | ||
1573 | - reg : offset and length of the device registers. | ||
1574 | - bus-frequency : the clock frequency for QUICC Engine. | ||
1575 | |||
1576 | Recommended properties | ||
1577 | - brg-frequency : the internal clock source frequency for baud-rate | ||
1578 | generators in Hz. | ||
1579 | |||
1580 | Example: | ||
1581 | qe@e0100000 { | ||
1582 | #address-cells = <1>; | ||
1583 | #size-cells = <1>; | ||
1584 | #interrupt-cells = <2>; | ||
1585 | compatible = "fsl,qe"; | ||
1586 | ranges = <0 e0100000 00100000>; | ||
1587 | reg = <e0100000 480>; | ||
1588 | brg-frequency = <0>; | ||
1589 | bus-frequency = <179A7B00>; | ||
1590 | } | ||
1591 | |||
1592 | |||
1593 | ii) SPI (Serial Peripheral Interface) | ||
1594 | |||
1595 | Required properties: | ||
1596 | - cell-index : SPI controller index. | ||
1597 | - compatible : should be "fsl,spi". | ||
1598 | - mode : the SPI operation mode, it can be "cpu" or "cpu-qe". | ||
1599 | - reg : Offset and length of the register set for the device | ||
1600 | - interrupts : <a b> where a is the interrupt number and b is a | ||
1601 | field that represents an encoding of the sense and level | ||
1602 | information for the interrupt. This should be encoded based on | ||
1603 | the information in section 2) depending on the type of interrupt | ||
1604 | controller you have. | ||
1605 | - interrupt-parent : the phandle for the interrupt controller that | ||
1606 | services interrupts for this device. | ||
1607 | |||
1608 | Example: | ||
1609 | spi@4c0 { | ||
1610 | cell-index = <0>; | ||
1611 | compatible = "fsl,spi"; | ||
1612 | reg = <4c0 40>; | ||
1613 | interrupts = <82 0>; | ||
1614 | interrupt-parent = <700>; | ||
1615 | mode = "cpu"; | ||
1616 | }; | ||
1617 | |||
1618 | |||
1619 | iii) USB (Universal Serial Bus Controller) | ||
1620 | |||
1621 | Required properties: | ||
1622 | - compatible : could be "qe_udc" or "fhci-hcd". | ||
1623 | - mode : the could be "host" or "slave". | ||
1624 | - reg : Offset and length of the register set for the device | ||
1625 | - interrupts : <a b> where a is the interrupt number and b is a | ||
1626 | field that represents an encoding of the sense and level | ||
1627 | information for the interrupt. This should be encoded based on | ||
1628 | the information in section 2) depending on the type of interrupt | ||
1629 | controller you have. | ||
1630 | - interrupt-parent : the phandle for the interrupt controller that | ||
1631 | services interrupts for this device. | ||
1632 | |||
1633 | Example(slave): | ||
1634 | usb@6c0 { | ||
1635 | compatible = "qe_udc"; | ||
1636 | reg = <6c0 40>; | ||
1637 | interrupts = <8b 0>; | ||
1638 | interrupt-parent = <700>; | ||
1639 | mode = "slave"; | ||
1640 | }; | ||
1641 | |||
1642 | |||
1643 | iv) UCC (Unified Communications Controllers) | ||
1644 | |||
1645 | Required properties: | ||
1646 | - device_type : should be "network", "hldc", "uart", "transparent" | ||
1647 | "bisync", "atm", or "serial". | ||
1648 | - compatible : could be "ucc_geth" or "fsl_atm" and so on. | ||
1649 | - cell-index : the ucc number(1-8), corresponding to UCCx in UM. | ||
1650 | - reg : Offset and length of the register set for the device | ||
1651 | - interrupts : <a b> where a is the interrupt number and b is a | ||
1652 | field that represents an encoding of the sense and level | ||
1653 | information for the interrupt. This should be encoded based on | ||
1654 | the information in section 2) depending on the type of interrupt | ||
1655 | controller you have. | ||
1656 | - interrupt-parent : the phandle for the interrupt controller that | ||
1657 | services interrupts for this device. | ||
1658 | - pio-handle : The phandle for the Parallel I/O port configuration. | ||
1659 | - port-number : for UART drivers, the port number to use, between 0 and 3. | ||
1660 | This usually corresponds to the /dev/ttyQE device, e.g. <0> = /dev/ttyQE0. | ||
1661 | The port number is added to the minor number of the device. Unlike the | ||
1662 | CPM UART driver, the port-number is required for the QE UART driver. | ||
1663 | - soft-uart : for UART drivers, if specified this means the QE UART device | ||
1664 | driver should use "Soft-UART" mode, which is needed on some SOCs that have | ||
1665 | broken UART hardware. Soft-UART is provided via a microcode upload. | ||
1666 | - rx-clock-name: the UCC receive clock source | ||
1667 | "none": clock source is disabled | ||
1668 | "brg1" through "brg16": clock source is BRG1-BRG16, respectively | ||
1669 | "clk1" through "clk24": clock source is CLK1-CLK24, respectively | ||
1670 | - tx-clock-name: the UCC transmit clock source | ||
1671 | "none": clock source is disabled | ||
1672 | "brg1" through "brg16": clock source is BRG1-BRG16, respectively | ||
1673 | "clk1" through "clk24": clock source is CLK1-CLK24, respectively | ||
1674 | The following two properties are deprecated. rx-clock has been replaced | ||
1675 | with rx-clock-name, and tx-clock has been replaced with tx-clock-name. | ||
1676 | Drivers that currently use the deprecated properties should continue to | ||
1677 | do so, in order to support older device trees, but they should be updated | ||
1678 | to check for the new properties first. | ||
1679 | - rx-clock : represents the UCC receive clock source. | ||
1680 | 0x00 : clock source is disabled; | ||
1681 | 0x1~0x10 : clock source is BRG1~BRG16 respectively; | ||
1682 | 0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively. | ||
1683 | - tx-clock: represents the UCC transmit clock source; | ||
1684 | 0x00 : clock source is disabled; | ||
1685 | 0x1~0x10 : clock source is BRG1~BRG16 respectively; | ||
1686 | 0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively. | ||
1687 | |||
1688 | Required properties for network device_type: | ||
1689 | - mac-address : list of bytes representing the ethernet address. | ||
1690 | - phy-handle : The phandle for the PHY connected to this controller. | ||
1691 | |||
1692 | Recommended properties: | ||
1693 | - phy-connection-type : a string naming the controller/PHY interface type, | ||
1694 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal | ||
1695 | Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), | ||
1696 | "tbi", or "rtbi". | ||
1697 | |||
1698 | Example: | ||
1699 | ucc@2000 { | ||
1700 | device_type = "network"; | ||
1701 | compatible = "ucc_geth"; | ||
1702 | cell-index = <1>; | ||
1703 | reg = <2000 200>; | ||
1704 | interrupts = <a0 0>; | ||
1705 | interrupt-parent = <700>; | ||
1706 | mac-address = [ 00 04 9f 00 23 23 ]; | ||
1707 | rx-clock = "none"; | ||
1708 | tx-clock = "clk9"; | ||
1709 | phy-handle = <212000>; | ||
1710 | phy-connection-type = "gmii"; | ||
1711 | pio-handle = <140001>; | ||
1712 | }; | ||
1713 | |||
1714 | |||
1715 | v) Parallel I/O Ports | ||
1716 | |||
1717 | This node configures Parallel I/O ports for CPUs with QE support. | ||
1718 | The node should reside in the "soc" node of the tree. For each | ||
1719 | device that using parallel I/O ports, a child node should be created. | ||
1720 | See the definition of the Pin configuration nodes below for more | ||
1721 | information. | ||
1722 | |||
1723 | Required properties: | ||
1724 | - device_type : should be "par_io". | ||
1725 | - reg : offset to the register set and its length. | ||
1726 | - num-ports : number of Parallel I/O ports | ||
1727 | |||
1728 | Example: | ||
1729 | par_io@1400 { | ||
1730 | reg = <1400 100>; | ||
1731 | #address-cells = <1>; | ||
1732 | #size-cells = <0>; | ||
1733 | device_type = "par_io"; | ||
1734 | num-ports = <7>; | ||
1735 | ucc_pin@01 { | ||
1736 | ...... | ||
1737 | }; | ||
1738 | |||
1739 | Note that "par_io" nodes are obsolete, and should not be used for | ||
1740 | the new device trees. Instead, each Par I/O bank should be represented | ||
1741 | via its own gpio-controller node: | ||
1742 | |||
1743 | Required properties: | ||
1744 | - #gpio-cells : should be "2". | ||
1745 | - compatible : should be "fsl,<chip>-qe-pario-bank", | ||
1746 | "fsl,mpc8323-qe-pario-bank". | ||
1747 | - reg : offset to the register set and its length. | ||
1748 | - gpio-controller : node to identify gpio controllers. | ||
1749 | |||
1750 | Example: | ||
1751 | qe_pio_a: gpio-controller@1400 { | ||
1752 | #gpio-cells = <2>; | ||
1753 | compatible = "fsl,mpc8360-qe-pario-bank", | ||
1754 | "fsl,mpc8323-qe-pario-bank"; | ||
1755 | reg = <0x1400 0x18>; | ||
1756 | gpio-controller; | ||
1757 | }; | ||
1758 | |||
1759 | qe_pio_e: gpio-controller@1460 { | ||
1760 | #gpio-cells = <2>; | ||
1761 | compatible = "fsl,mpc8360-qe-pario-bank", | ||
1762 | "fsl,mpc8323-qe-pario-bank"; | ||
1763 | reg = <0x1460 0x18>; | ||
1764 | gpio-controller; | ||
1765 | }; | ||
1766 | |||
1767 | vi) Pin configuration nodes | ||
1768 | |||
1769 | Required properties: | ||
1770 | - linux,phandle : phandle of this node; likely referenced by a QE | ||
1771 | device. | ||
1772 | - pio-map : array of pin configurations. Each pin is defined by 6 | ||
1773 | integers. The six numbers are respectively: port, pin, dir, | ||
1774 | open_drain, assignment, has_irq. | ||
1775 | - port : port number of the pin; 0-6 represent port A-G in UM. | ||
1776 | - pin : pin number in the port. | ||
1777 | - dir : direction of the pin, should encode as follows: | ||
1778 | |||
1779 | 0 = The pin is disabled | ||
1780 | 1 = The pin is an output | ||
1781 | 2 = The pin is an input | ||
1782 | 3 = The pin is I/O | ||
1783 | |||
1784 | - open_drain : indicates the pin is normal or wired-OR: | ||
1785 | |||
1786 | 0 = The pin is actively driven as an output | ||
1787 | 1 = The pin is an open-drain driver. As an output, the pin is | ||
1788 | driven active-low, otherwise it is three-stated. | ||
1789 | |||
1790 | - assignment : function number of the pin according to the Pin Assignment | ||
1791 | tables in User Manual. Each pin can have up to 4 possible functions in | ||
1792 | QE and two options for CPM. | ||
1793 | - has_irq : indicates if the pin is used as source of external | ||
1794 | interrupts. | ||
1795 | |||
1796 | Example: | ||
1797 | ucc_pin@01 { | ||
1798 | linux,phandle = <140001>; | ||
1799 | pio-map = < | ||
1800 | /* port pin dir open_drain assignment has_irq */ | ||
1801 | 0 3 1 0 1 0 /* TxD0 */ | ||
1802 | 0 4 1 0 1 0 /* TxD1 */ | ||
1803 | 0 5 1 0 1 0 /* TxD2 */ | ||
1804 | 0 6 1 0 1 0 /* TxD3 */ | ||
1805 | 1 6 1 0 3 0 /* TxD4 */ | ||
1806 | 1 7 1 0 1 0 /* TxD5 */ | ||
1807 | 1 9 1 0 2 0 /* TxD6 */ | ||
1808 | 1 a 1 0 2 0 /* TxD7 */ | ||
1809 | 0 9 2 0 1 0 /* RxD0 */ | ||
1810 | 0 a 2 0 1 0 /* RxD1 */ | ||
1811 | 0 b 2 0 1 0 /* RxD2 */ | ||
1812 | 0 c 2 0 1 0 /* RxD3 */ | ||
1813 | 0 d 2 0 1 0 /* RxD4 */ | ||
1814 | 1 1 2 0 2 0 /* RxD5 */ | ||
1815 | 1 0 2 0 2 0 /* RxD6 */ | ||
1816 | 1 4 2 0 2 0 /* RxD7 */ | ||
1817 | 0 7 1 0 1 0 /* TX_EN */ | ||
1818 | 0 8 1 0 1 0 /* TX_ER */ | ||
1819 | 0 f 2 0 1 0 /* RX_DV */ | ||
1820 | 0 10 2 0 1 0 /* RX_ER */ | ||
1821 | 0 0 2 0 1 0 /* RX_CLK */ | ||
1822 | 2 9 1 0 3 0 /* GTX_CLK - CLK10 */ | ||
1823 | 2 8 2 0 1 0>; /* GTX125 - CLK9 */ | ||
1824 | }; | ||
1825 | |||
1826 | vii) Multi-User RAM (MURAM) | ||
1827 | |||
1828 | Required properties: | ||
1829 | - compatible : should be "fsl,qe-muram", "fsl,cpm-muram". | ||
1830 | - mode : the could be "host" or "slave". | ||
1831 | - ranges : Should be defined as specified in 1) to describe the | ||
1832 | translation of MURAM addresses. | ||
1833 | - data-only : sub-node which defines the address area under MURAM | ||
1834 | bus that can be allocated as data/parameter | ||
1835 | |||
1836 | Example: | ||
1837 | |||
1838 | muram@10000 { | ||
1839 | compatible = "fsl,qe-muram", "fsl,cpm-muram"; | ||
1840 | ranges = <0 00010000 0000c000>; | ||
1841 | |||
1842 | data-only@0{ | ||
1843 | compatible = "fsl,qe-muram-data", | ||
1844 | "fsl,cpm-muram-data"; | ||
1845 | reg = <0 c000>; | ||
1846 | }; | ||
1847 | }; | ||
1848 | |||
1849 | viii) Uploaded QE firmware | ||
1850 | |||
1851 | If a new firwmare has been uploaded to the QE (usually by the | ||
1852 | boot loader), then a 'firmware' child node should be added to the QE | ||
1853 | node. This node provides information on the uploaded firmware that | ||
1854 | device drivers may need. | ||
1855 | |||
1856 | Required properties: | ||
1857 | - id: The string name of the firmware. This is taken from the 'id' | ||
1858 | member of the qe_firmware structure of the uploaded firmware. | ||
1859 | Device drivers can search this string to determine if the | ||
1860 | firmware they want is already present. | ||
1861 | - extended-modes: The Extended Modes bitfield, taken from the | ||
1862 | firmware binary. It is a 64-bit number represented | ||
1863 | as an array of two 32-bit numbers. | ||
1864 | - virtual-traps: The virtual traps, taken from the firmware binary. | ||
1865 | It is an array of 8 32-bit numbers. | ||
1866 | |||
1867 | Example: | ||
1868 | |||
1869 | firmware { | ||
1870 | id = "Soft-UART"; | ||
1871 | extended-modes = <0 0>; | ||
1872 | virtual-traps = <0 0 0 0 0 0 0 0>; | ||
1873 | } | ||
1874 | |||
1875 | j) CFI or JEDEC memory-mapped NOR flash | ||
1876 | 1287 | ||
1877 | Flash chips (Memory Technology Devices) are often used for solid state | 1288 | Flash chips (Memory Technology Devices) are often used for solid state |
1878 | file systems on embedded devices. | 1289 | file systems on embedded devices. |
@@ -1936,268 +1347,7 @@ platforms are moved over to use the flattened-device-tree model. | |||
1936 | }; | 1347 | }; |
1937 | }; | 1348 | }; |
1938 | 1349 | ||
1939 | k) Global Utilities Block | 1350 | d) 4xx/Axon EMAC ethernet nodes |
1940 | |||
1941 | The global utilities block controls power management, I/O device | ||
1942 | enabling, power-on-reset configuration monitoring, general-purpose | ||
1943 | I/O signal configuration, alternate function selection for multiplexed | ||
1944 | signals, and clock control. | ||
1945 | |||
1946 | Required properties: | ||
1947 | |||
1948 | - compatible : Should define the compatible device type for | ||
1949 | global-utilities. | ||
1950 | - reg : Offset and length of the register set for the device. | ||
1951 | |||
1952 | Recommended properties: | ||
1953 | |||
1954 | - fsl,has-rstcr : Indicates that the global utilities register set | ||
1955 | contains a functioning "reset control register" (i.e. the board | ||
1956 | is wired to reset upon setting the HRESET_REQ bit in this register). | ||
1957 | |||
1958 | Example: | ||
1959 | |||
1960 | global-utilities@e0000 { /* global utilities block */ | ||
1961 | compatible = "fsl,mpc8548-guts"; | ||
1962 | reg = <e0000 1000>; | ||
1963 | fsl,has-rstcr; | ||
1964 | }; | ||
1965 | |||
1966 | l) Freescale Communications Processor Module | ||
1967 | |||
1968 | NOTE: This is an interim binding, and will likely change slightly, | ||
1969 | as more devices are supported. The QE bindings especially are | ||
1970 | incomplete. | ||
1971 | |||
1972 | i) Root CPM node | ||
1973 | |||
1974 | Properties: | ||
1975 | - compatible : "fsl,cpm1", "fsl,cpm2", or "fsl,qe". | ||
1976 | - reg : A 48-byte region beginning with CPCR. | ||
1977 | |||
1978 | Example: | ||
1979 | cpm@119c0 { | ||
1980 | #address-cells = <1>; | ||
1981 | #size-cells = <1>; | ||
1982 | #interrupt-cells = <2>; | ||
1983 | compatible = "fsl,mpc8272-cpm", "fsl,cpm2"; | ||
1984 | reg = <119c0 30>; | ||
1985 | } | ||
1986 | |||
1987 | ii) Properties common to mulitple CPM/QE devices | ||
1988 | |||
1989 | - fsl,cpm-command : This value is ORed with the opcode and command flag | ||
1990 | to specify the device on which a CPM command operates. | ||
1991 | |||
1992 | - fsl,cpm-brg : Indicates which baud rate generator the device | ||
1993 | is associated with. If absent, an unused BRG | ||
1994 | should be dynamically allocated. If zero, the | ||
1995 | device uses an external clock rather than a BRG. | ||
1996 | |||
1997 | - reg : Unless otherwise specified, the first resource represents the | ||
1998 | scc/fcc/ucc registers, and the second represents the device's | ||
1999 | parameter RAM region (if it has one). | ||
2000 | |||
2001 | iii) Serial | ||
2002 | |||
2003 | Currently defined compatibles: | ||
2004 | - fsl,cpm1-smc-uart | ||
2005 | - fsl,cpm2-smc-uart | ||
2006 | - fsl,cpm1-scc-uart | ||
2007 | - fsl,cpm2-scc-uart | ||
2008 | - fsl,qe-uart | ||
2009 | |||
2010 | Example: | ||
2011 | |||
2012 | serial@11a00 { | ||
2013 | device_type = "serial"; | ||
2014 | compatible = "fsl,mpc8272-scc-uart", | ||
2015 | "fsl,cpm2-scc-uart"; | ||
2016 | reg = <11a00 20 8000 100>; | ||
2017 | interrupts = <28 8>; | ||
2018 | interrupt-parent = <&PIC>; | ||
2019 | fsl,cpm-brg = <1>; | ||
2020 | fsl,cpm-command = <00800000>; | ||
2021 | }; | ||
2022 | |||
2023 | iii) Network | ||
2024 | |||
2025 | Currently defined compatibles: | ||
2026 | - fsl,cpm1-scc-enet | ||
2027 | - fsl,cpm2-scc-enet | ||
2028 | - fsl,cpm1-fec-enet | ||
2029 | - fsl,cpm2-fcc-enet (third resource is GFEMR) | ||
2030 | - fsl,qe-enet | ||
2031 | |||
2032 | Example: | ||
2033 | |||
2034 | ethernet@11300 { | ||
2035 | device_type = "network"; | ||
2036 | compatible = "fsl,mpc8272-fcc-enet", | ||
2037 | "fsl,cpm2-fcc-enet"; | ||
2038 | reg = <11300 20 8400 100 11390 1>; | ||
2039 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
2040 | interrupts = <20 8>; | ||
2041 | interrupt-parent = <&PIC>; | ||
2042 | phy-handle = <&PHY0>; | ||
2043 | fsl,cpm-command = <12000300>; | ||
2044 | }; | ||
2045 | |||
2046 | iv) MDIO | ||
2047 | |||
2048 | Currently defined compatibles: | ||
2049 | fsl,pq1-fec-mdio (reg is same as first resource of FEC device) | ||
2050 | fsl,cpm2-mdio-bitbang (reg is port C registers) | ||
2051 | |||
2052 | Properties for fsl,cpm2-mdio-bitbang: | ||
2053 | fsl,mdio-pin : pin of port C controlling mdio data | ||
2054 | fsl,mdc-pin : pin of port C controlling mdio clock | ||
2055 | |||
2056 | Example: | ||
2057 | |||
2058 | mdio@10d40 { | ||
2059 | device_type = "mdio"; | ||
2060 | compatible = "fsl,mpc8272ads-mdio-bitbang", | ||
2061 | "fsl,mpc8272-mdio-bitbang", | ||
2062 | "fsl,cpm2-mdio-bitbang"; | ||
2063 | reg = <10d40 14>; | ||
2064 | #address-cells = <1>; | ||
2065 | #size-cells = <0>; | ||
2066 | fsl,mdio-pin = <12>; | ||
2067 | fsl,mdc-pin = <13>; | ||
2068 | }; | ||
2069 | |||
2070 | v) Baud Rate Generators | ||
2071 | |||
2072 | Currently defined compatibles: | ||
2073 | fsl,cpm-brg | ||
2074 | fsl,cpm1-brg | ||
2075 | fsl,cpm2-brg | ||
2076 | |||
2077 | Properties: | ||
2078 | - reg : There may be an arbitrary number of reg resources; BRG | ||
2079 | numbers are assigned to these in order. | ||
2080 | - clock-frequency : Specifies the base frequency driving | ||
2081 | the BRG. | ||
2082 | |||
2083 | Example: | ||
2084 | |||
2085 | brg@119f0 { | ||
2086 | compatible = "fsl,mpc8272-brg", | ||
2087 | "fsl,cpm2-brg", | ||
2088 | "fsl,cpm-brg"; | ||
2089 | reg = <119f0 10 115f0 10>; | ||
2090 | clock-frequency = <d#25000000>; | ||
2091 | }; | ||
2092 | |||
2093 | vi) Interrupt Controllers | ||
2094 | |||
2095 | Currently defined compatibles: | ||
2096 | - fsl,cpm1-pic | ||
2097 | - only one interrupt cell | ||
2098 | - fsl,pq1-pic | ||
2099 | - fsl,cpm2-pic | ||
2100 | - second interrupt cell is level/sense: | ||
2101 | - 2 is falling edge | ||
2102 | - 8 is active low | ||
2103 | |||
2104 | Example: | ||
2105 | |||
2106 | interrupt-controller@10c00 { | ||
2107 | #interrupt-cells = <2>; | ||
2108 | interrupt-controller; | ||
2109 | reg = <10c00 80>; | ||
2110 | compatible = "mpc8272-pic", "fsl,cpm2-pic"; | ||
2111 | }; | ||
2112 | |||
2113 | vii) USB (Universal Serial Bus Controller) | ||
2114 | |||
2115 | Properties: | ||
2116 | - compatible : "fsl,cpm1-usb", "fsl,cpm2-usb", "fsl,qe-usb" | ||
2117 | |||
2118 | Example: | ||
2119 | usb@11bc0 { | ||
2120 | #address-cells = <1>; | ||
2121 | #size-cells = <0>; | ||
2122 | compatible = "fsl,cpm2-usb"; | ||
2123 | reg = <11b60 18 8b00 100>; | ||
2124 | interrupts = <b 8>; | ||
2125 | interrupt-parent = <&PIC>; | ||
2126 | fsl,cpm-command = <2e600000>; | ||
2127 | }; | ||
2128 | |||
2129 | viii) Multi-User RAM (MURAM) | ||
2130 | |||
2131 | The multi-user/dual-ported RAM is expressed as a bus under the CPM node. | ||
2132 | |||
2133 | Ranges must be set up subject to the following restrictions: | ||
2134 | |||
2135 | - Children's reg nodes must be offsets from the start of all muram, even | ||
2136 | if the user-data area does not begin at zero. | ||
2137 | - If multiple range entries are used, the difference between the parent | ||
2138 | address and the child address must be the same in all, so that a single | ||
2139 | mapping can cover them all while maintaining the ability to determine | ||
2140 | CPM-side offsets with pointer subtraction. It is recommended that | ||
2141 | multiple range entries not be used. | ||
2142 | - A child address of zero must be translatable, even if no reg resources | ||
2143 | contain it. | ||
2144 | |||
2145 | A child "data" node must exist, compatible with "fsl,cpm-muram-data", to | ||
2146 | indicate the portion of muram that is usable by the OS for arbitrary | ||
2147 | purposes. The data node may have an arbitrary number of reg resources, | ||
2148 | all of which contribute to the allocatable muram pool. | ||
2149 | |||
2150 | Example, based on mpc8272: | ||
2151 | |||
2152 | muram@0 { | ||
2153 | #address-cells = <1>; | ||
2154 | #size-cells = <1>; | ||
2155 | ranges = <0 0 10000>; | ||
2156 | |||
2157 | data@0 { | ||
2158 | compatible = "fsl,cpm-muram-data"; | ||
2159 | reg = <0 2000 9800 800>; | ||
2160 | }; | ||
2161 | }; | ||
2162 | |||
2163 | m) Chipselect/Local Bus | ||
2164 | |||
2165 | Properties: | ||
2166 | - name : Should be localbus | ||
2167 | - #address-cells : Should be either two or three. The first cell is the | ||
2168 | chipselect number, and the remaining cells are the | ||
2169 | offset into the chipselect. | ||
2170 | - #size-cells : Either one or two, depending on how large each chipselect | ||
2171 | can be. | ||
2172 | - ranges : Each range corresponds to a single chipselect, and cover | ||
2173 | the entire access window as configured. | ||
2174 | |||
2175 | Example: | ||
2176 | localbus@f0010100 { | ||
2177 | compatible = "fsl,mpc8272-localbus", | ||
2178 | "fsl,pq2-localbus"; | ||
2179 | #address-cells = <2>; | ||
2180 | #size-cells = <1>; | ||
2181 | reg = <f0010100 40>; | ||
2182 | |||
2183 | ranges = <0 0 fe000000 02000000 | ||
2184 | 1 0 f4500000 00008000>; | ||
2185 | |||
2186 | flash@0,0 { | ||
2187 | compatible = "jedec-flash"; | ||
2188 | reg = <0 0 2000000>; | ||
2189 | bank-width = <4>; | ||
2190 | device-width = <1>; | ||
2191 | }; | ||
2192 | |||
2193 | board-control@1,0 { | ||
2194 | reg = <1 0 20>; | ||
2195 | compatible = "fsl,mpc8272ads-bcsr"; | ||
2196 | }; | ||
2197 | }; | ||
2198 | |||
2199 | |||
2200 | n) 4xx/Axon EMAC ethernet nodes | ||
2201 | 1351 | ||
2202 | The EMAC ethernet controller in IBM and AMCC 4xx chips, and also | 1352 | The EMAC ethernet controller in IBM and AMCC 4xx chips, and also |
2203 | the Axon bridge. To operate this needs to interact with a ths | 1353 | the Axon bridge. To operate this needs to interact with a ths |
@@ -2345,7 +1495,7 @@ platforms are moved over to use the flattened-device-tree model. | |||
2345 | available. | 1495 | available. |
2346 | For Axon: 0x0000012a | 1496 | For Axon: 0x0000012a |
2347 | 1497 | ||
2348 | o) Xilinx IP cores | 1498 | e) Xilinx IP cores |
2349 | 1499 | ||
2350 | The Xilinx EDK toolchain ships with a set of IP cores (devices) for use | 1500 | The Xilinx EDK toolchain ships with a set of IP cores (devices) for use |
2351 | in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range | 1501 | in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range |
@@ -2639,206 +1789,7 @@ platforms are moved over to use the flattened-device-tree model. | |||
2639 | - reg-offset : A value of 3 is required | 1789 | - reg-offset : A value of 3 is required |
2640 | - reg-shift : A value of 2 is required | 1790 | - reg-shift : A value of 2 is required |
2641 | 1791 | ||
2642 | 1792 | f) USB EHCI controllers | |
2643 | p) Freescale Synchronous Serial Interface | ||
2644 | |||
2645 | The SSI is a serial device that communicates with audio codecs. It can | ||
2646 | be programmed in AC97, I2S, left-justified, or right-justified modes. | ||
2647 | |||
2648 | Required properties: | ||
2649 | - compatible : compatible list, containing "fsl,ssi" | ||
2650 | - cell-index : the SSI, <0> = SSI1, <1> = SSI2, and so on | ||
2651 | - reg : offset and length of the register set for the device | ||
2652 | - interrupts : <a b> where a is the interrupt number and b is a | ||
2653 | field that represents an encoding of the sense and | ||
2654 | level information for the interrupt. This should be | ||
2655 | encoded based on the information in section 2) | ||
2656 | depending on the type of interrupt controller you | ||
2657 | have. | ||
2658 | - interrupt-parent : the phandle for the interrupt controller that | ||
2659 | services interrupts for this device. | ||
2660 | - fsl,mode : the operating mode for the SSI interface | ||
2661 | "i2s-slave" - I2S mode, SSI is clock slave | ||
2662 | "i2s-master" - I2S mode, SSI is clock master | ||
2663 | "lj-slave" - left-justified mode, SSI is clock slave | ||
2664 | "lj-master" - l.j. mode, SSI is clock master | ||
2665 | "rj-slave" - right-justified mode, SSI is clock slave | ||
2666 | "rj-master" - r.j., SSI is clock master | ||
2667 | "ac97-slave" - AC97 mode, SSI is clock slave | ||
2668 | "ac97-master" - AC97 mode, SSI is clock master | ||
2669 | |||
2670 | Optional properties: | ||
2671 | - codec-handle : phandle to a 'codec' node that defines an audio | ||
2672 | codec connected to this SSI. This node is typically | ||
2673 | a child of an I2C or other control node. | ||
2674 | |||
2675 | Child 'codec' node required properties: | ||
2676 | - compatible : compatible list, contains the name of the codec | ||
2677 | |||
2678 | Child 'codec' node optional properties: | ||
2679 | - clock-frequency : The frequency of the input clock, which typically | ||
2680 | comes from an on-board dedicated oscillator. | ||
2681 | |||
2682 | * Freescale 83xx DMA Controller | ||
2683 | |||
2684 | Freescale PowerPC 83xx have on chip general purpose DMA controllers. | ||
2685 | |||
2686 | Required properties: | ||
2687 | |||
2688 | - compatible : compatible list, contains 2 entries, first is | ||
2689 | "fsl,CHIP-dma", where CHIP is the processor | ||
2690 | (mpc8349, mpc8360, etc.) and the second is | ||
2691 | "fsl,elo-dma" | ||
2692 | - reg : <registers mapping for DMA general status reg> | ||
2693 | - ranges : Should be defined as specified in 1) to describe the | ||
2694 | DMA controller channels. | ||
2695 | - cell-index : controller index. 0 for controller @ 0x8100 | ||
2696 | - interrupts : <interrupt mapping for DMA IRQ> | ||
2697 | - interrupt-parent : optional, if needed for interrupt mapping | ||
2698 | |||
2699 | |||
2700 | - DMA channel nodes: | ||
2701 | - compatible : compatible list, contains 2 entries, first is | ||
2702 | "fsl,CHIP-dma-channel", where CHIP is the processor | ||
2703 | (mpc8349, mpc8350, etc.) and the second is | ||
2704 | "fsl,elo-dma-channel" | ||
2705 | - reg : <registers mapping for channel> | ||
2706 | - cell-index : dma channel index starts at 0. | ||
2707 | |||
2708 | Optional properties: | ||
2709 | - interrupts : <interrupt mapping for DMA channel IRQ> | ||
2710 | (on 83xx this is expected to be identical to | ||
2711 | the interrupts property of the parent node) | ||
2712 | - interrupt-parent : optional, if needed for interrupt mapping | ||
2713 | |||
2714 | Example: | ||
2715 | dma@82a8 { | ||
2716 | #address-cells = <1>; | ||
2717 | #size-cells = <1>; | ||
2718 | compatible = "fsl,mpc8349-dma", "fsl,elo-dma"; | ||
2719 | reg = <82a8 4>; | ||
2720 | ranges = <0 8100 1a4>; | ||
2721 | interrupt-parent = <&ipic>; | ||
2722 | interrupts = <47 8>; | ||
2723 | cell-index = <0>; | ||
2724 | dma-channel@0 { | ||
2725 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | ||
2726 | cell-index = <0>; | ||
2727 | reg = <0 80>; | ||
2728 | }; | ||
2729 | dma-channel@80 { | ||
2730 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | ||
2731 | cell-index = <1>; | ||
2732 | reg = <80 80>; | ||
2733 | }; | ||
2734 | dma-channel@100 { | ||
2735 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | ||
2736 | cell-index = <2>; | ||
2737 | reg = <100 80>; | ||
2738 | }; | ||
2739 | dma-channel@180 { | ||
2740 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | ||
2741 | cell-index = <3>; | ||
2742 | reg = <180 80>; | ||
2743 | }; | ||
2744 | }; | ||
2745 | |||
2746 | * Freescale 85xx/86xx DMA Controller | ||
2747 | |||
2748 | Freescale PowerPC 85xx/86xx have on chip general purpose DMA controllers. | ||
2749 | |||
2750 | Required properties: | ||
2751 | |||
2752 | - compatible : compatible list, contains 2 entries, first is | ||
2753 | "fsl,CHIP-dma", where CHIP is the processor | ||
2754 | (mpc8540, mpc8540, etc.) and the second is | ||
2755 | "fsl,eloplus-dma" | ||
2756 | - reg : <registers mapping for DMA general status reg> | ||
2757 | - cell-index : controller index. 0 for controller @ 0x21000, | ||
2758 | 1 for controller @ 0xc000 | ||
2759 | - ranges : Should be defined as specified in 1) to describe the | ||
2760 | DMA controller channels. | ||
2761 | |||
2762 | - DMA channel nodes: | ||
2763 | - compatible : compatible list, contains 2 entries, first is | ||
2764 | "fsl,CHIP-dma-channel", where CHIP is the processor | ||
2765 | (mpc8540, mpc8560, etc.) and the second is | ||
2766 | "fsl,eloplus-dma-channel" | ||
2767 | - cell-index : dma channel index starts at 0. | ||
2768 | - reg : <registers mapping for channel> | ||
2769 | - interrupts : <interrupt mapping for DMA channel IRQ> | ||
2770 | - interrupt-parent : optional, if needed for interrupt mapping | ||
2771 | |||
2772 | Example: | ||
2773 | dma@21300 { | ||
2774 | #address-cells = <1>; | ||
2775 | #size-cells = <1>; | ||
2776 | compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma"; | ||
2777 | reg = <21300 4>; | ||
2778 | ranges = <0 21100 200>; | ||
2779 | cell-index = <0>; | ||
2780 | dma-channel@0 { | ||
2781 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | ||
2782 | reg = <0 80>; | ||
2783 | cell-index = <0>; | ||
2784 | interrupt-parent = <&mpic>; | ||
2785 | interrupts = <14 2>; | ||
2786 | }; | ||
2787 | dma-channel@80 { | ||
2788 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | ||
2789 | reg = <80 80>; | ||
2790 | cell-index = <1>; | ||
2791 | interrupt-parent = <&mpic>; | ||
2792 | interrupts = <15 2>; | ||
2793 | }; | ||
2794 | dma-channel@100 { | ||
2795 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | ||
2796 | reg = <100 80>; | ||
2797 | cell-index = <2>; | ||
2798 | interrupt-parent = <&mpic>; | ||
2799 | interrupts = <16 2>; | ||
2800 | }; | ||
2801 | dma-channel@180 { | ||
2802 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | ||
2803 | reg = <180 80>; | ||
2804 | cell-index = <3>; | ||
2805 | interrupt-parent = <&mpic>; | ||
2806 | interrupts = <17 2>; | ||
2807 | }; | ||
2808 | }; | ||
2809 | |||
2810 | * Freescale 8xxx/3.0 Gb/s SATA nodes | ||
2811 | |||
2812 | SATA nodes are defined to describe on-chip Serial ATA controllers. | ||
2813 | Each SATA port should have its own node. | ||
2814 | |||
2815 | Required properties: | ||
2816 | - compatible : compatible list, contains 2 entries, first is | ||
2817 | "fsl,CHIP-sata", where CHIP is the processor | ||
2818 | (mpc8315, mpc8379, etc.) and the second is | ||
2819 | "fsl,pq-sata" | ||
2820 | - interrupts : <interrupt mapping for SATA IRQ> | ||
2821 | - cell-index : controller index. | ||
2822 | 1 for controller @ 0x18000 | ||
2823 | 2 for controller @ 0x19000 | ||
2824 | 3 for controller @ 0x1a000 | ||
2825 | 4 for controller @ 0x1b000 | ||
2826 | |||
2827 | Optional properties: | ||
2828 | - interrupt-parent : optional, if needed for interrupt mapping | ||
2829 | - reg : <registers mapping> | ||
2830 | |||
2831 | Example: | ||
2832 | |||
2833 | sata@18000 { | ||
2834 | compatible = "fsl,mpc8379-sata", "fsl,pq-sata"; | ||
2835 | reg = <0x18000 0x1000>; | ||
2836 | cell-index = <1>; | ||
2837 | interrupts = <2c 8>; | ||
2838 | interrupt-parent = < &ipic >; | ||
2839 | }; | ||
2840 | |||
2841 | q) USB EHCI controllers | ||
2842 | 1793 | ||
2843 | Required properties: | 1794 | Required properties: |
2844 | - compatible : should be "usb-ehci". | 1795 | - compatible : should be "usb-ehci". |
@@ -2864,109 +1815,6 @@ platforms are moved over to use the flattened-device-tree model. | |||
2864 | big-endian; | 1815 | big-endian; |
2865 | }; | 1816 | }; |
2866 | 1817 | ||
2867 | r) Freescale Display Interface Unit | ||
2868 | |||
2869 | The Freescale DIU is a LCD controller, with proper hardware, it can also | ||
2870 | drive DVI monitors. | ||
2871 | |||
2872 | Required properties: | ||
2873 | - compatible : should be "fsl-diu". | ||
2874 | - reg : should contain at least address and length of the DIU register | ||
2875 | set. | ||
2876 | - Interrupts : one DIU interrupt should be describe here. | ||
2877 | |||
2878 | Example (MPC8610HPCD) | ||
2879 | display@2c000 { | ||
2880 | compatible = "fsl,diu"; | ||
2881 | reg = <0x2c000 100>; | ||
2882 | interrupts = <72 2>; | ||
2883 | interrupt-parent = <&mpic>; | ||
2884 | }; | ||
2885 | |||
2886 | s) Freescale on board FPGA | ||
2887 | |||
2888 | This is the memory-mapped registers for on board FPGA. | ||
2889 | |||
2890 | Required properities: | ||
2891 | - compatible : should be "fsl,fpga-pixis". | ||
2892 | - reg : should contain the address and the lenght of the FPPGA register | ||
2893 | set. | ||
2894 | |||
2895 | Example (MPC8610HPCD) | ||
2896 | board-control@e8000000 { | ||
2897 | compatible = "fsl,fpga-pixis"; | ||
2898 | reg = <0xe8000000 32>; | ||
2899 | }; | ||
2900 | |||
2901 | t) Freescale MSI interrupt controller | ||
2902 | |||
2903 | Reguired properities: | ||
2904 | - compatible : compatible list, contains 2 entries, | ||
2905 | first is "fsl,CHIP-msi", where CHIP is the processor(mpc8610, mpc8572, | ||
2906 | etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on | ||
2907 | the parent type. | ||
2908 | - reg : should contain the address and the length of the shared message | ||
2909 | interrupt register set. | ||
2910 | - msi-available-ranges: use <start count> style section to define which | ||
2911 | msi interrupt can be used in the 256 msi interrupts. This property is | ||
2912 | optional, without this, all the 256 MSI interrupts can be used. | ||
2913 | - interrupts : each one of the interrupts here is one entry per 32 MSIs, | ||
2914 | and routed to the host interrupt controller. the interrupts should | ||
2915 | be set as edge sensitive. | ||
2916 | - interrupt-parent: the phandle for the interrupt controller | ||
2917 | that services interrupts for this device. for 83xx cpu, the interrupts | ||
2918 | are routed to IPIC, and for 85xx/86xx cpu the interrupts are routed | ||
2919 | to MPIC. | ||
2920 | |||
2921 | Example | ||
2922 | msi@41600 { | ||
2923 | compatible = "fsl,mpc8610-msi", "fsl,mpic-msi"; | ||
2924 | reg = <0x41600 0x80>; | ||
2925 | msi-available-ranges = <0 0x100>; | ||
2926 | interrupts = < | ||
2927 | 0xe0 0 | ||
2928 | 0xe1 0 | ||
2929 | 0xe2 0 | ||
2930 | 0xe3 0 | ||
2931 | 0xe4 0 | ||
2932 | 0xe5 0 | ||
2933 | 0xe6 0 | ||
2934 | 0xe7 0>; | ||
2935 | interrupt-parent = <&mpic>; | ||
2936 | }; | ||
2937 | |||
2938 | u) Freescale General-purpose Timers Module | ||
2939 | |||
2940 | Required properties: | ||
2941 | - compatible : should be | ||
2942 | "fsl,<chip>-gtm", "fsl,gtm" for SOC GTMs | ||
2943 | "fsl,<chip>-qe-gtm", "fsl,qe-gtm", "fsl,gtm" for QE GTMs | ||
2944 | "fsl,<chip>-cpm2-gtm", "fsl,cpm2-gtm", "fsl,gtm" for CPM2 GTMs | ||
2945 | - reg : should contain gtm registers location and length (0x40). | ||
2946 | - interrupts : should contain four interrupts. | ||
2947 | - interrupt-parent : interrupt source phandle. | ||
2948 | - clock-frequency : specifies the frequency driving the timer. | ||
2949 | |||
2950 | Example: | ||
2951 | |||
2952 | timer@500 { | ||
2953 | compatible = "fsl,mpc8360-gtm", "fsl,gtm"; | ||
2954 | reg = <0x500 0x40>; | ||
2955 | interrupts = <90 8 78 8 84 8 72 8>; | ||
2956 | interrupt-parent = <&ipic>; | ||
2957 | /* filled by u-boot */ | ||
2958 | clock-frequency = <0>; | ||
2959 | }; | ||
2960 | |||
2961 | timer@440 { | ||
2962 | compatible = "fsl,mpc8360-qe-gtm", "fsl,qe-gtm", "fsl,gtm"; | ||
2963 | reg = <0x440 0x40>; | ||
2964 | interrupts = <12 13 14 15>; | ||
2965 | interrupt-parent = <&qeic>; | ||
2966 | /* filled by u-boot */ | ||
2967 | clock-frequency = <0>; | ||
2968 | }; | ||
2969 | |||
2970 | VII - Marvell Discovery mv64[345]6x System Controller chips | 1818 | VII - Marvell Discovery mv64[345]6x System Controller chips |
2971 | =========================================================== | 1819 | =========================================================== |
2972 | 1820 | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/board.txt b/Documentation/powerpc/dts-bindings/fsl/board.txt new file mode 100644 index 000000000000..74ae6f1cd2d6 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/board.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | * Board Control and Status (BCSR) | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - device_type : Should be "board-control" | ||
6 | - reg : Offset and length of the register set for the device | ||
7 | |||
8 | Example: | ||
9 | |||
10 | bcsr@f8000000 { | ||
11 | device_type = "board-control"; | ||
12 | reg = <f8000000 8000>; | ||
13 | }; | ||
14 | |||
15 | * Freescale on board FPGA | ||
16 | |||
17 | This is the memory-mapped registers for on board FPGA. | ||
18 | |||
19 | Required properities: | ||
20 | - compatible : should be "fsl,fpga-pixis". | ||
21 | - reg : should contain the address and the lenght of the FPPGA register | ||
22 | set. | ||
23 | |||
24 | Example (MPC8610HPCD): | ||
25 | |||
26 | board-control@e8000000 { | ||
27 | compatible = "fsl,fpga-pixis"; | ||
28 | reg = <0xe8000000 32>; | ||
29 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm.txt new file mode 100644 index 000000000000..088fc471e03a --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm.txt | |||
@@ -0,0 +1,67 @@ | |||
1 | * Freescale Communications Processor Module | ||
2 | |||
3 | NOTE: This is an interim binding, and will likely change slightly, | ||
4 | as more devices are supported. The QE bindings especially are | ||
5 | incomplete. | ||
6 | |||
7 | * Root CPM node | ||
8 | |||
9 | Properties: | ||
10 | - compatible : "fsl,cpm1", "fsl,cpm2", or "fsl,qe". | ||
11 | - reg : A 48-byte region beginning with CPCR. | ||
12 | |||
13 | Example: | ||
14 | cpm@119c0 { | ||
15 | #address-cells = <1>; | ||
16 | #size-cells = <1>; | ||
17 | #interrupt-cells = <2>; | ||
18 | compatible = "fsl,mpc8272-cpm", "fsl,cpm2"; | ||
19 | reg = <119c0 30>; | ||
20 | } | ||
21 | |||
22 | * Properties common to mulitple CPM/QE devices | ||
23 | |||
24 | - fsl,cpm-command : This value is ORed with the opcode and command flag | ||
25 | to specify the device on which a CPM command operates. | ||
26 | |||
27 | - fsl,cpm-brg : Indicates which baud rate generator the device | ||
28 | is associated with. If absent, an unused BRG | ||
29 | should be dynamically allocated. If zero, the | ||
30 | device uses an external clock rather than a BRG. | ||
31 | |||
32 | - reg : Unless otherwise specified, the first resource represents the | ||
33 | scc/fcc/ucc registers, and the second represents the device's | ||
34 | parameter RAM region (if it has one). | ||
35 | |||
36 | * Multi-User RAM (MURAM) | ||
37 | |||
38 | The multi-user/dual-ported RAM is expressed as a bus under the CPM node. | ||
39 | |||
40 | Ranges must be set up subject to the following restrictions: | ||
41 | |||
42 | - Children's reg nodes must be offsets from the start of all muram, even | ||
43 | if the user-data area does not begin at zero. | ||
44 | - If multiple range entries are used, the difference between the parent | ||
45 | address and the child address must be the same in all, so that a single | ||
46 | mapping can cover them all while maintaining the ability to determine | ||
47 | CPM-side offsets with pointer subtraction. It is recommended that | ||
48 | multiple range entries not be used. | ||
49 | - A child address of zero must be translatable, even if no reg resources | ||
50 | contain it. | ||
51 | |||
52 | A child "data" node must exist, compatible with "fsl,cpm-muram-data", to | ||
53 | indicate the portion of muram that is usable by the OS for arbitrary | ||
54 | purposes. The data node may have an arbitrary number of reg resources, | ||
55 | all of which contribute to the allocatable muram pool. | ||
56 | |||
57 | Example, based on mpc8272: | ||
58 | muram@0 { | ||
59 | #address-cells = <1>; | ||
60 | #size-cells = <1>; | ||
61 | ranges = <0 0 10000>; | ||
62 | |||
63 | data@0 { | ||
64 | compatible = "fsl,cpm-muram-data"; | ||
65 | reg = <0 2000 9800 800>; | ||
66 | }; | ||
67 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/brg.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/brg.txt new file mode 100644 index 000000000000..4c7d45eaf025 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/brg.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Baud Rate Generators | ||
2 | |||
3 | Currently defined compatibles: | ||
4 | fsl,cpm-brg | ||
5 | fsl,cpm1-brg | ||
6 | fsl,cpm2-brg | ||
7 | |||
8 | Properties: | ||
9 | - reg : There may be an arbitrary number of reg resources; BRG | ||
10 | numbers are assigned to these in order. | ||
11 | - clock-frequency : Specifies the base frequency driving | ||
12 | the BRG. | ||
13 | |||
14 | Example: | ||
15 | brg@119f0 { | ||
16 | compatible = "fsl,mpc8272-brg", | ||
17 | "fsl,cpm2-brg", | ||
18 | "fsl,cpm-brg"; | ||
19 | reg = <119f0 10 115f0 10>; | ||
20 | clock-frequency = <d#25000000>; | ||
21 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/i2c.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/i2c.txt new file mode 100644 index 000000000000..87bc6048667e --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/i2c.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | * I2C | ||
2 | |||
3 | The I2C controller is expressed as a bus under the CPM node. | ||
4 | |||
5 | Properties: | ||
6 | - compatible : "fsl,cpm1-i2c", "fsl,cpm2-i2c" | ||
7 | - reg : On CPM2 devices, the second resource doesn't specify the I2C | ||
8 | Parameter RAM itself, but the I2C_BASE field of the CPM2 Parameter RAM | ||
9 | (typically 0x8afc 0x2). | ||
10 | - #address-cells : Should be one. The cell is the i2c device address with | ||
11 | the r/w bit set to zero. | ||
12 | - #size-cells : Should be zero. | ||
13 | - clock-frequency : Can be used to set the i2c clock frequency. If | ||
14 | unspecified, a default frequency of 60kHz is being used. | ||
15 | The following two properties are deprecated. They are only used by legacy | ||
16 | i2c drivers to find the bus to probe: | ||
17 | - linux,i2c-index : Can be used to hard code an i2c bus number. By default, | ||
18 | the bus number is dynamically assigned by the i2c core. | ||
19 | - linux,i2c-class : Can be used to override the i2c class. The class is used | ||
20 | by legacy i2c device drivers to find a bus in a specific context like | ||
21 | system management, video or sound. By default, I2C_CLASS_HWMON (1) is | ||
22 | being used. The definition of the classes can be found in | ||
23 | include/i2c/i2c.h | ||
24 | |||
25 | Example, based on mpc823: | ||
26 | |||
27 | i2c@860 { | ||
28 | compatible = "fsl,mpc823-i2c", | ||
29 | "fsl,cpm1-i2c"; | ||
30 | reg = <0x860 0x20 0x3c80 0x30>; | ||
31 | interrupts = <16>; | ||
32 | interrupt-parent = <&CPM_PIC>; | ||
33 | fsl,cpm-command = <0x10>; | ||
34 | #address-cells = <1>; | ||
35 | #size-cells = <0>; | ||
36 | |||
37 | rtc@68 { | ||
38 | compatible = "dallas,ds1307"; | ||
39 | reg = <0x68>; | ||
40 | }; | ||
41 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/pic.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/pic.txt new file mode 100644 index 000000000000..8e3ee1681618 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/pic.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | * Interrupt Controllers | ||
2 | |||
3 | Currently defined compatibles: | ||
4 | - fsl,cpm1-pic | ||
5 | - only one interrupt cell | ||
6 | - fsl,pq1-pic | ||
7 | - fsl,cpm2-pic | ||
8 | - second interrupt cell is level/sense: | ||
9 | - 2 is falling edge | ||
10 | - 8 is active low | ||
11 | |||
12 | Example: | ||
13 | interrupt-controller@10c00 { | ||
14 | #interrupt-cells = <2>; | ||
15 | interrupt-controller; | ||
16 | reg = <10c00 80>; | ||
17 | compatible = "mpc8272-pic", "fsl,cpm2-pic"; | ||
18 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/usb.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/usb.txt new file mode 100644 index 000000000000..74bfda4bb824 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/cpm/usb.txt | |||
@@ -0,0 +1,15 @@ | |||
1 | * USB (Universal Serial Bus Controller) | ||
2 | |||
3 | Properties: | ||
4 | - compatible : "fsl,cpm1-usb", "fsl,cpm2-usb", "fsl,qe-usb" | ||
5 | |||
6 | Example: | ||
7 | usb@11bc0 { | ||
8 | #address-cells = <1>; | ||
9 | #size-cells = <0>; | ||
10 | compatible = "fsl,cpm2-usb"; | ||
11 | reg = <11b60 18 8b00 100>; | ||
12 | interrupts = <b 8>; | ||
13 | interrupt-parent = <&PIC>; | ||
14 | fsl,cpm-command = <2e600000>; | ||
15 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/network.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/network.txt new file mode 100644 index 000000000000..0e4269446580 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/network.txt | |||
@@ -0,0 +1,45 @@ | |||
1 | * Network | ||
2 | |||
3 | Currently defined compatibles: | ||
4 | - fsl,cpm1-scc-enet | ||
5 | - fsl,cpm2-scc-enet | ||
6 | - fsl,cpm1-fec-enet | ||
7 | - fsl,cpm2-fcc-enet (third resource is GFEMR) | ||
8 | - fsl,qe-enet | ||
9 | |||
10 | Example: | ||
11 | |||
12 | ethernet@11300 { | ||
13 | device_type = "network"; | ||
14 | compatible = "fsl,mpc8272-fcc-enet", | ||
15 | "fsl,cpm2-fcc-enet"; | ||
16 | reg = <11300 20 8400 100 11390 1>; | ||
17 | local-mac-address = [ 00 00 00 00 00 00 ]; | ||
18 | interrupts = <20 8>; | ||
19 | interrupt-parent = <&PIC>; | ||
20 | phy-handle = <&PHY0>; | ||
21 | fsl,cpm-command = <12000300>; | ||
22 | }; | ||
23 | |||
24 | * MDIO | ||
25 | |||
26 | Currently defined compatibles: | ||
27 | fsl,pq1-fec-mdio (reg is same as first resource of FEC device) | ||
28 | fsl,cpm2-mdio-bitbang (reg is port C registers) | ||
29 | |||
30 | Properties for fsl,cpm2-mdio-bitbang: | ||
31 | fsl,mdio-pin : pin of port C controlling mdio data | ||
32 | fsl,mdc-pin : pin of port C controlling mdio clock | ||
33 | |||
34 | Example: | ||
35 | mdio@10d40 { | ||
36 | device_type = "mdio"; | ||
37 | compatible = "fsl,mpc8272ads-mdio-bitbang", | ||
38 | "fsl,mpc8272-mdio-bitbang", | ||
39 | "fsl,cpm2-mdio-bitbang"; | ||
40 | reg = <10d40 14>; | ||
41 | #address-cells = <1>; | ||
42 | #size-cells = <0>; | ||
43 | fsl,mdio-pin = <12>; | ||
44 | fsl,mdc-pin = <13>; | ||
45 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt new file mode 100644 index 000000000000..78790d58dc2c --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe.txt | |||
@@ -0,0 +1,58 @@ | |||
1 | * Freescale QUICC Engine module (QE) | ||
2 | This represents qe module that is installed on PowerQUICC II Pro. | ||
3 | |||
4 | NOTE: This is an interim binding; it should be updated to fit | ||
5 | in with the CPM binding later in this document. | ||
6 | |||
7 | Basically, it is a bus of devices, that could act more or less | ||
8 | as a complete entity (UCC, USB etc ). All of them should be siblings on | ||
9 | the "root" qe node, using the common properties from there. | ||
10 | The description below applies to the qe of MPC8360 and | ||
11 | more nodes and properties would be extended in the future. | ||
12 | |||
13 | i) Root QE device | ||
14 | |||
15 | Required properties: | ||
16 | - compatible : should be "fsl,qe"; | ||
17 | - model : precise model of the QE, Can be "QE", "CPM", or "CPM2" | ||
18 | - reg : offset and length of the device registers. | ||
19 | - bus-frequency : the clock frequency for QUICC Engine. | ||
20 | |||
21 | Recommended properties | ||
22 | - brg-frequency : the internal clock source frequency for baud-rate | ||
23 | generators in Hz. | ||
24 | |||
25 | Example: | ||
26 | qe@e0100000 { | ||
27 | #address-cells = <1>; | ||
28 | #size-cells = <1>; | ||
29 | #interrupt-cells = <2>; | ||
30 | compatible = "fsl,qe"; | ||
31 | ranges = <0 e0100000 00100000>; | ||
32 | reg = <e0100000 480>; | ||
33 | brg-frequency = <0>; | ||
34 | bus-frequency = <179A7B00>; | ||
35 | } | ||
36 | |||
37 | * Multi-User RAM (MURAM) | ||
38 | |||
39 | Required properties: | ||
40 | - compatible : should be "fsl,qe-muram", "fsl,cpm-muram". | ||
41 | - mode : the could be "host" or "slave". | ||
42 | - ranges : Should be defined as specified in 1) to describe the | ||
43 | translation of MURAM addresses. | ||
44 | - data-only : sub-node which defines the address area under MURAM | ||
45 | bus that can be allocated as data/parameter | ||
46 | |||
47 | Example: | ||
48 | |||
49 | muram@10000 { | ||
50 | compatible = "fsl,qe-muram", "fsl,cpm-muram"; | ||
51 | ranges = <0 00010000 0000c000>; | ||
52 | |||
53 | data-only@0{ | ||
54 | compatible = "fsl,qe-muram-data", | ||
55 | "fsl,cpm-muram-data"; | ||
56 | reg = <0 c000>; | ||
57 | }; | ||
58 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/firmware.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/firmware.txt new file mode 100644 index 000000000000..6c238f59b2a9 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/firmware.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | * Uploaded QE firmware | ||
2 | |||
3 | If a new firwmare has been uploaded to the QE (usually by the | ||
4 | boot loader), then a 'firmware' child node should be added to the QE | ||
5 | node. This node provides information on the uploaded firmware that | ||
6 | device drivers may need. | ||
7 | |||
8 | Required properties: | ||
9 | - id: The string name of the firmware. This is taken from the 'id' | ||
10 | member of the qe_firmware structure of the uploaded firmware. | ||
11 | Device drivers can search this string to determine if the | ||
12 | firmware they want is already present. | ||
13 | - extended-modes: The Extended Modes bitfield, taken from the | ||
14 | firmware binary. It is a 64-bit number represented | ||
15 | as an array of two 32-bit numbers. | ||
16 | - virtual-traps: The virtual traps, taken from the firmware binary. | ||
17 | It is an array of 8 32-bit numbers. | ||
18 | |||
19 | Example: | ||
20 | firmware { | ||
21 | id = "Soft-UART"; | ||
22 | extended-modes = <0 0>; | ||
23 | virtual-traps = <0 0 0 0 0 0 0 0>; | ||
24 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/par_io.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/par_io.txt new file mode 100644 index 000000000000..60984260207b --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/par_io.txt | |||
@@ -0,0 +1,51 @@ | |||
1 | * Parallel I/O Ports | ||
2 | |||
3 | This node configures Parallel I/O ports for CPUs with QE support. | ||
4 | The node should reside in the "soc" node of the tree. For each | ||
5 | device that using parallel I/O ports, a child node should be created. | ||
6 | See the definition of the Pin configuration nodes below for more | ||
7 | information. | ||
8 | |||
9 | Required properties: | ||
10 | - device_type : should be "par_io". | ||
11 | - reg : offset to the register set and its length. | ||
12 | - num-ports : number of Parallel I/O ports | ||
13 | |||
14 | Example: | ||
15 | par_io@1400 { | ||
16 | reg = <1400 100>; | ||
17 | #address-cells = <1>; | ||
18 | #size-cells = <0>; | ||
19 | device_type = "par_io"; | ||
20 | num-ports = <7>; | ||
21 | ucc_pin@01 { | ||
22 | ...... | ||
23 | }; | ||
24 | |||
25 | Note that "par_io" nodes are obsolete, and should not be used for | ||
26 | the new device trees. Instead, each Par I/O bank should be represented | ||
27 | via its own gpio-controller node: | ||
28 | |||
29 | Required properties: | ||
30 | - #gpio-cells : should be "2". | ||
31 | - compatible : should be "fsl,<chip>-qe-pario-bank", | ||
32 | "fsl,mpc8323-qe-pario-bank". | ||
33 | - reg : offset to the register set and its length. | ||
34 | - gpio-controller : node to identify gpio controllers. | ||
35 | |||
36 | Example: | ||
37 | qe_pio_a: gpio-controller@1400 { | ||
38 | #gpio-cells = <2>; | ||
39 | compatible = "fsl,mpc8360-qe-pario-bank", | ||
40 | "fsl,mpc8323-qe-pario-bank"; | ||
41 | reg = <0x1400 0x18>; | ||
42 | gpio-controller; | ||
43 | }; | ||
44 | |||
45 | qe_pio_e: gpio-controller@1460 { | ||
46 | #gpio-cells = <2>; | ||
47 | compatible = "fsl,mpc8360-qe-pario-bank", | ||
48 | "fsl,mpc8323-qe-pario-bank"; | ||
49 | reg = <0x1460 0x18>; | ||
50 | gpio-controller; | ||
51 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/pincfg.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/pincfg.txt new file mode 100644 index 000000000000..c5b43061db3a --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/pincfg.txt | |||
@@ -0,0 +1,60 @@ | |||
1 | * Pin configuration nodes | ||
2 | |||
3 | Required properties: | ||
4 | - linux,phandle : phandle of this node; likely referenced by a QE | ||
5 | device. | ||
6 | - pio-map : array of pin configurations. Each pin is defined by 6 | ||
7 | integers. The six numbers are respectively: port, pin, dir, | ||
8 | open_drain, assignment, has_irq. | ||
9 | - port : port number of the pin; 0-6 represent port A-G in UM. | ||
10 | - pin : pin number in the port. | ||
11 | - dir : direction of the pin, should encode as follows: | ||
12 | |||
13 | 0 = The pin is disabled | ||
14 | 1 = The pin is an output | ||
15 | 2 = The pin is an input | ||
16 | 3 = The pin is I/O | ||
17 | |||
18 | - open_drain : indicates the pin is normal or wired-OR: | ||
19 | |||
20 | 0 = The pin is actively driven as an output | ||
21 | 1 = The pin is an open-drain driver. As an output, the pin is | ||
22 | driven active-low, otherwise it is three-stated. | ||
23 | |||
24 | - assignment : function number of the pin according to the Pin Assignment | ||
25 | tables in User Manual. Each pin can have up to 4 possible functions in | ||
26 | QE and two options for CPM. | ||
27 | - has_irq : indicates if the pin is used as source of external | ||
28 | interrupts. | ||
29 | |||
30 | Example: | ||
31 | ucc_pin@01 { | ||
32 | linux,phandle = <140001>; | ||
33 | pio-map = < | ||
34 | /* port pin dir open_drain assignment has_irq */ | ||
35 | 0 3 1 0 1 0 /* TxD0 */ | ||
36 | 0 4 1 0 1 0 /* TxD1 */ | ||
37 | 0 5 1 0 1 0 /* TxD2 */ | ||
38 | 0 6 1 0 1 0 /* TxD3 */ | ||
39 | 1 6 1 0 3 0 /* TxD4 */ | ||
40 | 1 7 1 0 1 0 /* TxD5 */ | ||
41 | 1 9 1 0 2 0 /* TxD6 */ | ||
42 | 1 a 1 0 2 0 /* TxD7 */ | ||
43 | 0 9 2 0 1 0 /* RxD0 */ | ||
44 | 0 a 2 0 1 0 /* RxD1 */ | ||
45 | 0 b 2 0 1 0 /* RxD2 */ | ||
46 | 0 c 2 0 1 0 /* RxD3 */ | ||
47 | 0 d 2 0 1 0 /* RxD4 */ | ||
48 | 1 1 2 0 2 0 /* RxD5 */ | ||
49 | 1 0 2 0 2 0 /* RxD6 */ | ||
50 | 1 4 2 0 2 0 /* RxD7 */ | ||
51 | 0 7 1 0 1 0 /* TX_EN */ | ||
52 | 0 8 1 0 1 0 /* TX_ER */ | ||
53 | 0 f 2 0 1 0 /* RX_DV */ | ||
54 | 0 10 2 0 1 0 /* RX_ER */ | ||
55 | 0 0 2 0 1 0 /* RX_CLK */ | ||
56 | 2 9 1 0 3 0 /* GTX_CLK - CLK10 */ | ||
57 | 2 8 2 0 1 0>; /* GTX125 - CLK9 */ | ||
58 | }; | ||
59 | |||
60 | |||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/ucc.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/ucc.txt new file mode 100644 index 000000000000..e47734bee3f0 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/ucc.txt | |||
@@ -0,0 +1,70 @@ | |||
1 | * UCC (Unified Communications Controllers) | ||
2 | |||
3 | Required properties: | ||
4 | - device_type : should be "network", "hldc", "uart", "transparent" | ||
5 | "bisync", "atm", or "serial". | ||
6 | - compatible : could be "ucc_geth" or "fsl_atm" and so on. | ||
7 | - cell-index : the ucc number(1-8), corresponding to UCCx in UM. | ||
8 | - reg : Offset and length of the register set for the device | ||
9 | - interrupts : <a b> where a is the interrupt number and b is a | ||
10 | field that represents an encoding of the sense and level | ||
11 | information for the interrupt. This should be encoded based on | ||
12 | the information in section 2) depending on the type of interrupt | ||
13 | controller you have. | ||
14 | - interrupt-parent : the phandle for the interrupt controller that | ||
15 | services interrupts for this device. | ||
16 | - pio-handle : The phandle for the Parallel I/O port configuration. | ||
17 | - port-number : for UART drivers, the port number to use, between 0 and 3. | ||
18 | This usually corresponds to the /dev/ttyQE device, e.g. <0> = /dev/ttyQE0. | ||
19 | The port number is added to the minor number of the device. Unlike the | ||
20 | CPM UART driver, the port-number is required for the QE UART driver. | ||
21 | - soft-uart : for UART drivers, if specified this means the QE UART device | ||
22 | driver should use "Soft-UART" mode, which is needed on some SOCs that have | ||
23 | broken UART hardware. Soft-UART is provided via a microcode upload. | ||
24 | - rx-clock-name: the UCC receive clock source | ||
25 | "none": clock source is disabled | ||
26 | "brg1" through "brg16": clock source is BRG1-BRG16, respectively | ||
27 | "clk1" through "clk24": clock source is CLK1-CLK24, respectively | ||
28 | - tx-clock-name: the UCC transmit clock source | ||
29 | "none": clock source is disabled | ||
30 | "brg1" through "brg16": clock source is BRG1-BRG16, respectively | ||
31 | "clk1" through "clk24": clock source is CLK1-CLK24, respectively | ||
32 | The following two properties are deprecated. rx-clock has been replaced | ||
33 | with rx-clock-name, and tx-clock has been replaced with tx-clock-name. | ||
34 | Drivers that currently use the deprecated properties should continue to | ||
35 | do so, in order to support older device trees, but they should be updated | ||
36 | to check for the new properties first. | ||
37 | - rx-clock : represents the UCC receive clock source. | ||
38 | 0x00 : clock source is disabled; | ||
39 | 0x1~0x10 : clock source is BRG1~BRG16 respectively; | ||
40 | 0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively. | ||
41 | - tx-clock: represents the UCC transmit clock source; | ||
42 | 0x00 : clock source is disabled; | ||
43 | 0x1~0x10 : clock source is BRG1~BRG16 respectively; | ||
44 | 0x11~0x28: clock source is QE_CLK1~QE_CLK24 respectively. | ||
45 | |||
46 | Required properties for network device_type: | ||
47 | - mac-address : list of bytes representing the ethernet address. | ||
48 | - phy-handle : The phandle for the PHY connected to this controller. | ||
49 | |||
50 | Recommended properties: | ||
51 | - phy-connection-type : a string naming the controller/PHY interface type, | ||
52 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal | ||
53 | Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), | ||
54 | "tbi", or "rtbi". | ||
55 | |||
56 | Example: | ||
57 | ucc@2000 { | ||
58 | device_type = "network"; | ||
59 | compatible = "ucc_geth"; | ||
60 | cell-index = <1>; | ||
61 | reg = <2000 200>; | ||
62 | interrupts = <a0 0>; | ||
63 | interrupt-parent = <700>; | ||
64 | mac-address = [ 00 04 9f 00 23 23 ]; | ||
65 | rx-clock = "none"; | ||
66 | tx-clock = "clk9"; | ||
67 | phy-handle = <212000>; | ||
68 | phy-connection-type = "gmii"; | ||
69 | pio-handle = <140001>; | ||
70 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/usb.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/usb.txt new file mode 100644 index 000000000000..c8f44d6bcbcf --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/qe/usb.txt | |||
@@ -0,0 +1,22 @@ | |||
1 | * USB (Universal Serial Bus Controller) | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : could be "qe_udc" or "fhci-hcd". | ||
5 | - mode : the could be "host" or "slave". | ||
6 | - reg : Offset and length of the register set for the device | ||
7 | - interrupts : <a b> where a is the interrupt number and b is a | ||
8 | field that represents an encoding of the sense and level | ||
9 | information for the interrupt. This should be encoded based on | ||
10 | the information in section 2) depending on the type of interrupt | ||
11 | controller you have. | ||
12 | - interrupt-parent : the phandle for the interrupt controller that | ||
13 | services interrupts for this device. | ||
14 | |||
15 | Example(slave): | ||
16 | usb@6c0 { | ||
17 | compatible = "qe_udc"; | ||
18 | reg = <6c0 40>; | ||
19 | interrupts = <8b 0>; | ||
20 | interrupt-parent = <700>; | ||
21 | mode = "slave"; | ||
22 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/cpm_qe/serial.txt b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/serial.txt new file mode 100644 index 000000000000..b35f3482e3e4 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/cpm_qe/serial.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | * Serial | ||
2 | |||
3 | Currently defined compatibles: | ||
4 | - fsl,cpm1-smc-uart | ||
5 | - fsl,cpm2-smc-uart | ||
6 | - fsl,cpm1-scc-uart | ||
7 | - fsl,cpm2-scc-uart | ||
8 | - fsl,qe-uart | ||
9 | |||
10 | Example: | ||
11 | |||
12 | serial@11a00 { | ||
13 | device_type = "serial"; | ||
14 | compatible = "fsl,mpc8272-scc-uart", | ||
15 | "fsl,cpm2-scc-uart"; | ||
16 | reg = <11a00 20 8000 100>; | ||
17 | interrupts = <28 8>; | ||
18 | interrupt-parent = <&PIC>; | ||
19 | fsl,cpm-brg = <1>; | ||
20 | fsl,cpm-command = <00800000>; | ||
21 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/diu.txt b/Documentation/powerpc/dts-bindings/fsl/diu.txt new file mode 100644 index 000000000000..deb35de70988 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/diu.txt | |||
@@ -0,0 +1,18 @@ | |||
1 | * Freescale Display Interface Unit | ||
2 | |||
3 | The Freescale DIU is a LCD controller, with proper hardware, it can also | ||
4 | drive DVI monitors. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : should be "fsl-diu". | ||
8 | - reg : should contain at least address and length of the DIU register | ||
9 | set. | ||
10 | - Interrupts : one DIU interrupt should be describe here. | ||
11 | |||
12 | Example (MPC8610HPCD): | ||
13 | display@2c000 { | ||
14 | compatible = "fsl,diu"; | ||
15 | reg = <0x2c000 100>; | ||
16 | interrupts = <72 2>; | ||
17 | interrupt-parent = <&mpic>; | ||
18 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/dma.txt b/Documentation/powerpc/dts-bindings/fsl/dma.txt new file mode 100644 index 000000000000..86826df00e64 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/dma.txt | |||
@@ -0,0 +1,127 @@ | |||
1 | * Freescale 83xx DMA Controller | ||
2 | |||
3 | Freescale PowerPC 83xx have on chip general purpose DMA controllers. | ||
4 | |||
5 | Required properties: | ||
6 | |||
7 | - compatible : compatible list, contains 2 entries, first is | ||
8 | "fsl,CHIP-dma", where CHIP is the processor | ||
9 | (mpc8349, mpc8360, etc.) and the second is | ||
10 | "fsl,elo-dma" | ||
11 | - reg : <registers mapping for DMA general status reg> | ||
12 | - ranges : Should be defined as specified in 1) to describe the | ||
13 | DMA controller channels. | ||
14 | - cell-index : controller index. 0 for controller @ 0x8100 | ||
15 | - interrupts : <interrupt mapping for DMA IRQ> | ||
16 | - interrupt-parent : optional, if needed for interrupt mapping | ||
17 | |||
18 | |||
19 | - DMA channel nodes: | ||
20 | - compatible : compatible list, contains 2 entries, first is | ||
21 | "fsl,CHIP-dma-channel", where CHIP is the processor | ||
22 | (mpc8349, mpc8350, etc.) and the second is | ||
23 | "fsl,elo-dma-channel" | ||
24 | - reg : <registers mapping for channel> | ||
25 | - cell-index : dma channel index starts at 0. | ||
26 | |||
27 | Optional properties: | ||
28 | - interrupts : <interrupt mapping for DMA channel IRQ> | ||
29 | (on 83xx this is expected to be identical to | ||
30 | the interrupts property of the parent node) | ||
31 | - interrupt-parent : optional, if needed for interrupt mapping | ||
32 | |||
33 | Example: | ||
34 | dma@82a8 { | ||
35 | #address-cells = <1>; | ||
36 | #size-cells = <1>; | ||
37 | compatible = "fsl,mpc8349-dma", "fsl,elo-dma"; | ||
38 | reg = <82a8 4>; | ||
39 | ranges = <0 8100 1a4>; | ||
40 | interrupt-parent = <&ipic>; | ||
41 | interrupts = <47 8>; | ||
42 | cell-index = <0>; | ||
43 | dma-channel@0 { | ||
44 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | ||
45 | cell-index = <0>; | ||
46 | reg = <0 80>; | ||
47 | }; | ||
48 | dma-channel@80 { | ||
49 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | ||
50 | cell-index = <1>; | ||
51 | reg = <80 80>; | ||
52 | }; | ||
53 | dma-channel@100 { | ||
54 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | ||
55 | cell-index = <2>; | ||
56 | reg = <100 80>; | ||
57 | }; | ||
58 | dma-channel@180 { | ||
59 | compatible = "fsl,mpc8349-dma-channel", "fsl,elo-dma-channel"; | ||
60 | cell-index = <3>; | ||
61 | reg = <180 80>; | ||
62 | }; | ||
63 | }; | ||
64 | |||
65 | * Freescale 85xx/86xx DMA Controller | ||
66 | |||
67 | Freescale PowerPC 85xx/86xx have on chip general purpose DMA controllers. | ||
68 | |||
69 | Required properties: | ||
70 | |||
71 | - compatible : compatible list, contains 2 entries, first is | ||
72 | "fsl,CHIP-dma", where CHIP is the processor | ||
73 | (mpc8540, mpc8540, etc.) and the second is | ||
74 | "fsl,eloplus-dma" | ||
75 | - reg : <registers mapping for DMA general status reg> | ||
76 | - cell-index : controller index. 0 for controller @ 0x21000, | ||
77 | 1 for controller @ 0xc000 | ||
78 | - ranges : Should be defined as specified in 1) to describe the | ||
79 | DMA controller channels. | ||
80 | |||
81 | - DMA channel nodes: | ||
82 | - compatible : compatible list, contains 2 entries, first is | ||
83 | "fsl,CHIP-dma-channel", where CHIP is the processor | ||
84 | (mpc8540, mpc8560, etc.) and the second is | ||
85 | "fsl,eloplus-dma-channel" | ||
86 | - cell-index : dma channel index starts at 0. | ||
87 | - reg : <registers mapping for channel> | ||
88 | - interrupts : <interrupt mapping for DMA channel IRQ> | ||
89 | - interrupt-parent : optional, if needed for interrupt mapping | ||
90 | |||
91 | Example: | ||
92 | dma@21300 { | ||
93 | #address-cells = <1>; | ||
94 | #size-cells = <1>; | ||
95 | compatible = "fsl,mpc8540-dma", "fsl,eloplus-dma"; | ||
96 | reg = <21300 4>; | ||
97 | ranges = <0 21100 200>; | ||
98 | cell-index = <0>; | ||
99 | dma-channel@0 { | ||
100 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | ||
101 | reg = <0 80>; | ||
102 | cell-index = <0>; | ||
103 | interrupt-parent = <&mpic>; | ||
104 | interrupts = <14 2>; | ||
105 | }; | ||
106 | dma-channel@80 { | ||
107 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | ||
108 | reg = <80 80>; | ||
109 | cell-index = <1>; | ||
110 | interrupt-parent = <&mpic>; | ||
111 | interrupts = <15 2>; | ||
112 | }; | ||
113 | dma-channel@100 { | ||
114 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | ||
115 | reg = <100 80>; | ||
116 | cell-index = <2>; | ||
117 | interrupt-parent = <&mpic>; | ||
118 | interrupts = <16 2>; | ||
119 | }; | ||
120 | dma-channel@180 { | ||
121 | compatible = "fsl,mpc8540-dma-channel", "fsl,eloplus-dma-channel"; | ||
122 | reg = <180 80>; | ||
123 | cell-index = <3>; | ||
124 | interrupt-parent = <&mpic>; | ||
125 | interrupts = <17 2>; | ||
126 | }; | ||
127 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/gtm.txt b/Documentation/powerpc/dts-bindings/fsl/gtm.txt new file mode 100644 index 000000000000..9a33efded4bc --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/gtm.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | * Freescale General-purpose Timers Module | ||
2 | |||
3 | Required properties: | ||
4 | - compatible : should be | ||
5 | "fsl,<chip>-gtm", "fsl,gtm" for SOC GTMs | ||
6 | "fsl,<chip>-qe-gtm", "fsl,qe-gtm", "fsl,gtm" for QE GTMs | ||
7 | "fsl,<chip>-cpm2-gtm", "fsl,cpm2-gtm", "fsl,gtm" for CPM2 GTMs | ||
8 | - reg : should contain gtm registers location and length (0x40). | ||
9 | - interrupts : should contain four interrupts. | ||
10 | - interrupt-parent : interrupt source phandle. | ||
11 | - clock-frequency : specifies the frequency driving the timer. | ||
12 | |||
13 | Example: | ||
14 | |||
15 | timer@500 { | ||
16 | compatible = "fsl,mpc8360-gtm", "fsl,gtm"; | ||
17 | reg = <0x500 0x40>; | ||
18 | interrupts = <90 8 78 8 84 8 72 8>; | ||
19 | interrupt-parent = <&ipic>; | ||
20 | /* filled by u-boot */ | ||
21 | clock-frequency = <0>; | ||
22 | }; | ||
23 | |||
24 | timer@440 { | ||
25 | compatible = "fsl,mpc8360-qe-gtm", "fsl,qe-gtm", "fsl,gtm"; | ||
26 | reg = <0x440 0x40>; | ||
27 | interrupts = <12 13 14 15>; | ||
28 | interrupt-parent = <&qeic>; | ||
29 | /* filled by u-boot */ | ||
30 | clock-frequency = <0>; | ||
31 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/guts.txt b/Documentation/powerpc/dts-bindings/fsl/guts.txt new file mode 100644 index 000000000000..9e7a2417dac5 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/guts.txt | |||
@@ -0,0 +1,25 @@ | |||
1 | * Global Utilities Block | ||
2 | |||
3 | The global utilities block controls power management, I/O device | ||
4 | enabling, power-on-reset configuration monitoring, general-purpose | ||
5 | I/O signal configuration, alternate function selection for multiplexed | ||
6 | signals, and clock control. | ||
7 | |||
8 | Required properties: | ||
9 | |||
10 | - compatible : Should define the compatible device type for | ||
11 | global-utilities. | ||
12 | - reg : Offset and length of the register set for the device. | ||
13 | |||
14 | Recommended properties: | ||
15 | |||
16 | - fsl,has-rstcr : Indicates that the global utilities register set | ||
17 | contains a functioning "reset control register" (i.e. the board | ||
18 | is wired to reset upon setting the HRESET_REQ bit in this register). | ||
19 | |||
20 | Example: | ||
21 | global-utilities@e0000 { /* global utilities block */ | ||
22 | compatible = "fsl,mpc8548-guts"; | ||
23 | reg = <e0000 1000>; | ||
24 | fsl,has-rstcr; | ||
25 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/i2c.txt b/Documentation/powerpc/dts-bindings/fsl/i2c.txt new file mode 100644 index 000000000000..d0ab33e21fe6 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/i2c.txt | |||
@@ -0,0 +1,32 @@ | |||
1 | * I2C | ||
2 | |||
3 | Required properties : | ||
4 | |||
5 | - device_type : Should be "i2c" | ||
6 | - reg : Offset and length of the register set for the device | ||
7 | |||
8 | Recommended properties : | ||
9 | |||
10 | - compatible : Should be "fsl-i2c" for parts compatible with | ||
11 | Freescale I2C specifications. | ||
12 | - interrupts : <a b> where a is the interrupt number and b is a | ||
13 | field that represents an encoding of the sense and level | ||
14 | information for the interrupt. This should be encoded based on | ||
15 | the information in section 2) depending on the type of interrupt | ||
16 | controller you have. | ||
17 | - interrupt-parent : the phandle for the interrupt controller that | ||
18 | services interrupts for this device. | ||
19 | - dfsrr : boolean; if defined, indicates that this I2C device has | ||
20 | a digital filter sampling rate register | ||
21 | - fsl5200-clocking : boolean; if defined, indicated that this device | ||
22 | uses the FSL 5200 clocking mechanism. | ||
23 | |||
24 | Example : | ||
25 | i2c@3000 { | ||
26 | interrupt-parent = <40000>; | ||
27 | interrupts = <1b 3>; | ||
28 | reg = <3000 18>; | ||
29 | device_type = "i2c"; | ||
30 | compatible = "fsl-i2c"; | ||
31 | dfsrr; | ||
32 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/lbc.txt b/Documentation/powerpc/dts-bindings/fsl/lbc.txt new file mode 100644 index 000000000000..3300fec501c5 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/lbc.txt | |||
@@ -0,0 +1,35 @@ | |||
1 | * Chipselect/Local Bus | ||
2 | |||
3 | Properties: | ||
4 | - name : Should be localbus | ||
5 | - #address-cells : Should be either two or three. The first cell is the | ||
6 | chipselect number, and the remaining cells are the | ||
7 | offset into the chipselect. | ||
8 | - #size-cells : Either one or two, depending on how large each chipselect | ||
9 | can be. | ||
10 | - ranges : Each range corresponds to a single chipselect, and cover | ||
11 | the entire access window as configured. | ||
12 | |||
13 | Example: | ||
14 | localbus@f0010100 { | ||
15 | compatible = "fsl,mpc8272-localbus", | ||
16 | "fsl,pq2-localbus"; | ||
17 | #address-cells = <2>; | ||
18 | #size-cells = <1>; | ||
19 | reg = <f0010100 40>; | ||
20 | |||
21 | ranges = <0 0 fe000000 02000000 | ||
22 | 1 0 f4500000 00008000>; | ||
23 | |||
24 | flash@0,0 { | ||
25 | compatible = "jedec-flash"; | ||
26 | reg = <0 0 2000000>; | ||
27 | bank-width = <4>; | ||
28 | device-width = <1>; | ||
29 | }; | ||
30 | |||
31 | board-control@1,0 { | ||
32 | reg = <1 0 20>; | ||
33 | compatible = "fsl,mpc8272ads-bcsr"; | ||
34 | }; | ||
35 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/msi-pic.txt b/Documentation/powerpc/dts-bindings/fsl/msi-pic.txt new file mode 100644 index 000000000000..b26b91992c55 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/msi-pic.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | * Freescale MSI interrupt controller | ||
2 | |||
3 | Reguired properities: | ||
4 | - compatible : compatible list, contains 2 entries, | ||
5 | first is "fsl,CHIP-msi", where CHIP is the processor(mpc8610, mpc8572, | ||
6 | etc.) and the second is "fsl,mpic-msi" or "fsl,ipic-msi" depending on | ||
7 | the parent type. | ||
8 | - reg : should contain the address and the length of the shared message | ||
9 | interrupt register set. | ||
10 | - msi-available-ranges: use <start count> style section to define which | ||
11 | msi interrupt can be used in the 256 msi interrupts. This property is | ||
12 | optional, without this, all the 256 MSI interrupts can be used. | ||
13 | - interrupts : each one of the interrupts here is one entry per 32 MSIs, | ||
14 | and routed to the host interrupt controller. the interrupts should | ||
15 | be set as edge sensitive. | ||
16 | - interrupt-parent: the phandle for the interrupt controller | ||
17 | that services interrupts for this device. for 83xx cpu, the interrupts | ||
18 | are routed to IPIC, and for 85xx/86xx cpu the interrupts are routed | ||
19 | to MPIC. | ||
20 | |||
21 | Example: | ||
22 | msi@41600 { | ||
23 | compatible = "fsl,mpc8610-msi", "fsl,mpic-msi"; | ||
24 | reg = <0x41600 0x80>; | ||
25 | msi-available-ranges = <0 0x100>; | ||
26 | interrupts = < | ||
27 | 0xe0 0 | ||
28 | 0xe1 0 | ||
29 | 0xe2 0 | ||
30 | 0xe3 0 | ||
31 | 0xe4 0 | ||
32 | 0xe5 0 | ||
33 | 0xe6 0 | ||
34 | 0xe7 0>; | ||
35 | interrupt-parent = <&mpic>; | ||
36 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/sata.txt b/Documentation/powerpc/dts-bindings/fsl/sata.txt new file mode 100644 index 000000000000..b46bcf46c3d8 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/sata.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | * Freescale 8xxx/3.0 Gb/s SATA nodes | ||
2 | |||
3 | SATA nodes are defined to describe on-chip Serial ATA controllers. | ||
4 | Each SATA port should have its own node. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : compatible list, contains 2 entries, first is | ||
8 | "fsl,CHIP-sata", where CHIP is the processor | ||
9 | (mpc8315, mpc8379, etc.) and the second is | ||
10 | "fsl,pq-sata" | ||
11 | - interrupts : <interrupt mapping for SATA IRQ> | ||
12 | - cell-index : controller index. | ||
13 | 1 for controller @ 0x18000 | ||
14 | 2 for controller @ 0x19000 | ||
15 | 3 for controller @ 0x1a000 | ||
16 | 4 for controller @ 0x1b000 | ||
17 | |||
18 | Optional properties: | ||
19 | - interrupt-parent : optional, if needed for interrupt mapping | ||
20 | - reg : <registers mapping> | ||
21 | |||
22 | Example: | ||
23 | sata@18000 { | ||
24 | compatible = "fsl,mpc8379-sata", "fsl,pq-sata"; | ||
25 | reg = <0x18000 0x1000>; | ||
26 | cell-index = <1>; | ||
27 | interrupts = <2c 8>; | ||
28 | interrupt-parent = < &ipic >; | ||
29 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/sec.txt b/Documentation/powerpc/dts-bindings/fsl/sec.txt new file mode 100644 index 000000000000..2b6f2d45c45a --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/sec.txt | |||
@@ -0,0 +1,68 @@ | |||
1 | Freescale SoC SEC Security Engines | ||
2 | |||
3 | Required properties: | ||
4 | |||
5 | - compatible : Should contain entries for this and backward compatible | ||
6 | SEC versions, high to low, e.g., "fsl,sec2.1", "fsl,sec2.0" | ||
7 | - reg : Offset and length of the register set for the device | ||
8 | - interrupts : the SEC's interrupt number | ||
9 | - fsl,num-channels : An integer representing the number of channels | ||
10 | available. | ||
11 | - fsl,channel-fifo-len : An integer representing the number of | ||
12 | descriptor pointers each channel fetch fifo can hold. | ||
13 | - fsl,exec-units-mask : The bitmask representing what execution units | ||
14 | (EUs) are available. It's a single 32-bit cell. EU information | ||
15 | should be encoded following the SEC's Descriptor Header Dword | ||
16 | EU_SEL0 field documentation, i.e. as follows: | ||
17 | |||
18 | bit 0 = reserved - should be 0 | ||
19 | bit 1 = set if SEC has the ARC4 EU (AFEU) | ||
20 | bit 2 = set if SEC has the DES/3DES EU (DEU) | ||
21 | bit 3 = set if SEC has the message digest EU (MDEU/MDEU-A) | ||
22 | bit 4 = set if SEC has the random number generator EU (RNG) | ||
23 | bit 5 = set if SEC has the public key EU (PKEU) | ||
24 | bit 6 = set if SEC has the AES EU (AESU) | ||
25 | bit 7 = set if SEC has the Kasumi EU (KEU) | ||
26 | bit 8 = set if SEC has the CRC EU (CRCU) | ||
27 | bit 11 = set if SEC has the message digest EU extended alg set (MDEU-B) | ||
28 | |||
29 | remaining bits are reserved for future SEC EUs. | ||
30 | |||
31 | - fsl,descriptor-types-mask : The bitmask representing what descriptors | ||
32 | are available. It's a single 32-bit cell. Descriptor type information | ||
33 | should be encoded following the SEC's Descriptor Header Dword DESC_TYPE | ||
34 | field documentation, i.e. as follows: | ||
35 | |||
36 | bit 0 = set if SEC supports the aesu_ctr_nonsnoop desc. type | ||
37 | bit 1 = set if SEC supports the ipsec_esp descriptor type | ||
38 | bit 2 = set if SEC supports the common_nonsnoop desc. type | ||
39 | bit 3 = set if SEC supports the 802.11i AES ccmp desc. type | ||
40 | bit 4 = set if SEC supports the hmac_snoop_no_afeu desc. type | ||
41 | bit 5 = set if SEC supports the srtp descriptor type | ||
42 | bit 6 = set if SEC supports the non_hmac_snoop_no_afeu desc.type | ||
43 | bit 7 = set if SEC supports the pkeu_assemble descriptor type | ||
44 | bit 8 = set if SEC supports the aesu_key_expand_output desc.type | ||
45 | bit 9 = set if SEC supports the pkeu_ptmul descriptor type | ||
46 | bit 10 = set if SEC supports the common_nonsnoop_afeu desc. type | ||
47 | bit 11 = set if SEC supports the pkeu_ptadd_dbl descriptor type | ||
48 | |||
49 | ..and so on and so forth. | ||
50 | |||
51 | Optional properties: | ||
52 | |||
53 | - interrupt-parent : the phandle for the interrupt controller that | ||
54 | services interrupts for this device. | ||
55 | |||
56 | Example: | ||
57 | |||
58 | /* MPC8548E */ | ||
59 | crypto@30000 { | ||
60 | compatible = "fsl,sec2.1", "fsl,sec2.0"; | ||
61 | reg = <0x30000 0x10000>; | ||
62 | interrupts = <29 2>; | ||
63 | interrupt-parent = <&mpic>; | ||
64 | fsl,num-channels = <4>; | ||
65 | fsl,channel-fifo-len = <24>; | ||
66 | fsl,exec-units-mask = <0xfe>; | ||
67 | fsl,descriptor-types-mask = <0x12b0ebf>; | ||
68 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/spi.txt b/Documentation/powerpc/dts-bindings/fsl/spi.txt new file mode 100644 index 000000000000..e7d9a344c4f4 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/spi.txt | |||
@@ -0,0 +1,24 @@ | |||
1 | * SPI (Serial Peripheral Interface) | ||
2 | |||
3 | Required properties: | ||
4 | - cell-index : SPI controller index. | ||
5 | - compatible : should be "fsl,spi". | ||
6 | - mode : the SPI operation mode, it can be "cpu" or "cpu-qe". | ||
7 | - reg : Offset and length of the register set for the device | ||
8 | - interrupts : <a b> where a is the interrupt number and b is a | ||
9 | field that represents an encoding of the sense and level | ||
10 | information for the interrupt. This should be encoded based on | ||
11 | the information in section 2) depending on the type of interrupt | ||
12 | controller you have. | ||
13 | - interrupt-parent : the phandle for the interrupt controller that | ||
14 | services interrupts for this device. | ||
15 | |||
16 | Example: | ||
17 | spi@4c0 { | ||
18 | cell-index = <0>; | ||
19 | compatible = "fsl,spi"; | ||
20 | reg = <4c0 40>; | ||
21 | interrupts = <82 0>; | ||
22 | interrupt-parent = <700>; | ||
23 | mode = "cpu"; | ||
24 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/ssi.txt b/Documentation/powerpc/dts-bindings/fsl/ssi.txt new file mode 100644 index 000000000000..d100555d488a --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/ssi.txt | |||
@@ -0,0 +1,38 @@ | |||
1 | Freescale Synchronous Serial Interface | ||
2 | |||
3 | The SSI is a serial device that communicates with audio codecs. It can | ||
4 | be programmed in AC97, I2S, left-justified, or right-justified modes. | ||
5 | |||
6 | Required properties: | ||
7 | - compatible : compatible list, containing "fsl,ssi" | ||
8 | - cell-index : the SSI, <0> = SSI1, <1> = SSI2, and so on | ||
9 | - reg : offset and length of the register set for the device | ||
10 | - interrupts : <a b> where a is the interrupt number and b is a | ||
11 | field that represents an encoding of the sense and | ||
12 | level information for the interrupt. This should be | ||
13 | encoded based on the information in section 2) | ||
14 | depending on the type of interrupt controller you | ||
15 | have. | ||
16 | - interrupt-parent : the phandle for the interrupt controller that | ||
17 | services interrupts for this device. | ||
18 | - fsl,mode : the operating mode for the SSI interface | ||
19 | "i2s-slave" - I2S mode, SSI is clock slave | ||
20 | "i2s-master" - I2S mode, SSI is clock master | ||
21 | "lj-slave" - left-justified mode, SSI is clock slave | ||
22 | "lj-master" - l.j. mode, SSI is clock master | ||
23 | "rj-slave" - right-justified mode, SSI is clock slave | ||
24 | "rj-master" - r.j., SSI is clock master | ||
25 | "ac97-slave" - AC97 mode, SSI is clock slave | ||
26 | "ac97-master" - AC97 mode, SSI is clock master | ||
27 | |||
28 | Optional properties: | ||
29 | - codec-handle : phandle to a 'codec' node that defines an audio | ||
30 | codec connected to this SSI. This node is typically | ||
31 | a child of an I2C or other control node. | ||
32 | |||
33 | Child 'codec' node required properties: | ||
34 | - compatible : compatible list, contains the name of the codec | ||
35 | |||
36 | Child 'codec' node optional properties: | ||
37 | - clock-frequency : The frequency of the input clock, which typically | ||
38 | comes from an on-board dedicated oscillator. | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/tsec.txt b/Documentation/powerpc/dts-bindings/fsl/tsec.txt new file mode 100644 index 000000000000..583ef6b56c43 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/tsec.txt | |||
@@ -0,0 +1,69 @@ | |||
1 | * MDIO IO device | ||
2 | |||
3 | The MDIO is a bus to which the PHY devices are connected. For each | ||
4 | device that exists on this bus, a child node should be created. See | ||
5 | the definition of the PHY node below for an example of how to define | ||
6 | a PHY. | ||
7 | |||
8 | Required properties: | ||
9 | - reg : Offset and length of the register set for the device | ||
10 | - compatible : Should define the compatible device type for the | ||
11 | mdio. Currently, this is most likely to be "fsl,gianfar-mdio" | ||
12 | |||
13 | Example: | ||
14 | |||
15 | mdio@24520 { | ||
16 | reg = <24520 20>; | ||
17 | compatible = "fsl,gianfar-mdio"; | ||
18 | |||
19 | ethernet-phy@0 { | ||
20 | ...... | ||
21 | }; | ||
22 | }; | ||
23 | |||
24 | |||
25 | * Gianfar-compatible ethernet nodes | ||
26 | |||
27 | Required properties: | ||
28 | |||
29 | - device_type : Should be "network" | ||
30 | - model : Model of the device. Can be "TSEC", "eTSEC", or "FEC" | ||
31 | - compatible : Should be "gianfar" | ||
32 | - reg : Offset and length of the register set for the device | ||
33 | - mac-address : List of bytes representing the ethernet address of | ||
34 | this controller | ||
35 | - interrupts : <a b> where a is the interrupt number and b is a | ||
36 | field that represents an encoding of the sense and level | ||
37 | information for the interrupt. This should be encoded based on | ||
38 | the information in section 2) depending on the type of interrupt | ||
39 | controller you have. | ||
40 | - interrupt-parent : the phandle for the interrupt controller that | ||
41 | services interrupts for this device. | ||
42 | - phy-handle : The phandle for the PHY connected to this ethernet | ||
43 | controller. | ||
44 | - fixed-link : <a b c d e> where a is emulated phy id - choose any, | ||
45 | but unique to the all specified fixed-links, b is duplex - 0 half, | ||
46 | 1 full, c is link speed - d#10/d#100/d#1000, d is pause - 0 no | ||
47 | pause, 1 pause, e is asym_pause - 0 no asym_pause, 1 asym_pause. | ||
48 | |||
49 | Recommended properties: | ||
50 | |||
51 | - phy-connection-type : a string naming the controller/PHY interface type, | ||
52 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "sgmii", | ||
53 | "tbi", or "rtbi". This property is only really needed if the connection | ||
54 | is of type "rgmii-id", as all other connection types are detected by | ||
55 | hardware. | ||
56 | |||
57 | |||
58 | Example: | ||
59 | ethernet@24000 { | ||
60 | #size-cells = <0>; | ||
61 | device_type = "network"; | ||
62 | model = "TSEC"; | ||
63 | compatible = "gianfar"; | ||
64 | reg = <24000 1000>; | ||
65 | mac-address = [ 00 E0 0C 00 73 00 ]; | ||
66 | interrupts = <d 3 e 3 12 3>; | ||
67 | interrupt-parent = <40000>; | ||
68 | phy-handle = <2452000> | ||
69 | }; | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/usb.txt b/Documentation/powerpc/dts-bindings/fsl/usb.txt new file mode 100644 index 000000000000..b00152402694 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/usb.txt | |||
@@ -0,0 +1,59 @@ | |||
1 | Freescale SOC USB controllers | ||
2 | |||
3 | The device node for a USB controller that is part of a Freescale | ||
4 | SOC is as described in the document "Open Firmware Recommended | ||
5 | Practice : Universal Serial Bus" with the following modifications | ||
6 | and additions : | ||
7 | |||
8 | Required properties : | ||
9 | - compatible : Should be "fsl-usb2-mph" for multi port host USB | ||
10 | controllers, or "fsl-usb2-dr" for dual role USB controllers | ||
11 | - phy_type : For multi port host USB controllers, should be one of | ||
12 | "ulpi", or "serial". For dual role USB controllers, should be | ||
13 | one of "ulpi", "utmi", "utmi_wide", or "serial". | ||
14 | - reg : Offset and length of the register set for the device | ||
15 | - port0 : boolean; if defined, indicates port0 is connected for | ||
16 | fsl-usb2-mph compatible controllers. Either this property or | ||
17 | "port1" (or both) must be defined for "fsl-usb2-mph" compatible | ||
18 | controllers. | ||
19 | - port1 : boolean; if defined, indicates port1 is connected for | ||
20 | fsl-usb2-mph compatible controllers. Either this property or | ||
21 | "port0" (or both) must be defined for "fsl-usb2-mph" compatible | ||
22 | controllers. | ||
23 | - dr_mode : indicates the working mode for "fsl-usb2-dr" compatible | ||
24 | controllers. Can be "host", "peripheral", or "otg". Default to | ||
25 | "host" if not defined for backward compatibility. | ||
26 | |||
27 | Recommended properties : | ||
28 | - interrupts : <a b> where a is the interrupt number and b is a | ||
29 | field that represents an encoding of the sense and level | ||
30 | information for the interrupt. This should be encoded based on | ||
31 | the information in section 2) depending on the type of interrupt | ||
32 | controller you have. | ||
33 | - interrupt-parent : the phandle for the interrupt controller that | ||
34 | services interrupts for this device. | ||
35 | |||
36 | Example multi port host USB controller device node : | ||
37 | usb@22000 { | ||
38 | compatible = "fsl-usb2-mph"; | ||
39 | reg = <22000 1000>; | ||
40 | #address-cells = <1>; | ||
41 | #size-cells = <0>; | ||
42 | interrupt-parent = <700>; | ||
43 | interrupts = <27 1>; | ||
44 | phy_type = "ulpi"; | ||
45 | port0; | ||
46 | port1; | ||
47 | }; | ||
48 | |||
49 | Example dual role USB controller device node : | ||
50 | usb@23000 { | ||
51 | compatible = "fsl-usb2-dr"; | ||
52 | reg = <23000 1000>; | ||
53 | #address-cells = <1>; | ||
54 | #size-cells = <0>; | ||
55 | interrupt-parent = <700>; | ||
56 | interrupts = <26 1>; | ||
57 | dr_mode = "otg"; | ||
58 | phy = "ulpi"; | ||
59 | }; | ||
diff --git a/Documentation/vm/slabinfo.c b/Documentation/vm/slabinfo.c index e4230ed16ee7..df3227605d59 100644 --- a/Documentation/vm/slabinfo.c +++ b/Documentation/vm/slabinfo.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Slabinfo: Tool to get reports about slabs | 2 | * Slabinfo: Tool to get reports about slabs |
3 | * | 3 | * |
4 | * (C) 2007 sgi, Christoph Lameter <clameter@sgi.com> | 4 | * (C) 2007 sgi, Christoph Lameter |
5 | * | 5 | * |
6 | * Compile by: | 6 | * Compile by: |
7 | * | 7 | * |
@@ -99,7 +99,7 @@ void fatal(const char *x, ...) | |||
99 | 99 | ||
100 | void usage(void) | 100 | void usage(void) |
101 | { | 101 | { |
102 | printf("slabinfo 5/7/2007. (c) 2007 sgi. clameter@sgi.com\n\n" | 102 | printf("slabinfo 5/7/2007. (c) 2007 sgi.\n\n" |
103 | "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n" | 103 | "slabinfo [-ahnpvtsz] [-d debugopts] [slab-regexp]\n" |
104 | "-a|--aliases Show aliases\n" | 104 | "-a|--aliases Show aliases\n" |
105 | "-A|--activity Most active slabs first\n" | 105 | "-A|--activity Most active slabs first\n" |
diff --git a/Documentation/vm/slub.txt b/Documentation/vm/slub.txt index 7c13f22a0c9e..bb1f5c6e28b3 100644 --- a/Documentation/vm/slub.txt +++ b/Documentation/vm/slub.txt | |||
@@ -266,4 +266,4 @@ of other objects. | |||
266 | 266 | ||
267 | slub_debug=FZ,dentry | 267 | slub_debug=FZ,dentry |
268 | 268 | ||
269 | Christoph Lameter, <clameter@sgi.com>, May 30, 2007 | 269 | Christoph Lameter, May 30, 2007 |