Add media top-level directory for storage medium access components

Introduces the top-level media directory for components concerned
with accessing storage media using well-known formats. Reuses
external source code from TF-A where possible.

Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I5fa2cb24aa33f019df5108e80ccd78f0170e4c0b
diff --git a/components/common/crc32/tf-a/component.cmake b/components/common/crc32/tf-a/component.cmake
new file mode 100644
index 0000000..39636d5
--- /dev/null
+++ b/components/common/crc32/tf-a/component.cmake
@@ -0,0 +1,14 @@
+#-------------------------------------------------------------------------------
+# Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+#-------------------------------------------------------------------------------
+if (NOT DEFINED TGT)
+	message(FATAL_ERROR "mandatory parameter TGT is not defined.")
+endif()
+
+target_sources(${TGT} PRIVATE
+	"${CMAKE_CURRENT_LIST_DIR}/crc32.c"
+	"${TFA_SOURCE_DIR}/common/tf_crc32.c"
+	)
diff --git a/components/common/crc32/tf-a/crc32.c b/components/common/crc32/tf-a/crc32.c
new file mode 100644
index 0000000..abc0f8a
--- /dev/null
+++ b/components/common/crc32/tf-a/crc32.c
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2022, Arm Limited. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ *
+ */
+
+#include <common/crc32/crc32.h>
+#include <common/tf_crc32.h>
+
+
+uint32_t crc32(uint32_t crc, const unsigned char *buf, size_t size)
+{
+	return tf_crc32(crc, buf, size);
+}