mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/6] netX: just a style fix
Date: Fri, 20 Apr 2012 15:06:12 +0200	[thread overview]
Message-ID: <1334927177-13912-2-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1334927177-13912-1-git-send-email-jbe@pengutronix.de>

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
 arch/arm/mach-netx/generic.c |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index 8810e6d..e4763c6 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -33,11 +33,11 @@ struct fw_header {
 
 static int xc_check_ptr(int xcno, unsigned long adr, unsigned int size)
 {
-	if( adr >= NETX_PA_XMAC(xcno) &&
+	if (adr >= NETX_PA_XMAC(xcno) &&
 	    adr + size < NETX_PA_XMAC(xcno) + XMAC_MEM_SIZE)
 		return 0;
 
-	if( adr >= NETX_PA_XPEC(xcno) &&
+	if (adr >= NETX_PA_XPEC(xcno) &&
 	    adr + size < NETX_PA_XPEC(xcno) + XPEC_MEM_SIZE)
 		return 0;
 
@@ -49,12 +49,11 @@ static int xc_patch(int xcno, void *patch, int count)
 {
 	unsigned int adr, val, *p = patch;
 
-/*	printf("%s: patch: %p size: %d\n",__FUNCTION__,patch,count); */
 	int i;
-	for(i=0; i<count; i++) {
+	for (i = 0; i < count; i++) {
 		adr = *p++;
 		val = *p++;
-		if( xc_check_ptr(xcno, adr, 1) < 0)
+		if (xc_check_ptr(xcno, adr, 1) < 0)
 			return -1;
 		*(volatile unsigned int *)adr = val;
 	}
@@ -66,7 +65,7 @@ static void memset32(void *s, int c, int n)
 	int i;
 	unsigned int *t = s;
 
-	for(i=0; i<(n>>2); i++)
+	for (i = 0; i < (n >> 2); i++)
 		*t++ = 0;
 }
 
@@ -75,11 +74,12 @@ static void memcpy32(void *trg, void *src, int size)
 	int i;
 	unsigned int *t = trg;
 	unsigned int *s = src;
-	for(i=0; i<(size>>2); i++)
+	for (i = 0; i < (size >> 2); i++)
 		*t++ = *s++;
 }
 
-int loadxc(int xcno) {
+int loadxc(int xcno)
+{
 	/* stop xmac / xpec */
 	XMAC_REG(xcno, XMAC_RPU_HOLD_PC) = RPU_HOLD_PC;
 	XMAC_REG(xcno, XMAC_TPU_HOLD_PC) = TPU_HOLD_PC;
@@ -92,7 +92,7 @@ int loadxc(int xcno) {
 	memset32((void*)NETX_PA_XMAC(xcno), 0, 0x800);
 
 	/* can't use barebox memcpy here, we need 32bit accesses */
-	if(xcno == 0) {
+	if (xcno == 0) {
 		memcpy32((void*)(NETX_PA_XMAC(xcno) + XMAC_RPU_PROGRAM_START), rpu_eth0, sizeof(rpu_eth0));
 		memcpy32((void*)(NETX_PA_XMAC(xcno) + XMAC_TPU_PROGRAM_START), tpu_eth0, sizeof(tpu_eth0));
 		memcpy32((void*)NETX_PA_XPEC(xcno) + XPEC_RAM_START, xpec_eth0_mac, sizeof(xpec_eth0_mac));
-- 
1.7.10


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

  reply	other threads:[~2012-04-20 13:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 13:06 [PATCH] some minor fixes for the netX arch Juergen Beisert
2012-04-20 13:06 ` Juergen Beisert [this message]
2012-04-20 13:06 ` [PATCH 2/6] netX: use correct sized pointers Juergen Beisert
2012-04-20 13:06 ` [PATCH 3/6] netX: adapt it to the current boot spec Juergen Beisert
2012-04-20 13:06 ` [PATCH 4/6] netX: add more common permissions Juergen Beisert
2012-04-20 13:06 ` [PATCH 5/6] netX: make the host interface macros compile Juergen Beisert
2012-04-20 13:06 ` [PATCH 6/6] netX: ignoring temporary netx build tool Juergen Beisert
2012-04-23  5:53 ` [PATCH] some minor fixes for the netX arch 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=1334927177-13912-2-git-send-email-jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --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