* TR: Linux 2.6.x 82xx probe devices with multiple serial drivers
@ 2010-02-11 18:39 Laurent Lagrange
2010-05-28 14:44 ` Linux 2.6.x: arch powerpc: PCI DMA allocation misunderstandings Laurent Lagrange
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Lagrange @ 2010-02-11 18:39 UTC (permalink / raw)
To: linuxppc-dev
Hello,
I use a 82xx platform with a device tree which describes 4 SCC ports.
I want to probe these 4 SCC ports against 2 serial drivers (e.g. async and
sync).
Each port is declared as compatible with the 2 drivers.
When the first driver is loaded, all devices are probed and bound
with this driver and cannot be probed against the second driver.
I know that it can be a way to prevent against concurrent accesses but the
configuration is static and depends on how the drivers are loaded.
In fact, I want to load my 2 drivers, probe each entry without requesting
any resource then select how to open my ports using the first or second
driver.
Any tips ?
Thanks
Laurent
^ permalink raw reply [flat|nested] 2+ messages in thread
* Linux 2.6.x: arch powerpc: PCI DMA allocation misunderstandings
2010-02-11 18:39 TR: Linux 2.6.x 82xx probe devices with multiple serial drivers Laurent Lagrange
@ 2010-05-28 14:44 ` Laurent Lagrange
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Lagrange @ 2010-05-28 14:44 UTC (permalink / raw)
To: linuxppc-dev
Hello,
I use a 82xx or 85xx host platform with a Linux 2.6.24 or 2.2.31.
On this host, I want to write a PCI driver for a target PMC device
wich only supports 30bits (1GB) DMA addressing.
The PMC device is the master of the DMA transfers from/to the host memory.
In the host driver, I begin to set the two DMA masks with
- pci_set_dma_mask(pdev, DMA_BIT_MASK(30)) and
- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(30))
Then I allocate DMA buffers in the host memory with
- pci_alloc_consistent or
- pci_pool_create and pci_pool_alloc
My problem is that the alloc functions return physical addresses
which are coherent with 32bits but not with the wanted 30bits.
The allocations seem to work like a kmalloc with a GFP_DMA flag.
On powerpc architecture, GFP_DMA preserves the allocations on 32bits
unlike on x86 architecture which restrict the allocations on 24bits.
I don't understand why it is recommended to use the PCI DMA API
with the DMA masks if the final allocator is only able to
use a GFP_DMA-like restriction and not a real provided mask.
Surely I missed something...
Any idea would be welcome.
Thanks
Laurent
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-29 4:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-11 18:39 TR: Linux 2.6.x 82xx probe devices with multiple serial drivers Laurent Lagrange
2010-05-28 14:44 ` Linux 2.6.x: arch powerpc: PCI DMA allocation misunderstandings Laurent Lagrange
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).