aboutsummaryrefslogtreecommitdiff
path: root/tools/bus_space/C
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2015-07-26 21:37:31 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2015-07-26 21:37:31 +0000
commit71d80fbaf303a0d61b3b020b23a0f10bb9320881 (patch)
tree59ac184600735945ed7377cd16ed2f73e6490328 /tools/bus_space/C
parent582317b71d8241cf557a410d4dae81db66c4d51d (diff)
downloadsrc-71d80fbaf303a0d61b3b020b23a0f10bb9320881.tar.gz
src-71d80fbaf303a0d61b3b020b23a0f10bb9320881.zip
Change the dev argument from a full path to just the device
identification (e.g. isa:0x3f0 or pci0:2:1:0). In libbus, the device is turned into a path name. For bus_space_map(), the resource is now specified in a second argument. Before: bus.map('/dev/proto/pci0:2:1:0/pcicfg') busdma.tag_create('/dev/proto/pci0:2:1:0/busdma', ...) Now: bus.map('pci0:2:1:0', 'pcicfg') busdma.tag_create('pci0:2:1:0', ...)
Notes
Notes: svn path=/head/; revision=285903
Diffstat (limited to 'tools/bus_space/C')
-rw-r--r--tools/bus_space/C/lang.c4
-rw-r--r--tools/bus_space/C/libbus.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/tools/bus_space/C/lang.c b/tools/bus_space/C/lang.c
index d9c3f52cde18..f9b404b1b26c 100644
--- a/tools/bus_space/C/lang.c
+++ b/tools/bus_space/C/lang.c
@@ -80,10 +80,10 @@ bus_write_4(int rid, long ofs, uint32_t val)
}
int
-bus_map(const char *dev)
+bus_map(const char *dev, const char *resource)
{
- return (bs_map(dev));
+ return (bs_map(dev, resource));
}
int
diff --git a/tools/bus_space/C/libbus.h b/tools/bus_space/C/libbus.h
index 50efd3808cc8..0fae9879d2ce 100644
--- a/tools/bus_space/C/libbus.h
+++ b/tools/bus_space/C/libbus.h
@@ -29,7 +29,7 @@
#ifndef _LIBBUS_SPACE_H_
#define _LIBBUS_SPACE_H_
-int bus_map(const char *dev);
+int bus_map(const char *dev, const char *resource);
int16_t bus_read_1(int rid, long ofs);
int32_t bus_read_2(int rid, long ofs);
int64_t bus_read_4(int rid, long ofs);