mpc5200 and pcmcia
Asier Llano Palacios
a.llano at usyscom.com
Tue Oct 4 17:30:35 EST 2005
I've developed the following patch.
It is not tested against the last git revision (I have to update my tree
as soon as I have enough time) and I sent it to Sylvain so it may be
partially commited.
Sorry, but this patch solves (or tries to solve) several problems.
You will have to have a look at the patch manually to understand every
of the issues it tries to solve.
PCI bus initialization: If you boot the MPC5200 with u-boot without PCI
support you will end up with some linux initialization problems. It is
because of the reset process (which leaves the PCI bus in its previous
state, that is reset by default, unless u-boot touches it). It does also
need to initialize some configuration elements of the PCI bus.
+ tmp = in_be32(&pci_regs->scr);
+ tmp |= PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY;
+ out_be32(&pci_regs->scr, tmp);
and
- out_be32(&pci_regs->gscr, tmp);
+ out_be32(&pci_regs->gscr, tmp & ~MPC52xx_PCI_GSCR_PR);
Flags for hotplug: The function mpc52xx_pci_fixup_resources is called
for every PCI device (included cardbus) so if it is called from cardbus
it cannot be __init (it caused a big problem). Removing the __init is
enough.
-static void __init mpc52xx_pci_fixup_resources(struct pci_dev *dev) {
+static void mpc52xx_pci_fixup_resources(struct pci_dev *dev) {
Introduced Delay: A udelay(1) is introduced before configuration cycles.
Otherwise it crashes for me. Sylvain told me that the PCI should wait
some time after reset before it is used. I've not tested including the
delay in other parts.
Workaround for bug of MPC5200: MPC5200 has a bug with PCI type 1
configuration frames so the workaround proposed by freescale is
splitting them. Sylvain told me that some PCI cards have problems
reading or writting operations that are not 32 bits. So this code should
be rewritten a little bit. (I think I should rewrite it near in the
future).
(This is everything else in the patch).
I would thank very much to anyone that splits this patch, introduces the
workaround for the bug of MPC5200 while using only 32 bit operation on
type 0 frames, and sends it to Sylvain. (I feel like writting my Xmas
letter to Santa. XoD).
I hope this helps.
Asier Llano
El mar, 04-10-2005 a las 17:11 +1000, Andrew Dennison escribió:
> On 10/4/05, Sylvain Munaut <tnt at 246tnt.com> wrote:
> >
> > IIRC, there is an errata wrt configuration cycle thru bridges.
>
> I've got support for this (it's in my December patch). Configuration
> cycles work but some cardbus cards / drivers cause a TEA when the
> device is enabled driver loads Netgear FA511), while with a prism
> based WLAN card (Netcomm NP5430) I can load the firmware into the card
> but it doesn't run correctly - iwconfig can cause a TEA.
>
> I haven't had time to work out how to debug these properly - other
> more important things to do.
>
> >
> > > Apparnetly it's working in 2.6 but I haven't had time to sort this out.
> >
> > Is it ? not sure. I remember seeing a patch about it but it removed
> > the "always 32 bit access" in all cases and not just in the needed case
> > iirc. Make me think I forgot to sort that out ...
>
> At one stange you mentioned you had a patch from someone for cardbus
> support on 2.6 - it just fixed the configuration cycle errata so I
> assumed this meant the rest "just worked". Maybe that was a bad
> assumption...
>
> Andrew
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
--
Asier Llano Palacios <a.llano at usyscom.com>
----------------------------------------- PLEASE NOTE -------------------------------------------
This message, along with any attachments, may be confidential or legally privileged.
It is intended only for the named person(s), who is/are the only authorized recipients.
If this message has reached you in error, kindly destroy it without review and notify the sender immediately.
Thank you for your help.
µSysCom uses virus scanning software but excludes any liability for viruses contained in any attachment.
------------------------------------ ROGAMOS LEA ESTE TEXTO -------------------------------
Este mensaje y sus anexos pueden contener información confidencial y/o con derecho legal.
Está dirigido únicamente a la/s persona/s o entidad/es reseñadas como único destinatario autorizado.
Si este mensaje le hubiera llegado por error, por favor elimínelo sin revisarlo ni reenviarlo y notifíquelo inmediatamente al remitente. Gracias por su colaboración.
µSysCom utiliza software antivirus, pero no se hace responsable de los virus contenidos en los ficheros anexos.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mpc5200_pci.patch
Type: text/x-patch
Size: 3089 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20051004/6dc93288/attachment.bin
More information about the Linuxppc-embedded
mailing list