Changeset 438b6eca in rtems


Ignore:
Timestamp:
Apr 5, 2012, 3:23:21 PM (7 years ago)
Author:
Daniel Hellstrom <daniel@…>
Children:
5d2f040f
Parents:
29b2b3e
git-author:
Daniel Hellstrom <daniel@…> (04/05/12 15:23:21)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/10/12 06:45:03)
Message:

LEON3: added IRQAMP support

Location:
c/src/lib/libbsp/sparc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/sparc/leon3/amba/amba.c

    r29b2b3e r438b6eca  
    4040{
    4141  int i;
     42  int icsel;
    4243  amba_apb_device dev;
    4344
     
    5657
    5758  LEON3_IrqCtrl_Regs = (volatile LEON3_IrqCtrl_Regs_Map *) dev.start;
     59  if ((LEON3_IrqCtrl_Regs->ampctrl >> 28) > 0) {
     60    /* IRQ Controller has support for multiple IRQ Controllers, each
     61     * CPU can be routed to different Controllers, we find out which
     62     * controller by looking at the IRQCTRL Select Register for this CPU.
     63     * Each Controller is located at a 4KByte offset.
     64     */
     65    icsel = LEON3_IrqCtrl_Regs->icsel[LEON3_Cpu_Index/8];
     66    icsel = (icsel >> ((7 - (LEON3_Cpu_Index & 0x7)) * 4)) & 0xf;
     67    LEON3_IrqCtrl_Regs += icsel;
     68    LEON3_IrqCtrl_Regs->mask[LEON3_Cpu_Index] = 0;
     69    LEON3_IrqCtrl_Regs->force[LEON3_Cpu_Index] = 0;
     70    LEON3_IrqCtrl_Regs->iclear = 0xffffffff;
     71  }
    5872
    5973  /* Init Extended IRQ controller if available */
  • c/src/lib/libbsp/sparc/shared/include/ambapp.h

    r29b2b3e r438b6eca  
    263263  volatile unsigned int notused02;
    264264  volatile unsigned int notused03;
    265   volatile unsigned int notused10;
    266   volatile unsigned int notused11;
    267   volatile unsigned int notused12;
     265  volatile unsigned int ampctrl;
     266  volatile unsigned int icsel[2];
    268267  volatile unsigned int notused13;
    269268  volatile unsigned int notused20;
     
    275274  /* Extended IRQ registers */
    276275  volatile unsigned int intid[16];
     276  /* 0x100, align to 4Kb boundary */
     277  volatile unsigned int resv1[(0x1000-0x100)/4];
    277278} LEON3_IrqCtrl_Regs_Map;
    278279
Note: See TracChangeset for help on using the changeset viewer.