linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Lite5200 and PCI1520
@ 2004-12-13 17:50 Zeitler, Nathan
  2004-12-13 21:13 ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: Zeitler, Nathan @ 2004-12-13 17:50 UTC (permalink / raw)
  To: linuxppc-embedded

 Greetings all,
I would greatly appreciate some advice regarding getting Linux to read
and write to CompactFlash devices behind a PCI1520 PCI bridge on a
custom Lite5200 board.  I am admittedly new to this process within
embedded devices and could use some direction.  We're using a recent
2.4.25 kernel from Denx, as well as UBOOT 1.1.1 and ELDK2.1. =20

My status:
UBOOT detects the PCI Bridge just fine.  I'm able to read and write to
the registers within the PCI1520 using the BDI2000 as well as UBOOT's
pci command.  I've therefore set up the bridge to use its output to run
the power chip instead of reading an EEPROM for its settings.  I've also
set up the multifunction pins to be "parallel PCI only", as they are
connected to hardware "IRQ1" and "IRQ2" of the MPC5200.  I've tried
several different values for the Interrupt Line register, but am mostly
flying blind in this respect.  I've enabled most every PCMCIA option in
the Linux kernel I could find, enabled PnP and Cardbus support, but not
i82365 compatible bridge support as it seemed to scan for ISA resources
that weren't there (I understand the yenta driver doesn't want nor need
this anyway?).

My problem:
I can't access anything plugged into the sockets!  PCI1520 registers
detect a card is inserted, but I can't read and write to flash cards
from Linux.  I checked out PCMCIA Card Services from CVS, compiled and
ran cardmgr and it gives a seg-fault, but indicates it is watching the
sockets (debug output seems to confirm this).  I can read the status and
config using cardctl, but reading the identification or info causes
another seg fault.  I suspect I may be running into a combination of
interrupt and driver issues, but I need a knowledgeable opinion on this.
I'm most confused by the line between ISA and PCI IRQs, and how or why
CF uses these.  I've appended some interesting messages from Linux's
boot sequence.  Thanks in advance.

Linux Kernel Card Services 3.1.22
  options:  [pci] [cardbus]
yenta 00:18.0: no resource of type 100 available, trying to continue...

yenta 00:18.0: no resource of type 100 available, trying to continue...

yenta 00:18.1: no resource of type 100 available, trying to continue...

yenta 00:18.1: no resource of type 100 available, trying to continue...=20

/* type 100 =3D=3D IO_RESOURCE, recoding yenta.c to bind them=20
to a 0x5000nnnn address range stopped the error,=20
but seemed  to fix nothing */=20

...

Yenta ISA IRQ mask 0x0000, PCI irq 255
Socket status: 30000810
Yenta ISA IRQ mask 0x0000, PCI irq 255
Socket status: 30000006
/* 255 seems to be the default value,
But what should it be instead? */


Nathan Zeitler
Systems Engineer
Open Systems International, Inc.
3600 Holly Lane North, Suite 40
Minneapolis, MN 55447-1286
Phone: (763) 551-0559
Fax:     (763)551-0750
Email:  nzeitler@osii.com

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: Lite5200 and PCI1520
@ 2004-12-13 22:09 Zeitler, Nathan
  2004-12-13 23:48 ` Andrew Dennison
  0 siblings, 1 reply; 8+ messages in thread
From: Zeitler, Nathan @ 2004-12-13 22:09 UTC (permalink / raw)
  To: wd; +Cc: linuxppc-embedded

Hello Wolfgang,=20

>Now what? Is it a custom board, or a Lite5200?=20

My apologies.  It is a custom board based closely on the design of the
Lite5200.  Thus we are able to put a PCI1520 chip on the same PCB and
connect it to the MPC5200 PCI bus.

>U-Boot 1.1.1 is old. You better use current code (top of CVS).
>
>ELDK 2.1 is extremely old. You better use a current version (3.1).

Agreed, they are old, although I was hoping to be more certain that the
age of the toolchain was a problem first.  I have tried top-of-CVS
UBOOT, but reverted when no evident improvement occurred.=20
 =20
>What's you PCMCIA config file looking like?

Under /etc/sysconfig/pcmcia:
PCMCIA=3Dyes
PCIC=3Dyenta_socket
PCIC_OPTS=3D
CORE_OPTS=3D
CARDMGR_OPTS=3D

Under /etc/pcmcia/config.opts...=20
(This is as how I found it, although I added the 4th port address and
changed the memory range in an attempt to get it to cooperate.  I/O
resources aren't even being detected, so I tried adding 0x50000000 to
each I/O port address in yenta.c and adding the same value to each I/O
here to no avail):
include port 0x100-0x4ff, port 0x800-0x8ff, port 0xc00-0xcff, port
0x1000-0x10ff
include memory 0x40000000-0x40001fff
include port 0xa00-0xaff
exclude irq 4
exclude irq 7
module "ray_cs" opts "essid=3DADHOC_ESSID hop_dwell=3D128 =
beacon_period=3D256
translate=3D1"

Help with respect to getting the interrupts and anything further
(configuration files and more) is appreciated, although for the sake of
keeping on topic, I can send any Card Services-based queries to the
pcmcia-cs mailing list if so desired :-)

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: Lite5200 and PCI1520
@ 2004-12-14  0:06 Zeitler, Nathan
  2004-12-14  0:45 ` Andrew Dennison
  0 siblings, 1 reply; 8+ messages in thread
From: Zeitler, Nathan @ 2004-12-14  0:06 UTC (permalink / raw)
  To: Andrew Dennison; +Cc: linuxppc-embedded

Hello Andrew,

>Nathan,
>I posted a question on cardbus with the 5200 a few weeks ago but got no
reply. I think the reason is that=20
>cardbus / pcmcia support may not have been considered when the 5200 PCI
memory map was laid out, but I >would love to be contradicted!

This would certainly help explain some of the pain in getting it to
work.  :-/

>Which kernel are you using?

I'm using the 2.4.25 kernel from Denx also.  The version I have is a
couple months old (trying to keep from changing too many things at once!
:-)  ),but I have also tried the top-of-CVS version to no avail.  My
ELDK version is old, as explained earlier, but I'm taking steps to
change that.


>I also have a few outstanding issues that I haven't resolved yet, hence
I haven't posted a full patch, but I can=20
>now load and configure a wireless ethernet card. Loading cardbus
drivers currently fails when accessing PCI >configuration space on the
cardbus bus, and I haven't sorted this out yet.

It sounds like we're working towards the same end!  I would like to
assist in some way if possible.  I am willing to believe that remapping
the PCI bus is a possible approach, although I'd like to hear the
opinion of others as well.  Where in UBOOT did you change the PCI bus
mappings?

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

end of thread, other threads:[~2004-12-14  1:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-13 17:50 Lite5200 and PCI1520 Zeitler, Nathan
2004-12-13 21:13 ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2004-12-13 22:09 Zeitler, Nathan
2004-12-13 23:48 ` Andrew Dennison
2004-12-14  0:32   ` Wolfgang Denk
2004-12-14  1:25     ` Andrew Dennison
2004-12-14  0:06 Zeitler, Nathan
2004-12-14  0:45 ` Andrew Dennison

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).