1
0
mirror of git://projects.qi-hardware.com/ben-blinkenlights.git synced 2024-11-27 17:05:20 +02:00

ubb-patgen/ubb-patgen.c (send_buffer): use physmem_flush instead of cacheflush

This commit is contained in:
Werner Almesberger 2013-01-15 23:31:30 -03:00
parent a8f905a85f
commit ff38f1c249
2 changed files with 3 additions and 9 deletions

View File

@ -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

View File

@ -20,7 +20,6 @@
#include <time.h>
#include <assert.h>
#include <sys/mman.h>
#include <asm/cachectl.h>
#include <ubb/ubb.h>
#include <ubb/regs4740.h>
@ -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);
}