Merge pull request #801 from masahir0y/cleanup

Macro cleanups
diff --git a/drivers/arm/pl061/pl061_gpio.c b/drivers/arm/pl061/pl061_gpio.c
index fca0056..327c68e 100644
--- a/drivers/arm/pl061/pl061_gpio.c
+++ b/drivers/arm/pl061/pl061_gpio.c
@@ -39,6 +39,7 @@
 #include <gpio.h>
 #include <mmio.h>
 #include <pl061_gpio.h>
+#include <utils.h>
 
 #if !PLAT_PL061_MAX_GPIOS
 # define PLAT_PL061_MAX_GPIOS	32
@@ -52,7 +53,6 @@
 #define PL061_GPIO_DIR		0x400
 
 #define GPIOS_PER_PL061		8
-#define BIT(nr)			(1UL << (nr))
 
 static int pl061_get_direction(int gpio);
 static void pl061_set_direction(int gpio, int direction);
diff --git a/include/lib/utils.h b/include/lib/utils.h
index a234e3c..f7af8f6 100644
--- a/include/lib/utils.h
+++ b/include/lib/utils.h
@@ -40,6 +40,8 @@
 
 #define SIZE_FROM_LOG2_WORDS(n)		(4 << (n))
 
+#define BIT(nr)				(1UL << (nr))
+
 /*
  * The round_up() macro rounds up a value to the given boundary in a
  * type-agnostic yet type-safe manner. The boundary must be a power of two.
diff --git a/lib/cpus/aarch64/cpu_helpers.S b/lib/cpus/aarch64/cpu_helpers.S
index ec7f1dd..4f47439 100644
--- a/lib/cpus/aarch64/cpu_helpers.S
+++ b/lib/cpus/aarch64/cpu_helpers.S
@@ -31,10 +31,10 @@
 #include <arch.h>
 #include <asm_macros.S>
 #include <assert_macros.S>
-#include <cpu_macros.S>
 #if IMAGE_BL31
 #include <cpu_data.h>
 #endif
+#include <cpu_macros.S>
 #include <debug.h>
 
  /* Reset fn is needed in BL at reset vector */
diff --git a/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c b/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
index 7aacdec..d715735 100644
--- a/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
+++ b/plat/mediatek/mt8173/drivers/spm/spm_mcdi.c
@@ -232,7 +232,7 @@
 static const struct pcm_desc mcdi_pcm = {
 	.version = "pcm_mcdi_mt8173_20160401_v1",
 	.base = mcdi_binary,
-	.size = 1019,
+	.size = 1001,
 	.sess = 2,
 	.replace = 0,
 };
diff --git a/plat/rockchip/common/include/plat_private.h b/plat/rockchip/common/include/plat_private.h
index a093e79..b2234a6 100644
--- a/plat/rockchip/common/include/plat_private.h
+++ b/plat/rockchip/common/include/plat_private.h
@@ -75,10 +75,6 @@
  ******************************************************************************/
 #define REG_MSK_SHIFT	16
 
-#ifndef BIT
-#define BIT(nr)			(1 << (nr))
-#endif
-
 #ifndef WMSK_BIT
 #define WMSK_BIT(nr)		BIT((nr) + REG_MSK_SHIFT)
 #endif
diff --git a/plat/rockchip/rk3399/drivers/soc/soc.h b/plat/rockchip/rk3399/drivers/soc/soc.h
index 742bb7b..28590f2 100644
--- a/plat/rockchip/rk3399/drivers/soc/soc.h
+++ b/plat/rockchip/rk3399/drivers/soc/soc.h
@@ -31,6 +31,8 @@
 #ifndef __SOC_H__
 #define __SOC_H__
 
+#include <utils.h>
+
 #define GLB_SRST_FST_CFG_VAL	0xfdb9
 #define GLB_SRST_SND_CFG_VAL	0xeca8