npe.h 982 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef __IXP4XX_NPE_H
  2. #define __IXP4XX_NPE_H
  3. #include <linux/kernel.h>
  4. extern const char *npe_names[];
  5. struct npe_regs {
  6. u32 exec_addr, exec_data, exec_status_cmd, exec_count;
  7. u32 action_points[4];
  8. u32 watchpoint_fifo, watch_count;
  9. u32 profile_count;
  10. u32 messaging_status, messaging_control;
  11. u32 mailbox_status, /*messaging_*/ in_out_fifo;
  12. };
  13. struct npe {
  14. struct resource *mem_res;
  15. struct npe_regs __iomem *regs;
  16. u32 regs_phys;
  17. int id;
  18. int valid;
  19. };
  20. static inline const char *npe_name(struct npe *npe)
  21. {
  22. return npe_names[npe->id];
  23. }
  24. int npe_running(struct npe *npe);
  25. int npe_send_message(struct npe *npe, const void *msg, const char *what);
  26. int npe_recv_message(struct npe *npe, void *msg, const char *what);
  27. int npe_send_recv_message(struct npe *npe, void *msg, const char *what);
  28. int npe_load_firmware(struct npe *npe, const char *name, struct device *dev);
  29. struct npe *npe_request(unsigned id);
  30. void npe_release(struct npe *npe);
  31. #endif /* __IXP4XX_NPE_H */