Yes, that is neither obvious nor nice. My apologies, but I could not
find a better way.
Explanation: The memcpy_toio cases goes like this:
- isa_memcpy_toio(NCR53C400_host_buffer+NCR5380_map_name,src+start,128);
+ memcpy_toio(isa_remap_ptr+OFFSET_FROM_REMAPPING, src+start, 128);
isa_remap_ptr is the ioremap from NCR5380_map_name + NCR53C400_mem_base.
I would like to memcpy from NCR53C400_host_buffer+NCR5380_map_name thus
needing to add the difference between NCR53C400_host_buffer and the
NCR53C400_mem_base (used in isa_remap_ptr). Thus, in the hope that
this can be done linearly, I add OFFSET_FROM_REMAPPING
(NCR53C400_host_buffer - NCR53C400_mem_base). (BTW, this is also done
in the memcpy_fromio cases.)
I hope that the above is readable.
-- Regards, Rasmus(rasmus@jaquet.dk) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/