swr-common.h 939 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2015, 2017-2020 The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _LINUX_SWR_COMMON_H
  6. #define _LINUX_SWR_COMMON_H
  7. #include <linux/module.h>
  8. #include <linux/platform_device.h>
  9. #include <linux/device.h>
  10. #include <linux/bitops.h>
  11. enum {
  12. SWR_UC0 = 0,
  13. SWR_UC1,
  14. SWR_UC2,
  15. SWR_UC_MAX,
  16. };
  17. struct port_params {
  18. u16 si;
  19. u8 off1;
  20. u8 off2;
  21. u8 hstart;/* head start */
  22. u8 hstop; /* head stop */
  23. u8 wd_len;/* word length */
  24. u8 bp_mode; /* block pack mode */
  25. u8 bgp_ctrl;/* block group control */
  26. u8 lane_ctrl;/* lane to be used */
  27. u8 dir; /* master port dir: OUT = 0 IN = 1 */
  28. u8 stream_type; /* PDM = 0, PCM = 1 */
  29. };
  30. struct swrm_port_config {
  31. u32 size;
  32. u32 uc;
  33. void *params;
  34. };
  35. struct swr_mstr_port_map {
  36. u32 id;
  37. u32 uc;
  38. struct port_params *swr_port_params;
  39. };
  40. #define SWR_MSTR_PORT_LEN 8 /* Number of master ports */
  41. #endif /* _LINUX_SWR_COMMON_H */