Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #ifndef _PXA255_IC_H_
  2. #define _PXA255_IC_H_
  3.  
  4. #include "mem.h"
  5. #include "CPU.h"
  6. #include <stdio.h>
  7.  
  8. /*
  9.         PXA255 interrupt controller
  10.        
  11.         PURRPOSE: raises IRQ, FIQ as needed
  12.  
  13. */
  14.  
  15. #define PXA255_IC_BASE  0x40D00000UL
  16. #define PXA255_IC_SIZE  0x00010000UL
  17.  
  18.  
  19. #define PXA255_I_RTC_ALM        31
  20. #define PXA255_I_RTC_HZ         30
  21. #define PXA255_I_TIMR3          29
  22. #define PXA255_I_TIMR2          28
  23. #define PXA255_I_TIMR1          27
  24. #define PXA255_I_TIMR0          26
  25. #define PXA255_I_DMA            25
  26. #define PXA255_I_SSP            24
  27. #define PXA255_I_MMC            23
  28. #define PXA255_I_FFUART         22
  29. #define PXA255_I_BTUART         21
  30. #define PXA255_I_STUART         20
  31. #define PXA255_I_ICP            19
  32. #define PXA255_I_I2C            18
  33. #define PXA255_I_LCD            17
  34. #define PXA255_I_NET_SSP        16
  35. #define PXA255_I_AC97           14
  36. #define PXA255_I_I2S            13
  37. #define PXA255_I_PMU            12
  38. #define PXA255_I_USB            11
  39. #define PXA255_I_GPIO_all       10
  40. #define PXA255_I_GPIO_1         9
  41. #define PXA255_I_GPIO_0         8
  42. #define PXA255_I_HWUART         7
  43.  
  44.  
  45. typedef struct{
  46.  
  47.         ArmCpu* cpu;
  48.        
  49.         UInt32 ICMR;    //Mask Register
  50.         UInt32 ICLR;    //Level Register
  51.         UInt32 ICCR;    //Control Register
  52.         UInt32 ICPR;    //Pending register
  53.        
  54.         Boolean wasIrq, wasFiq;
  55.        
  56. }Pxa255ic;
  57.  
  58. Boolean pxa255icInit(Pxa255ic* ic, ArmCpu* cpu, ArmMem* physMem);
  59.  
  60. void pxa255icInt(Pxa255ic* ic, UInt8 intNum, Boolean raise);            //interrupt caused by emulated hardware/ interrupt handled by guest
  61.  
  62.  
  63. #endif
  64.  
  65.