of: Add of_get_cpu_hwid() to read hardware ID from CPU nodes
authorRob Herring <robh@kernel.org>
Wed, 6 Oct 2021 16:43:21 +0000 (11:43 -0500)
committerRob Herring <robh@kernel.org>
Wed, 20 Oct 2021 18:36:16 +0000 (13:36 -0500)
commit795e92ec5fd79027648bd7f779d34bad5b6f2f55
tree7ed34ab33981d96f3527ec4b5a49fbc7c08d544c
parent378be0cca602cbee8aa441a14f836e9e41e25314
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
drivers/of/base.c
include/linux/of.h