bcma_driver_mips.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef LINUX_BCMA_DRIVER_MIPS_H_
  2. #define LINUX_BCMA_DRIVER_MIPS_H_
  3. #define BCMA_MIPS_IPSFLAG 0x0F08
  4. /* which sbflags get routed to mips interrupt 1 */
  5. #define BCMA_MIPS_IPSFLAG_IRQ1 0x0000003F
  6. #define BCMA_MIPS_IPSFLAG_IRQ1_SHIFT 0
  7. /* which sbflags get routed to mips interrupt 2 */
  8. #define BCMA_MIPS_IPSFLAG_IRQ2 0x00003F00
  9. #define BCMA_MIPS_IPSFLAG_IRQ2_SHIFT 8
  10. /* which sbflags get routed to mips interrupt 3 */
  11. #define BCMA_MIPS_IPSFLAG_IRQ3 0x003F0000
  12. #define BCMA_MIPS_IPSFLAG_IRQ3_SHIFT 16
  13. /* which sbflags get routed to mips interrupt 4 */
  14. #define BCMA_MIPS_IPSFLAG_IRQ4 0x3F000000
  15. #define BCMA_MIPS_IPSFLAG_IRQ4_SHIFT 24
  16. /* MIPS 74K core registers */
  17. #define BCMA_MIPS_MIPS74K_CORECTL 0x0000
  18. #define BCMA_MIPS_MIPS74K_EXCEPTBASE 0x0004
  19. #define BCMA_MIPS_MIPS74K_BIST 0x000C
  20. #define BCMA_MIPS_MIPS74K_INTMASK_INT0 0x0014
  21. #define BCMA_MIPS_MIPS74K_INTMASK(int) \
  22. ((int) * 4 + BCMA_MIPS_MIPS74K_INTMASK_INT0)
  23. #define BCMA_MIPS_MIPS74K_NMIMASK 0x002C
  24. #define BCMA_MIPS_MIPS74K_GPIOSEL 0x0040
  25. #define BCMA_MIPS_MIPS74K_GPIOOUT 0x0044
  26. #define BCMA_MIPS_MIPS74K_GPIOEN 0x0048
  27. #define BCMA_MIPS_MIPS74K_CLKCTLST 0x01E0
  28. #define BCMA_MIPS_OOBSELOUTA30 0x100
  29. struct bcma_device;
  30. struct bcma_drv_mips {
  31. struct bcma_device *core;
  32. u8 setup_done:1;
  33. unsigned int assigned_irqs;
  34. };
  35. #ifdef CONFIG_BCMA_DRIVER_MIPS
  36. extern void bcma_core_mips_init(struct bcma_drv_mips *mcore);
  37. #else
  38. static inline void bcma_core_mips_init(struct bcma_drv_mips *mcore) { }
  39. #endif
  40. extern u32 bcma_cpu_clock(struct bcma_drv_mips *mcore);
  41. extern unsigned int bcma_core_mips_irq(struct bcma_device *dev);
  42. #endif /* LINUX_BCMA_DRIVER_MIPS_H_ */