xlat v2: Synchronise code with TF

Change-Id: Ibf4fffbfc025b205223d17a579f8cde386252199
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
diff --git a/lib/xlat_tables_v2/xlat_tables_context.c b/lib/xlat_tables_v2/xlat_tables_context.c
index df491d0..9b481a1 100644
--- a/lib/xlat_tables_v2/xlat_tables_context.c
+++ b/lib/xlat_tables_v2/xlat_tables_context.c
@@ -19,24 +19,6 @@
 uint64_t mmu_cfg_params[MMU_CFG_PARAM_MAX];
 
 /*
- * Each platform can define the size of its physical and virtual address spaces.
- * If the platform hasn't defined one or both of them, default to
- * ADDR_SPACE_SIZE. The latter is deprecated, though.
- */
-#if ERROR_DEPRECATED
-# ifdef ADDR_SPACE_SIZE
-#  error "ADDR_SPACE_SIZE is deprecated. Use PLAT_xxx_ADDR_SPACE_SIZE instead."
-# endif
-#elif defined(ADDR_SPACE_SIZE)
-# ifndef PLAT_PHY_ADDR_SPACE_SIZE
-#  define PLAT_PHY_ADDR_SPACE_SIZE	ADDR_SPACE_SIZE
-# endif
-# ifndef PLAT_VIRT_ADDR_SPACE_SIZE
-#  define PLAT_VIRT_ADDR_SPACE_SIZE	ADDR_SPACE_SIZE
-# endif
-#endif
-
-/*
  * Allocate and initialise the default translation context for the software
  * image currently executing.
  */
@@ -68,7 +50,7 @@
 
 void mmap_add_alloc_va(mmap_region_t *mm)
 {
-	while (mm->size != 0U) {
+	while (mm->granularity != 0U) {
 		assert(mm->base_va == 0U);
 		mmap_add_region_alloc_va_ctx(&tf_xlat_ctx, mm);
 		mm++;
@@ -107,7 +89,7 @@
 
 #endif /* PLAT_XLAT_TABLES_DYNAMIC */
 
-void init_xlat_tables(void)
+void __init init_xlat_tables(void)
 {
 	assert(tf_xlat_ctx.xlat_regime == EL_REGIME_INVALID);