linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Enabling 64 bit data type for dma_addr_t on non PPC64 architecture
@ 2008-04-26  2:52 Tushar Tyagi
  2008-04-26  3:38 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 4+ messages in thread
From: Tushar Tyagi @ 2008-04-26  2:52 UTC (permalink / raw)
  To: linuxppc-dev

Hello,
I'm working a new DMA hardware for PPC processors.
The processor is a 32 bit architecture having 40 bit physical address
space.=20
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
flag.
=20
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.
=20
Currently the dma_map_single function has 2 versions based upon
CONFIG_PPC64 defined or not.
=20
Is it possible to reuse the CONFIG_PPC64 based code only pertaining to
DMA by doing the following:
=20
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.
=20
With the above modification, the function dma_map_single starts
returning 64 bit data type instead of 32.
=20
Do you have any comments or suggestions ?
=20
-thanks
TT

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Enabling 64 bit data type for dma_addr_t on non PPC64 architecture
@ 2008-04-26  2:48 Tushar Tyagi
  0 siblings, 0 replies; 4+ messages in thread
From: Tushar Tyagi @ 2008-04-26  2:48 UTC (permalink / raw)
  To: linuxppc-embedded

Hello,
I'm working a new DMA hardware for PPC processors.
The processor is a 32 bit architecture having 40 bit physical address
space.=20
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
flag.
=20
We want to use the Linux generic DMA layer to offload DMA operations to
the hw and the Linux code path goes through function=20
dma_async_memcpy_buf_to_buf and then dma_map_single.
=20
Currently the dma_map_single function has 2 versions based upon
CONFIG_PPC64 defined or not.
=20
Is it possible to reuse the CONFIG_PPC64 based code only pertaining to
DMA by doing the following:
=20
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.
=20
With the above modification, the function dma_map_single starts
returning 64 bit data type instead of 32.
=20
Do you have any comments or suggestions ?
=20
-thanks
TT

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-04-29 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-26  2:52 Enabling 64 bit data type for dma_addr_t on non PPC64 architecture Tushar Tyagi
2008-04-26  3:38 ` Benjamin Herrenschmidt
2008-04-29 15:14   ` Becky Bruce
  -- strict thread matches above, loose matches on Subject: below --
2008-04-26  2:48 Tushar Tyagi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).