arbiter.h 724 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _ASM_CRIS_ARCH_ARBITER_H
  2. #define _ASM_CRIS_ARCH_ARBITER_H
  3. #define EXT_REGION 0
  4. #define INT_REGION 1
  5. typedef void (watch_callback)(void);
  6. enum {
  7. arbiter_all_dmas = 0x7fe,
  8. arbiter_cpu = 0x1800,
  9. arbiter_all_clients = 0x7fff
  10. };
  11. enum {
  12. arbiter_bar_all_clients = 0x1ff
  13. };
  14. enum {
  15. arbiter_all_read = 0x55,
  16. arbiter_all_write = 0xaa,
  17. arbiter_all_accesses = 0xff
  18. };
  19. #define MARB_CLIENTS(foo_cli, bar_cli) (((bar_cli) << 16) | (foo_cli))
  20. int crisv32_arbiter_allocate_bandwidth(int client, int region,
  21. unsigned long bandwidth);
  22. int crisv32_arbiter_watch(unsigned long start, unsigned long size,
  23. unsigned long clients, unsigned long accesses,
  24. watch_callback * cb);
  25. int crisv32_arbiter_unwatch(int id);
  26. #endif