From: Marc Leeman <marc.leeman@barco.com>
To: linuxppc-dev@lists.linuxppc.org
Cc: Jeff Angielski <jeff@theptrgroup.com>
Subject: Re: PCI Memory mapping
Date: Mon, 22 Mar 2004 08:48:33 +0100 [thread overview]
Message-ID: <20040322074833.GY7133@smtp.barco.com> (raw)
In-Reply-To: <1079455175.4184.25.camel@localhost.localdomain>
> Check your PPC documentation for the configuration of the PITARx,
> PIBARx, and PICMRx. Once you read about these it should all make
> sense. Then look at your bootloader source code (hopefully you are
> using u-boot) to see how these registers are being configured.
Tnx for the info.
I am working on a solution, so instead of just posing a question on
the list, maybe the current working solution is a good contribution to
the lesser divine kernel hackers on the list :)
pci_map_single(driver_data.dev,driver_data.device[i]->\
pciaddress,PCI_TRANSFER_SIZE,PCI_DMA_TODEVICE)
and
pci_unmap_single(driver_data.dev,driver_data.device[i]->\
bus_addr,PCI_TRANSFER_SIZE,PCI_DMA_TODEVICE);
The data is transferred in blocks of 2k and first copied into a kernel
buffer from user space and then mapped on the PCI address range. Ideally
the user-space buffer would be mapped onto PCI (don't know if this is
possible, I did a quick, negative, test, but I suspect that I should
check the addresses again). However, this would put some logic at user
level, which is currently (in the transformation process) not desired.
The bus address (result of pci_map_single) is transferred to the DSP,
which it uses to fetch the data.
+------+ +--------+ +------------+
| user |------>| kernel |---->| pci-mapped |
+------+ +--------+ +------------+
In the current kernel code (2.4.17 mvl2.1), pci_sync_single does not
seem to be implemented. In the code I checked, the successive mapping
and unmapping of the buffers does result in the same addresses.
I would assume that pci_sync_single would allow me to pass the mapped
address only once to the DSP, awaking it with an appropriate interrupt
when new data is available. Due to the absence of pci_sync_single, the
pci-mapped address needs to be passed to the DSP each time.
The observation based question is: to what degree can I be certain that
in a streaming data application, the successive mapping and unmapping of
the pci mapped addresses will result in the same bus addresses?
--
Marc Leeman Hardware R&D Engineer
Barco Controlrooms Division Noordlaan 5, B-8520 Kuurne (BE)
Tel. +32 56 368 428 http://www.barcocontrolrooms.com marc.leeman@barco.com
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2004-03-22 7:48 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-16 11:40 PCI Memory mapping Marc Leeman
2004-03-16 16:39 ` Jeff Angielski
2004-03-22 7:48 ` Marc Leeman [this message]
2004-03-22 11:02 ` Marc Leeman
2004-03-23 11:17 ` Marc Leeman
2004-03-23 16:01 ` Marc Leeman
2004-03-24 2:04 ` Michael R. Zucca
2004-03-24 0:04 ` Benjamin Herrenschmidt
2004-03-24 12:26 ` Marc Leeman
2004-03-24 14:25 ` Marc Leeman
2004-03-24 17:08 ` linas
2004-03-25 15:48 ` Marc Leeman
2004-03-25 16:34 ` linas
2004-03-25 16:45 ` linas
2004-03-26 8:00 ` Marc Leeman
2004-03-30 19:49 ` Jeff Angielski
2004-03-31 15:56 ` Marc Leeman
2004-03-31 16:02 ` Marc Leeman
2004-04-01 12:33 ` Marc Leeman
2004-04-04 22:53 ` Benjamin Herrenschmidt
2004-04-05 8:46 ` Adrian Cox
[not found] ` <20040402140130.GG22365@smtp.barco.com>
[not found] ` <1081175362.20952.30.camel@localhost.localdomain>
2004-04-06 6:21 ` Marc Leeman
-- strict thread matches above, loose matches on Subject: below --
2004-04-07 7:15 Marc Leeman
2011-04-15 5:44 koteswararaom
2011-04-15 6:32 ` David Hawkins
2011-04-15 6:48 ` Michael Neuling
2025-04-07 14:55 PCI memory mapping Renaud Barbier
2025-04-08 9:54 ` Lucas Stach
2025-04-09 10:00 ` Renaud Barbier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040322074833.GY7133@smtp.barco.com \
--to=marc.leeman@barco.com \
--cc=jeff@theptrgroup.com \
--cc=linuxppc-dev@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.