linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Janaka Subhawickrama <JanakaS@optiscan.com>
Cc: "'linuxppc-dev@ozlabs.org'" <linuxppc-dev@ozlabs.org>
Subject: Re: Kernel crash while initialising PCI
Date: Wed, 3 Sep 2008 12:15:19 -0500	[thread overview]
Message-ID: <20080903171519.GC10979@loki.buserror.net> (raw)
In-Reply-To: <DE0CCFFBFF707949BEABD4537A14ACBA073580F459@mailsvr.optiscan.com>

On Wed, Sep 03, 2008 at 05:50:10PM +1000, Janaka Subhawickrama wrote:
> My DTS file entries for PCI are as follows:
> 
> pci@8500 {
>                         interrupt-map-mask = <  // Mask the child UnitIrqSpec
>                                                 //ff00 0 0 7
>                                                 ffff ff ff f
>                                                 >;
>                         interrupt-map = <
>                                         // Child UnitIrqSpec, Parent PIC handle, Parent UnitIrqSpec
>                                         // PCI unit address (0000 0 0), Interrupt specifier IDSEL 0x0D (CRX board hard wired to IDSEL 13),
>                                         //      parent Phandle, IRQ7=0x17 (jumper based) level sensitive(8)
>                                         //0d00 0 0 1 &ipic 17 8
>                                         00006800 0 0 1 &ipic 17 8
>                                         >;
>                         interrupt-parent = < &ipic >;
>                         interrupts = <42 8>;            //PCI1 interrupt, level sensitive
>                         bus-range = <0 0>;              //Bus number and largest bus under this
>                         /*
>                                 struct ranges_pci {
>                                         unsigned int pci_space; //Prefechable/relocatable .... IEEE1275
>                                         u64 pci_addr;
>                                         phys_addr_t phys_addr;
>                                         u64 size;
>                                 };
>                         */
>                         ranges = < 02000000 0 A0000000 A0000000 0 20000000
>                                    01000000 0 D8000000 D8000000 0 01000000 >;
>                         clock-frequency = <1FCA055>;    //33333333Hz
>                         #interrupt-cells = <1>;         //PCI aparently uses 1
>                         #size-cells = <2>;              //Max of 2 ints
>                         #address-cells = <3>;           //int size
>                         reg = <8500 100>; //??
>                         compatible = "fsl,mpc8349-pci";
>                         device_type = "pci";
>                 };
> 
> 
> What am I doing wrong ?

The PCI node needs to go under the root node, rather than under the soc
node.  Otherwise, the kernel will try to translate ranges through the IMMR
window.  In older kernels, there was a bug in the PCI code that let you get
away with this.

See current in-kernel device trees for examples.

-Scott

  reply	other threads:[~2008-09-03 17:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-03  7:50 Kernel crash while initialising PCI Janaka Subhawickrama
2008-09-03 17:15 ` Scott Wood [this message]
2008-09-05  0:31   ` Janaka Subhawickrama

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=20080903171519.GC10979@loki.buserror.net \
    --to=scottwood@freescale.com \
    --cc=JanakaS@optiscan.com \
    --cc=linuxppc-dev@ozlabs.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 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).