[U-Boot] [PATCH v2 3/4] odroid: make some macros common

Hyungwon Hwang human.hwang at samsung.com
Fri Oct 31 13:14:32 CET 2014


Some macros are used commonly for odroid series boards. This patch makes a
common header file to congregate that kinds of macros. Even though there are
more macros which can be common, they are not become common. Because they are a
part of a register, the readability is better when they are defined at a place.

Signed-off-by: Hyungwon Hwang <human.hwang at samsung.com>
---
 board/samsung/odroid/odroid.c | 1 +
 board/samsung/odroid/setup.h  | 8 --------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/board/samsung/odroid/odroid.c b/board/samsung/odroid/odroid.c
index 5edb250..ccbb3a0 100644
--- a/board/samsung/odroid/odroid.c
+++ b/board/samsung/odroid/odroid.c
@@ -18,6 +18,7 @@
 #include <usb.h>
 #include <usb/s3c_udc.h>
 #include <samsung/misc.h>
+#include "../setup.h"
 #include "setup.h"
 
 DECLARE_GLOBAL_DATA_PTR;
diff --git a/board/samsung/odroid/setup.h b/board/samsung/odroid/setup.h
index 3e48dad..35f7af5 100644
--- a/board/samsung/odroid/setup.h
+++ b/board/samsung/odroid/setup.h
@@ -8,14 +8,6 @@
 #ifndef __ODROIDU3_SETUP__
 #define __ODROIDU3_SETUP__
 
-/* A/M PLL_CON0 */
-#define SDIV(x)                 ((x) & 0x7)
-#define PDIV(x)                 (((x) & 0x3f) << 8)
-#define MDIV(x)                 (((x) & 0x3ff) << 16)
-#define FSEL(x)                 (((x) & 0x1) << 27)
-#define PLL_LOCKED_BIT          (0x1 << 29)
-#define PLL_ENABLE(x)           (((x) & 0x1) << 31)
-
 /* CLK_SRC_CPU */
 #define MUX_APLL_SEL(x)         ((x) & 0x1)
 #define MUX_CORE_SEL(x)         (((x) & 0x1) << 16)
-- 
1.8.3.2



More information about the U-Boot mailing list