diff --git a/CHANGELOG b/CHANGELOG
index e1759fbf1ed7229568f3a50be7628baa4e89d976..557e3196055fe65073aa57abe6f8c030d65f23a7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,8 @@
 Changes since U-Boot 1.1.4:
 ======================================================================
 
+* More code cleanup
+
 * Disabled kvme080 board in MAKEALL because of build problems.
 
 * Code cleanup
diff --git a/board/Marvell/include/core.h b/board/Marvell/include/core.h
index 081d5fd6783fedae3bccc65091f5fe1c7d10e360..c41343919ec4e86553e4e84a91c57eb43668b9d0 100644
--- a/board/Marvell/include/core.h
+++ b/board/Marvell/include/core.h
@@ -91,7 +91,10 @@ extern unsigned int INTERNAL_REG_BASE_ADDR;
 #define _1G		0x40000000
 #define _2G		0x80000000
 
+#ifndef	BOOL_WAS_DEFINED
+#define BOOL_WAS_DEFINED
 typedef enum _bool{false,true} bool;
+#endif
 
 /* Little to Big endian conversion macros */
 
diff --git a/board/fads/fads.h b/board/fads/fads.h
index e981be03b5a59cc2c12067ad38f1de4598a9c593..41f18b5cf542b8d8c89637c3089a76ffa088504f 100644
--- a/board/fads/fads.h
+++ b/board/fads/fads.h
@@ -467,7 +467,9 @@
 #define CONFIG_ISO_PARTITION	1
 
 #undef	CONFIG_ATAPI
+#if 0	/* does not make sense when CFG_CMD_IDE is not enabled, too */
 #define CONFIG_IDE_8xx_PCCARD	1	/* Use IDE with PC Card Adapter */
+#endif
 #undef	CONFIG_IDE_8xx_DIRECT		/* Direct IDE	 not supported	*/
 #undef	CONFIG_IDE_LED			/* LED	 for ide not supported	*/
 #undef	CONFIG_IDE_RESET		/* reset for ide not supported	*/
diff --git a/board/tqm834x/tqm834x.c b/board/tqm834x/tqm834x.c
index d992aec3817761bcadd107f2aca4c16cb8e11e5a..41b34cc6fa461616fcac9d0c02224b43505fcbd2 100644
--- a/board/tqm834x/tqm834x.c
+++ b/board/tqm834x/tqm834x.c
@@ -424,10 +424,12 @@ static void set_ddr_config(void) {
 		 * which has to be written with a certain value defined by
 		 * errata sheet.
 		 */
+		u32 *reserved_p = (u32 *)((u8 *)im + 0x2f00);
+
 #if defined(DDR_CASLAT_20)
-		*((u8 *)im + 0x2f00) = 0x201c0000;
+		*reserved_p = 0x201c0000;
 #else
-		*((u8 *)im + 0x2f00) = 0x202c0000;
+		*reserved_p = 0x202c0000;
 #endif
 	}
 }
diff --git a/board/tqm85xx/tqm85xx.c b/board/tqm85xx/tqm85xx.c
index be2dd642087901b7446741730fd9e0a70a8bbe74..b4ef5afe70f2807af46f4a24040c49dd5666b7e1 100644
--- a/board/tqm85xx/tqm85xx.c
+++ b/board/tqm85xx/tqm85xx.c
@@ -42,6 +42,7 @@ extern flash_info_t flash_info[];	/* FLASH chips info */
 void local_bus_init (void);
 long int fixed_sdram (void);
 ulong flash_get_size (ulong base, int banknum);
+
 #ifdef CONFIG_PS2MULT
 void ps2mult_early_init(void);
 #endif
diff --git a/common/xyzModem.c b/common/xyzModem.c
index 9b455a314a97fa7e33e82bd1a936ba4c44f360cd..d1d66e8bb30d5991f8e3908de754bcdfc5a5a4b8 100644
--- a/common/xyzModem.c
+++ b/common/xyzModem.c
@@ -261,8 +261,8 @@ zm_dprintf(char *fmt, ...)
 static void
 zm_flush(void)
 {
-    char *p = zm_out_start;
 #ifdef REDBOOT
+    char *p = zm_out_start;
     while (*p) mon_write_char(*p++);
 #endif
     zm_out = zm_out_start;
diff --git a/drivers/mpc8xx_pcmcia.c b/drivers/mpc8xx_pcmcia.c
index 1fb106f5117cc26448b92867f5f161d1eb768b4a..399a719e56593f04478e27c9a387b870e7f0ecf8 100644
--- a/drivers/mpc8xx_pcmcia.c
+++ b/drivers/mpc8xx_pcmcia.c
@@ -1,5 +1,7 @@
 #include <common.h>
+#if defined(CONFIG_8xx)
 #include <mpc8xx.h>
+#endif
 #include <pcmcia.h>
 
 #undef	CONFIG_PCMCIA
diff --git a/drivers/ps2ser.c b/drivers/ps2ser.c
index ec32ed2df4e0f90353102e42d1a8fa36ea1cbd84..4e304f7407cfbe61b848c9a7c20407211342d07b 100644
--- a/drivers/ps2ser.c
+++ b/drivers/ps2ser.c
@@ -20,7 +20,7 @@
 #include <asm/io.h>
 #include <asm/atomic.h>
 #include <ps2mult.h>
-#ifdef CFG_NS16550
+#if defined(CFG_NS16550) || defined(CONFIG_MPC85xx)
 #include <ns16550.h>
 #endif
 
diff --git a/drivers/rpx_pcmcia.c b/drivers/rpx_pcmcia.c
index 01ff1d45ba1aebc0aff60990a656d8235a7ce208..2a0a9e05a27de32688b1d6393ce918a3e3080e87 100644
--- a/drivers/rpx_pcmcia.c
+++ b/drivers/rpx_pcmcia.c
@@ -2,7 +2,9 @@
 /* RPX Boards from Embedded Planet					*/
 /* -------------------------------------------------------------------- */
 #include <common.h>
+#ifdef CONFIG_8xx
 #include <mpc8xx.h>
+#endif
 #include <pcmcia.h>
 
 #undef	CONFIG_PCMCIA
diff --git a/drivers/tqm8xx_pcmcia.c b/drivers/tqm8xx_pcmcia.c
index b5b93088d4cf1808159a96ab314664c2eb946afd..a0f53cd6841a21c7c22a37da5d908ffbcfc43308 100644
--- a/drivers/tqm8xx_pcmcia.c
+++ b/drivers/tqm8xx_pcmcia.c
@@ -3,7 +3,9 @@
 /* SC8xx   Boards by SinoVee Microsystems				*/
 /* -------------------------------------------------------------------- */
 #include <common.h>
+#ifdef CONFIG_8xx
 #include <mpc8xx.h>
+#endif
 #include <pcmcia.h>
 
 #undef	CONFIG_PCMCIA
@@ -242,8 +244,6 @@ int pcmcia_hardware_enable(int slot)
 #if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
 int pcmcia_hardware_disable(int slot)
 {
-	volatile pcmconf8xx_t *pcmp =
-		(pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
 	u_long reg;
 
 	debug ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
@@ -268,9 +268,11 @@ int pcmcia_hardware_disable(int slot)
 int pcmcia_voltage_set(int slot, int vcc, int vpp)
 {
 #ifndef CONFIG_NSCU
+	u_long reg;
+# ifdef DEBUG
 	volatile pcmconf8xx_t *pcmp =
 		(pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
-	u_long reg;
+# endif
 
 	debug ("voltage_set: " PCMCIA_BOARD_MSG
 		" Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
diff --git a/include/configs/TQM85xx.h b/include/configs/TQM85xx.h
index bda85e0c9cd34fb6e3019c01edd021d2580de841..780f27433e6887d06256fdaf56f68b09a73d3516 100644
--- a/include/configs/TQM85xx.h
+++ b/include/configs/TQM85xx.h
@@ -158,7 +158,7 @@
 #undef  CONFIG_CONS_NONE        /* define if console on something else */
 #define CONFIG_CONS_INDEX       1  /* which serial channel for console */
 
-#else
+#else	/* ! TQM8560 */
 
 #define CONFIG_CONS_INDEX     1
 #undef	CONFIG_SERIAL_SOFTWARE_FIFO
@@ -170,13 +170,6 @@
 #define CFG_NS16550_COM1	(CFG_CCSRBAR+0x4500)
 #define CFG_NS16550_COM2	(CFG_CCSRBAR+0x4600)
 
-#endif /* CONFIG_TQM8560 */
-
-#define CONFIG_BAUDRATE         115200
-
-#define CFG_BAUDRATE_TABLE  \
-	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
-
 /* PS/2 Keyboard */
 #if !defined(CONFIG_TQM8560)
 #define CONFIG_PS2KBD			/* AT-PS/2 Keyboard		*/
@@ -186,6 +179,13 @@
 #define CONFIG_BOARD_EARLY_INIT_R	1
 #endif /* !CONFIG_TQM8560 */
 
+#endif /* CONFIG_TQM8560 */
+
+#define CONFIG_BAUDRATE         115200
+
+#define CFG_BAUDRATE_TABLE  \
+	{300, 600, 1200, 2400, 4800, 9600, 19200, 38400,115200}
+
 /* Use the HUSH parser */
 #define CFG_HUSH_PARSER
 #ifdef	CFG_HUSH_PARSER
diff --git a/include/galileo/core.h b/include/galileo/core.h
index 0735d075b3c05edcd38a9845852392d03ca02279..49f4dd2d2101c4f89584e396899981e49ae04cbe 100644
--- a/include/galileo/core.h
+++ b/include/galileo/core.h
@@ -110,7 +110,10 @@ extern unsigned int INTERNAL_REG_BASE_ADDR;
 #define _1G             0x40000000
 #define _2G             0x80000000
 
+#ifndef	BOOL_WAS_DEFINED
+#define BOOL_WAS_DEFINED
 typedef enum _bool{false,true} bool;
+#endif
 
 /* Little to Big endian conversion macros */
 
diff --git a/include/xyzModem.h b/include/xyzModem.h
index 4ec10b5a379f4149d6ebe9e51b781774e2e8c450..f437bbd0bdf8254cd90f9cf0b4f67693023bbf23 100644
--- a/include/xyzModem.h
+++ b/include/xyzModem.h
@@ -97,7 +97,10 @@ typedef struct {
 #endif
 } connection_info_t;
 
+#ifndef	BOOL_WAS_DEFINED
+#define BOOL_WAS_DEFINED
 typedef unsigned int bool;
+#endif
 
 #define false 0
 #define true 1