From 7ebae8a88bddf297d327ba5aa2cd7e74e6d08872 Mon Sep 17 00:00:00 2001
From: Markus Hubig <mhubig@imko.de>
Date: Wed, 11 Jul 2012 20:37:49 +0200
Subject: [PATCH 3/3] Cleaning up the code a bit.

Signed-off-by: Markus Hubig <mhubig@imko.de>
---
 board/taskit/stamp9G20/led.c       |    4 ++
 board/taskit/stamp9G20/stamp9G20.c |   13 ++++---
 include/configs/stamp9G20.h        |   71 +++++++++++++++++-------------------
 3 files changed, 44 insertions(+), 44 deletions(-)

diff --git a/board/taskit/stamp9G20/led.c b/board/taskit/stamp9G20/led.c
index 9180ac3..8a23f4c 100644
--- a/board/taskit/stamp9G20/led.c
+++ b/board/taskit/stamp9G20/led.c
@@ -3,6 +3,10 @@
  * Stelian Pop <stelian@popies.net>
  * Lead Tech Design <www.leadtechdesign.com>
  *
+ * (C) Copyright 2012
+ * Markus Hubig <mhubig@imko.de>
+ * IMKO GmbH <www.imko.de>
+ *
  * See file CREDITS for list of people who contributed to this
  * project.
  *
diff --git a/board/taskit/stamp9G20/stamp9G20.c b/board/taskit/stamp9G20/stamp9G20.c
index 639db5d..e6f097a 100644
--- a/board/taskit/stamp9G20/stamp9G20.c
+++ b/board/taskit/stamp9G20/stamp9G20.c
@@ -3,10 +3,11 @@
  * Stelian Pop <stelian@popies.net>
  * Lead Tech Design <www.leadtechdesign.com>
  *
+ * (C) Copyright 2010
  * Achim Ehrlich <aehrlich@taskit.de>
  * taskit GmbH <www.taskit.de>
  *
- * (C) Copyright 2012-
+ * (C) Copyright 2012
  * Markus Hubig <mhubig@imko.de>
  * IMKO GmbH <www.imko.de>
  *
@@ -88,7 +89,7 @@ static void stamp9G20_nand_hw_init(void)
 	at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1);
 
 }
-#endif
+#endif /* CONFIG_CMD_NAND */
 
 #ifdef CONFIG_MACB
 static void stamp9G20_macb_hw_init(void)
@@ -115,7 +116,7 @@ static void stamp9G20_macb_hw_init(void)
 	 *
 	 * PHY has internal pull-down
 	 */
-	writel(pin_to_mask(AT91_PIN_PA14) |
+	writel(pin_to_mask(AT91_PIN_PA14)  |
 		pin_to_mask(AT91_PIN_PA15) |
 		pin_to_mask(AT91_PIN_PA17) |
 		pin_to_mask(AT91_PIN_PA18) |
@@ -139,7 +140,7 @@ static void stamp9G20_macb_hw_init(void)
 		&rstc->mr);
 
 	/* Re-enable pull-up */
-	writel(pin_to_mask(AT91_PIN_PA14) |
+	writel(pin_to_mask(AT91_PIN_PA14)  |
 		pin_to_mask(AT91_PIN_PA15) |
 		pin_to_mask(AT91_PIN_PA17) |
 		pin_to_mask(AT91_PIN_PA18) |
@@ -149,7 +150,7 @@ static void stamp9G20_macb_hw_init(void)
 	/* Initialize EMAC=MACB hardware */
 	at91_macb_hw_init();
 }
-#endif
+#endif /* CONFIG_MACB */
 
 int board_early_init_f(void)
 {
@@ -212,7 +213,7 @@ void reset_phy(void)
 	eth_init(gd->bd);
 #endif
 }
-#endif
+#endif /* CONFIG_RESET_PHY_R */
 
 int board_eth_init(bd_t *bis)
 {
diff --git a/include/configs/stamp9G20.h b/include/configs/stamp9G20.h
index c79ec5b..a35389c 100644
--- a/include/configs/stamp9G20.h
+++ b/include/configs/stamp9G20.h
@@ -52,7 +52,7 @@
 /* ARM asynchronous clock */
 #define CONFIG_SYS_AT91_SLOW_CLOCK	32768		/* slow clock xtal */
 #define CONFIG_SYS_AT91_MAIN_CLOCK	18432000	/* 18.432 MHz crystal */
-#define CONFIG_SYS_HZ				1000		/* 1ms resolution */
+#define CONFIG_SYS_HZ			1000		/* 1ms resolution */
 
 /* Misc CPU related */
 #define CONFIG_ARCH_CPU_INIT
@@ -85,11 +85,10 @@
 #undef	CONFIG_USART2
 #define CONFIG_USART3		1	/* USART 3 is DBGU */
 
-
 /* LED */
 #undef CONFIG_AT91_LED
 
-
+/* general boot options */
 #define CONFIG_BOOTDELAY	3
 
 /*
@@ -101,7 +100,7 @@
 #define CONFIG_BOOTP_HOSTNAME		1
 
 /*
- * Command line configuration.
+ * command line configuration.
  */
 #include <config_cmd_default.h>
 #undef CONFIG_CMD_BDI
@@ -138,8 +137,8 @@
 
 
 /* NAND flash */
-#ifdef CONFIG_CMD_NAND
-#define CONFIG_NAND_ATMEL
+#ifdef	CONFIG_CMD_NAND
+#define	CONFIG_NAND_ATMEL
 #define CONFIG_SYS_MAX_NAND_DEVICE	1
 #define CONFIG_SYS_NAND_BASE		ATMEL_BASE_CS3
 #define CONFIG_SYS_NAND_DBW_8
@@ -147,73 +146,69 @@
 #define CONFIG_SYS_NAND_MASK_CLE	(1 << 22)
 #define CONFIG_SYS_NAND_ENABLE_PIN	AT91_PIN_PC14
 #define CONFIG_SYS_NAND_READY_PIN	AT91_PIN_PC13
-#define CONFIG_SYS_64BIT_VSPRINTF		/* needed for nand_util.c */
+#define CONFIG_SYS_64BIT_VSPRINTF	/* needed for nand_util.c */
 #endif
 
 /* NOR flash - no real flash on this board */
-#define CONFIG_SYS_NO_FLASH			1
+#define CONFIG_SYS_NO_FLASH	1
 
 /* Ethernet */
-#define CONFIG_MACB				1
-#define CONFIG_RMII				1
-#define CONFIG_NET_MULTI		1
+#define CONFIG_MACB		1
+#define CONFIG_RMII		1
+#define CONFIG_NET_MULTI	1
 #define CONFIG_NET_RETRY_COUNT	20
-#define CONFIG_RESET_PHY_R		1
+#define CONFIG_RESET_PHY_R	1
 
 /* USB */
 #define CONFIG_USB_ATMEL
-#define CONFIG_USB_OHCI_NEW					1
-#define CONFIG_DOS_PARTITION				1
+#define CONFIG_USB_OHCI_NEW			1
+#define CONFIG_DOS_PARTITION			1
 #define CONFIG_SYS_USB_OHCI_CPU_INIT		1
 #define CONFIG_SYS_USB_OHCI_REGS_BASE		0x00500000	/* AT91SAM9260_UHP_BASE */
 #define CONFIG_SYS_USB_OHCI_SLOT_NAME		"at91sam9260"
 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS	2
-#define CONFIG_USB_STORAGE					1
-#define CONFIG_CMD_FAT						1
+#define CONFIG_USB_STORAGE			1
+#define CONFIG_CMD_FAT				1
 
 #define CONFIG_SYS_LOAD_ADDR			0x22000000	/* load address */
 
 #define CONFIG_SYS_MEMTEST_START		CONFIG_SYS_SDRAM_BASE
 #define CONFIG_SYS_MEMTEST_END			0x23e00000
 
-
-
 /* bootstrap + u-boot + env + linux in nandflash */
 #define CONFIG_ENV_IS_IN_NAND		1
-#define CONFIG_ENV_OFFSET			0x60000
+#define CONFIG_ENV_OFFSET		0x60000
 #define CONFIG_ENV_OFFSET_REDUND	0x80000
-#define CONFIG_ENV_SIZE				0x20000	/* 1 sector = 128 kB */
-#define CONFIG_BOOTCOMMAND			"run sdboot"
-#define	CONFIG_EXTRA_ENV_SETTINGS							\
-	"mtdparts=mtdparts=atmel_nand:128k(bootstrap)ro,"		\
-		"256k(uboot)ro,128k(env1)ro,"						\
-		"128k(env2)ro,2M(linux),-(root)rw\0" 				\
-	"sdboot=setenv bootargs ${basicargs} ${mtdparts} "		\
-		"root=/dev/mmcblk0p1 rootdelay=1; "					\
-		"nand read 0x22000000 0xA0000 0x200000; "			\
-		"bootm 22000000\0"									\
+#define CONFIG_ENV_SIZE			0x20000	/* 1 sector = 128 kB */
+#define CONFIG_BOOTCOMMAND		"run sdboot"
+#define	CONFIG_EXTRA_ENV_SETTINGS				\
+	"mtdparts=mtdparts=atmel_nand:128k(bootstrap)ro,"	\
+		"256k(uboot)ro,128k(env1)ro,"			\
+		"128k(env2)ro,2M(linux),-(root)rw\0"		\
+	"sdboot=setenv bootargs ${basicargs} ${mtdparts} "	\
+		"root=/dev/mmcblk0p1 rootdelay=1; "		\
+		"nand read 0x22000000 0xA0000 0x200000; "	\
+		"bootm 22000000\0"				\
 	"flashboot=setenv bootargs ${basicargs} ${mtdparts} "	\
-		"root=/dev/mtdblock5 rootfstype=jffs2; "			\
-		"nand read 0x22000000 0xA0000 0x200000; "			\
-		"bootm 22000000\0"									\
-	"basicargs=console=ttyS0,115200 mem=64M\0"				\
+		"root=/dev/mtdblock5 rootfstype=jffs2; "	\
+		"nand read 0x22000000 0xA0000 0x200000; "	\
+		"bootm 22000000\0"				\
+	"basicargs=console=ttyS0,115200 mem=64M\0"		\
 	""
 
-
 #define CONFIG_SYS_PROMPT		"U-Boot> "
 #define CONFIG_SYS_CBSIZE		256
 #define CONFIG_SYS_MAXARGS		16
 #define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
 #define CONFIG_SYS_LONGHELP		1
-#define CONFIG_CMDLINE_EDITING	1
+#define CONFIG_CMDLINE_EDITING		1
 
 /*
  * Size of malloc() pool
  */
 #define CONFIG_SYS_MALLOC_LEN		ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
-#define CONFIG_SYS_GBL_DATA_SIZE	128	/* 128 bytes for initial data */
-
-#define CONFIG_STACKSIZE	(32*1024)	/* regular stack */
+#define CONFIG_SYS_GBL_DATA_SIZE	128		/* 128 bytes for initial data */
+#define CONFIG_STACKSIZE		(32*1024)	/* regular stack */
 
 #ifdef CONFIG_USE_IRQ
 #error CONFIG_USE_IRQ not supported
-- 
1.7.9.5

