dma_port.h 937 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Thunderbolt DMA configuration based mailbox support
  4. *
  5. * Copyright (C) 2017, Intel Corporation
  6. * Authors: Michael Jamet <michael.jamet@intel.com>
  7. * Mika Westerberg <mika.westerberg@linux.intel.com>
  8. */
  9. #ifndef DMA_PORT_H_
  10. #define DMA_PORT_H_
  11. #include "tb.h"
  12. struct tb_switch;
  13. struct tb_dma_port;
  14. #define DMA_PORT_CSS_ADDRESS 0x3fffff
  15. #define DMA_PORT_CSS_MAX_SIZE SZ_128
  16. struct tb_dma_port *dma_port_alloc(struct tb_switch *sw);
  17. void dma_port_free(struct tb_dma_port *dma);
  18. int dma_port_flash_read(struct tb_dma_port *dma, unsigned int address,
  19. void *buf, size_t size);
  20. int dma_port_flash_update_auth(struct tb_dma_port *dma);
  21. int dma_port_flash_update_auth_status(struct tb_dma_port *dma, u32 *status);
  22. int dma_port_flash_write(struct tb_dma_port *dma, unsigned int address,
  23. const void *buf, size_t size);
  24. int dma_port_power_cycle(struct tb_dma_port *dma);
  25. #endif