diff options
author | Rob Herring <robh@kernel.org> | 2021-10-06 19:43:21 +0300 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2021-10-20 21:36:16 +0300 |
commit | 795e92ec5fd79027648bd7f779d34bad5b6f2f55 (patch) | |
tree | 7ed34ab33981d96f3527ec4b5a49fbc7c08d544c /include/linux/of.h | |
parent | 378be0cca602cbee8aa441a14f836e9e41e25314 (diff) | |
download | linux-795e92ec5fd79027648bd7f779d34bad5b6f2f55.tar.xz |
of: Add of_get_cpu_hwid() to read hardware ID from CPU nodes
There are various open coded implementions parsing the CPU node 'reg'
property which contains the CPU's hardware ID. Introduce a new function,
of_get_cpu_hwid(), to read the hardware ID.
All the callers should be DT only code, so no need for an empty
function.
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Sudeep Holla <sudeep.holla@arm.com>
Link: https://lore.kernel.org/r/20211006164332.1981454-2-robh@kernel.org
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 6f1c41f109bb..807f8168dad9 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -353,6 +353,7 @@ extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); extern struct device_node *of_get_next_cpu_node(struct device_node *prev); extern struct device_node *of_get_cpu_state_node(struct device_node *cpu_node, int index); +extern u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread); #define for_each_property_of_node(dn, pp) \ for (pp = dn->properties; pp != NULL; pp = pp->next) |