0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef DMA_PORT_H_
0011 #define DMA_PORT_H_
0012
0013 #include "tb.h"
0014
0015 struct tb_switch;
0016 struct tb_dma_port;
0017
0018 #define DMA_PORT_CSS_ADDRESS 0x3fffff
0019 #define DMA_PORT_CSS_MAX_SIZE SZ_128
0020
0021 struct tb_dma_port *dma_port_alloc(struct tb_switch *sw);
0022 void dma_port_free(struct tb_dma_port *dma);
0023 int dma_port_flash_read(struct tb_dma_port *dma, unsigned int address,
0024 void *buf, size_t size);
0025 int dma_port_flash_update_auth(struct tb_dma_port *dma);
0026 int dma_port_flash_update_auth_status(struct tb_dma_port *dma, u32 *status);
0027 int dma_port_flash_write(struct tb_dma_port *dma, unsigned int address,
0028 const void *buf, size_t size);
0029 int dma_port_power_cycle(struct tb_dma_port *dma);
0030
0031 #endif