power: use orderly shutdown
[GitHub/moto-9609/android_kernel_motorola_exynos9610.git] / drivers / thunderbolt / dma_port.h
CommitLineData
3e136768
MW
1/*
2 * Thunderbolt DMA configuration based mailbox support
3 *
4 * Copyright (C) 2017, Intel Corporation
5 * Authors: Michael Jamet <michael.jamet@intel.com>
6 * Mika Westerberg <mika.westerberg@linux.intel.com>
7 *
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.
11 */
12
13#ifndef DMA_PORT_H_
14#define DMA_PORT_H_
15
16#include "tb.h"
17
18struct tb_switch;
19struct tb_dma_port;
20
21#define DMA_PORT_CSS_ADDRESS 0x3fffff
22#define DMA_PORT_CSS_MAX_SIZE SZ_128
23
24struct tb_dma_port *dma_port_alloc(struct tb_switch *sw);
25void dma_port_free(struct tb_dma_port *dma);
26int dma_port_flash_read(struct tb_dma_port *dma, unsigned int address,
27 void *buf, size_t size);
28int dma_port_flash_update_auth(struct tb_dma_port *dma);
29int dma_port_flash_update_auth_status(struct tb_dma_port *dma, u32 *status);
30int dma_port_flash_write(struct tb_dma_port *dma, unsigned int address,
31 const void *buf, size_t size);
32int dma_port_power_cycle(struct tb_dma_port *dma);
33
34#endif