plat/common: move arch-agnostic fallback functions to C file

When we add a new callback, we need to duplicate fallbacks among
plat/common/{aarch32,aarch64}/platform_helpers.S  This is tedious.

I created a new C file, then moved 3 functions:
  plat_error_handler
  bl2_plat_preload_setup
  plat_try_next_boot_source

They are called from C, so I do not see a good reason to implement
them in assembly.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
diff --git a/plat/common/platform_helpers_default.c b/plat/common/platform_helpers_default.c
new file mode 100644
index 0000000..75c5199
--- /dev/null
+++ b/plat/common/platform_helpers_default.c
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <arch_helpers.h>
+#include <platform.h>
+
+/*
+ * Placeholder functions which can be redefined by each platfrom.
+ */
+
+#pragma weak plat_error_handler
+#pragma weak bl2_plat_preload_setup
+#pragma weak plat_try_next_boot_source
+
+void __dead2 plat_error_handler(int err)
+{
+	while (1)
+		wfi();
+}
+
+void bl2_plat_preload_setup(void)
+{
+}
+
+int plat_try_next_boot_source(void)
+{
+	return 0;
+}