Commit a74a5a33 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

Merge branch 'cpuidle/3.19' of...

Merge branch 'cpuidle/3.19' of http://git.linaro.org/git-ro/people/daniel.lezcano/linux into pm-cpuidle

Pull ARM cpuidle material for 3.19-rc1 from Daniel Lezcano.

* 'cpuidle/3.19' of http://git.linaro.org/git-ro/people/daniel.lezcano/linux:
  drivers: cpuidle: Remove cpuidle-arm64 duplicate error messages
  drivers: cpuidle: Add idle-state-name description to ARM idle states
  drivers: cpuidle: Add status property to ARM idle states
parents fc14f9c1 18f95a36
...@@ -317,6 +317,26 @@ follows: ...@@ -317,6 +317,26 @@ follows:
In such systems entry-latency-us + exit-latency-us In such systems entry-latency-us + exit-latency-us
will exceed wakeup-latency-us by this duration. will exceed wakeup-latency-us by this duration.
- status:
Usage: Optional
Value type: <string>
Definition: A standard device tree property [5] that indicates
the operational status of an idle-state.
If present, it shall be:
"okay": to indicate that the idle state is
operational.
"disabled": to indicate that the idle state has
been disabled in firmware so it is not
operational.
If the property is not present the idle-state must
be considered operational.
- idle-state-name:
Usage: Optional
Value type: <string>
Definition: A string used as a descriptive name for the idle
state.
In addition to the properties listed above, a state node may require In addition to the properties listed above, a state node may require
additional properties specifics to the entry-method defined in the additional properties specifics to the entry-method defined in the
idle-states node, please refer to the entry-method bindings idle-states node, please refer to the entry-method bindings
......
...@@ -104,11 +104,8 @@ static int __init arm64_idle_init(void) ...@@ -104,11 +104,8 @@ static int __init arm64_idle_init(void)
* reason to initialize the idle driver if only wfi is supported. * reason to initialize the idle driver if only wfi is supported.
*/ */
ret = dt_init_idle_driver(drv, arm64_idle_state_match, 1); ret = dt_init_idle_driver(drv, arm64_idle_state_match, 1);
if (ret <= 0) { if (ret <= 0)
if (ret)
pr_err("failed to initialize idle states\n");
return ret ? : -ENODEV; return ret ? : -ENODEV;
}
/* /*
* Call arch CPU operations in order to initialize * Call arch CPU operations in order to initialize
...@@ -122,12 +119,6 @@ static int __init arm64_idle_init(void) ...@@ -122,12 +119,6 @@ static int __init arm64_idle_init(void)
} }
} }
ret = cpuidle_register(drv, NULL); return cpuidle_register(drv, NULL);
if (ret) {
pr_err("failed to register cpuidle driver\n");
return ret;
}
return 0;
} }
device_initcall(arm64_idle_init); device_initcall(arm64_idle_init);
...@@ -27,6 +27,7 @@ static int init_state_node(struct cpuidle_state *idle_state, ...@@ -27,6 +27,7 @@ static int init_state_node(struct cpuidle_state *idle_state,
{ {
int err; int err;
const struct of_device_id *match_id; const struct of_device_id *match_id;
const char *desc;
match_id = of_match_node(matches, state_node); match_id = of_match_node(matches, state_node);
if (!match_id) if (!match_id)
...@@ -73,6 +74,10 @@ static int init_state_node(struct cpuidle_state *idle_state, ...@@ -73,6 +74,10 @@ static int init_state_node(struct cpuidle_state *idle_state,
return -EINVAL; return -EINVAL;
} }
err = of_property_read_string(state_node, "idle-state-name", &desc);
if (err)
desc = state_node->name;
idle_state->flags = CPUIDLE_FLAG_TIME_VALID; idle_state->flags = CPUIDLE_FLAG_TIME_VALID;
if (of_property_read_bool(state_node, "local-timer-stop")) if (of_property_read_bool(state_node, "local-timer-stop"))
idle_state->flags |= CPUIDLE_FLAG_TIMER_STOP; idle_state->flags |= CPUIDLE_FLAG_TIMER_STOP;
...@@ -82,7 +87,7 @@ static int init_state_node(struct cpuidle_state *idle_state, ...@@ -82,7 +87,7 @@ static int init_state_node(struct cpuidle_state *idle_state,
* and desc become string pointers * and desc become string pointers
*/ */
strncpy(idle_state->name, state_node->name, CPUIDLE_NAME_LEN - 1); strncpy(idle_state->name, state_node->name, CPUIDLE_NAME_LEN - 1);
strncpy(idle_state->desc, state_node->name, CPUIDLE_DESC_LEN - 1); strncpy(idle_state->desc, desc, CPUIDLE_DESC_LEN - 1);
return 0; return 0;
} }
...@@ -169,6 +174,9 @@ int dt_init_idle_driver(struct cpuidle_driver *drv, ...@@ -169,6 +174,9 @@ int dt_init_idle_driver(struct cpuidle_driver *drv,
if (!state_node) if (!state_node)
break; break;
if (!of_device_is_available(state_node))
continue;
if (!idle_state_valid(state_node, i, cpumask)) { if (!idle_state_valid(state_node, i, cpumask)) {
pr_warn("%s idle state not valid, bailing out\n", pr_warn("%s idle state not valid, bailing out\n",
state_node->full_name); state_node->full_name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment