remoteproc.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Remote processor machine-specific quirks for OMAP4+ SoCs
  3. *
  4. * Copyright (C) 2014-2017 Texas Instruments Incorporated - http://www.ti.com/
  5. * Suman Anna <s-anna@ti.com>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * version 2 as published by the Free Software Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. */
  17. #ifndef __ARCH_ARM_MACH_OMAP2_REMOTEPROC_H
  18. #define __ARCH_ARM_MACH_OMAP2_REMOTEPROC_H
  19. #include "linux/platform_device.h"
  20. struct omap_dm_timer;
  21. #if IS_ENABLED(CONFIG_OMAP_REMOTEPROC)
  22. int omap_rproc_device_enable(struct platform_device *pdev);
  23. int omap_rproc_device_shutdown(struct platform_device *pdev);
  24. struct omap_dm_timer *omap_rproc_request_timer(struct device_node *np);
  25. int omap_rproc_release_timer(struct omap_dm_timer *timer);
  26. int omap_rproc_start_timer(struct omap_dm_timer *timer);
  27. int omap_rproc_stop_timer(struct omap_dm_timer *timer);
  28. int omap_rproc_get_timer_irq(struct omap_dm_timer *timer);
  29. void omap_rproc_ack_timer_irq(struct omap_dm_timer *timer);
  30. #else
  31. static inline int omap_rproc_device_enable(struct platform_device *pdev)
  32. {
  33. return 0;
  34. }
  35. static inline int omap_rproc_device_shutdown(struct platform_device *pdev)
  36. {
  37. return 0;
  38. }
  39. static inline
  40. struct omap_dm_timer *omap_rproc_request_timer(struct device_node *np)
  41. {
  42. return ERR_PTR(-ENODEV);
  43. }
  44. static inline int omap_rproc_release_timer(struct omap_dm_timer *timer)
  45. {
  46. return -ENODEV;
  47. }
  48. static inline int omap_rproc_start_timer(struct omap_dm_timer *timer)
  49. {
  50. return -ENODEV;
  51. }
  52. static inline int omap_rproc_stop_timer(struct omap_dm_timer *timer)
  53. {
  54. return -ENODEV;
  55. }
  56. static inline int omap_rproc_get_timer_irq(struct omap_dm_timer *timer)
  57. {
  58. return -1;
  59. }
  60. static inline void omap_rproc_ack_timer_irq(struct omap_dm_timer *timer) { }
  61. #endif
  62. #endif