In some platforms it may be desirable to disable certain CPU power
states, for example, because they have extra requirements not available
on all boards/applications. Because `cpu-power-states` are defined at
SoC dts file levels, the only way to achieve that now was by re-defining
`cpu-power-states` property in e.g. a board file. With this patch, one
can now selectively set `status = "disabled";` to any power state and it
will be skipped by the PM subsystem.
Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
In order to bring consistency in-tree, migrate all subsystems code to
the new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The CPU power states were declared with a typecast array literal,
which is a GNU extension.
Unfortunately some compilers (xt-xcc even in very recent versions,
when used with -fdata-sections) will die with a compiler error when
those rvalues are used in an expression that also takes their address,
e.g.:
/* this all by itself crashes xcc -fdata-sections */
int *foo = (int[]){0};
Declare the array elments in two steps, making the code standard C.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The PM state code is in practice useless when no cpus are defined in DT,
so require this node to be defined.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>