linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Canyonlands PCIE Interrupt Handler
@ 2008-11-14 18:33 Deepak Pandian
  2008-11-17  7:41 ` Stefan Roese
  0 siblings, 1 reply; 2+ messages in thread
From: Deepak Pandian @ 2008-11-14 18:33 UTC (permalink / raw)
  To: linuxppc-dev

Hi,

I am trying to implement a platform driver for msi.  Whenever I write
in to the PCIE-IH space, the kernel stops abruptly and the system is
reset.

 Below is the part of the code which lead me to the brick wall!

I am getting the PCIEIH base addr  from dts .
          if (of_address_to_resource(dn, 0,&pcieih_reg)) {

                printk(KERN_ERR "%s: Can't get PCIEIH Resource !",

                       dn->full_name);

                return -1;

       	 }

	
        pcieih_base = ioremap(pcieih_reg.start, pcieih_reg.end + 1 -
pcieih_reg.start);
        out_be32(pcieih_base + PEIH_TERMADL, PPC4XX_PCIE_MSI_LADDR)

       Whenever I try to access the registers in PCIE-IH space the
device gets restarted.


I have one more clarification to be made. The datasheet says that the
PCIE-IH  registers are implemented at EF62 0000. But the SDR registers
- PESDRn_PEIHS1 and PESDRn_PEIHS2 reset value is c00100000.

When I read the SDR registers I am getting only 000000 instead of the
specified reset value.

 sdrbase = of_get_property(dn, "sdr-base", NULL);

        if (sdrbase == NULL) {

                printk(KERN_ERR "PCIEIH-msi: missing sdr-base for %s\n",

                       dn->full_name);

                return -1;

        }

        sdr_base = *sdrbase;

	printk("SDR_BASE :%08x \n", sdr_base);	

	mtdcri(SDR0,sdr_base + PESDRn_PEIHS1, baseaddrhi);

    	mtdcri(SDR0,sdr_base + PESDRn_PEIHS2, baseaddrlow);

   I have tried both with ef62 0000 and c00100000 but both didnt help.
Expecting your guidance to proceed further!

--
With Regards,
Deepak Pandian
"Time is precious,One day we will find that we have less than what we
think" -RandyPausch

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

end of thread, other threads:[~2008-11-17  7:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-14 18:33 Canyonlands PCIE Interrupt Handler Deepak Pandian
2008-11-17  7:41 ` Stefan Roese

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