diff --git a/board/g2000/g2000.c b/board/g2000/g2000.c
index c0b3676..5967e90 100644
--- a/board/g2000/g2000.c
+++ b/board/g2000/g2000.c
@@ -25,7 +25,6 @@
 #include <asm/processor.h>
 #include <command.h>
 
-
 #define MEM_MCOPT1_INIT_VAL     0x00800000
 #define MEM_RTR_INIT_VAL        0x04070000
 #define MEM_PMIT_INIT_VAL       0x07c00000
@@ -34,11 +33,8 @@
 #define MEM_SDTR1_INIT_VAL      0x00854005
 #define SDRAM0_CFG_ENABLE       0x80000000
 
-
-
 #define CFG_SDRAM_SIZE          0x04000000      /* 64 MB */
 
-
 int board_early_init_f (void)
 {
 #if 0 /* test-only */
@@ -119,19 +115,19 @@
 long int init_sdram_static_settings(void)
 {
 #define mtsdram0(reg, data)  mtdcr(memcfga,reg);mtdcr(memcfgd,data)
-        /* disable memcontroller so updates work */
-        mtsdram0( mem_mcopt1, MEM_MCOPT1_INIT_VAL );
-        mtsdram0( mem_rtr   , MEM_RTR_INIT_VAL   );
-        mtsdram0( mem_pmit  , MEM_PMIT_INIT_VAL  );
-        mtsdram0( mem_mb0cf , MEM_MB0CF_INIT_VAL );
-        mtsdram0( mem_mb1cf , MEM_MB1CF_INIT_VAL );
-        mtsdram0( mem_sdtr1 , MEM_SDTR1_INIT_VAL );
+	/* disable memcontroller so updates work */
+	mtsdram0( mem_mcopt1, MEM_MCOPT1_INIT_VAL );
+	mtsdram0( mem_rtr   , MEM_RTR_INIT_VAL   );
+	mtsdram0( mem_pmit  , MEM_PMIT_INIT_VAL  );
+	mtsdram0( mem_mb0cf , MEM_MB0CF_INIT_VAL );
+	mtsdram0( mem_mb1cf , MEM_MB1CF_INIT_VAL );
+	mtsdram0( mem_sdtr1 , MEM_SDTR1_INIT_VAL );
 
-        /* SDRAM have a power on delay,  500 micro should do */
-        udelay(500);
-        mtsdram0( mem_mcopt1, MEM_MCOPT1_INIT_VAL|SDRAM0_CFG_ENABLE );
+	/* SDRAM have a power on delay,  500 micro should do */
+	udelay(500);
+	mtsdram0( mem_mcopt1, MEM_MCOPT1_INIT_VAL|SDRAM0_CFG_ENABLE );
 
-        return (CFG_SDRAM_SIZE); /* CFG_SDRAM_SIZE is in G2000.h */
+	return (CFG_SDRAM_SIZE); /* CFG_SDRAM_SIZE is in G2000.h */
  }
 
 
@@ -141,9 +137,9 @@
 
 /* flzt, we can still turn this on in the future */
 /* #ifdef CONFIG_SPD_EEPROM
-        ret = spd_sdram ();
+	ret = spd_sdram ();
 #else
-        ret = init_sdram_static_settings();
+	ret = init_sdram_static_settings();
 #endif
 */
 
diff --git a/board/g2000/strataflash.c b/board/g2000/strataflash.c
index 06fedec..8446e02 100644
--- a/board/g2000/strataflash.c
+++ b/board/g2000/strataflash.c
@@ -85,12 +85,8 @@
 #define FLASH_OFFSET_USER_PROTECTION    0x85
 #define FLASH_OFFSET_INTEL_PROTECTION   0x81
 
-
 #define FLASH_MAN_CFI			0x01000000
 
-
-
-
 typedef union {
 	unsigned char c;
 	unsigned short w;
@@ -107,13 +103,10 @@
 
 flash_info_t	flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips	*/
 
-
 /*-----------------------------------------------------------------------
  * Functions
  */
 
-
-
 static void flash_add_byte(flash_info_t *info, cfiword_t * cword, uchar c);
 static void flash_make_cmd(flash_info_t * info, uchar cmd, void * cmdbuf);
 static void flash_write_cmd(flash_info_t * info, int sect, uchar offset, uchar cmd);
@@ -286,28 +279,28 @@
 		int erased;
 		volatile unsigned long *flash;
 
-                /*
-                 * Check if whole sector is erased
-                 */
-                if (i != (info->sector_count-1))
-                  size = info->start[i+1] - info->start[i];
-                else
-                  size = info->start[0] + info->size - info->start[i];
-                erased = 1;
-                flash = (volatile unsigned long *)info->start[i];
-                size = size >> 2;        /* divide by 4 for longword access */
-                for (k=0; k<size; k++)
-                  {
-                    if (*flash++ != 0xffffffff)
-                      {
-                        erased = 0;
-                        break;
-                      }
-                  }
+		/*
+		 * Check if whole sector is erased
+		 */
+		if (i != (info->sector_count-1))
+		  size = info->start[i+1] - info->start[i];
+		else
+		  size = info->start[0] + info->size - info->start[i];
+		erased = 1;
+		flash = (volatile unsigned long *)info->start[i];
+		size = size >> 2;        /* divide by 4 for longword access */
+		for (k=0; k<size; k++)
+		  {
+		    if (*flash++ != 0xffffffff)
+		      {
+			erased = 0;
+			break;
+		      }
+		  }
 
 		if ((i % 5) == 0)
 			printf ("\n   ");
-                /* print empty and read-only info */
+		/* print empty and read-only info */
 		printf (" %08lX%s%s",
 			info->start[i],
 			erased ? " E" : "  ",
@@ -464,7 +457,7 @@
 			printf("Command Sequence Error.\n");
 		} else if(flash_isset(info, sector, 0, FLASH_STATUS_ECLBS)){
 			printf("Block Erase Error.\n");
-		        retcode = ERR_NOT_ERASED;
+			retcode = ERR_NOT_ERASED;
 		} else if (flash_isset(info, sector, 0, FLASH_STATUS_PSLBS)) {
 			printf("Locking Error\n");
 		}
