efc_common.h 853 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2021 Broadcom. All Rights Reserved. The term
  4. * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
  5. */
  6. #ifndef __EFC_COMMON_H__
  7. #define __EFC_COMMON_H__
  8. #include <linux/pci.h>
  9. struct efc_dma {
  10. void *virt;
  11. void *alloc;
  12. dma_addr_t phys;
  13. size_t size;
  14. size_t len;
  15. struct pci_dev *pdev;
  16. };
  17. #define efc_log_crit(efc, fmt, args...) \
  18. dev_crit(&((efc)->pci)->dev, fmt, ##args)
  19. #define efc_log_err(efc, fmt, args...) \
  20. dev_err(&((efc)->pci)->dev, fmt, ##args)
  21. #define efc_log_warn(efc, fmt, args...) \
  22. dev_warn(&((efc)->pci)->dev, fmt, ##args)
  23. #define efc_log_info(efc, fmt, args...) \
  24. dev_info(&((efc)->pci)->dev, fmt, ##args)
  25. #define efc_log_debug(efc, fmt, args...) \
  26. dev_dbg(&((efc)->pci)->dev, fmt, ##args)
  27. #endif /* __EFC_COMMON_H__ */