File Index
Files and directories
Sign in
FILE

spi-amd.h

File preview with syntax highlighting.

linux-6.19.14/drivers/spi/spi-amd.h C
 1/* SPDX-License-Identifier: GPL-2.0-or-later */
 2/*
 3 * AMD SPI controller driver common stuff
 4 *
 5 * Copyright (c) 2025, Advanced Micro Devices, Inc.
 6 * All Rights Reserved.
 7 *
 8 * Author: Krishnamoorthi M <krishnamoorthi.m@amd.com>
 9 */
10
11#ifndef SPI_AMD_H
12#define SPI_AMD_H
13
14/**
15 * enum amd_spi_versions - SPI controller versions
16 * @AMD_SPI_V1:         AMDI0061 hardware version
17 * @AMD_SPI_V2:         AMDI0062 hardware version
18 * @AMD_HID2_SPI:       AMDI0063 hardware version
19 */
20enum amd_spi_versions {
21	AMD_SPI_V1 = 1,
22	AMD_SPI_V2,
23	AMD_HID2_SPI,
24};
25
26/**
27 * struct amd_spi - SPI driver instance
28 * @io_remap_addr:      Start address of the SPI controller registers
29 * @phy_dma_buf:        Physical address of DMA buffer
30 * @dma_virt_addr:      Virtual address of DMA buffer
31 * @version:            SPI controller hardware version
32 * @speed_hz:           Device frequency
33 */
34struct amd_spi {
35	void __iomem *io_remap_addr;
36	dma_addr_t phy_dma_buf;
37	void *dma_virt_addr;
38	enum amd_spi_versions version;
39	unsigned int speed_hz;
40};
41
42int amd_spi_probe_common(struct device *dev, struct spi_controller *host);
43
44#endif /* SPI_AMD_H */
~/ Read-only file preview.