Merge branch 'dt/cpu-type-rework' into dt/next
This commit is contained in:
@@ -87,14 +87,11 @@ void __init arm_dt_init_cpu_maps(void)
|
||||
if (!cpus)
|
||||
return;
|
||||
|
||||
for_each_child_of_node(cpus, cpu) {
|
||||
for_each_of_cpu_node(cpu) {
|
||||
const __be32 *cell;
|
||||
int prop_bytes;
|
||||
u32 hwid;
|
||||
|
||||
if (of_node_cmp(cpu->type, "cpu"))
|
||||
continue;
|
||||
|
||||
pr_debug(" * %pOF...\n", cpu);
|
||||
/*
|
||||
* A device tree containing CPU nodes with missing "reg"
|
||||
|
@@ -94,12 +94,6 @@ static void __init parse_dt_topology(void)
|
||||
__cpu_capacity = kcalloc(nr_cpu_ids, sizeof(*__cpu_capacity),
|
||||
GFP_NOWAIT);
|
||||
|
||||
cn = of_find_node_by_path("/cpus");
|
||||
if (!cn) {
|
||||
pr_err("No CPU information found in DT\n");
|
||||
return;
|
||||
}
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
const u32 *rate;
|
||||
int len;
|
||||
|
@@ -50,7 +50,7 @@ void __init rcar_gen2_pm_init(void)
|
||||
void __iomem *p;
|
||||
u32 bar;
|
||||
static int once;
|
||||
struct device_node *np, *cpus;
|
||||
struct device_node *np;
|
||||
bool has_a7 = false;
|
||||
bool has_a15 = false;
|
||||
struct resource res;
|
||||
@@ -59,11 +59,7 @@ void __init rcar_gen2_pm_init(void)
|
||||
if (once++)
|
||||
return;
|
||||
|
||||
cpus = of_find_node_by_path("/cpus");
|
||||
if (!cpus)
|
||||
return;
|
||||
|
||||
for_each_child_of_node(cpus, np) {
|
||||
for_each_of_cpu_node(np) {
|
||||
if (of_device_is_compatible(np, "arm,cortex-a15"))
|
||||
has_a15 = true;
|
||||
else if (of_device_is_compatible(np, "arm,cortex-a7"))
|
||||
|
@@ -202,7 +202,7 @@ static void __init get_special_pds(void)
|
||||
const struct of_device_id *id;
|
||||
|
||||
/* PM domains containing CPUs */
|
||||
for_each_node_by_type(np, "cpu")
|
||||
for_each_of_cpu_node(np)
|
||||
add_special_pd(np, PD_CPU);
|
||||
|
||||
/* PM domain containing console */
|
||||
|
@@ -22,22 +22,16 @@
|
||||
|
||||
void __init shmobile_init_delay(void)
|
||||
{
|
||||
struct device_node *np, *cpus;
|
||||
struct device_node *np;
|
||||
u32 max_freq = 0;
|
||||
|
||||
cpus = of_find_node_by_path("/cpus");
|
||||
if (!cpus)
|
||||
return;
|
||||
|
||||
for_each_child_of_node(cpus, np) {
|
||||
for_each_of_cpu_node(np) {
|
||||
u32 freq;
|
||||
|
||||
if (!of_property_read_u32(np, "clock-frequency", &freq))
|
||||
max_freq = max(max_freq, freq);
|
||||
}
|
||||
|
||||
of_node_put(cpus);
|
||||
|
||||
if (!max_freq)
|
||||
return;
|
||||
|
||||
|
Reference in New Issue
Block a user