summaryrefslogtreecommitdiffstats
path: root/tools/bus_space/C
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2015-08-02 01:09:30 +0000
committermarcel <marcel@FreeBSD.org>2015-08-02 01:09:30 +0000
commitda99969eb727ae2cf19f925f08c3f965f9856b6d (patch)
tree389a014deed0f01fd66db730dc3f619a499a44cb /tools/bus_space/C
parent2878ab524794d3b961b0e950c6069afc7a77f795 (diff)
downloadFreeBSD-src-da99969eb727ae2cf19f925f08c3f965f9856b6d.zip
FreeBSD-src-da99969eb727ae2cf19f925f08c3f965f9856b6d.tar.gz
Rename busdma_sync() to busdma_sync_range() and rename the
base and size parameters to ofs and len (resp). Add a new busdma_sync() that makes the entire MD coherent.
Diffstat (limited to 'tools/bus_space/C')
-rw-r--r--tools/bus_space/C/lang.c11
-rw-r--r--tools/bus_space/C/libbus.h3
2 files changed, 11 insertions, 3 deletions
diff --git a/tools/bus_space/C/lang.c b/tools/bus_space/C/lang.c
index f9b404b..3ef4544 100644
--- a/tools/bus_space/C/lang.c
+++ b/tools/bus_space/C/lang.c
@@ -227,8 +227,15 @@ busdma_seg_get_size(busdma_seg_t seg)
}
int
-busdma_sync(busdma_md_t md, int op, bus_addr_t base, bus_size_t size)
+busdma_sync(busdma_md_t md, int op)
{
- return (bd_sync(md, op, base, size));
+ return (bd_sync(md, op, 0UL, ~0UL));
+}
+
+int
+busdma_sync_range(busdma_md_t md, int op, bus_size_t ofs, bus_size_t len)
+{
+
+ return (bd_sync(md, op, ofs, len));
}
diff --git a/tools/bus_space/C/libbus.h b/tools/bus_space/C/libbus.h
index 0fae987..1f0c3f1 100644
--- a/tools/bus_space/C/libbus.h
+++ b/tools/bus_space/C/libbus.h
@@ -78,6 +78,7 @@ bus_size_t busdma_seg_get_size(busdma_seg_t seg);
#define BUSDMA_SYNC_PREWRITE 4
#define BUSDMA_SYNC_POSTWRITE 8
-int busdma_sync(busdma_md_t md, int op, bus_addr_t, bus_size_t);
+int busdma_sync(busdma_md_t md, int op);
+int busdma_sync_range(busdma_md_t md, int op, bus_size_t, bus_size_t);
#endif /* _LIBBUS_SPACE_H_ */
OpenPOWER on IntegriCloud