Xilinx ML310 PCI driver problem

Michael Platov platov at setdsp.ru
Sat Nov 6 09:06:39 EST 2004


Hello linuxppc-embedded,

  I have xilinx ml310 based development system. It using ml310
  reference PCI design and MontaVista linux. Everything work OK I ever
  tried to work with several PCI cards and everything worked fine
  (memory and interrupts), but when I tried to write driver for my PCI
  board I faced strange (for me) problem. Reading and writing in I/O
  ports of PCI controller causes kernel oopsing with message kernel
  access of bad area error:

ops: kernel access of bad area, sig: 11
NIP: C9023980 XER: 00000000 LR: C9023950 SP: C7AE3EE0 REGS: c7ae3e30 TRAP: 0800
   Not tainted
MSR: 00009030 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DEAR: F7FC3D84, ESR: 00800000
TASK = c7ae2000[119] 'io_test3' Last syscall: 54
last math 00000000 last altivec 00000000
GPR00: F7FC3D84 C7AE3EE0 C7AE2000 00000101 C90247EC 00000008 C7AE3EEC 00000000
GPR08: 00000000 F7FB4000 00000555 C0280000 22000222 10019190 00000000 00000000
GPR16: 00000000 00000000 00000000 00000000 00009032 07AE3F40 00000000 C00048B4
GPR24: C0004620 0FFED7E8 C7AE3EE8 00000004 0000FD84 0000FD80 00000000 7FFFFD08
Call backtrace:
C9023704 C004FC8C C000467C 00000000 10000894 10000700 0FEB6D84
00000000

I examined sources of ethernet card that is working on this platform
(intel e100), but as I understand sources, this card is not working
with I/O (it stores value from BAR1 and never use it). Kernel
documenatation saids that PowerPC doesn't have special instructions
for accessing I/O (like Intel CPUs) and all devices are memory mapped.
So maybe I should call ioremap();

As I understand from different sources in internet, there is no need
calling ioremap() (but when I calling it kernel is not crashing, but
device still doesn doing what it should do) Does reading and writing
to I/O, using in*() and out*() should be sufficient? I realy in doubt.
Does PowerPC can work with IO regions? If it can, should I call
ioremap() beforehand? If I shouldn't why kernel oopsing? However, if I
should why reading from I/O register is not working (I'm sure that PCI
board is fine because everything is working in Windows)?


-- 
Best regards,
 Michael                          mailto:platov at setdsp.ru




More information about the Linuxppc-embedded mailing list