From 6c58a030f86829fa4f0d4337cf4b794c41a1823e Mon Sep 17 00:00:00 2001
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Date: Wed, 13 Aug 2008 01:40:38 +0200
Subject: [PATCH] serial: move CFG_SCIF_CONSOLE to CONFIG_SCIF_CONSOLE

move also conditional compilation to Makefile

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/serial/Makefile     | 2 +-
 drivers/serial/serial_sh.c  | 4 ----
 include/configs/MigoR.h     | 2 +-
 include/configs/mpr2.h      | 2 +-
 include/configs/ms7720se.h  | 2 +-
 include/configs/ms7722se.h  | 2 +-
 include/configs/ms7750se.h  | 2 +-
 include/configs/r2dplus.h   | 2 +-
 include/configs/r7780mp.h   | 2 +-
 include/configs/sh7763rdp.h | 2 +-
 10 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
index de6fbab740..3716974c62 100644
--- a/drivers/serial/Makefile
+++ b/drivers/serial/Makefile
@@ -35,7 +35,7 @@ COBJS-$(CONFIG_MAX3100_SERIAL) += serial_max3100.o
 COBJS-y += serial_pl010.o
 COBJS-y += serial_pl011.o
 COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o
-COBJS-y += serial_sh.o
+COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o
 COBJS-$(CONFIG_USB_TTY) += usbtty.o
 
 COBJS	:= $(COBJS-y)
diff --git a/drivers/serial/serial_sh.c b/drivers/serial/serial_sh.c
index 0801ac4a8c..2b9eeed47e 100644
--- a/drivers/serial/serial_sh.c
+++ b/drivers/serial/serial_sh.c
@@ -20,8 +20,6 @@
 #include <common.h>
 #include <asm/processor.h>
 
-#ifdef CFG_SCIF_CONSOLE
-
 #if defined (CONFIG_CONS_SCIF0)
 #define SCIF_BASE	SCIF0_BASE
 #elif defined (CONFIG_CONS_SCIF1)
@@ -215,5 +213,3 @@ int serial_getc(void)
 
 	return ch;
 }
-
-#endif /* CFG_SCIF_CONSOLE */
diff --git a/include/configs/MigoR.h b/include/configs/MigoR.h
index fa0e5db021..ffa9b54e13 100644
--- a/include/configs/MigoR.h
+++ b/include/configs/MigoR.h
@@ -67,7 +67,7 @@
 #define CFG_BAUDRATE_TABLE	{ 115200 }	/* List of legal baudrate settings for this board */
 
 /* SCIF */
-#define CFG_SCIF_CONSOLE	1
+#define CONFIG_SCIF_CONSOLE	1
 #define CONFIG_CONS_SCIF0	1
 #undef  CFG_CONSOLE_INFO_QUIET	/* Suppress display of console
 								   information at boot */
diff --git a/include/configs/mpr2.h b/include/configs/mpr2.h
index 0fc0b970db..2598b342f4 100644
--- a/include/configs/mpr2.h
+++ b/include/configs/mpr2.h
@@ -86,7 +86,7 @@
 #define CFG_HZ			(CONFIG_SYS_CLK_FREQ / TMU_CLK_DIVIDER)
 
 /* UART */
-#define CFG_SCIF_CONSOLE	1
+#define CONFIG_SCIF_CONSOLE	1
 #define CONFIG_CONS_SCIF0	1
 
 #endif	/* __MPR2_H */
diff --git a/include/configs/ms7720se.h b/include/configs/ms7720se.h
index 5e79a27111..dc0af1594e 100644
--- a/include/configs/ms7720se.h
+++ b/include/configs/ms7720se.h
@@ -63,7 +63,7 @@
 #define CFG_BAUDRATE_TABLE	{ 115200 }
 
 /* SCIF */
-#define CFG_SCIF_CONSOLE	1
+#define CONFIG_SCIF_CONSOLE	1
 #define CONFIG_CONS_SCIF0	1
 
 #define CFG_MEMTEST_START	MS7720SE_SDRAM_BASE
diff --git a/include/configs/ms7722se.h b/include/configs/ms7722se.h
index 7298e55c70..910a44eb4a 100644
--- a/include/configs/ms7722se.h
+++ b/include/configs/ms7722se.h
@@ -62,7 +62,7 @@
 #define CFG_BAUDRATE_TABLE	{ 115200 }	/* List of legal baudrate settings for this board */
 
 /* SCIF */
-#define CFG_SCIF_CONSOLE	1
+#define CONFIG_SCIF_CONSOLE	1
 #define CONFIG_CONS_SCIF0	1
 #undef  CFG_CONSOLE_INFO_QUIET			/* Suppress display of console information at boot */
 #undef  CFG_CONSOLE_OVERWRITE_ROUTINE
diff --git a/include/configs/ms7750se.h b/include/configs/ms7750se.h
index 3000c77c11..bee0aab133 100644
--- a/include/configs/ms7750se.h
+++ b/include/configs/ms7750se.h
@@ -42,7 +42,7 @@
 #define CONFIG_CMD_FLASH
 #define CONFIG_CMD_ENV
 
-#define CFG_SCIF_CONSOLE	1
+#define CONFIG_SCIF_CONSOLE	1
 #define CONFIG_BAUDRATE		38400
 #define CONFIG_CONS_SCIF1	1
 #define BOARD_LATE_INIT		1
diff --git a/include/configs/r2dplus.h b/include/configs/r2dplus.h
index e269336e82..414e8dca57 100644
--- a/include/configs/r2dplus.h
+++ b/include/configs/r2dplus.h
@@ -26,7 +26,7 @@
 #define CONFIG_DOS_PARTITION
 
 /* SCIF */
-#define CFG_SCIF_CONSOLE	1
+#define CONFIG_SCIF_CONSOLE	1
 #define CONFIG_BAUDRATE		115200
 #define CONFIG_CONS_SCIF1	1
 #define BOARD_LATE_INIT		1
diff --git a/include/configs/r7780mp.h b/include/configs/r7780mp.h
index 4c82c5a2fd..0b08f18be1 100644
--- a/include/configs/r7780mp.h
+++ b/include/configs/r7780mp.h
@@ -49,7 +49,7 @@
 #define CONFIG_CMD_EXT2
 #define CONFIG_DOS_PARTITION
 
-#define CFG_SCIF_CONSOLE	1
+#define CONFIG_SCIF_CONSOLE	1
 #define CONFIG_BAUDRATE		115200
 #define CONFIG_CONS_SCIF0	1
 
diff --git a/include/configs/sh7763rdp.h b/include/configs/sh7763rdp.h
index 5a6566320a..47236341bd 100644
--- a/include/configs/sh7763rdp.h
+++ b/include/configs/sh7763rdp.h
@@ -52,7 +52,7 @@
 #undef  CONFIG_SHOW_BOOT_PROGRESS
 
 /* SCIF */
-#define CFG_SCIF_CONSOLE        1
+#define CONFIG_SCIF_CONSOLE        1
 #define CONFIG_BAUDRATE         115200
 #define CONFIG_CONS_SCIF2		1
 
-- 
2.39.5