Hi,
David Miller wrote:
>> The SBUS routines look quite different though. I will use the
pci32_dma_ops.
I suggested the SBUS ones because they inherit the OpenFirmware
device node name into the resource. They have also been cleaned
up substantially, the PCI ones are very messy still.
I finally had the time to look at this again and I'm not sure
how I would do this cleanly using only the SBUS stuff. They
use the IOMMU routines (mm/iommu.c or mm/io-unit.c) and since
we don't currently have an IOMMU I don't want to mess with that.
On LEON system that are not snooping DMA accesses I want to flush
the dcache when unmapping or syncing the buffer. That's it.
I have a suggestion for a patch. It uses sbus_alloc_coherent and
sbus_free_coherent with some added ifdefs and then the PCI
routines for the rest (I've added unmap_page and patched map_page).
At least the code duplication is quite minimal ...
In the somewhat limited testing I have done it works fine.
If you explain what you think is very messy with the PCI routines
maybe I can clean them up further. On LEON we use both the generic
DMA-API and the PCI-API.
I will send the patches separately.
Best regards,
Kristoffer
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html