Always use named structs in header files

Add tag names to all unnamed structs in header files. This
allows forward declaration of structs, which is necessary to
reduce header file nesting (to be implemented in a subsequent
commit).

Also change the typedef names across the codebase to use the _t
suffix to be more conformant with the Linux coding style. The
coding style actually prefers us not to use typedefs at all but
this is considered a step too far for Trusted Firmware.

Also change the IO framework structs defintions to use typedef'd
structs to be consistent with the rest of the codebase.

Change-Id: I722b2c86fc0d92e4da3b15e5cab20373dd26786f
diff --git a/drivers/io/io_semihosting.c b/drivers/io/io_semihosting.c
index c8013bc..89c844b 100644
--- a/drivers/io/io_semihosting.c
+++ b/drivers/io/io_semihosting.c
@@ -36,7 +36,7 @@
 
 
 /* Identify the device type as semihosting */
-static io_type device_type_sh(void)
+static io_type_t device_type_sh(void)
 {
 	return IO_TYPE_SEMIHOSTING;
 }
@@ -44,16 +44,16 @@
 
 /* Semi-hosting functions, device info and handle */
 
-static int sh_dev_open(void *spec, struct io_dev_info **dev_info);
-static int sh_file_open(struct io_dev_info *dev_info, const void *spec,
-		struct io_entity *entity);
-static int sh_file_seek(struct io_entity *entity, int mode, ssize_t offset);
-static int sh_file_len(struct io_entity *entity, size_t *length);
-static int sh_file_read(struct io_entity *entity, void *buffer, size_t length,
+static int sh_dev_open(void *spec, io_dev_info_t **dev_info);
+static int sh_file_open(io_dev_info_t *dev_info, const void *spec,
+		io_entity_t *entity);
+static int sh_file_seek(io_entity_t *entity, int mode, ssize_t offset);
+static int sh_file_len(io_entity_t *entity, size_t *length);
+static int sh_file_read(io_entity_t *entity, void *buffer, size_t length,
 		size_t *length_read);
-static int sh_file_write(struct io_entity *entity, const void *buffer,
+static int sh_file_write(io_entity_t *entity, const void *buffer,
 		size_t length, size_t *length_written);
-static int sh_file_close(struct io_entity *entity);
+static int sh_file_close(io_entity_t *entity);
 
 static struct io_dev_connector sh_dev_connector = {
 	.dev_open = sh_dev_open
@@ -80,7 +80,7 @@
 
 
 /* Open a connection to the semi-hosting device */
-static int sh_dev_open(void *spec __unused, struct io_dev_info **dev_info)
+static int sh_dev_open(void *spec __unused, io_dev_info_t **dev_info)
 {
 	int result = IO_SUCCESS;
 	assert(dev_info != NULL);
@@ -90,12 +90,12 @@
 
 
 /* Open a file on the semi-hosting device */
-static int sh_file_open(struct io_dev_info *dev_info __attribute__((unused)),
-		const void *spec, struct io_entity *entity)
+static int sh_file_open(io_dev_info_t *dev_info __attribute__((unused)),
+		const void *spec, io_entity_t *entity)
 {
 	int result = IO_FAIL;
 	long sh_result = -1;
-	const io_file_spec *file_spec = (io_file_spec *)spec;
+	const io_file_spec_t *file_spec = (io_file_spec_t *)spec;
 
 	assert(file_spec != NULL);
 	assert(entity != NULL);
@@ -113,7 +113,7 @@
 
 
 /* Seek to a particular file offset on the semi-hosting device */
-static int sh_file_seek(struct io_entity *entity, int mode, ssize_t offset)
+static int sh_file_seek(io_entity_t *entity, int mode, ssize_t offset)
 {
 	int result = IO_FAIL;
 	long file_handle, sh_result;
@@ -131,7 +131,7 @@
 
 
 /* Return the size of a file on the semi-hosting device */
-static int sh_file_len(struct io_entity *entity, size_t *length)
+static int sh_file_len(io_entity_t *entity, size_t *length)
 {
 	int result = IO_FAIL;
 
@@ -151,7 +151,7 @@
 
 
 /* Read data from a file on the semi-hosting device */
-static int sh_file_read(struct io_entity *entity, void *buffer, size_t length,
+static int sh_file_read(io_entity_t *entity, void *buffer, size_t length,
 		size_t *length_read)
 {
 	int result = IO_FAIL;
@@ -178,7 +178,7 @@
 
 
 /* Write data to a file on the semi-hosting device */
-static int sh_file_write(struct io_entity *entity, const void *buffer,
+static int sh_file_write(io_entity_t *entity, const void *buffer,
 		size_t length, size_t *length_written)
 {
 	int result = IO_FAIL;
@@ -205,7 +205,7 @@
 
 
 /* Close a file on the semi-hosting device */
-static int sh_file_close(struct io_entity *entity)
+static int sh_file_close(io_entity_t *entity)
 {
 	int result = IO_FAIL;
 	long sh_result = -1;
@@ -226,7 +226,7 @@
 /* Exported functions */
 
 /* Register the semi-hosting driver with the IO abstraction */
-int register_io_dev_sh(struct io_dev_connector **dev_con)
+int register_io_dev_sh(io_dev_connector_t **dev_con)
 {
 	int result = IO_FAIL;
 	assert(dev_con != NULL);