1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef SOC_INTEL_COMMON_BLOCK_GSPI_H
4 #define SOC_INTEL_COMMON_BLOCK_GSPI_H
6 #include <spi-generic.h>
9 /* GSPI controller structure to allow SoCs to define bus-controller mapping. */
10 extern const struct spi_ctrlr gspi_ctrlr
;
13 /* Bus speed in MHz. */
15 /* Bus should be enabled prior to ramstage with temporary base. */
19 /* GSPI controller APIs. */
20 void gspi_early_bar_init(void);
24 * Map given GSPI bus number to devfn.
27 * otherwise, devfn(>=0) corresponding to GSPI bus number.
29 int gspi_soc_bus_to_devfn(unsigned int gspi_bus
);
32 * SoC-provided callback for getting configuration of SPI bus. Driver provides
33 * weak implementation with default SPI-bus configuration.
39 int gspi_get_soc_spi_cfg(unsigned int bus
, struct spi_cfg
*cfg
);
41 #endif /* SOC_INTEL_COMMON_BLOCK_GSPI_H */