ssb_driver_mips.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #ifndef LINUX_SSB_MIPSCORE_H_
  2. #define LINUX_SSB_MIPSCORE_H_
  3. #ifdef CONFIG_SSB_DRIVER_MIPS
  4. struct ssb_device;
  5. struct ssb_serial_port {
  6. void *regs;
  7. unsigned long clockspeed;
  8. unsigned int irq;
  9. unsigned int baud_base;
  10. unsigned int reg_shift;
  11. };
  12. struct ssb_pflash {
  13. bool present;
  14. u8 buswidth;
  15. u32 window;
  16. u32 window_size;
  17. };
  18. #ifdef CONFIG_SSB_SFLASH
  19. struct ssb_sflash {
  20. bool present;
  21. u32 window;
  22. u32 blocksize;
  23. u16 numblocks;
  24. u32 size;
  25. void *priv;
  26. };
  27. #endif
  28. struct ssb_mipscore {
  29. struct ssb_device *dev;
  30. int nr_serial_ports;
  31. struct ssb_serial_port serial_ports[4];
  32. struct ssb_pflash pflash;
  33. #ifdef CONFIG_SSB_SFLASH
  34. struct ssb_sflash sflash;
  35. #endif
  36. };
  37. extern void ssb_mipscore_init(struct ssb_mipscore *mcore);
  38. extern u32 ssb_cpu_clock(struct ssb_mipscore *mcore);
  39. extern unsigned int ssb_mips_irq(struct ssb_device *dev);
  40. #else /* CONFIG_SSB_DRIVER_MIPS */
  41. struct ssb_mipscore {
  42. };
  43. static inline
  44. void ssb_mipscore_init(struct ssb_mipscore *mcore)
  45. {
  46. }
  47. static inline unsigned int ssb_mips_irq(struct ssb_device *dev)
  48. {
  49. return 0;
  50. }
  51. #endif /* CONFIG_SSB_DRIVER_MIPS */
  52. #endif /* LINUX_SSB_MIPSCORE_H_ */