diff options
author | Samuel Holland <samuel@sholland.org> | 2019-02-17 15:09:11 -0600 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2019-02-17 20:13:40 -0600 |
commit | 508116827cfc763a5a8788608fb9848b25858c95 (patch) | |
tree | 229dff0d3523d8b509ca8f79ba82484365e70136 /plat/allwinner | |
parent | 833216666fe0083d55a275886ca7b272e13dde6b (diff) |
allwinner: Constify data structures
This maximizes the amount of data protected by the MMU.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'plat/allwinner')
-rw-r--r-- | plat/allwinner/common/sunxi_common.c | 2 | ||||
-rw-r--r-- | plat/allwinner/common/sunxi_topology.c | 2 | ||||
-rw-r--r-- | plat/allwinner/sun50i_a64/sunxi_power.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/plat/allwinner/common/sunxi_common.c b/plat/allwinner/common/sunxi_common.c index 6bb8968c..3b44aab6 100644 --- a/plat/allwinner/common/sunxi_common.c +++ b/plat/allwinner/common/sunxi_common.c @@ -18,7 +18,7 @@ #include <sunxi_mmap.h> #include <sunxi_private.h> -static mmap_region_t sunxi_mmap[PLATFORM_MMAP_REGIONS + 1] = { +static const mmap_region_t sunxi_mmap[PLATFORM_MMAP_REGIONS + 1] = { MAP_REGION_FLAT(SUNXI_SRAM_BASE, SUNXI_SRAM_SIZE, MT_MEMORY | MT_RW | MT_SECURE), MAP_REGION_FLAT(SUNXI_DEV_BASE, SUNXI_DEV_SIZE, diff --git a/plat/allwinner/common/sunxi_topology.c b/plat/allwinner/common/sunxi_topology.c index 7acc77a9..45be1e03 100644 --- a/plat/allwinner/common/sunxi_topology.c +++ b/plat/allwinner/common/sunxi_topology.c @@ -9,7 +9,7 @@ #include <arch.h> #include <plat/common/platform.h> -static unsigned char plat_power_domain_tree_desc[PLAT_MAX_PWR_LVL + 1] = { +static const unsigned char plat_power_domain_tree_desc[PLAT_MAX_PWR_LVL + 1] = { /* One root node for the SoC */ 1, /* One node for each cluster */ diff --git a/plat/allwinner/sun50i_a64/sunxi_power.c b/plat/allwinner/sun50i_a64/sunxi_power.c index 706bfcec..b4d16a06 100644 --- a/plat/allwinner/sun50i_a64/sunxi_power.c +++ b/plat/allwinner/sun50i_a64/sunxi_power.c @@ -175,7 +175,7 @@ static int fdt_get_regulator_millivolt(const void *fdt, int node) #define NO_SPLIT 0xff -struct axp_regulator { +static const struct axp_regulator { char *dt_name; uint16_t min_volt; uint16_t max_volt; @@ -247,7 +247,7 @@ static void setup_axp803_rails(const void *fdt) for (node = fdt_first_subnode(fdt, node); node != -FDT_ERR_NOTFOUND; node = fdt_next_subnode(fdt, node)) { - struct axp_regulator *reg; + const struct axp_regulator *reg; const char *name; int length; |