2 * Thunderbolt DMA configuration based mailbox support
4 * Copyright (C) 2017, Intel Corporation
5 * Authors: Michael Jamet <michael.jamet@intel.com>
6 * Mika Westerberg <mika.westerberg@linux.intel.com>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
21 #define DMA_PORT_CSS_ADDRESS 0x3fffff
22 #define DMA_PORT_CSS_MAX_SIZE SZ_128
24 struct tb_dma_port
*dma_port_alloc(struct tb_switch
*sw
);
25 void dma_port_free(struct tb_dma_port
*dma
);
26 int dma_port_flash_read(struct tb_dma_port
*dma
, unsigned int address
,
27 void *buf
, size_t size
);
28 int dma_port_flash_update_auth(struct tb_dma_port
*dma
);
29 int dma_port_flash_update_auth_status(struct tb_dma_port
*dma
, u32
*status
);
30 int dma_port_flash_write(struct tb_dma_port
*dma
, unsigned int address
,
31 const void *buf
, size_t size
);
32 int dma_port_power_cycle(struct tb_dma_port
*dma
);