[PATCH 6/7] netX: don't bother with variable sizes, use the intend
Juergen Beisert
jbe at pengutronix.de
Fri Apr 27 05:32:24 EDT 2012
Signed-off-by: Juergen Beisert <jbe at pengutronix.de>
---
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
More information about the barebox
mailing list