Enabling 64 bit data type for dma_addr_t on non PPC64 architecture

Tushar Tyagi ttyagi at amcc.com
Sat Apr 26 12:48:56 EST 2008

I'm working a new DMA hardware for PPC processors.
The processor is a 32 bit architecture having 40 bit physical address
So we need the 32 bit processor code base but we want the type
dma_addr_t to represent 64 bit data, without enabling the CONFIG_PPC64
We want to use the Linux generic DMA layer to offload DMA operations to
the hw and the Linux code path goes through function 
dma_async_memcpy_buf_to_buf and then dma_map_single.
Currently the dma_map_single function has 2 versions based upon
CONFIG_PPC64 defined or not.
Is it possible to reuse the CONFIG_PPC64 based code only pertaining to
DMA by doing the following:
Add a new flag called CONFIG_DMA64 along with CONFIG_PPC64 and
__powerpc64__ flags, enabling our code to use the generic DMA layer with
64 bit data type for dma_addr_t.
With the above modification, the function dma_map_single starts
returning 64 bit data type instead of 32.
Do you have any comments or suggestions ?

More information about the Linuxppc-embedded mailing list