From ff38f1c2499e8deae6502abe3e5ff1ccc3046dfa Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 15 Jan 2013 23:31:30 -0300 Subject: [PATCH] ubb-patgen/ubb-patgen.c (send_buffer): use physmem_flush instead of cacheflush --- ubb-patgen/Makefile | 2 +- ubb-patgen/ubb-patgen.c | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/ubb-patgen/Makefile b/ubb-patgen/Makefile index eafa139..5bb248e 100644 --- a/ubb-patgen/Makefile +++ b/ubb-patgen/Makefile @@ -11,7 +11,7 @@ # CC = mipsel-openwrt-linux-gcc -CFLAGS = -g -Wall -O9 -march=mips32 -I../libubb/include +CFLAGS = -g -Wall -O9 -I../libubb/include LDFLAGS = LDLIBS = -L../libubb -lubb -lm diff --git a/ubb-patgen/ubb-patgen.c b/ubb-patgen/ubb-patgen.c index ea34cdc..0febacf 100644 --- a/ubb-patgen/ubb-patgen.c +++ b/ubb-patgen/ubb-patgen.c @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -31,9 +30,6 @@ #define DMA 5 -extern int cacheflush(char *addr, int nbytes, int cache); - - /* ----- List available bus clock frequencies ------------------------------ */ @@ -390,13 +386,11 @@ static void send_buffer(const struct mmcclk *clk, { unsigned long phys; - if (cacheflush((void *) buf, nibbles >> 1, DCACHE)) { - perror("cacheflush"); + if (physmem_flush(buf, nibbles)) { + perror("physmem_flush"); exit(1); } - asm("sync"); /* flush the write buffer */ - phys = physmem_xlat((void *) buf); mmc_buffer(clk, buf[0] >> 4, phys, nibbles, mask, trigger); }