1 /*
2  * Copyright (c) 2024 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 /**
8  * @file qspi.h
9  *
10  * @brief Header file for the QSPI bus layer specific structure declarations of the Wi-Fi driver.
11  */
12 
13 #ifndef __QSPI_H__
14 #define __QSPI_H__
15 
16 /**
17  * @brief Structure to hold context information for the QSPI bus.
18  */
19 struct nrf_wifi_bus_qspi_priv {
20 	/** Pointer to the QSPI bus-specific context. */
21 	void *os_qspi_priv;
22 
23 	/**
24 	 * @brief Interrupt callback function.
25 	 *
26 	 * This function is called when an interrupt occurs on the QSPI bus.
27 	 *
28 	 * @param hal_ctx The HAL context.
29 	 * @return The status of the interrupt handling.
30 	 */
31 	enum nrf_wifi_status (*intr_callbk_fn)(void *hal_ctx);
32 
33 	/**
34 	 * @brief Configuration parameters for the QSPI bus.
35 	 *
36 	 * This structure holds the configuration parameters for the QSPI bus.
37 	 * Some of the elements of the structure need to be initialized during
38 	 * the initialization of the QSPI bus, while others need to be kept
39 	 * updated over the duration of the QSPI bus operation.
40 	 */
41 	struct nrf_wifi_bal_cfg_params cfg_params;
42 };
43 
44 /**
45  * @brief Structure to hold the device context for the QSPI bus.
46  */
47 struct nrf_wifi_bus_qspi_dev_ctx {
48 	/** Pointer to the QSPI bus context. */
49 	struct nrf_wifi_bus_qspi_priv *qspi_priv;
50 	/** Pointer to the BAL device context. */
51 	void *bal_dev_ctx;
52 	/** Pointer to the QSPI bus-specific device context. */
53 	void *os_qspi_dev_ctx;
54 
55 	/** Base address of the host. */
56 	unsigned long host_addr_base;
57 	/** Base address of the packet RAM. */
58 	unsigned long addr_pktram_base;
59 };
60 
61 #endif /* __QSPI_H__ */
62