MVME5500 status, and on to PMC interrupts

Peter Dufault dufault at hda.com
Mon Feb 28 16:15:10 UTC 2005


On Feb 28, 2005, at 10:00 AM, Kate Feng wrote:

>
> If you are running from the CVS head, the PMC interrupts should
> work. The PMC1 IRQ number  is  equivalent  to
> BSP_GPP8_IRQ_OFFSET, which is defined in irq.h.  The PMC2 IRQ
> number is  BSP_GPP_PMC2_INTA.   To be documentary, in irq.h, I added :
>
>

Here's what I'm doing, based on looking at the ethernet drivers.

I'll use the pmc730 in PMC1 on the MVME5500 as an example.

I look up the pmc730 (I don't really use all constants, of course), 
using the functions in mvme5500 for now, which means I manually keep 
track of what it calls "pciNum":

pciNum=0;
BSP_PCIxFindDevice(0x16d5, 0x4457, 0, pciNum, &bus, &dev, &fun);

And I find it on pciNum == 0 and get back:
bus=0
dev=6
fun=0

Now I look up the base address and interrupt:

PCIx_read_config_dword(pciNum, bus, dev, fun, PCI0_BASE_ADDRESS_0, 
&addr);
PCIx_read_config_byte (pciNum, bus, dev, fun, PCI0_INTERRUPT_LINE, 
&intr_line);

Both are successful and I get back:
addr=0x80200000
intr_line=0x08

And sure enough, address 0x80200000 corresponds to a PMC730 register 
set.  So far so good.

Now I want to install the interrupt (this is probably where I go 
wrong).  I do the moral equivalent of this:

static void no_op(const rtems_irq_connect_data *irq) { return; }

static int dunno(const rtems_irq_connect_data *irq) {
  printk("pmc730 is on?  I don't know\n");
  return 0;
}

static rtems_isr pmc730_hdl(void) {
   printk("pmc730_hdl: Ouch!\n");
}

irqInfo.name = intr_line;
irqInfo.on = no_op;
irqInfo.off = no_op;
irqInfo.isOn = dunno;
irqInfo.hdl = pmc730_hdl;

BSP_install_rtems_irq_handler(&irqInfo);

I check the return code and don't get an error.

Finally I twiddle the pmc730 registers until it says it is 
interrupting, but nothing happens.

Peter

Peter Dufault
HD Associates, Inc.




More information about the users mailing list