rc32434.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Definitions for IDT RC323434 CPU.
  3. */
  4. #ifndef _ASM_RC32434_RC32434_H_
  5. #define _ASM_RC32434_RC32434_H_
  6. #include <linux/delay.h>
  7. #include <linux/io.h>
  8. #define RC32434_REG_BASE 0x18000000
  9. #define RC32434_RST (1 << 15)
  10. #define IDT_CLOCK_MULT 2
  11. #define MIPS_CPU_TIMER_IRQ 7
  12. /* Interrupt Controller */
  13. #define IC_GROUP0_PEND (RC32434_REG_BASE + 0x38000)
  14. #define IC_GROUP0_MASK (RC32434_REG_BASE + 0x38008)
  15. #define IC_GROUP_OFFSET 0x0C
  16. #define NUM_INTR_GROUPS 5
  17. /* 16550 UARTs */
  18. #define GROUP0_IRQ_BASE 8 /* GRP2 IRQ numbers start here */
  19. /* GRP3 IRQ numbers start here */
  20. #define GROUP1_IRQ_BASE (GROUP0_IRQ_BASE + 32)
  21. /* GRP4 IRQ numbers start here */
  22. #define GROUP2_IRQ_BASE (GROUP1_IRQ_BASE + 32)
  23. /* GRP5 IRQ numbers start here */
  24. #define GROUP3_IRQ_BASE (GROUP2_IRQ_BASE + 32)
  25. #define GROUP4_IRQ_BASE (GROUP3_IRQ_BASE + 32)
  26. #ifdef __MIPSEB__
  27. #define RC32434_UART0_BASE (RC32434_REG_BASE + 0x58003)
  28. #else
  29. #define RC32434_UART0_BASE (RC32434_REG_BASE + 0x58000)
  30. #endif
  31. #define RC32434_UART0_IRQ (GROUP3_IRQ_BASE + 0)
  32. /* cpu pipeline flush */
  33. static inline void rc32434_sync(void)
  34. {
  35. __asm__ volatile ("sync");
  36. }
  37. static inline void rc32434_sync_udelay(int us)
  38. {
  39. __asm__ volatile ("sync");
  40. udelay(us);
  41. }
  42. static inline void rc32434_sync_delay(int ms)
  43. {
  44. __asm__ volatile ("sync");
  45. mdelay(ms);
  46. }
  47. #endif /* _ASM_RC32434_RC32434_H_ */