aboutsummaryrefslogtreecommitdiff
path: root/plat/arm/common/arm_io_storage.c
diff options
context:
space:
mode:
authorJuan Castillo <juan.castillo@arm.com>2015-11-02 10:47:01 +0000
committerJuan Castillo <juan.castillo@arm.com>2015-11-02 10:47:01 +0000
commite098e244a25017d8298d63a8bf04e9151b52ac3a (patch)
tree9b6618d8dcdb604e8206b3104b60c71766a629f5 /plat/arm/common/arm_io_storage.c
parentf57e2db6ef4b86a6af57891a2d7a90266ad6c033 (diff)
downloadtrusted-firmware-a-e098e244a25017d8298d63a8bf04e9151b52ac3a.tar.gz
Remove deprecated IO return definitions
Patch 7e26fe1f deprecates IO specific return definitions in favour of standard errno codes. This patch removes those definitions and its usage from the IO framework, IO drivers and IO platform layer. Following this patch, standard errno codes must be used when checking the return value of an IO function. Change-Id: Id6e0e9d0a7daf15a81ec598cf74de83d5768650f
Diffstat (limited to 'plat/arm/common/arm_io_storage.c')
-rw-r--r--plat/arm/common/arm_io_storage.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/plat/arm/common/arm_io_storage.c b/plat/arm/common/arm_io_storage.c
index 8488f1213c..ae67cde00d 100644
--- a/plat/arm/common/arm_io_storage.c
+++ b/plat/arm/common/arm_io_storage.c
@@ -220,9 +220,9 @@ static int open_fip(const uintptr_t spec)
/* See if a Firmware Image Package is available */
result = io_dev_init(fip_dev_handle, (uintptr_t)FIP_IMAGE_ID);
- if (result == IO_SUCCESS) {
+ if (result == 0) {
result = io_open(fip_dev_handle, spec, &local_image_handle);
- if (result == IO_SUCCESS) {
+ if (result == 0) {
VERBOSE("Using FIP\n");
io_close(local_image_handle);
}
@@ -237,9 +237,9 @@ static int open_memmap(const uintptr_t spec)
uintptr_t local_image_handle;
result = io_dev_init(memmap_dev_handle, (uintptr_t)NULL);
- if (result == IO_SUCCESS) {
+ if (result == 0) {
result = io_open(memmap_dev_handle, spec, &local_image_handle);
- if (result == IO_SUCCESS) {
+ if (result == 0) {
VERBOSE("Using Memmap\n");
io_close(local_image_handle);
}
@@ -253,19 +253,19 @@ void arm_io_setup(void)
int io_result;
io_result = register_io_dev_fip(&fip_dev_con);
- assert(io_result == IO_SUCCESS);
+ assert(io_result == 0);
io_result = register_io_dev_memmap(&memmap_dev_con);
- assert(io_result == IO_SUCCESS);
+ assert(io_result == 0);
/* Open connections to devices and cache the handles */
io_result = io_dev_open(fip_dev_con, (uintptr_t)NULL,
&fip_dev_handle);
- assert(io_result == IO_SUCCESS);
+ assert(io_result == 0);
io_result = io_dev_open(memmap_dev_con, (uintptr_t)NULL,
&memmap_dev_handle);
- assert(io_result == IO_SUCCESS);
+ assert(io_result == 0);
/* Ignore improbable errors in release builds */
(void)io_result;
@@ -282,7 +282,7 @@ int plat_arm_get_alt_image_source(
uintptr_t *image_spec __attribute__((unused)))
{
/* By default do not try an alternative */
- return IO_FAIL;
+ return -ENOENT;
}
/* Return an IO device handle and specification which can be used to access
@@ -290,14 +290,14 @@ int plat_arm_get_alt_image_source(
int plat_get_image_source(unsigned int image_id, uintptr_t *dev_handle,
uintptr_t *image_spec)
{
- int result = IO_FAIL;
+ int result;
const struct plat_io_policy *policy;
assert(image_id < ARRAY_SIZE(policies));
policy = &policies[image_id];
result = policy->check(policy->image_spec);
- if (result == IO_SUCCESS) {
+ if (result == 0) {
*image_spec = policy->image_spec;
*dev_handle = *(policy->dev_handle);
} else {