misc.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2016 Freescale Semiconductor, Inc.
  4. * Copyright 2017~2018 NXP
  5. *
  6. * Header file containing the public API for the System Controller (SC)
  7. * Miscellaneous (MISC) function.
  8. *
  9. * MISC_SVC (SVC) Miscellaneous Service
  10. *
  11. * Module for the Miscellaneous (MISC) service.
  12. */
  13. #ifndef _SC_MISC_API_H
  14. #define _SC_MISC_API_H
  15. #include <linux/firmware/imx/sci.h>
  16. /*
  17. * This type is used to indicate RPC MISC function calls.
  18. */
  19. enum imx_misc_func {
  20. IMX_SC_MISC_FUNC_UNKNOWN = 0,
  21. IMX_SC_MISC_FUNC_SET_CONTROL = 1,
  22. IMX_SC_MISC_FUNC_GET_CONTROL = 2,
  23. IMX_SC_MISC_FUNC_SET_MAX_DMA_GROUP = 4,
  24. IMX_SC_MISC_FUNC_SET_DMA_GROUP = 5,
  25. IMX_SC_MISC_FUNC_SECO_IMAGE_LOAD = 8,
  26. IMX_SC_MISC_FUNC_SECO_AUTHENTICATE = 9,
  27. IMX_SC_MISC_FUNC_DEBUG_OUT = 10,
  28. IMX_SC_MISC_FUNC_WAVEFORM_CAPTURE = 6,
  29. IMX_SC_MISC_FUNC_BUILD_INFO = 15,
  30. IMX_SC_MISC_FUNC_UNIQUE_ID = 19,
  31. IMX_SC_MISC_FUNC_SET_ARI = 3,
  32. IMX_SC_MISC_FUNC_BOOT_STATUS = 7,
  33. IMX_SC_MISC_FUNC_BOOT_DONE = 14,
  34. IMX_SC_MISC_FUNC_OTP_FUSE_READ = 11,
  35. IMX_SC_MISC_FUNC_OTP_FUSE_WRITE = 17,
  36. IMX_SC_MISC_FUNC_SET_TEMP = 12,
  37. IMX_SC_MISC_FUNC_GET_TEMP = 13,
  38. IMX_SC_MISC_FUNC_GET_BOOT_DEV = 16,
  39. IMX_SC_MISC_FUNC_GET_BUTTON_STATUS = 18,
  40. };
  41. /*
  42. * Control Functions
  43. */
  44. int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource,
  45. u8 ctrl, u32 val);
  46. int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
  47. u8 ctrl, u32 *val);
  48. #endif /* _SC_MISC_API_H */