mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-23 23:52:49 +02:00
ubb-patgen/ubb-patgen.c (send_buffer): use physmem_flush instead of cacheflush
This commit is contained in:
parent
a8f905a85f
commit
ff38f1c249
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
CC = mipsel-openwrt-linux-gcc
|
CC = mipsel-openwrt-linux-gcc
|
||||||
CFLAGS = -g -Wall -O9 -march=mips32 -I../libubb/include
|
CFLAGS = -g -Wall -O9 -I../libubb/include
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
LDLIBS = -L../libubb -lubb -lm
|
LDLIBS = -L../libubb -lubb -lm
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <asm/cachectl.h>
|
|
||||||
|
|
||||||
#include <ubb/ubb.h>
|
#include <ubb/ubb.h>
|
||||||
#include <ubb/regs4740.h>
|
#include <ubb/regs4740.h>
|
||||||
@ -31,9 +30,6 @@
|
|||||||
#define DMA 5
|
#define DMA 5
|
||||||
|
|
||||||
|
|
||||||
extern int cacheflush(char *addr, int nbytes, int cache);
|
|
||||||
|
|
||||||
|
|
||||||
/* ----- List available bus clock frequencies ------------------------------ */
|
/* ----- List available bus clock frequencies ------------------------------ */
|
||||||
|
|
||||||
|
|
||||||
@ -390,13 +386,11 @@ static void send_buffer(const struct mmcclk *clk,
|
|||||||
{
|
{
|
||||||
unsigned long phys;
|
unsigned long phys;
|
||||||
|
|
||||||
if (cacheflush((void *) buf, nibbles >> 1, DCACHE)) {
|
if (physmem_flush(buf, nibbles)) {
|
||||||
perror("cacheflush");
|
perror("physmem_flush");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
asm("sync"); /* flush the write buffer */
|
|
||||||
|
|
||||||
phys = physmem_xlat((void *) buf);
|
phys = physmem_xlat((void *) buf);
|
||||||
mmc_buffer(clk, buf[0] >> 4, phys, nibbles, mask, trigger);
|
mmc_buffer(clk, buf[0] >> 4, phys, nibbles, mask, trigger);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user