Lines Matching refs:range
35 struct logic_pio_hwaddr *range; in logic_pio_register_range() local
50 list_for_each_entry(range, &io_range_list, list) { in logic_pio_register_range()
51 if (range->fwnode == new_range->fwnode) { in logic_pio_register_range()
56 if (range->flags == LOGIC_PIO_CPU_MMIO && in logic_pio_register_range()
59 if (start >= range->hw_start + range->size || in logic_pio_register_range()
60 end < range->hw_start) { in logic_pio_register_range()
61 mmio_end = range->io_start + range->size; in logic_pio_register_range()
66 } else if (range->flags == LOGIC_PIO_INDIRECT && in logic_pio_register_range()
68 iio_sz += range->size; in logic_pio_register_range()
109 void logic_pio_unregister_range(struct logic_pio_hwaddr *range) in logic_pio_unregister_range() argument
112 list_del_rcu(&range->list); in logic_pio_unregister_range()
127 struct logic_pio_hwaddr *range, *found_range = NULL; in find_io_range_by_fwnode() local
130 list_for_each_entry_rcu(range, &io_range_list, list) { in find_io_range_by_fwnode()
131 if (range->fwnode == fwnode) { in find_io_range_by_fwnode()
132 found_range = range; in find_io_range_by_fwnode()
144 struct logic_pio_hwaddr *range, *found_range = NULL; in find_io_range() local
147 list_for_each_entry_rcu(range, &io_range_list, list) { in find_io_range()
148 if (in_range(pio, range->io_start, range->size)) { in find_io_range()
149 found_range = range; in find_io_range()
172 struct logic_pio_hwaddr *range; in logic_pio_to_hwaddr() local
174 range = find_io_range(pio); in logic_pio_to_hwaddr()
175 if (range) in logic_pio_to_hwaddr()
176 return range->hw_start + pio - range->io_start; in logic_pio_to_hwaddr()
192 struct logic_pio_hwaddr *range; in logic_pio_trans_hwaddr() local
194 range = find_io_range_by_fwnode(fwnode); in logic_pio_trans_hwaddr()
195 if (!range || range->flags == LOGIC_PIO_CPU_MMIO) { in logic_pio_trans_hwaddr()
199 if (range->size < size) { in logic_pio_trans_hwaddr()
201 &size, &range->size); in logic_pio_trans_hwaddr()
204 return addr - range->hw_start + range->io_start; in logic_pio_trans_hwaddr()
209 struct logic_pio_hwaddr *range; in logic_pio_trans_cpuaddr() local
212 list_for_each_entry_rcu(range, &io_range_list, list) { in logic_pio_trans_cpuaddr()
213 if (range->flags != LOGIC_PIO_CPU_MMIO) in logic_pio_trans_cpuaddr()
215 if (in_range(addr, range->hw_start, range->size)) { in logic_pio_trans_cpuaddr()
218 cpuaddr = addr - range->hw_start + range->io_start; in logic_pio_trans_cpuaddr()