Lines Matching refs:host
37 bool dcr_map_ok_generic(dcr_host_t host) in dcr_map_ok_generic() argument
39 if (host.type == DCR_HOST_NATIVE) in dcr_map_ok_generic()
40 return dcr_map_ok_native(host.host.native); in dcr_map_ok_generic()
41 else if (host.type == DCR_HOST_MMIO) in dcr_map_ok_generic()
42 return dcr_map_ok_mmio(host.host.mmio); in dcr_map_ok_generic()
52 dcr_host_t host; in dcr_map_generic() local
56 host.type = DCR_HOST_INVALID; in dcr_map_generic()
60 return host; in dcr_map_generic()
67 host.type = DCR_HOST_NATIVE; in dcr_map_generic()
68 host.host.native = dcr_map_native(dev, dcr_n, dcr_c); in dcr_map_generic()
70 host.type = DCR_HOST_MMIO; in dcr_map_generic()
71 host.host.mmio = dcr_map_mmio(dev, dcr_n, dcr_c); in dcr_map_generic()
75 return host; in dcr_map_generic()
79 void dcr_unmap_generic(dcr_host_t host, unsigned int dcr_c) in dcr_unmap_generic() argument
81 if (host.type == DCR_HOST_NATIVE) in dcr_unmap_generic()
82 dcr_unmap_native(host.host.native, dcr_c); in dcr_unmap_generic()
83 else if (host.type == DCR_HOST_MMIO) in dcr_unmap_generic()
84 dcr_unmap_mmio(host.host.mmio, dcr_c); in dcr_unmap_generic()
90 u32 dcr_read_generic(dcr_host_t host, unsigned int dcr_n) in dcr_read_generic() argument
92 if (host.type == DCR_HOST_NATIVE) in dcr_read_generic()
93 return dcr_read_native(host.host.native, dcr_n); in dcr_read_generic()
94 else if (host.type == DCR_HOST_MMIO) in dcr_read_generic()
95 return dcr_read_mmio(host.host.mmio, dcr_n); in dcr_read_generic()
102 void dcr_write_generic(dcr_host_t host, unsigned int dcr_n, u32 value) in dcr_write_generic() argument
104 if (host.type == DCR_HOST_NATIVE) in dcr_write_generic()
105 dcr_write_native(host.host.native, dcr_n, value); in dcr_write_generic()
106 else if (host.type == DCR_HOST_MMIO) in dcr_write_generic()
107 dcr_write_mmio(host.host.mmio, dcr_n, value); in dcr_write_generic()
204 void dcr_unmap_mmio(dcr_host_mmio_t host, unsigned int dcr_c) in dcr_unmap_mmio() argument
206 dcr_host_mmio_t h = host; in dcr_unmap_mmio()
210 h.token += host.base * h.stride; in dcr_unmap_mmio()