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