diff options
| author | Rob Herring <robh@kernel.org> | 2018-08-27 14:46:51 -0400 |
|---|---|---|
| committer | Rob Herring <robh@kernel.org> | 2018-09-28 15:25:58 -0400 |
| commit | 6487c15f1cc9340fa010d94eeab72ebb657b21dc (patch) | |
| tree | 4c3eecbd1592fd99693f351ec308b2fd067f4f8c /drivers/of | |
| parent | f1f207e43b8a49ac2ee3c36a64de1f84651c6079 (diff) | |
of: Support matching cpu nodes with no 'reg' property
For some single core ARM systems, the DTs can have a single cpu node
without a reg property and #address-cells == 0. This case is valid and
should match on cpu #0.
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
| -rw-r--r-- | drivers/of/base.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 4807db0a35b3..bd51d2113cc0 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
| @@ -327,6 +327,8 @@ static bool __of_find_n_match_cpu_property(struct device_node *cpun, | |||
| 327 | 327 | ||
| 328 | ac = of_n_addr_cells(cpun); | 328 | ac = of_n_addr_cells(cpun); |
| 329 | cell = of_get_property(cpun, prop_name, &prop_len); | 329 | cell = of_get_property(cpun, prop_name, &prop_len); |
| 330 | if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0)) | ||
| 331 | return true; | ||
| 330 | if (!cell || !ac) | 332 | if (!cell || !ac) |
| 331 | return false; | 333 | return false; |
| 332 | prop_len /= sizeof(*cell) * ac; | 334 | prop_len /= sizeof(*cell) * ac; |
