diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2022-06-08 17:14:21 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2022-06-13 11:43:50 +0200 |
commit | 4f5bc54d28ecd0739c99dc71ed93c2ebb5d9ba32 (patch) | |
tree | 8b1e7b06b822522f7ae546fe9070ea5cd6c8c58f /drivers/soc/renesas | |
parent | soc: renesas: r8a779a0-sysc: Fix A2DP1 and A2CV[2357] PDR values (diff) | |
download | linux-4f5bc54d28ecd0739c99dc71ed93c2ebb5d9ba32.tar.xz linux-4f5bc54d28ecd0739c99dc71ed93c2ebb5d9ba32.zip |
soc: renesas: rcar-sysc: Optimize rcar_sysc_area struct sizes
Reduce the sizes of the rcar_sysc_area and rcar_gen4_sysc_area
structures:
- parent is in the range [-1..32] or [-1..64], so s8 is sufficient,
- flags needs just 3 bits (for now), so u8 is plenty.
This reduces kernel size by:
- 288 bytes for an R-Car Gen1+Gen2 kernel (arm32),
- 1772 bytes for an R-Car Gen3+Gen4 kernel (arm64).
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/cbbc8f464743d636895c048de61aa610d75392de.1654701156.git.geert+renesas@glider.be
Diffstat (limited to 'drivers/soc/renesas')
-rw-r--r-- | drivers/soc/renesas/rcar-gen4-sysc.h | 4 | ||||
-rw-r--r-- | drivers/soc/renesas/rcar-sysc.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/soc/renesas/rcar-gen4-sysc.h b/drivers/soc/renesas/rcar-gen4-sysc.h index fe2d98254754..388cfa8f8f9f 100644 --- a/drivers/soc/renesas/rcar-gen4-sysc.h +++ b/drivers/soc/renesas/rcar-gen4-sysc.h @@ -25,8 +25,8 @@ struct rcar_gen4_sysc_area { const char *name; u8 pdr; /* PDRn */ - int parent; /* -1 if none */ - unsigned int flags; /* See PD_* */ + s8 parent; /* -1 if none */ + u8 flags; /* See PD_* */ }; /* diff --git a/drivers/soc/renesas/rcar-sysc.h b/drivers/soc/renesas/rcar-sysc.h index 8d861c1cfdf7..266c599a0a9b 100644 --- a/drivers/soc/renesas/rcar-sysc.h +++ b/drivers/soc/renesas/rcar-sysc.h @@ -31,8 +31,8 @@ struct rcar_sysc_area { u16 chan_offs; /* Offset of PWRSR register for this area */ u8 chan_bit; /* Bit in PWR* (except for PWRUP in PWRSR) */ u8 isr_bit; /* Bit in SYSCI*R */ - int parent; /* -1 if none */ - unsigned int flags; /* See PD_* */ + s8 parent; /* -1 if none */ + u8 flags; /* See PD_* */ }; |