Changeset 1c62f7ee in rtems


Ignore:
Timestamp:
Jul 22, 2016, 8:27:11 AM (3 years ago)
Author:
Deval Shah <deval.maker@…>
Branches:
master
Children:
d548318
Parents:
0055b65
git-author:
Deval Shah <deval.maker@…> (07/22/16 08:27:11)
git-committer:
Pavel Pisa <pisa@…> (07/23/16 08:10:16)
Message:

Added USB interrupt handler. And defined some macros regarding USB.

Location:
c/src/lib/libbsp/arm/raspberrypi
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/raspberrypi/include/irq.h

    r0055b65 r1c62f7ee  
    3737
    3838
     39#define BCM2835_IRQ_ID_USB           9
    3940#define BCM2835_IRQ_ID_AUX           29
    4041#define BCM2835_IRQ_ID_SPI_SLAVE     43
  • c/src/lib/libbsp/arm/raspberrypi/include/raspberrypi.h

    r0055b65 r1c62f7ee  
    337337/** @} */
    338338
     339/**
     340* @name USB Registers
     341*
     342* @{
     343*/
     344
     345#define BCM2835_USB_BASE        (RPI_PERIPHERAL_BASE + 0x980000) /* DTC_OTG USB controller */
     346
     347/** @} */
    339348
    340349/** @} */
  • c/src/lib/libbsp/arm/raspberrypi/irq/irq.c

    r0055b65 r1c62f7ee  
    9292      vector = BCM2835_IRQ_ID_SPI;
    9393  }
     94  /* USB */
     95  else if ( BCM2835_REG(BCM2835_IRQ_PENDING1) & BCM2835_BIT(9) )
     96  {
     97      vector = BCM2835_IRQ_ID_USB;
     98  }
    9499
    95100  if ( vector < 255 )
     
    145150      BCM2835_REG(BCM2835_IRQ_ENABLE2) = BCM2835_BIT(22);
    146151  }
     152  /* USB */
     153  else if ( vector == BCM2835_IRQ_ID_USB )
     154  {
     155      BCM2835_REG(BCM2835_IRQ_ENABLE1) = BCM2835_BIT(9);
     156  }
    147157 
    148158  rtems_interrupt_enable(level);
     
    194204  {
    195205      BCM2835_REG(BCM2835_IRQ_DISABLE2) = BCM2835_BIT(22);
     206  }
     207  /* USB */
     208  else if ( vector == BCM2835_IRQ_ID_USB )
     209  {
     210      BCM2835_REG(BCM2835_IRQ_DISABLE1) = BCM2835_BIT(9);
    196211  }
    197212
Note: See TracChangeset for help on using the changeset viewer.