mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Fabio Porcedda <fabio.porcedda@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH v2 1/2] at91sam9260/9g20ek: cleanup coding style
Date: Thu,  7 Feb 2013 15:43:50 +0100	[thread overview]
Message-ID: <1360248231-31561-2-git-send-email-fabio.porcedda@gmail.com> (raw)
In-Reply-To: <1360248231-31561-1-git-send-email-fabio.porcedda@gmail.com>

- fix some error and warnings pointed out by checkpatch.
- join some short lines.
- remove some empty lines.
- remove unnecessary headers.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/boards/at91sam9260ek/init.c | 25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)

diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
index 2d52f5a..e0c03ee 100644
--- a/arch/arm/boards/at91sam9260ek/init.c
+++ b/arch/arm/boards/at91sam9260ek/init.c
@@ -10,25 +10,15 @@
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- *
  */
 
 #include <common.h>
-#include <net.h>
 #include <init.h>
 #include <environment.h>
-#include <fec.h>
 #include <asm/armlinux.h>
 #include <generated/mach-types.h>
-#include <partition.h>
-#include <fs.h>
-#include <fcntl.h>
-#include <io.h>
-#include <asm/hardware.h>
 #include <nand.h>
 #include <sizes.h>
-#include <linux/mtd/nand.h>
 #include <mach/board.h>
 #include <mach/at91sam9_smc.h>
 #include <gpio.h>
@@ -83,7 +73,8 @@ static struct sam9_smc_config ek_9260_nand_smc_config = {
 	.read_cycle		= 5,
 	.write_cycle		= 5,
 
-	.mode			= AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
+	.mode			= AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
+				  AT91_SMC_EXNWMODE_DISABLE,
 	.tdf_cycles		= 2,
 };
 
@@ -101,7 +92,8 @@ static struct sam9_smc_config ek_9g20_nand_smc_config = {
 	.read_cycle		= 7,
 	.write_cycle		= 7,
 
-	.mode			= AT91_SMC_READMODE | AT91_SMC_WRITEMODE | AT91_SMC_EXNWMODE_DISABLE,
+	.mode			= AT91_SMC_READMODE | AT91_SMC_WRITEMODE |
+				  AT91_SMC_EXNWMODE_DISABLE,
 	.tdf_cycles		= 3,
 };
 
@@ -153,12 +145,11 @@ static void at91sam9260ek_phy_reset(void)
 	at91_sys_write(AT91_RSTC_CR, AT91_RSTC_KEY | AT91_RSTC_EXTRST);
 
 	/* Wait for end hardware reset */
-	while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL));
+	while (!(at91_sys_read(AT91_RSTC_SR) & AT91_RSTC_NRSTL))
+		;
 
 	/* Restore NRST value */
-	at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY |
-				     (rstc) |
-				     AT91_RSTC_URSTEN);
+	at91_sys_write(AT91_RSTC_MR, AT91_RSTC_KEY | (rstc) | AT91_RSTC_URSTEN);
 }
 
 /*
@@ -271,7 +262,6 @@ static int at91sam9260ek_devices_init(void)
 
 	return 0;
 }
-
 device_initcall(at91sam9260ek_devices_init);
 
 static int at91sam9260ek_console_init(void)
@@ -279,5 +269,4 @@ static int at91sam9260ek_console_init(void)
 	at91_register_uart(0, 0);
 	return 0;
 }
-
 console_initcall(at91sam9260ek_console_init);
-- 
1.8.1.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-02-07 14:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07 14:43 [PATCH v2 0/2] at91sam9260/9g20ek: some cleanup Fabio Porcedda
2013-02-07 14:43 ` Fabio Porcedda [this message]
2013-02-07 14:43 ` [PATCH v2 2/2] at91sam9260/9g20ek: enable clock via clock framework Fabio Porcedda
2013-02-07 16:02 ` [PATCH v2 0/2] at91sam9260/9g20ek: some cleanup Jean-Christophe PLAGNIOL-VILLARD
2013-02-07 21:24 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1360248231-31561-2-git-send-email-fabio.porcedda@gmail.com \
    --to=fabio.porcedda@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox