diff options
Diffstat (limited to 'drivers/net/wireless/bcmdhd/include/bcmsdh_sdmmc.h')
-rw-r--r-- | drivers/net/wireless/bcmdhd/include/bcmsdh_sdmmc.h | 58 |
1 files changed, 20 insertions, 38 deletions
diff --git a/drivers/net/wireless/bcmdhd/include/bcmsdh_sdmmc.h b/drivers/net/wireless/bcmdhd/include/bcmsdh_sdmmc.h index bd85de3..a789e03 100644 --- a/drivers/net/wireless/bcmdhd/include/bcmsdh_sdmmc.h +++ b/drivers/net/wireless/bcmdhd/include/bcmsdh_sdmmc.h @@ -1,7 +1,7 @@ /* * BCMSDH Function Driver for the native SDIO/MMC driver in the Linux Kernel * - * Copyright (C) 1999-2012, Broadcom Corporation + * Copyright (C) 1999-2014, Broadcom Corporation * * Unless you and Broadcom execute a separate written software license * agreement governing use of this software, this software is licensed to you @@ -21,7 +21,7 @@ * software in any way with any other Broadcom software provided under a license * other than the GPL, without Broadcom's express prior written consent. * - * $Id: bcmsdh_sdmmc.h 393684 2013-03-28 11:03:49Z $ + * $Id: bcmsdh_sdmmc.h 444019 2013-12-18 08:36:54Z $ */ #ifndef __BCMSDH_SDMMC_H__ @@ -34,15 +34,16 @@ #define sd_data(x) #define sd_ctrl(x) +#ifdef CUSTOMER_HW4 +#undef sd_err +#define sd_err(x) do {printf x;} while (0) +#endif + #define sd_sync_dma(sd, read, nbytes) #define sd_init_dma(sd) #define sd_ack_intr(sd) #define sd_wakeup(sd); -/* Allocate/init/free per-OS private data */ -extern int sdioh_sdmmc_osinit(sdioh_info_t *sd); -extern void sdioh_sdmmc_osfree(sdioh_info_t *sd); - #define sd_log(x) #define SDIOH_ASSERT(exp) \ @@ -60,48 +61,32 @@ extern void sdioh_sdmmc_osfree(sdioh_info_t *sd); /* private bus modes */ #define SDIOH_MODE_SD4 2 #define CLIENT_INTR 0x100 /* Get rid of this! */ - -#ifdef BCMSDIOH_TXGLOM -/* Setting the MAX limit to 10 */ -#define SDIOH_MAXGLOM_SIZE 16 - -typedef struct glom_buf { - void *glom_pkt_head; - void *glom_pkt_tail; - uint32 count; /* Total number of pkts queued */ -} glom_buf_t; -#endif +#define SDIOH_SDMMC_MAX_SG_ENTRIES (SDPCM_MAXGLOM_SIZE+2) struct sdioh_info { osl_t *osh; /* osh handler */ + void *bcmsdh; /* upper layer handle */ bool client_intr_enabled; /* interrupt connnected flag */ bool intr_handler_valid; /* client driver interrupt handler valid */ sdioh_cb_fn_t intr_handler; /* registered interrupt handler */ void *intr_handler_arg; /* argument to call interrupt handler */ uint16 intmask; /* Current active interrupts */ - void *sdos_info; /* Pointer to per-OS private data */ - - uint irq; /* Client irq */ - int intrcount; /* Client interrupts */ + int intrcount; /* Client interrupts */ bool sd_use_dma; /* DMA on CMD53 */ bool sd_blockmode; /* sd_blockmode == FALSE => 64 Byte Cmd 53s. */ /* Must be on for sd_multiblock to be effective */ - bool use_client_ints; /* If this is false, make sure to restore */ - int sd_mode; /* SD1/SD4/SPI */ - int client_block_size[SDIOD_MAX_IOFUNCS]; /* Blocksize */ - uint8 num_funcs; /* Supported funcs on client */ - uint32 com_cis_ptr; + bool use_client_ints; /* If this is false, make sure to restore */ + int sd_mode; /* SD1/SD4/SPI */ + int client_block_size[SDIOD_MAX_IOFUNCS]; /* Blocksize */ + uint8 num_funcs; /* Supported funcs on client */ + uint32 com_cis_ptr; uint32 func_cis_ptr[SDIOD_MAX_IOFUNCS]; - -#define SDIOH_SDMMC_MAX_SG_ENTRIES 32 - struct scatterlist sg_list[SDIOH_SDMMC_MAX_SG_ENTRIES]; bool use_rxchain; + struct scatterlist sg_list[SDIOH_SDMMC_MAX_SG_ENTRIES]; + struct sdio_func fake_func0; + struct sdio_func *func[SDIOD_MAX_IOFUNCS]; -#ifdef BCMSDIOH_TXGLOM - glom_buf_t glom_info; /* pkt information used for glomming */ - uint txglom_mode; /* Txglom mode: 0 - copy, 1 - multi-descriptor */ -#endif }; /************************************************************ @@ -131,9 +116,6 @@ extern void sdioh_sdmmc_reg_unmap(osl_t *osh, int32 addr, int size); extern int sdioh_sdmmc_register_irq(sdioh_info_t *sd, uint irq); extern void sdioh_sdmmc_free_irq(uint irq, sdioh_info_t *sd); -typedef struct _BCMSDH_SDMMC_INSTANCE { - sdioh_info_t *sd; - struct sdio_func *func[SDIOD_MAX_IOFUNCS]; -} BCMSDH_SDMMC_INSTANCE, *PBCMSDH_SDMMC_INSTANCE; - +extern sdioh_info_t *sdioh_attach(osl_t *osh, struct sdio_func *func); +extern SDIOH_API_RC sdioh_detach(osl_t *osh, sdioh_info_t *sd); #endif /* __BCMSDH_SDMMC_H__ */ |