io: Allow image load to address zero

Remove assert on buffer address equal zero.
Marvell uses address 0x0 for loading BL33,
so this check is irrelevant and breaks the
debug builds on Marvell platforms.

Change-Id: Ie56a51138e2e4ddd8986dd7036797dc2d8b10125
Signed-off-by: Haim Boot <hayim@marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap@marvell.com>
Reviewed-on: http://vgitil04.il.marvell.com:8080/54589
diff --git a/drivers/io/io_fip.c b/drivers/io/io_fip.c
index 1754339..c5ee6a4 100644
--- a/drivers/io/io_fip.c
+++ b/drivers/io/io_fip.c
@@ -272,7 +272,6 @@
 	uintptr_t backend_handle;
 
 	assert(entity != NULL);
-	assert(buffer != (uintptr_t)NULL);
 	assert(length_read != NULL);
 	assert(entity->info != (uintptr_t)NULL);
 
diff --git a/drivers/io/io_memmap.c b/drivers/io/io_memmap.c
index bf59d6a..5595e60 100644
--- a/drivers/io/io_memmap.c
+++ b/drivers/io/io_memmap.c
@@ -9,6 +9,7 @@
 #include <io_driver.h>
 #include <io_memmap.h>
 #include <io_storage.h>
+#include <platform_def.h>
 #include <string.h>
 #include <utils.h>
 
@@ -169,7 +170,6 @@
 	size_t pos_after;
 
 	assert(entity != NULL);
-	assert(buffer != (uintptr_t)NULL);
 	assert(length_read != NULL);
 
 	fp = (file_state_t *) entity->info;
@@ -197,7 +197,6 @@
 	size_t pos_after;
 
 	assert(entity != NULL);
-	assert(buffer != (uintptr_t)NULL);
 	assert(length_written != NULL);
 
 	fp = (file_state_t *) entity->info;
diff --git a/drivers/io/io_semihosting.c b/drivers/io/io_semihosting.c
index 4abf44f..9ca0a9d 100644
--- a/drivers/io/io_semihosting.c
+++ b/drivers/io/io_semihosting.c
@@ -8,6 +8,7 @@
 #include <io_driver.h>
 #include <io_semihosting.h>
 #include <io_storage.h>
+#include <platform_def.h>
 #include <semihosting.h>
 
 
@@ -133,7 +134,6 @@
 	long file_handle;
 
 	assert(entity != NULL);
-	assert(buffer != (uintptr_t)NULL);
 	assert(length_read != NULL);
 
 	file_handle = (long)entity->info;
@@ -158,7 +158,6 @@
 	size_t bytes = length;
 
 	assert(entity != NULL);
-	assert(buffer != (uintptr_t)NULL);
 	assert(length_written != NULL);
 
 	file_handle = (long)entity->info;
diff --git a/drivers/io/io_storage.c b/drivers/io/io_storage.c
index 0918de0..948f848 100644
--- a/drivers/io/io_storage.c
+++ b/drivers/io/io_storage.c
@@ -279,7 +279,7 @@
 		size_t *length_read)
 {
 	int result = -ENODEV;
-	assert(is_valid_entity(handle) && (buffer != (uintptr_t)NULL));
+	assert(is_valid_entity(handle));
 
 	io_entity_t *entity = (io_entity_t *)handle;
 
@@ -299,7 +299,7 @@
 		size_t *length_written)
 {
 	int result = -ENODEV;
-	assert(is_valid_entity(handle) && (buffer != (uintptr_t)NULL));
+	assert(is_valid_entity(handle));
 
 	io_entity_t *entity = (io_entity_t *)handle;