aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2014-05-15 17:15:20 +0100
committerSandrine Bailleux <sandrine.bailleux@arm.com>2014-06-05 17:39:40 +0100
commitdbc6eb236bb56a8cbc0b7876914aeea880a85a53 (patch)
tree71d5c043e61dc19acd6790311be2c3cb5b4bfe6b
parent7beb5ec173b49db62fd43cdd22def75d751e9b21 (diff)
downloadarm-trusted-firmware-dbc6eb236bb56a8cbc0b7876914aeea880a85a53.tar.gz
juno: Constify some variables
Mark some of the variables in the juno code as 'const' where possible. Change-Id: I14b19cccff5993c08a0ca11cd42e57d5435081f4
-rw-r--r--plat/juno/plat_io_storage.c16
-rw-r--r--plat/juno/plat_pm.c2
2 files changed, 9 insertions, 9 deletions
diff --git a/plat/juno/plat_io_storage.c b/plat/juno/plat_io_storage.c
index 5893b5e..6dbc27f 100644
--- a/plat/juno/plat_io_storage.c
+++ b/plat/juno/plat_io_storage.c
@@ -48,27 +48,27 @@ static uintptr_t memmap_dev_spec;
static uintptr_t memmap_init_params;
static uintptr_t memmap_dev_handle;
-static io_block_spec_t fip_block_spec = {
+static const io_block_spec_t fip_block_spec = {
.offset = FLASH_BASE,
.length = FLASH_SIZE
};
-static io_file_spec_t bl2_file_spec = {
+static const io_file_spec_t bl2_file_spec = {
.path = BL2_IMAGE_NAME,
.mode = FOPEN_MODE_RB
};
-static io_file_spec_t bl30_file_spec = {
+static const io_file_spec_t bl30_file_spec = {
.path = BL30_IMAGE_NAME,
.mode = FOPEN_MODE_RB
};
-static io_file_spec_t bl31_file_spec = {
+static const io_file_spec_t bl31_file_spec = {
.path = BL31_IMAGE_NAME,
.mode = FOPEN_MODE_RB
};
-static io_file_spec_t bl33_file_spec = {
+static const io_file_spec_t bl33_file_spec = {
.path = BL33_IMAGE_NAME,
.mode = FOPEN_MODE_RB
};
@@ -77,13 +77,13 @@ static int open_fip(const uintptr_t spec);
static int open_memmap(const uintptr_t spec);
struct plat_io_policy {
- char *image_name;
+ const char *image_name;
uintptr_t *dev_handle;
uintptr_t image_spec;
int (*check)(const uintptr_t spec);
};
-static struct plat_io_policy policies[] = {
+static const struct plat_io_policy policies[] = {
{
FIP_IMAGE_NAME,
&memmap_dev_handle,
@@ -178,7 +178,7 @@ int plat_get_image_source(const char *image_name, uintptr_t *dev_handle,
uintptr_t *image_spec)
{
int result = IO_FAIL;
- struct plat_io_policy *policy;
+ const struct plat_io_policy *policy;
if ((image_name != NULL) && (dev_handle != NULL) &&
(image_spec != NULL)) {
diff --git a/plat/juno/plat_pm.c b/plat/juno/plat_pm.c
index d301a74..87b9d8c 100644
--- a/plat/juno/plat_pm.c
+++ b/plat/juno/plat_pm.c
@@ -145,7 +145,7 @@ int pm_off(unsigned long mpidr, unsigned int afflvl, unsigned int state)
/*******************************************************************************
* Export the platform handlers to enable psci to invoke them
******************************************************************************/
-static plat_pm_ops_t pm_ops = {
+static const plat_pm_ops_t pm_ops = {
.affinst_on = pm_on,
.affinst_on_finish = pm_on_finish,
.affinst_off = pm_off