OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [orpmon/] [drivers/] [int.c] - Diff between revs 858 and 1312

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 858 Rev 1312
Line 54... Line 54...
 
 
  return 0;
  return 0;
}
}
 
 
/* Main interrupt handler */
/* Main interrupt handler */
void int_main()
void int_main(void)
{
{
  unsigned long picsr = mfspr(SPR_PICSR);
  unsigned long picsr = mfspr(SPR_PICSR);
  unsigned long i = 0;
  unsigned long i = 0;
 
 
  mtspr(SPR_PICSR, 0);
  mtspr(SPR_PICSR, 0);
  debug ("int :%08lx\n", picsr);
  //  printf ("int :%08lx\n", picsr);
 
 
  while(i < 32) {
  while(i < 32) {
    if((picsr & (0x01L << i)) && (int_handlers[i].handler != 0)) {
    if((picsr & (0x01L << i)) && (int_handlers[i].handler != 0)) {
      (*int_handlers[i].handler)();
      (*int_handlers[i].handler)();
      mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(0x00000001L << i));
      mtspr(SPR_PICSR, mfspr(SPR_PICSR) & ~(0x00000001L << i));

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.