mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
Renesas ARM SoC updates for v6.4
- Use of_cpu_node_to_id() to read CPU node 'reg'. -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZDO7RwAKCRCKwlD9ZEnx cN5MAP96emLuyEeV2srYuaCTWhPRuJ8ze0gSyoRiMHNJz4EWOwD+Ii2AswTIWhwU D6mJcLY5fqUTin9sdboT3S18gHJlFAw= =B76T -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmQ5QV4ACgkQYKtH/8kJ UifxKxAAzC/5BUCSKIbNApmlA0w8mZSoLOSR6Wthd4uPNbzbva4xi+tEQp2NWRR3 bodtOnoBJ4ytTFdFMOV22VTGuzC9o4eW1Jjzfcqpzs8RyYzmk0yWVoNvvekkV5rO Oje7PLptfgmCsMILkBXaxe6GbLjLkRSBrvpWCjXSXgVb4VF9fKHfcFtkHFP7eMfr Ftw5eCFqi7E2xBk4irBw4XwVwq7wZsb1yjJ3rXmgyw4zCW9CY+71eJMnRDnDDyYM k16yhX5C6G3s9Ce+T46wa199MeVzJ1SwWF8K0dShmEvXOTW0na/CYWrjuvlb/dx3 DjAnAKQN+uCxBWodqtFaD2zQYCyWN1oA8ZrLNb7y8+zG0los3Ms9BsNOw1Guj5Bk ImuoBLw/ihb/M2iC7PY/xUtzxpHZeeesh5MeeUcL8N+Z1kC4ckjgus6/lTt0RN+V HZdtoOBjUnjSDMyq9v9r5LxY41zRK8o3TP7LbZzjP/+wY24laiMdXdEhNvYRBl3p Ez5HDza0yKYPpl3bd2hfHhMgmINZW2MKfiNTMAZ7PP7oyWp+TdF5wK7S/UeEnWSX bzJuXpH0h2/3rYC4njrRCBLLIUaY1Dh5UnUBozenYwuP/zSgeVOFpIJeYrucuB3+ 1Wwa9ZNzDc1q9E9jDne2OJ4uJWCtvDVWxGdS7aBENahjUmSUqLE= =o8j1 -----END PGP SIGNATURE----- Merge tag 'renesas-arm-soc-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/arm Renesas ARM SoC updates for v6.4 - Use of_cpu_node_to_id() to read CPU node 'reg'. * tag 'renesas-arm-soc-for-v6.4-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: ARM: sh-mobile: Use of_cpu_node_to_id() to read CPU node 'reg' Link: https://lore.kernel.org/r/cover.1681113113.git.geert+renesas@glider.be Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
bda649b9a8
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/suspend.h>
|
||||
|
|
@ -210,7 +211,6 @@ static void apmu_parse_dt(void (*fn)(struct resource *res, int cpu, int bit))
|
|||
struct device_node *np_apmu, *np_cpu;
|
||||
struct resource res;
|
||||
int bit, index;
|
||||
u32 id;
|
||||
|
||||
for_each_matching_node(np_apmu, apmu_ids) {
|
||||
/* only enable the cluster that includes the boot CPU */
|
||||
|
|
@ -218,33 +218,29 @@ static void apmu_parse_dt(void (*fn)(struct resource *res, int cpu, int bit))
|
|||
|
||||
for (bit = 0; bit < CONFIG_NR_CPUS; bit++) {
|
||||
np_cpu = of_parse_phandle(np_apmu, "cpus", bit);
|
||||
if (np_cpu) {
|
||||
if (!of_property_read_u32(np_cpu, "reg", &id)) {
|
||||
if (id == cpu_logical_map(0)) {
|
||||
is_allowed = true;
|
||||
of_node_put(np_cpu);
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
if (!np_cpu)
|
||||
break;
|
||||
if (of_cpu_node_to_id(np_cpu) == 0) {
|
||||
is_allowed = true;
|
||||
of_node_put(np_cpu);
|
||||
break;
|
||||
}
|
||||
of_node_put(np_cpu);
|
||||
}
|
||||
if (!is_allowed)
|
||||
continue;
|
||||
|
||||
for (bit = 0; bit < CONFIG_NR_CPUS; bit++) {
|
||||
np_cpu = of_parse_phandle(np_apmu, "cpus", bit);
|
||||
if (np_cpu) {
|
||||
if (!of_property_read_u32(np_cpu, "reg", &id)) {
|
||||
index = get_logical_index(id);
|
||||
if ((index >= 0) &&
|
||||
!of_address_to_resource(np_apmu,
|
||||
0, &res))
|
||||
fn(&res, index, bit);
|
||||
}
|
||||
of_node_put(np_cpu);
|
||||
}
|
||||
if (!np_cpu)
|
||||
break;
|
||||
|
||||
index = of_cpu_node_to_id(np_cpu);
|
||||
if ((index >= 0) &&
|
||||
!of_address_to_resource(np_apmu, 0, &res))
|
||||
fn(&res, index, bit);
|
||||
|
||||
of_node_put(np_cpu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user