/drivers/staging/tidspbridge/include/dspbridge/dmm.h

https://bitbucket.org/wisechild/galaxy-nexus · C++ Header · 75 lines · 31 code · 19 blank · 25 comment · 0 complexity · 86b036c565c4b9ceef65bfac0eff1c72 MD5 · raw file

  1. /*
  2. * dmm.h
  3. *
  4. * DSP-BIOS Bridge driver support functions for TI OMAP processors.
  5. *
  6. * The Dynamic Memory Mapping(DMM) module manages the DSP Virtual address
  7. * space that can be directly mapped to any MPU buffer or memory region.
  8. *
  9. * Copyright (C) 2005-2006 Texas Instruments, Inc.
  10. *
  11. * This package is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License version 2 as
  13. * published by the Free Software Foundation.
  14. *
  15. * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  16. * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  17. * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  18. */
  19. #ifndef DMM_
  20. #define DMM_
  21. #include <dspbridge/dbdefs.h>
  22. struct dmm_object;
  23. /* DMM attributes used in dmm_create() */
  24. struct dmm_mgrattrs {
  25. u32 reserved;
  26. };
  27. #define DMMPOOLSIZE 0x4000000
  28. /*
  29. * ======== dmm_get_handle ========
  30. * Purpose:
  31. * Return the dynamic memory manager object for this device.
  32. * This is typically called from the client process.
  33. */
  34. extern int dmm_get_handle(void *hprocessor,
  35. struct dmm_object **dmm_manager);
  36. extern int dmm_reserve_memory(struct dmm_object *dmm_mgr,
  37. u32 size, u32 *prsv_addr);
  38. extern int dmm_un_reserve_memory(struct dmm_object *dmm_mgr,
  39. u32 rsv_addr);
  40. extern int dmm_map_memory(struct dmm_object *dmm_mgr, u32 addr,
  41. u32 size);
  42. extern int dmm_un_map_memory(struct dmm_object *dmm_mgr,
  43. u32 addr, u32 *psize);
  44. extern int dmm_destroy(struct dmm_object *dmm_mgr);
  45. extern int dmm_delete_tables(struct dmm_object *dmm_mgr);
  46. extern int dmm_create(struct dmm_object **dmm_manager,
  47. struct dev_object *hdev_obj,
  48. const struct dmm_mgrattrs *mgr_attrts);
  49. extern bool dmm_init(void);
  50. extern void dmm_exit(void);
  51. extern int dmm_create_tables(struct dmm_object *dmm_mgr,
  52. u32 addr, u32 size);
  53. #ifdef DSP_DMM_DEBUG
  54. u32 dmm_mem_map_dump(struct dmm_object *dmm_mgr);
  55. #endif
  56. #endif /* DMM_ */