vha_plat_dt.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*!
  2. *****************************************************************************
  3. *
  4. * @File vha_plat_dt.h
  5. * ---------------------------------------------------------------------------
  6. *
  7. * Copyright (c) Imagination Technologies Ltd.
  8. *
  9. * The contents of this file are subject to the MIT license as set out below.
  10. *
  11. * Permission is hereby granted, free of charge, to any person obtaining a
  12. * copy of this software and associated documentation files (the "Software"),
  13. * to deal in the Software without restriction, including without limitation
  14. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  15. * and/or sell copies of the Software, and to permit persons to whom the
  16. * Software is furnished to do so, subject to the following conditions:
  17. *
  18. * The above copyright notice and this permission notice shall be included in
  19. * all copies or substantial portions of the Software.
  20. *
  21. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  22. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  23. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  24. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  25. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  26. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  27. * THE SOFTWARE.
  28. *
  29. * Alternatively, the contents of this file may be used under the terms of the
  30. * GNU General Public License Version 2 ("GPL")in which case the provisions of
  31. * GPL are applicable instead of those above.
  32. *
  33. * If you wish to allow use of your version of this file only under the terms
  34. * of GPL, and not to allow others to use your version of this file under the
  35. * terms of the MIT license, indicate your decision by deleting the provisions
  36. * above and replace them with the notice and other provisions required by GPL
  37. * as set out in the file called "GPLHEADER" included in this distribution. If
  38. * you do not delete the provisions above, a recipient may use your version of
  39. * this file under the terms of either the MIT license or GPL.
  40. *
  41. * This License is also included in this distribution in the file called
  42. * "MIT_COPYING".
  43. *
  44. *****************************************************************************/
  45. #ifndef VHA_PLAT_DT_H
  46. #define VHA_PLAT_DT_H
  47. #include <linux/platform_device.h>
  48. /* OpenFirmware device tree id, for this driver */
  49. #if defined(HW_AX2)
  50. #define VHA_PLAT_DT_OF_ID "img,ax21xx-nna"
  51. #define VHA_PLAT_DT_NAME "ax21xx-nna"
  52. #elif defined(HW_AX3)
  53. #define VHA_PLAT_DT_OF_ID "img,ax3xxx-nna"
  54. #define VHA_PLAT_DT_NAME "ax3xxx-nna"
  55. #else
  56. #error "No HW layout defined"
  57. #endif
  58. extern const struct of_device_id vha_plat_dt_of_ids[];
  59. void vha_plat_dt_get_heaps(struct heap_config **heap_configs, int *num_heaps);
  60. int vha_plat_dt_hw_init(struct platform_device *pdev);
  61. void vha_plat_dt_hw_destroy(struct platform_device *pdev);
  62. int vha_plat_dt_hw_suspend(struct platform_device *pdev);
  63. int vha_plat_dt_hw_resume(struct platform_device *pdev);
  64. #endif /* VHA_PLAT_DT_H */