OpenPIC (was Re: Bugs in the PPC/shared interrupt code + dec21140)

Kamen Penev kamen at penev.net
Fri Feb 21 22:22:50 UTC 2003


There are other problems with openpic.[ch]. I recently implemented 
support for the MPC8245 EPIC, which is supposedly OpenPIC compliant. The 
existing code was not suitable for it without some substantial changes. 
For example, the current openpic implementation assumes that the 
register file in the OpenPIC is contiguous. However, the registers of 
the IRQs for the embedded MPC8245 devices are scattered all over the 
place into several groups. Here are my defs:
  BSP_EPIC_IRQ0                  =     BSP_EPIC_IRQ_LOWEST_OFFSET,
  BSP_EPIC_IRQ1                  =     BSP_EPIC_IRQ_LOWEST_OFFSET+1,
  BSP_EPIC_IRQ2                  =     BSP_EPIC_IRQ_LOWEST_OFFSET+2,
  BSP_EPIC_IRQ3                  =     BSP_EPIC_IRQ_LOWEST_OFFSET+3,
  BSP_EPIC_IRQ4                  =     BSP_EPIC_IRQ_LOWEST_OFFSET+4,
  BSP_EPIC_IRQ5                  =     BSP_EPIC_IRQ_LOWEST_OFFSET+5,
  BSP_EPIC_IRQ6                  =     BSP_EPIC_IRQ_LOWEST_OFFSET+6,
  BSP_EPIC_IRQ7                  =     BSP_EPIC_IRQ_LOWEST_OFFSET+7,
  BSP_EPIC_IRQ8                  =     BSP_EPIC_IRQ_LOWEST_OFFSET+8,
  BSP_EPIC_IRQ9                  =     BSP_EPIC_IRQ_LOWEST_OFFSET+9,
  BSP_EPIC_IRQ10              =     BSP_EPIC_IRQ_LOWEST_OFFSET+10,
  BSP_EPIC_IRQ11              =     BSP_EPIC_IRQ_LOWEST_OFFSET+11,
  BSP_EPIC_IRQ12              =     BSP_EPIC_IRQ_LOWEST_OFFSET+12,
  BSP_EPIC_IRQ13              =     BSP_EPIC_IRQ_LOWEST_OFFSET+13,
  BSP_EPIC_IRQ14              =     BSP_EPIC_IRQ_LOWEST_OFFSET+14,
  BSP_EPIC_IRQ15              =     BSP_EPIC_IRQ_LOWEST_OFFSET+15,
  BSP_EPIC_I2C_IRQ              =     BSP_EPIC_IRQ_LOWEST_OFFSET+113,
  BSP_EPIC_DMA0_IRQ              =     BSP_EPIC_IRQ_LOWEST_OFFSET+114,
  BSP_EPIC_DMA1_IRQ              =     BSP_EPIC_IRQ_LOWEST_OFFSET+115,
  BSP_EPIC_MU_IRQ              =     BSP_EPIC_IRQ_LOWEST_OFFSET+118,
  BSP_EPIC_UART1_IRQ              =     BSP_EPIC_IRQ_LOWEST_OFFSET+121,
  BSP_EPIC_UART2_IRQ              =     BSP_EPIC_IRQ_LOWEST_OFFSET+122,

I can give you my versions of openpic.[hc], irq_init.c and irq[hc], if 
you want them.

BTW, can anybody point me towards the OpenPIC spec? I could not find it 
at AMD's web site,.

The MPC8245 EPIC manual is at
http://e-www.motorola.com/brdata/PDFDB/docs/MPC8245UM_CH11.pdf

Kamen





More information about the users mailing list