/* Modified versions of the sdio.h macros. * The macros in sdio.h can't be used easily with the FIELD_{PREP|GET} * macros in bitfield.h, so we define our own macros here.
*/ #define ATH10K_SDIO_DRIVE_DTSX_MASK \
(SDIO_DRIVE_DTSx_MASK << SDIO_DRIVE_DTSx_SHIFT)
/* mode to enable special 4-bit interrupt assertion without clock */ #define SDIO_IRQ_MODE_ASYNC_4BIT_IRQ BIT(0) #define SDIO_IRQ_MODE_ASYNC_4BIT_IRQ_SDIO3 BIT(1)
#define ATH10K_SDIO_TARGET_DEBUG_INTR_MASK 0x01
/* The theoretical maximum number of RX messages that can be fetched * from the mbox interrupt handler in one loop is derived in the following * way: * * Let's assume that each packet in a bundle of the maximum bundle size * (HTC_HOST_MAX_MSG_PER_RX_BUNDLE) has the HTC header bundle count set * to the maximum value (HTC_HOST_MAX_MSG_PER_RX_BUNDLE). * * in this case the driver must allocate * (HTC_HOST_MAX_MSG_PER_RX_BUNDLE * 2) skb's.
*/ #define ATH10K_SDIO_MAX_RX_MSGS \
(HTC_HOST_MAX_MSG_PER_RX_BUNDLE * 2)
/* TODO: remove this and use skb->cb instead, much cleaner approach */ struct ath10k_sdio_bus_request { struct list_head list;
/* sdio address */
u32 address;
struct sk_buff *skb; enum ath10k_htc_ep_id eid; int status; /* Specifies if the current request is an HTC message. * If not, the eid is not applicable an the TX completion handler * associated with the endpoint will not be invoked.
*/ bool htc_msg; /* Completion that (if set) will be invoked for non HTC requests * (htc_msg == false) when the request has been processed.
*/ struct completion *comp;
};
struct ath10k_sdio_irq_data { /* protects irq_proc_reg and irq_en_reg below. * We use a mutex here and not a spinlock since we will have the * mutex locked while calling the sdio_memcpy_ functions. * These function require non atomic context, and hence, spinlocks * can be held while calling these functions.
*/ struct mutex mtx; struct ath10k_sdio_irq_proc_regs *irq_proc_reg; struct ath10k_sdio_irq_enable_regs *irq_en_reg;
};
/* available bus requests */ struct ath10k_sdio_bus_request bus_req[ATH10K_SDIO_BUS_REQUEST_MAX_NUM]; /* free list of bus requests */ struct list_head bus_req_freeq;
struct sk_buff_head rx_head;
/* protects access to bus_req_freeq */
spinlock_t lock;
/* temporary buffer for sdio read. * It is allocated when probe, and used for receive bundled packets, * the read for bundled packets is not parallel, so it does not need * protected.
*/
u8 *vsg_buffer;
/* temporary buffer for BMI requests */
u8 *bmi_buf;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.