[PATCH 6/7] netX: don't bother with variable sizes, use the intend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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

diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index 5ce7a0d..53b0c60 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -20,6 +20,7 @@
 
 #include <common.h>
 #include <command.h>
+#include <io.h>
 #include <mach/netx-regs.h>
 #include "eth_firmware.h"
 
@@ -45,18 +46,17 @@ static int xc_check_ptr(int xcno, unsigned long adr, unsigned int size)
 	return -1;
 }
 
-static int xc_patch(int xcno, const void *patch, int count)
+static int xc_patch(int xcno, const u32 *patch, int count)
 {
 	unsigned int adr, val;
-	const unsigned int *p = patch;
 
 	int i;
 	for (i = 0; i < count; i++) {
-		adr = *p++;
-		val = *p++;
+		adr = *patch++;
+		val = *patch++;
 		if (xc_check_ptr(xcno, adr, 1) < 0)
 			return -1;
-		*(volatile unsigned int *)adr = val;
+		writel(val, adr);
 	}
 	return 0;
 }
-- 
1.7.10


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


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux