diff options
author | jhibbits <jhibbits@FreeBSD.org> | 2016-01-27 02:23:54 +0000 |
---|---|---|
committer | jhibbits <jhibbits@FreeBSD.org> | 2016-01-27 02:23:54 +0000 |
commit | 31bb8ee5bdf9a6332a86e4774ebdccba877ce42e (patch) | |
tree | 5ac500b634909ff3fe2556201aef7e16d85316d2 /sys/dev/pccard | |
parent | d2ca0a07825355904475b1fe585efdd49eeae0b3 (diff) | |
download | FreeBSD-src-31bb8ee5bdf9a6332a86e4774ebdccba877ce42e.zip FreeBSD-src-31bb8ee5bdf9a6332a86e4774ebdccba877ce42e.tar.gz |
Convert rman to use rman_res_t instead of u_long
Summary:
Migrate to using the semi-opaque type rman_res_t to specify rman resources. For
now, this is still compatible with u_long.
This is step one in migrating rman to use uintmax_t for resources instead of
u_long.
Going forward, this could feasibly be used to specify architecture-specific
definitions of resource ranges, rather than baking a specific integer type into
the API.
This change has been broken out to facilitate MFC'ing drivers back to 10 without
breaking ABI.
Reviewed By: jhb
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D5075
Diffstat (limited to 'sys/dev/pccard')
-rw-r--r-- | sys/dev/pccard/pccard.c | 20 | ||||
-rw-r--r-- | sys/dev/pccard/pccardvarp.h | 10 |
2 files changed, 15 insertions, 15 deletions
diff --git a/sys/dev/pccard/pccard.c b/sys/dev/pccard/pccard.c index 87ab53a..b3c2e32 100644 --- a/sys/dev/pccard/pccard.c +++ b/sys/dev/pccard/pccard.c @@ -97,9 +97,9 @@ static void pccard_print_resources(struct resource_list *rl, const char *name, int type, int count, const char *format); static int pccard_print_child(device_t dev, device_t child); static int pccard_set_resource(device_t dev, device_t child, int type, - int rid, u_long start, u_long count); + int rid, rman_res_t start, rman_res_t count); static int pccard_get_resource(device_t dev, device_t child, int type, - int rid, u_long *startp, u_long *countp); + int rid, rman_res_t *startp, rman_res_t *countp); static void pccard_delete_resource(device_t dev, device_t child, int type, int rid); static int pccard_set_res_flags(device_t dev, device_t child, int type, @@ -113,8 +113,8 @@ static int pccard_read_ivar(device_t bus, device_t child, int which, uintptr_t *result); static void pccard_driver_added(device_t dev, driver_t *driver); static struct resource *pccard_alloc_resource(device_t dev, - device_t child, int type, int *rid, u_long start, - u_long end, u_long count, u_int flags); + device_t child, int type, int *rid, rman_res_t start, + rman_res_t end, rman_res_t count, u_int flags); static int pccard_release_resource(device_t dev, device_t child, int type, int rid, struct resource *r); static void pccard_child_detached(device_t parent, device_t dev); @@ -474,7 +474,7 @@ pccard_function_init(struct pccard_function *pf, int entry) struct pccard_ce_iospace *ios; struct pccard_ce_memspace *mems; device_t bus; - u_long start, end, len; + rman_res_t start, end, len; int i, rid, spaces; if (pf->pf_flags & PFF_ENABLED) { @@ -614,8 +614,8 @@ pccard_function_free(struct pccard_function *pf) } static void -pccard_mfc_adjust_iobase(struct pccard_function *pf, bus_addr_t addr, - bus_addr_t offset, bus_size_t size) +pccard_mfc_adjust_iobase(struct pccard_function *pf, rman_res_t addr, + rman_res_t offset, rman_res_t size) { bus_size_t iosize, tmp; @@ -923,7 +923,7 @@ pccard_print_child(device_t dev, device_t child) static int pccard_set_resource(device_t dev, device_t child, int type, int rid, - u_long start, u_long count) + rman_res_t start, rman_res_t count) { struct pccard_ivar *devi = PCCARD_IVAR(child); struct resource_list *rl = &devi->resources; @@ -952,7 +952,7 @@ pccard_set_resource(device_t dev, device_t child, int type, int rid, static int pccard_get_resource(device_t dev, device_t child, int type, int rid, - u_long *startp, u_long *countp) + rman_res_t *startp, rman_res_t *countp) { struct pccard_ivar *devi = PCCARD_IVAR(child); struct resource_list *rl = &devi->resources; @@ -1132,7 +1132,7 @@ pccard_driver_added(device_t dev, driver_t *driver) static struct resource * pccard_alloc_resource(device_t dev, device_t child, int type, int *rid, - u_long start, u_long end, u_long count, u_int flags) + rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct pccard_ivar *dinfo; struct resource_list_entry *rle = 0; diff --git a/sys/dev/pccard/pccardvarp.h b/sys/dev/pccard/pccardvarp.h index 54d7f75..9478c8f 100644 --- a/sys/dev/pccard/pccardvarp.h +++ b/sys/dev/pccard/pccardvarp.h @@ -48,14 +48,14 @@ #define PCCARD_CFE_AUDIO 0x0800 struct pccard_ce_iospace { - u_long length; - u_long start; + rman_res_t length; + rman_res_t start; }; struct pccard_ce_memspace { - u_long length; - u_long cardaddr; - u_long hostaddr; + rman_res_t length; + rman_res_t cardaddr; + rman_res_t hostaddr; }; struct pccard_config_entry { |