Writing to PCI Bridge in User Space - Problem
Dan Malek
dan at embeddededge.com
Tue Dec 18 07:31:25 EST 2001
Steven Vacca wrote:
> I have a "resident" driver which reads and writes a PLX PCI Bridge
> chip, which is mapped into 0x2000.0000 in MMU_init() (for the mpc860).
Bzzzzt!! Potentially wrong answer. How are you "mapping" it? If you
are using ioremap(), this isn't going to work. You either need to map it
much later in the kernel initialization, after the kernel VM is set up,
or by carefully choosing addresses for io_block_mapping().
> So, why does it work fine just before starting the app, from the non-driver
> kernel code, but not from the driver's ioctl fops func?
Because if you just use ioremap(), it placed the virtual address into the
user space. When you started up the user programs the mapping was used for
it's intended purpose (user space). There are plenty of messages in the
archives and FAQs describing the memory mapping.
Thanks.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list