swr-common.h 882 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2015, 2017-2021 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. struct port_params {
  12. u16 si;
  13. u8 off1;
  14. u8 off2;
  15. u8 hstart;/* head start */
  16. u8 hstop; /* head stop */
  17. u8 wd_len;/* word length */
  18. u8 bp_mode; /* block pack mode */
  19. u8 bgp_ctrl;/* block group control */
  20. u8 lane_ctrl;/* lane to be used */
  21. u8 dir; /* master port dir: OUT = 0 IN = 1 */
  22. u8 stream_type; /* PDM = 0, PCM = 1 */
  23. };
  24. struct swrm_port_config {
  25. u32 size;
  26. u32 uc;
  27. void *params;
  28. };
  29. struct swr_mstr_port_map {
  30. u32 id;
  31. u32 uc;
  32. struct port_params *swr_port_params;
  33. };
  34. #define SWR_MSTR_PORT_LEN 13 /* Number of master ports */
  35. #endif /* _LINUX_SWR_COMMON_H */