2017-12-27 12:55:14 -06:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
|
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
2016-06-15 08:32:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
2017-01-16 10:40:43 +00:00
|
|
|
|
2014-02-10 22:01:48 +01:00
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2010-02-01 21:34:14 -07:00
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
2012-12-06 14:55:41 -08:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2012-12-06 14:55:41 -08:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
|
|
|
|
|
2010-02-14 07:13:55 -07:00
|
|
|
|
2021-09-28 16:52:10 +02:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2014-03-28 08:12:18 -07:00
|
|
|
|
2014-11-27 17:56:07 +00:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
|
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
2018-08-27 07:50:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-22 09:03:54 -05:00
|
|
|
|
2018-08-27 07:50:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-22 09:03:54 -05:00
|
|
|
|
2018-08-27 07:50:47 -05:00
|
|
|
|
2018-08-29 08:36:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-02 18:42:39 +01:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
2017-07-23 19:55:47 +03:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
2019-07-02 18:42:39 +01:00
|
|
|
|
2017-07-23 19:55:47 +03:00
|
|
|
|
|
|
|
|
|
2019-07-02 18:42:39 +01:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-02 18:42:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
2019-07-02 18:42:39 +01:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
2017-07-23 19:55:47 +03:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
2019-07-02 18:42:39 +01:00
|
|
|
|
2017-07-23 19:55:47 +03:00
|
|
|
|
|
|
|
|
|
2019-07-02 18:42:39 +01:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-07-02 18:42:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
2013-09-17 10:42:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-08 19:59:20 +03:00
|
|
|
|
2013-09-17 10:42:50 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
|
|
|
|
|
2018-12-18 11:40:02 -08:00
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
2018-12-18 11:40:02 -08:00
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
2018-12-18 11:40:02 -08:00
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
2018-12-18 11:40:02 -08:00
|
|
|
|
|
|
|
|
|
2018-12-18 11:40:03 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
2018-12-18 11:40:03 -08:00
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
2018-12-18 11:40:03 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
2018-12-18 11:40:03 -08:00
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
Create a cache of the nodes that contain a phandle property. Use this
cache to find the node for a given phandle value instead of scanning
the devicetree to find the node. If the phandle value is not found
in the cache, of_find_node_by_phandle() will fall back to the tree
scan algorithm.
The cache is initialized in of_core_init().
The cache is freed via a late_initcall_sync() if modules are not
enabled.
If the devicetree is created by the dtc compiler, with all phandle
property values auto generated, then the size required by the cache
could be 4 * (1 + number of phandles) bytes. This results in an O(1)
node lookup cost for a given phandle value. Due to a concern that the
phandle property values might not be consistent with what is generated
by the dtc compiler, a mask has been added to the cache lookup algorithm.
To maintain the O(1) node lookup cost, the size of the cache has been
increased by rounding the number of entries up to the next power of
two.
The overhead of finding the devicetree node containing a given phandle
value has been noted by several people in the recent past, in some cases
with a patch to add a hashed index of devicetree nodes, based on the
phandle value of the node. One concern with this approach is the extra
space added to each node. This patch takes advantage of the phandle
property values auto generated by the dtc compiler, which begin with
one and monotonically increase by one, resulting in a range of 1..n
for n phandle values. This implementation should also provide a good
reduction of overhead for any range of phandle values that are mostly
in a monotonic range.
Performance measurements by Chintan Pandya <cpandya@codeaurora.org>
of several implementations of patches that are similar to this one
suggest an expected reduction of boot time by ~400ms for his test
system. If the cache size was decreased to 64 entries, the boot
time was reduced by ~340 ms. The measurements were on a 4.9.73 kernel
for arch/arm64/boot/dts/qcom/sda670-mtp.dts, contains 2371 nodes and
814 phandle values.
Reported-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-03-04 16:14:47 -08:00
|
|
|
|
|
|
|
|
|
2015-05-14 15:28:24 +01:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
Create a cache of the nodes that contain a phandle property. Use this
cache to find the node for a given phandle value instead of scanning
the devicetree to find the node. If the phandle value is not found
in the cache, of_find_node_by_phandle() will fall back to the tree
scan algorithm.
The cache is initialized in of_core_init().
The cache is freed via a late_initcall_sync() if modules are not
enabled.
If the devicetree is created by the dtc compiler, with all phandle
property values auto generated, then the size required by the cache
could be 4 * (1 + number of phandles) bytes. This results in an O(1)
node lookup cost for a given phandle value. Due to a concern that the
phandle property values might not be consistent with what is generated
by the dtc compiler, a mask has been added to the cache lookup algorithm.
To maintain the O(1) node lookup cost, the size of the cache has been
increased by rounding the number of entries up to the next power of
two.
The overhead of finding the devicetree node containing a given phandle
value has been noted by several people in the recent past, in some cases
with a patch to add a hashed index of devicetree nodes, based on the
phandle value of the node. One concern with this approach is the extra
space added to each node. This patch takes advantage of the phandle
property values auto generated by the dtc compiler, which begin with
one and monotonically increase by one, resulting in a range of 1..n
for n phandle values. This implementation should also provide a good
reduction of overhead for any range of phandle values that are mostly
in a monotonic range.
Performance measurements by Chintan Pandya <cpandya@codeaurora.org>
of several implementations of patches that are similar to this one
suggest an expected reduction of boot time by ~400ms for his test
system. If the cache size was decreased to 64 entries, the boot
time was reduced by ~340 ms. The measurements were on a 4.9.73 kernel
for arch/arm64/boot/dts/qcom/sda670-mtp.dts, contains 2371 nodes and
814 phandle values.
Reported-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-03-04 16:14:47 -08:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2016-06-15 08:32:18 -05:00
|
|
|
|
2015-05-14 15:28:24 +01:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2012-11-06 21:03:27 +00:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-08 05:19:59 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-06-27 09:44:45 +05:30
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
2012-06-27 09:44:45 +05:30
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 16:46:53 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
|
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2009-10-15 10:58:09 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-15 23:25:43 -06:00
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2007-05-01 16:26:07 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
2021-10-06 11:43:21 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-18 10:40:30 +00:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-27 13:46:51 -05:00
|
|
|
|
|
|
|
|
|
2013-10-04 17:24:26 +01:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
2013-10-04 17:24:26 +01:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-03 17:24:51 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-28 12:05:27 +09:00
|
|
|
|
2013-10-03 17:24:51 -04:00
|
|
|
|
|
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
2016-04-20 10:18:46 +09:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-03 17:24:51 -04:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
2018-08-27 09:47:00 -05:00
|
|
|
|
2013-10-03 17:24:51 -04:00
|
|
|
|
2013-08-15 14:01:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-01-02 11:25:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
|
|
|
|
|
2018-01-02 11:25:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: base: Add of_get_cpu_state_node() to get idle states for a CPU node
The CPU's idle state nodes are currently parsed at the common cpuidle DT
library, but also when initializing data for specific CPU idle operations,
as in the PSCI cpuidle driver case and qcom-spm cpuidle case.
To avoid open-coding, let's introduce of_get_cpu_state_node(), which takes
the device node for the CPU and the index to the requested idle state node,
as in-parameters. In case a corresponding idle state node is found, it
returns the node with the refcount incremented for it, else it returns
NULL.
Moreover, for PSCI there are two options to describe the CPU's idle states
[1], either via a flattened description or a hierarchical layout. Hence,
let's take both options into account.
[1] Documentation/devicetree/bindings/arm/psci.yaml
Suggested-by: Sudeep Holla <sudeep.holla@arm.com>
Co-developed-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
2019-10-10 12:01:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
of: base: Add of_get_cpu_state_node() to get idle states for a CPU node
The CPU's idle state nodes are currently parsed at the common cpuidle DT
library, but also when initializing data for specific CPU idle operations,
as in the PSCI cpuidle driver case and qcom-spm cpuidle case.
To avoid open-coding, let's introduce of_get_cpu_state_node(), which takes
the device node for the CPU and the index to the requested idle state node,
as in-parameters. In case a corresponding idle state node is found, it
returns the node with the refcount incremented for it, else it returns
NULL.
Moreover, for PSCI there are two options to describe the CPU's idle states
[1], either via a flattened description or a hierarchical layout. Hence,
let's take both options into account.
[1] Documentation/devicetree/bindings/arm/psci.yaml
Suggested-by: Sudeep Holla <sudeep.holla@arm.com>
Co-developed-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
2019-10-10 12:01:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
2018-08-29 08:36:12 -05:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
|
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
2018-08-27 08:37:06 -05:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
2007-05-01 16:29:19 +10:00
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
2016-07-08 08:35:59 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-29 17:32:49 -07:00
|
|
|
|
2016-07-08 08:35:59 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-18 14:54:57 +03:00
|
|
|
|
2016-07-08 08:35:59 +10:00
|
|
|
|
2010-01-28 13:47:25 -07:00
|
|
|
|
2010-02-01 21:34:14 -07:00
|
|
|
|
2010-01-28 13:47:25 -07:00
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
2010-01-28 13:47:25 -07:00
|
|
|
|
|
|
|
|
|
2010-02-01 21:34:14 -07:00
|
|
|
|
2010-01-28 13:47:25 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-01 21:34:14 -07:00
|
|
|
|
2010-01-28 13:47:25 -07:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: Fix __of_device_is_available check
From IEEE 1275, there defined a standard 'status' property indicating the
operational status of one device. The 'status' property has four possible
values: 'okay/ok', 'disabled', 'fail' and 'fail-xxx'.
If it is absent, that means the status of the device is unknown or okay.
The __of_device_is_available checks the state of the 'status' property of
a device. If the property is absent or set to 'okay/ok', it returns 1.
Otherwise it returns 0.
While in __of_device_is_available:
> status = of_get_property(device, "status", &statlen);
> if (status == NULL)
> return 1;
The status value returned from 'of_get_property()' will be NULL in two cases:
Firstly: the 'device' value (device node) is NULL.
Secondly: the 'status' property is actaully not exist.
If the device node is NULL, the __of_device_is_available will return true,
that will mean the absent state of the 'status' property.
So this add the device node check before checking the 'status' property's
state, and if the device node is not exist, 0 will be returned.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
2014-01-13 11:07:28 +08:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
of: Fix __of_device_is_available check
From IEEE 1275, there defined a standard 'status' property indicating the
operational status of one device. The 'status' property has four possible
values: 'okay/ok', 'disabled', 'fail' and 'fail-xxx'.
If it is absent, that means the status of the device is unknown or okay.
The __of_device_is_available checks the state of the 'status' property of
a device. If the property is absent or set to 'okay/ok', it returns 1.
Otherwise it returns 0.
While in __of_device_is_available:
> status = of_get_property(device, "status", &statlen);
> if (status == NULL)
> return 1;
The status value returned from 'of_get_property()' will be NULL in two cases:
Firstly: the 'device' value (device node) is NULL.
Secondly: the 'status' property is actaully not exist.
If the device node is NULL, the __of_device_is_available will return true,
that will mean the absent state of the 'status' property.
So this add the device node check before checking the 'status' property's
state, and if the device node is not exist, 0 will be returned.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
2014-01-13 11:07:28 +08:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
|
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
|
|
|
|
|
2014-11-12 12:54:01 -08:00
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-03-27 00:33:14 +11:00
|
|
|
|
|
|
|
|
|
2021-11-22 12:45:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-04-09 13:05:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
2015-04-09 13:05:14 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:16:16 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
|
|
|
|
|
2013-04-02 12:28:11 -03:00
|
|
|
|
2007-10-26 16:54:31 +10:00
|
|
|
|
2014-05-22 01:04:17 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-28 10:39:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-22 01:04:17 +09:00
|
|
|
|
2021-07-01 23:03:28 +09:00
|
|
|
|
2014-05-22 01:04:17 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-05-22 01:04:17 +09:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:21:29 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
2014-05-28 10:39:02 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
|
|
|
|
|
2013-02-11 14:15:32 -07:00
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2012-08-14 13:20:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-22 15:04:40 -05:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2018-08-22 15:04:40 -05:00
|
|
|
|
2021-11-22 12:45:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-22 15:04:40 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-22 12:45:36 +01:00
|
|
|
|
|
|
|
|
|
2018-08-22 15:04:40 -05:00
|
|
|
|
2018-08-29 08:36:12 -05:00
|
|
|
|
2018-08-22 15:04:40 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-27 10:21:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
2018-08-27 10:21:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-18 08:10:28 +01:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-18 08:10:28 +01:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
2012-09-18 08:10:28 +01:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-18 08:10:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-27 08:37:06 -05:00
|
|
|
|
2012-09-18 08:10:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-17 16:36:31 -07:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-06 16:52:53 +00:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
2015-03-17 12:30:31 -07:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-01 18:00:00 -05:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-02 12:43:18 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2014-11-28 11:34:28 +00:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-11-28 11:34:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-03-06 16:52:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-03-14 17:07:12 +00:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2017-06-02 12:43:18 -05:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
2014-11-28 11:34:28 +00:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2017-11-17 08:53:21 -08:00
|
|
|
|
|
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2018-08-27 08:37:06 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2018-08-29 08:36:12 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2007-04-24 17:57:33 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
2008-11-12 18:54:42 +00:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-12 18:54:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2008-11-12 18:54:42 +00:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2012-06-27 09:44:45 +05:30
|
|
|
|
2008-11-12 18:54:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2008-11-12 18:54:42 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-18 10:21:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Revert "OF: base: match each node compatible against all given matches first"
This reverts commit 105353145eafb3ea919f5cdeb652a9d8f270228e.
Stephen Chivers reported this is broken as we will get a match
entry '.type = "serial"' instead of the '.compatible = "ns16550"'
in the following scenario:
serial0: serial@4500 {
compatible = "fsl,ns16550", "ns16550";
}
struct of_device_id of_platform_serial_table[] = {
{ .compatible = "ns8250", .data = (void *)PORT_8250, },
{ .compatible = "ns16450", .data = (void *)PORT_16450, },
{ .compatible = "ns16550a", .data = (void *)PORT_16550A, },
{ .compatible = "ns16550", .data = (void *)PORT_16550, },
{ .compatible = "ns16750", .data = (void *)PORT_16750, },
{ .compatible = "ns16850", .data = (void *)PORT_16850, },
...
{ .type = "serial", .data = (void *)PORT_UNKNOWN, },
{ /* end of list */ },
};
So just revert this patch, we will use another implementation to find
the best compatible match in a follow-on patch.
Reported-by: Stephen N Chivers <schivers@csc.com.au>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2014-02-14 13:22:45 +08:00
|
|
|
|
of: reimplement the matching method for __of_match_node()
In the current implementation of __of_match_node(), it will compare
each given match entry against all the node's compatible strings
with of_device_is_compatible().
To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and
also an alphabetical ordering is more sane there.
Therefore, we define a following priority order for the match, and
then scan all the entries to find the best match.
1. specific compatible && type && name
2. specific compatible && type
3. specific compatible && name
4. specific compatible
5. general compatible && type && name
6. general compatible && type
7. general compatible && name
8. general compatible
9. type && name
10. type
11. name
v5: Fix nested locking bug
v4: Short-circuit failure cases instead of mucking with score, and
remove extra __of_device_is_compatible() wrapper stub.
Move scoring logic directly into __of_device_is_compatible()
v3: Also need to bail out when there does have a compatible member in match
entry, but it doesn't match with the device node's compatible.
v2: Fix the bug such as we get the same score for the following two match
entries with the empty node 'name2 { };'
struct of_device_id matches[] = {
{.name = "name2", },
{.name = "name2", .type = "type1", },
{}
};
Signed-off-by: Kevin Hao <haokexin@gmail.com>
[grant.likely: added v4 changes]
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Tested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Tested-by: Sachin Kamat <sachin.kamat@linaro.org>
2014-02-19 16:15:45 +08:00
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:54 +02:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
2012-11-20 16:12:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
|
|
|
|
|
2013-01-19 10:20:42 -08:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
2012-11-20 16:12:20 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-10-03 16:28:27 +01:00
|
|
|
|
2013-01-25 13:21:47 -05:00
|
|
|
|
2013-01-19 10:20:42 -08:00
|
|
|
|
2012-11-20 16:12:20 -07:00
|
|
|
|
2013-01-19 10:20:42 -08:00
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
2012-11-20 16:12:20 -07:00
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
|
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2008-01-09 06:20:40 +11:00
|
|
|
|
|
|
|
|
|
2012-12-19 10:45:36 +00:00
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:19 -06:00
|
|
|
|
|
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
|
|
|
|
|
2010-06-08 07:48:19 -06:00
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
|
|
|
|
|
2022-08-18 23:00:53 +02:00
|
|
|
|
2008-07-25 22:25:13 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-01 21:34:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
2010-02-01 21:34:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
Create a cache of the nodes that contain a phandle property. Use this
cache to find the node for a given phandle value instead of scanning
the devicetree to find the node. If the phandle value is not found
in the cache, of_find_node_by_phandle() will fall back to the tree
scan algorithm.
The cache is initialized in of_core_init().
The cache is freed via a late_initcall_sync() if modules are not
enabled.
If the devicetree is created by the dtc compiler, with all phandle
property values auto generated, then the size required by the cache
could be 4 * (1 + number of phandles) bytes. This results in an O(1)
node lookup cost for a given phandle value. Due to a concern that the
phandle property values might not be consistent with what is generated
by the dtc compiler, a mask has been added to the cache lookup algorithm.
To maintain the O(1) node lookup cost, the size of the cache has been
increased by rounding the number of entries up to the next power of
two.
The overhead of finding the devicetree node containing a given phandle
value has been noted by several people in the recent past, in some cases
with a patch to add a hashed index of devicetree nodes, based on the
phandle value of the node. One concern with this approach is the extra
space added to each node. This patch takes advantage of the phandle
property values auto generated by the dtc compiler, which begin with
one and monotonically increase by one, resulting in a range of 1..n
for n phandle values. This implementation should also provide a good
reduction of overhead for any range of phandle values that are mostly
in a monotonic range.
Performance measurements by Chintan Pandya <cpandya@codeaurora.org>
of several implementations of patches that are similar to this one
suggest an expected reduction of boot time by ~400ms for his test
system. If the cache size was decreased to 64 entries, the boot
time was reduced by ~340 ms. The measurements were on a 4.9.73 kernel
for arch/arm64/boot/dts/qcom/sda670-mtp.dts, contains 2371 nodes and
814 phandle values.
Reported-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-03-04 16:14:47 -08:00
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
2010-02-01 21:34:11 -07:00
|
|
|
|
2014-10-02 13:08:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
|
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
Create a cache of the nodes that contain a phandle property. Use this
cache to find the node for a given phandle value instead of scanning
the devicetree to find the node. If the phandle value is not found
in the cache, of_find_node_by_phandle() will fall back to the tree
scan algorithm.
The cache is initialized in of_core_init().
The cache is freed via a late_initcall_sync() if modules are not
enabled.
If the devicetree is created by the dtc compiler, with all phandle
property values auto generated, then the size required by the cache
could be 4 * (1 + number of phandles) bytes. This results in an O(1)
node lookup cost for a given phandle value. Due to a concern that the
phandle property values might not be consistent with what is generated
by the dtc compiler, a mask has been added to the cache lookup algorithm.
To maintain the O(1) node lookup cost, the size of the cache has been
increased by rounding the number of entries up to the next power of
two.
The overhead of finding the devicetree node containing a given phandle
value has been noted by several people in the recent past, in some cases
with a patch to add a hashed index of devicetree nodes, based on the
phandle value of the node. One concern with this approach is the extra
space added to each node. This patch takes advantage of the phandle
property values auto generated by the dtc compiler, which begin with
one and monotonically increase by one, resulting in a range of 1..n
for n phandle values. This implementation should also provide a good
reduction of overhead for any range of phandle values that are mostly
in a monotonic range.
Performance measurements by Chintan Pandya <cpandya@codeaurora.org>
of several implementations of patches that are similar to this one
suggest an expected reduction of boot time by ~400ms for his test
system. If the cache size was decreased to 64 entries, the boot
time was reduced by ~340 ms. The measurements were on a 4.9.73 kernel
for arch/arm64/boot/dts/qcom/sda670-mtp.dts, contains 2371 nodes and
814 phandle values.
Reported-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-03-04 16:14:47 -08:00
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
Create a cache of the nodes that contain a phandle property. Use this
cache to find the node for a given phandle value instead of scanning
the devicetree to find the node. If the phandle value is not found
in the cache, of_find_node_by_phandle() will fall back to the tree
scan algorithm.
The cache is initialized in of_core_init().
The cache is freed via a late_initcall_sync() if modules are not
enabled.
If the devicetree is created by the dtc compiler, with all phandle
property values auto generated, then the size required by the cache
could be 4 * (1 + number of phandles) bytes. This results in an O(1)
node lookup cost for a given phandle value. Due to a concern that the
phandle property values might not be consistent with what is generated
by the dtc compiler, a mask has been added to the cache lookup algorithm.
To maintain the O(1) node lookup cost, the size of the cache has been
increased by rounding the number of entries up to the next power of
two.
The overhead of finding the devicetree node containing a given phandle
value has been noted by several people in the recent past, in some cases
with a patch to add a hashed index of devicetree nodes, based on the
phandle value of the node. One concern with this approach is the extra
space added to each node. This patch takes advantage of the phandle
property values auto generated by the dtc compiler, which begin with
one and monotonically increase by one, resulting in a range of 1..n
for n phandle values. This implementation should also provide a good
reduction of overhead for any range of phandle values that are mostly
in a monotonic range.
Performance measurements by Chintan Pandya <cpandya@codeaurora.org>
of several implementations of patches that are similar to this one
suggest an expected reduction of boot time by ~400ms for his test
system. If the cache size was decreased to 64 entries, the boot
time was reduced by ~340 ms. The measurements were on a 4.9.73 kernel
for arch/arm64/boot/dts/qcom/sda670-mtp.dts, contains 2371 nodes and
814 phandle values.
Reported-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-03-04 16:14:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-18 11:40:03 -08:00
|
|
|
|
|
|
|
|
|
2019-12-06 16:27:41 -06:00
|
|
|
|
of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
Create a cache of the nodes that contain a phandle property. Use this
cache to find the node for a given phandle value instead of scanning
the devicetree to find the node. If the phandle value is not found
in the cache, of_find_node_by_phandle() will fall back to the tree
scan algorithm.
The cache is initialized in of_core_init().
The cache is freed via a late_initcall_sync() if modules are not
enabled.
If the devicetree is created by the dtc compiler, with all phandle
property values auto generated, then the size required by the cache
could be 4 * (1 + number of phandles) bytes. This results in an O(1)
node lookup cost for a given phandle value. Due to a concern that the
phandle property values might not be consistent with what is generated
by the dtc compiler, a mask has been added to the cache lookup algorithm.
To maintain the O(1) node lookup cost, the size of the cache has been
increased by rounding the number of entries up to the next power of
two.
The overhead of finding the devicetree node containing a given phandle
value has been noted by several people in the recent past, in some cases
with a patch to add a hashed index of devicetree nodes, based on the
phandle value of the node. One concern with this approach is the extra
space added to each node. This patch takes advantage of the phandle
property values auto generated by the dtc compiler, which begin with
one and monotonically increase by one, resulting in a range of 1..n
for n phandle values. This implementation should also provide a good
reduction of overhead for any range of phandle values that are mostly
in a monotonic range.
Performance measurements by Chintan Pandya <cpandya@codeaurora.org>
of several implementations of patches that are similar to this one
suggest an expected reduction of boot time by ~400ms for his test
system. If the cache size was decreased to 64 entries, the boot
time was reduced by ~340 ms. The measurements were on a 4.9.73 kernel
for arch/arm64/boot/dts/qcom/sda670-mtp.dts, contains 2371 nodes and
814 phandle values.
Reported-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-03-04 16:14:47 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-02-01 21:34:11 -07:00
|
|
|
|
2013-06-12 15:39:04 +10:00
|
|
|
|
2010-02-01 21:34:11 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-11 22:05:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
2016-12-01 09:00:55 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-11 22:05:10 +01:00
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2019-09-18 10:47:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2012-06-29 13:57:58 +09:00
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-20 01:31:16 +00:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2013-08-14 15:27:10 -06:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
2021-01-14 11:11:27 +01:00
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
2019-08-24 15:28:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
|
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-30 18:31:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-20 01:31:16 +00:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2016-04-04 17:49:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-18 18:35:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
|
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2022-01-18 18:35:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:20 +02:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
2016-04-04 17:49:21 +02:00
|
|
|
|
2013-04-10 11:36:39 +08:00
|
|
|
|
2016-04-04 17:49:17 +02:00
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
|
|
|
|
|
2011-12-12 09:25:57 -07:00
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:18 +02:00
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
2016-07-19 22:42:22 +02:00
|
|
|
|
2013-02-12 21:21:49 +00:00
|
|
|
|
2008-10-10 04:43:17 +00:00
|
|
|
|
2022-01-18 18:35:02 +01:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
of: Support parsing phandle argument lists through a nexus node
Platforms like 96boards have a standardized connector/expansion
slot that exposes signals like GPIOs to expansion boards in an
SoC agnostic way. We'd like the DT overlays for the expansion
boards to be written once without knowledge of the SoC on the
other side of the connector. This avoids the unscalable
combinatorial explosion of a different DT overlay for each
expansion board and SoC pair.
We need a way to describe the GPIOs routed through the connector
in an SoC agnostic way. Let's introduce nexus property parsing
into the OF core to do this. This is largely based on the
interrupt nexus support we already have. This allows us to remap
a phandle list in a consumer node (e.g. reset-gpios) through a
connector in a generic way (e.g. via gpio-map). Do this in a
generic routine so that we can remap any sort of variable length
phandle list.
Taking GPIOs as an example, the connector would be a GPIO nexus,
supporting the remapping of a GPIO specifier space to multiple
GPIO providers on the SoC. DT would look as shown below, where
'soc_gpio1' and 'soc_gpio2' are inside the SoC, 'connector' is an
expansion port where boards can be plugged in, and
'expansion_device' is a device on the expansion board.
soc {
soc_gpio1: gpio-controller1 {
#gpio-cells = <2>;
};
soc_gpio2: gpio-controller2 {
#gpio-cells = <2>;
};
};
connector: connector {
#gpio-cells = <2>;
gpio-map = <0 0 &soc_gpio1 1 0>,
<1 0 &soc_gpio2 4 0>,
<2 0 &soc_gpio1 3 0>,
<3 0 &soc_gpio2 2 0>;
gpio-map-mask = <0xf 0x0>;
gpio-map-pass-thru = <0x0 0x1>
};
expansion_device {
reset-gpios = <&connector 2 GPIO_ACTIVE_LOW>;
};
The GPIO core would use of_parse_phandle_with_args_map() instead
of of_parse_phandle_with_args() and arrive at the same type of
result, a phandle and argument list. The difference is that the
phandle and arguments will be remapped through the nexus node to
the underlying SoC GPIO controller node. In the example above,
we would remap 'reset-gpios' from <&connector 2 GPIO_ACTIVE_LOW>
to <&soc_gpio1 3 GPIO_ACTIVE_LOW>.
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-01-30 18:36:16 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
of: Support parsing phandle argument lists through a nexus node
Platforms like 96boards have a standardized connector/expansion
slot that exposes signals like GPIOs to expansion boards in an
SoC agnostic way. We'd like the DT overlays for the expansion
boards to be written once without knowledge of the SoC on the
other side of the connector. This avoids the unscalable
combinatorial explosion of a different DT overlay for each
expansion board and SoC pair.
We need a way to describe the GPIOs routed through the connector
in an SoC agnostic way. Let's introduce nexus property parsing
into the OF core to do this. This is largely based on the
interrupt nexus support we already have. This allows us to remap
a phandle list in a consumer node (e.g. reset-gpios) through a
connector in a generic way (e.g. via gpio-map). Do this in a
generic routine so that we can remap any sort of variable length
phandle list.
Taking GPIOs as an example, the connector would be a GPIO nexus,
supporting the remapping of a GPIO specifier space to multiple
GPIO providers on the SoC. DT would look as shown below, where
'soc_gpio1' and 'soc_gpio2' are inside the SoC, 'connector' is an
expansion port where boards can be plugged in, and
'expansion_device' is a device on the expansion board.
soc {
soc_gpio1: gpio-controller1 {
#gpio-cells = <2>;
};
soc_gpio2: gpio-controller2 {
#gpio-cells = <2>;
};
};
connector: connector {
#gpio-cells = <2>;
gpio-map = <0 0 &soc_gpio1 1 0>,
<1 0 &soc_gpio2 4 0>,
<2 0 &soc_gpio1 3 0>,
<3 0 &soc_gpio2 2 0>;
gpio-map-mask = <0xf 0x0>;
gpio-map-pass-thru = <0x0 0x1>
};
expansion_device {
reset-gpios = <&connector 2 GPIO_ACTIVE_LOW>;
};
The GPIO core would use of_parse_phandle_with_args_map() instead
of of_parse_phandle_with_args() and arrive at the same type of
result, a phandle and argument list. The difference is that the
phandle and arguments will be remapped through the nexus node to
the underlying SoC GPIO controller node. In the example above,
we would remap 'reset-gpios' from <&connector 2 GPIO_ACTIVE_LOW>
to <&soc_gpio1 3 GPIO_ACTIVE_LOW>.
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-01-30 18:36:16 -08:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: Support parsing phandle argument lists through a nexus node
Platforms like 96boards have a standardized connector/expansion
slot that exposes signals like GPIOs to expansion boards in an
SoC agnostic way. We'd like the DT overlays for the expansion
boards to be written once without knowledge of the SoC on the
other side of the connector. This avoids the unscalable
combinatorial explosion of a different DT overlay for each
expansion board and SoC pair.
We need a way to describe the GPIOs routed through the connector
in an SoC agnostic way. Let's introduce nexus property parsing
into the OF core to do this. This is largely based on the
interrupt nexus support we already have. This allows us to remap
a phandle list in a consumer node (e.g. reset-gpios) through a
connector in a generic way (e.g. via gpio-map). Do this in a
generic routine so that we can remap any sort of variable length
phandle list.
Taking GPIOs as an example, the connector would be a GPIO nexus,
supporting the remapping of a GPIO specifier space to multiple
GPIO providers on the SoC. DT would look as shown below, where
'soc_gpio1' and 'soc_gpio2' are inside the SoC, 'connector' is an
expansion port where boards can be plugged in, and
'expansion_device' is a device on the expansion board.
soc {
soc_gpio1: gpio-controller1 {
#gpio-cells = <2>;
};
soc_gpio2: gpio-controller2 {
#gpio-cells = <2>;
};
};
connector: connector {
#gpio-cells = <2>;
gpio-map = <0 0 &soc_gpio1 1 0>,
<1 0 &soc_gpio2 4 0>,
<2 0 &soc_gpio1 3 0>,
<3 0 &soc_gpio2 2 0>;
gpio-map-mask = <0xf 0x0>;
gpio-map-pass-thru = <0x0 0x1>
};
expansion_device {
reset-gpios = <&connector 2 GPIO_ACTIVE_LOW>;
};
The GPIO core would use of_parse_phandle_with_args_map() instead
of of_parse_phandle_with_args() and arrive at the same type of
result, a phandle and argument list. The difference is that the
phandle and arguments will be remapped through the nexus node to
the underlying SoC GPIO controller node. In the example above,
we would remap 'reset-gpios' from <&connector 2 GPIO_ACTIVE_LOW>
to <&soc_gpio1 3 GPIO_ACTIVE_LOW>.
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-01-30 18:36:16 -08:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: Support parsing phandle argument lists through a nexus node
Platforms like 96boards have a standardized connector/expansion
slot that exposes signals like GPIOs to expansion boards in an
SoC agnostic way. We'd like the DT overlays for the expansion
boards to be written once without knowledge of the SoC on the
other side of the connector. This avoids the unscalable
combinatorial explosion of a different DT overlay for each
expansion board and SoC pair.
We need a way to describe the GPIOs routed through the connector
in an SoC agnostic way. Let's introduce nexus property parsing
into the OF core to do this. This is largely based on the
interrupt nexus support we already have. This allows us to remap
a phandle list in a consumer node (e.g. reset-gpios) through a
connector in a generic way (e.g. via gpio-map). Do this in a
generic routine so that we can remap any sort of variable length
phandle list.
Taking GPIOs as an example, the connector would be a GPIO nexus,
supporting the remapping of a GPIO specifier space to multiple
GPIO providers on the SoC. DT would look as shown below, where
'soc_gpio1' and 'soc_gpio2' are inside the SoC, 'connector' is an
expansion port where boards can be plugged in, and
'expansion_device' is a device on the expansion board.
soc {
soc_gpio1: gpio-controller1 {
#gpio-cells = <2>;
};
soc_gpio2: gpio-controller2 {
#gpio-cells = <2>;
};
};
connector: connector {
#gpio-cells = <2>;
gpio-map = <0 0 &soc_gpio1 1 0>,
<1 0 &soc_gpio2 4 0>,
<2 0 &soc_gpio1 3 0>,
<3 0 &soc_gpio2 2 0>;
gpio-map-mask = <0xf 0x0>;
gpio-map-pass-thru = <0x0 0x1>
};
expansion_device {
reset-gpios = <&connector 2 GPIO_ACTIVE_LOW>;
};
The GPIO core would use of_parse_phandle_with_args_map() instead
of of_parse_phandle_with_args() and arrive at the same type of
result, a phandle and argument list. The difference is that the
phandle and arguments will be remapped through the nexus node to
the underlying SoC GPIO controller node. In the example above,
we would remap 'reset-gpios' from <&connector 2 GPIO_ACTIVE_LOW>
to <&soc_gpio1 3 GPIO_ACTIVE_LOW>.
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-01-30 18:36:16 -08:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: Support parsing phandle argument lists through a nexus node
Platforms like 96boards have a standardized connector/expansion
slot that exposes signals like GPIOs to expansion boards in an
SoC agnostic way. We'd like the DT overlays for the expansion
boards to be written once without knowledge of the SoC on the
other side of the connector. This avoids the unscalable
combinatorial explosion of a different DT overlay for each
expansion board and SoC pair.
We need a way to describe the GPIOs routed through the connector
in an SoC agnostic way. Let's introduce nexus property parsing
into the OF core to do this. This is largely based on the
interrupt nexus support we already have. This allows us to remap
a phandle list in a consumer node (e.g. reset-gpios) through a
connector in a generic way (e.g. via gpio-map). Do this in a
generic routine so that we can remap any sort of variable length
phandle list.
Taking GPIOs as an example, the connector would be a GPIO nexus,
supporting the remapping of a GPIO specifier space to multiple
GPIO providers on the SoC. DT would look as shown below, where
'soc_gpio1' and 'soc_gpio2' are inside the SoC, 'connector' is an
expansion port where boards can be plugged in, and
'expansion_device' is a device on the expansion board.
soc {
soc_gpio1: gpio-controller1 {
#gpio-cells = <2>;
};
soc_gpio2: gpio-controller2 {
#gpio-cells = <2>;
};
};
connector: connector {
#gpio-cells = <2>;
gpio-map = <0 0 &soc_gpio1 1 0>,
<1 0 &soc_gpio2 4 0>,
<2 0 &soc_gpio1 3 0>,
<3 0 &soc_gpio2 2 0>;
gpio-map-mask = <0xf 0x0>;
gpio-map-pass-thru = <0x0 0x1>
};
expansion_device {
reset-gpios = <&connector 2 GPIO_ACTIVE_LOW>;
};
The GPIO core would use of_parse_phandle_with_args_map() instead
of of_parse_phandle_with_args() and arrive at the same type of
result, a phandle and argument list. The difference is that the
phandle and arguments will be remapped through the nexus node to
the underlying SoC GPIO controller node. In the example above,
we would remap 'reset-gpios' from <&connector 2 GPIO_ACTIVE_LOW>
to <&soc_gpio1 3 GPIO_ACTIVE_LOW>.
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-01-30 18:36:16 -08:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of: Support parsing phandle argument lists through a nexus node
Platforms like 96boards have a standardized connector/expansion
slot that exposes signals like GPIOs to expansion boards in an
SoC agnostic way. We'd like the DT overlays for the expansion
boards to be written once without knowledge of the SoC on the
other side of the connector. This avoids the unscalable
combinatorial explosion of a different DT overlay for each
expansion board and SoC pair.
We need a way to describe the GPIOs routed through the connector
in an SoC agnostic way. Let's introduce nexus property parsing
into the OF core to do this. This is largely based on the
interrupt nexus support we already have. This allows us to remap
a phandle list in a consumer node (e.g. reset-gpios) through a
connector in a generic way (e.g. via gpio-map). Do this in a
generic routine so that we can remap any sort of variable length
phandle list.
Taking GPIOs as an example, the connector would be a GPIO nexus,
supporting the remapping of a GPIO specifier space to multiple
GPIO providers on the SoC. DT would look as shown below, where
'soc_gpio1' and 'soc_gpio2' are inside the SoC, 'connector' is an
expansion port where boards can be plugged in, and
'expansion_device' is a device on the expansion board.
soc {
soc_gpio1: gpio-controller1 {
#gpio-cells = <2>;
};
soc_gpio2: gpio-controller2 {
#gpio-cells = <2>;
};
};
connector: connector {
#gpio-cells = <2>;
gpio-map = <0 0 &soc_gpio1 1 0>,
<1 0 &soc_gpio2 4 0>,
<2 0 &soc_gpio1 3 0>,
<3 0 &soc_gpio2 2 0>;
gpio-map-mask = <0xf 0x0>;
gpio-map-pass-thru = <0x0 0x1>
};
expansion_device {
reset-gpios = <&connector 2 GPIO_ACTIVE_LOW>;
};
The GPIO core would use of_parse_phandle_with_args_map() instead
of of_parse_phandle_with_args() and arrive at the same type of
result, a phandle and argument list. The difference is that the
phandle and arguments will be remapped through the nexus node to
the underlying SoC GPIO controller node. In the example above,
we would remap 'reset-gpios' from <&connector 2 GPIO_ACTIVE_LOW>
to <&soc_gpio1 3 GPIO_ACTIVE_LOW>.
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-01-30 18:36:16 -08:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
of: Support parsing phandle argument lists through a nexus node
Platforms like 96boards have a standardized connector/expansion
slot that exposes signals like GPIOs to expansion boards in an
SoC agnostic way. We'd like the DT overlays for the expansion
boards to be written once without knowledge of the SoC on the
other side of the connector. This avoids the unscalable
combinatorial explosion of a different DT overlay for each
expansion board and SoC pair.
We need a way to describe the GPIOs routed through the connector
in an SoC agnostic way. Let's introduce nexus property parsing
into the OF core to do this. This is largely based on the
interrupt nexus support we already have. This allows us to remap
a phandle list in a consumer node (e.g. reset-gpios) through a
connector in a generic way (e.g. via gpio-map). Do this in a
generic routine so that we can remap any sort of variable length
phandle list.
Taking GPIOs as an example, the connector would be a GPIO nexus,
supporting the remapping of a GPIO specifier space to multiple
GPIO providers on the SoC. DT would look as shown below, where
'soc_gpio1' and 'soc_gpio2' are inside the SoC, 'connector' is an
expansion port where boards can be plugged in, and
'expansion_device' is a device on the expansion board.
soc {
soc_gpio1: gpio-controller1 {
#gpio-cells = <2>;
};
soc_gpio2: gpio-controller2 {
#gpio-cells = <2>;
};
};
connector: connector {
#gpio-cells = <2>;
gpio-map = <0 0 &soc_gpio1 1 0>,
<1 0 &soc_gpio2 4 0>,
<2 0 &soc_gpio1 3 0>,
<3 0 &soc_gpio2 2 0>;
gpio-map-mask = <0xf 0x0>;
gpio-map-pass-thru = <0x0 0x1>
};
expansion_device {
reset-gpios = <&connector 2 GPIO_ACTIVE_LOW>;
};
The GPIO core would use of_parse_phandle_with_args_map() instead
of of_parse_phandle_with_args() and arrive at the same type of
result, a phandle and argument list. The difference is that the
phandle and arguments will be remapped through the nexus node to
the underlying SoC GPIO controller node. In the example above,
we would remap 'reset-gpios' from <&connector 2 GPIO_ACTIVE_LOW>
to <&soc_gpio1 3 GPIO_ACTIVE_LOW>.
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-01-30 18:36:16 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-24 15:28:46 +02:00
|
|
|
|
of: Support parsing phandle argument lists through a nexus node
Platforms like 96boards have a standardized connector/expansion
slot that exposes signals like GPIOs to expansion boards in an
SoC agnostic way. We'd like the DT overlays for the expansion
boards to be written once without knowledge of the SoC on the
other side of the connector. This avoids the unscalable
combinatorial explosion of a different DT overlay for each
expansion board and SoC pair.
We need a way to describe the GPIOs routed through the connector
in an SoC agnostic way. Let's introduce nexus property parsing
into the OF core to do this. This is largely based on the
interrupt nexus support we already have. This allows us to remap
a phandle list in a consumer node (e.g. reset-gpios) through a
connector in a generic way (e.g. via gpio-map). Do this in a
generic routine so that we can remap any sort of variable length
phandle list.
Taking GPIOs as an example, the connector would be a GPIO nexus,
supporting the remapping of a GPIO specifier space to multiple
GPIO providers on the SoC. DT would look as shown below, where
'soc_gpio1' and 'soc_gpio2' are inside the SoC, 'connector' is an
expansion port where boards can be plugged in, and
'expansion_device' is a device on the expansion board.
soc {
soc_gpio1: gpio-controller1 {
#gpio-cells = <2>;
};
soc_gpio2: gpio-controller2 {
#gpio-cells = <2>;
};
};
connector: connector {
#gpio-cells = <2>;
gpio-map = <0 0 &soc_gpio1 1 0>,
<1 0 &soc_gpio2 4 0>,
<2 0 &soc_gpio1 3 0>,
<3 0 &soc_gpio2 2 0>;
gpio-map-mask = <0xf 0x0>;
gpio-map-pass-thru = <0x0 0x1>
};
expansion_device {
reset-gpios = <&connector 2 GPIO_ACTIVE_LOW>;
};
The GPIO core would use of_parse_phandle_with_args_map() instead
of of_parse_phandle_with_args() and arrive at the same type of
result, a phandle and argument list. The difference is that the
phandle and arguments will be remapped through the nexus node to
the underlying SoC GPIO controller node. In the example above,
we would remap 'reset-gpios' from <&connector 2 GPIO_ACTIVE_LOW>
to <&soc_gpio1 3 GPIO_ACTIVE_LOW>.
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
2018-01-30 18:36:16 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-10 22:57:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
2013-02-10 22:57:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-04-04 17:49:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-18 10:47:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-24 15:28:46 +02:00
|
|
|
|
2016-04-04 17:49:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-10 22:57:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-22 13:57:39 +08:00
|
|
|
|
|
|
|
|
|
2021-03-18 10:40:30 +00:00
|
|
|
|
2021-03-29 16:24:35 +01:00
|
|
|
|
2014-01-22 13:57:39 +08:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
2014-01-22 13:57:39 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2021-03-18 10:40:30 +00:00
|
|
|
|
2021-03-29 16:24:35 +01:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
|
|
|
|
|
2012-10-02 16:57:57 +00:00
|
|
|
|
|
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-01-22 13:57:39 +08:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2013-12-13 20:08:59 +02:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
|
|
|
|
|
2014-07-16 12:48:23 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-22 13:57:39 +08:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2021-07-10 02:13:13 -07:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2021-03-18 10:40:30 +00:00
|
|
|
|
2021-03-29 16:24:35 +01:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
|
|
|
|
|
2012-10-02 16:57:57 +00:00
|
|
|
|
|
|
|
|
|
2016-04-28 15:34:54 +10:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2014-07-16 12:48:23 -06:00
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2020-09-04 14:37:29 -07:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2012-07-11 15:16:37 +10:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-07-11 15:16:37 +10:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
2014-04-17 15:48:29 +08:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
2014-02-20 18:02:11 +00:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2012-07-11 15:16:37 +10:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2009-11-23 20:16:45 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2012-10-02 16:58:46 +00:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2012-10-02 16:57:57 +00:00
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
|
|
|
|
|
2012-10-02 16:57:57 +00:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2014-07-04 19:58:46 +03:00
|
|
|
|
2013-02-06 15:30:56 -05:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
|
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2014-07-23 17:05:06 -06:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
2014-07-16 12:48:23 -06:00
|
|
|
|
|
|
|
|
|
2012-10-02 16:55:01 +00:00
|
|
|
|
2012-10-02 16:57:57 +00:00
|
|
|
|
2010-01-29 05:04:33 -07:00
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-06-01 15:50:55 -05:00
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-22 11:44:53 +02:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
2014-10-22 11:44:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-08-27 17:09:39 +03:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
|
|
|
|
|
2014-03-28 08:12:18 -07:00
|
|
|
|
2017-07-23 19:55:48 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-28 08:12:18 -07:00
|
|
|
|
2017-07-23 19:55:48 +03:00
|
|
|
|
2015-03-17 16:46:33 -04:00
|
|
|
|
2014-11-27 17:56:07 +00:00
|
|
|
|
2022-06-23 01:03:43 -07:00
|
|
|
|
|
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-22 20:19:24 +08:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-23 16:38:27 +01:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
2013-08-28 21:24:17 +01:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-11 11:23:38 +01:00
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-07-04 19:58:03 +03:00
|
|
|
|
2011-08-15 15:28:14 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dt: add property iteration helpers
This patch adds macros of_property_for_each_u32() and
of_property_for_each_string(), which iterate over an array of values
within a device-tree property. Usage is for example:
struct property *prop;
const __be32 *p;
u32 u;
of_property_for_each_u32(np, "propname", prop, p, u)
printk("U32 value: %x\n", u);
struct property *prop;
const char *s;
of_property_for_each_string(np, "propname", prop, s)
printk("String value: %s\n", s);
Based on work by Rob Herring <robherring2@gmail.com>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-04-04 09:27:46 -06:00
|
|
|
|
2015-03-12 17:17:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
2021-03-18 10:40:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
|
|
|
|
|
2021-03-25 10:47:12 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
2017-09-26 15:25:10 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-05 14:40:44 +02:00
|
|
|
|
2014-03-27 17:18:55 -07:00
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
|
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
2021-03-26 13:26:06 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-04 12:30:07 -05:00
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
2017-05-04 12:30:07 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
2017-05-04 12:30:07 -05:00
|
|
|
|
|
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-29 08:36:12 -05:00
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
2018-08-29 08:36:12 -05:00
|
|
|
|
2013-09-18 11:53:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-02-10 22:01:48 +01:00
|
|
|
|
2017-01-16 10:40:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-23 21:12:47 -04:00
|
|
|
|
2017-01-16 10:40:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-30 16:49:36 +02:00
|
|
|
|
2017-01-16 10:40:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-09-30 16:49:36 +02:00
|
|
|
|
2017-01-16 10:40:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
|
|
|
|
|
2019-01-15 12:19:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|
2019-01-15 12:19:55 +00:00
|
|
|
|
2018-09-10 19:19:16 +05:30
|
|
|
|
2020-06-19 09:20:07 +01:00
|
|
|
|