soc: renesas: rcar-sysc: Add support for fixing up power area tables
authorGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 31 Mar 2017 09:01:55 +0000 (11:01 +0200)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 7 Apr 2017 17:53:40 +0000 (13:53 -0400)
commitafa6f53df6052968ce3934ad324777c0057e31d1
tree6f3e35d353e8040ef930cba81892d575d3dfadb8
parentb1d134ba9de2b7a136406530e34fc8b110ba6efd
soc: renesas: rcar-sysc: Add support for fixing up power area tables

The same SoC may have different power areas, depending on SoC revision.
One option is to use different sets of power area tables for each SoC
revision.  However, if the differences are small, it is much more
space-efficient to have a single set of tables, and fix those up at
runtime instead.

Hence provide a helper to NULLify power areas that do not exist on some
revisions (NULLified power areas are skipped during the registration
phase), and support for an optional initialization callback to e.g. fix
up power area tables.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/soc/renesas/rcar-sysc.c
drivers/soc/renesas/rcar-sysc.h