summaryrefslogtreecommitdiffstats
path: root/drivers/soc/renesas/rcar-sysc.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2017-03-31 11:01:55 +0200
committerSimon Horman <horms+renesas@verge.net.au>2017-04-07 13:53:40 -0400
commitafa6f53df6052968ce3934ad324777c0057e31d1 (patch)
tree6f3e35d353e8040ef930cba81892d575d3dfadb8 /drivers/soc/renesas/rcar-sysc.h
parentb1d134ba9de2b7a136406530e34fc8b110ba6efd (diff)
downloadop-kernel-dev-afa6f53df6052968ce3934ad324777c0057e31d1.zip
op-kernel-dev-afa6f53df6052968ce3934ad324777c0057e31d1.tar.gz
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>
Diffstat (limited to 'drivers/soc/renesas/rcar-sysc.h')
-rw-r--r--drivers/soc/renesas/rcar-sysc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/soc/renesas/rcar-sysc.h b/drivers/soc/renesas/rcar-sysc.h
index f6e842e..07edb04 100644
--- a/drivers/soc/renesas/rcar-sysc.h
+++ b/drivers/soc/renesas/rcar-sysc.h
@@ -46,6 +46,7 @@ struct rcar_sysc_area {
*/
struct rcar_sysc_info {
+ int (*init)(void); /* Optional */
const struct rcar_sysc_area *areas;
unsigned int num_areas;
};
@@ -59,4 +60,13 @@ extern const struct rcar_sysc_info r8a7792_sysc_info;
extern const struct rcar_sysc_info r8a7794_sysc_info;
extern const struct rcar_sysc_info r8a7795_sysc_info;
extern const struct rcar_sysc_info r8a7796_sysc_info;
+
+
+ /*
+ * Helpers for fixing up power area tables depending on SoC revision
+ */
+
+extern void rcar_sysc_nullify(struct rcar_sysc_area *areas,
+ unsigned int num_areas, u8 id);
+
#endif /* __SOC_RENESAS_RCAR_SYSC_H__ */
OpenPOWER on IntegriCloud