linux/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c

// SPDX-License-Identifier: ISC
/*
 * Copyright (c) 2010 Broadcom Corporation
 */
/* ****************** SDIO CARD Interface Functions **************************/

#include <linux/types.h>
#include <linux/netdevice.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/sched.h>
#include <linux/completion.h>
#include <linux/interrupt.h>
#include <linux/scatterlist.h>
#include <linux/mmc/sdio.h>
#include <linux/mmc/core.h>
#include <linux/mmc/sdio_func.h>
#include <linux/mmc/card.h>
#include <linux/mmc/host.h>
#include <linux/pm_runtime.h>
#include <linux/suspend.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/acpi.h>
#include <net/cfg80211.h>

#include <defs.h>
#include <brcm_hw_ids.h>
#include <brcmu_utils.h>
#include <brcmu_wifi.h>
#include <chipcommon.h>
#include <soc.h>
#include "chip.h"
#include "bus.h"
#include "debug.h"
#include "sdio.h"
#include "core.h"
#include "common.h"

#define SDIOH_API_ACCESS_RETRY_LIMIT

#define DMA_ALIGN_MASK

#define SDIO_FUNC1_BLOCKSIZE
#define SDIO_FUNC2_BLOCKSIZE
#define SDIO_4373_FUNC2_BLOCKSIZE
#define SDIO_435X_FUNC2_BLOCKSIZE
#define SDIO_4329_FUNC2_BLOCKSIZE
/* Maximum milliseconds to wait for F2 to come up */
#define SDIO_WAIT_F2RDY

#define BRCMF_DEFAULT_RXGLOM_SIZE

struct brcmf_sdiod_freezer {};

static irqreturn_t brcmf_sdiod_oob_irqhandler(int irq, void *dev_id)
{}

static void brcmf_sdiod_ib_irqhandler(struct sdio_func *func)
{}

/* dummy handler for SDIO function 2 interrupt */
static void brcmf_sdiod_dummy_irqhandler(struct sdio_func *func)
{}

int brcmf_sdiod_intr_register(struct brcmf_sdio_dev *sdiodev)
{}

void brcmf_sdiod_intr_unregister(struct brcmf_sdio_dev *sdiodev)
{}

void brcmf_sdiod_change_state(struct brcmf_sdio_dev *sdiodev,
			      enum brcmf_sdiod_state state)
{}

static int brcmf_sdiod_set_backplane_window(struct brcmf_sdio_dev *sdiodev,
					    u32 addr)
{}

u32 brcmf_sdiod_readl(struct brcmf_sdio_dev *sdiodev, u32 addr, int *ret)
{}

void brcmf_sdiod_writel(struct brcmf_sdio_dev *sdiodev, u32 addr,
			u32 data, int *ret)
{}

static int brcmf_sdiod_skbuff_read(struct brcmf_sdio_dev *sdiodev,
				   struct sdio_func *func, u32 addr,
				   struct sk_buff *skb)
{}

static int brcmf_sdiod_skbuff_write(struct brcmf_sdio_dev *sdiodev,
				    struct sdio_func *func, u32 addr,
				    struct sk_buff *skb)
{}

static int mmc_submit_one(struct mmc_data *md, struct mmc_request *mr,
			  struct mmc_command *mc, int sg_cnt, int req_sz,
			  int func_blk_sz, u32 *addr,
			  struct brcmf_sdio_dev *sdiodev,
			  struct sdio_func *func, int write)
{}

/**
 * brcmf_sdiod_sglist_rw - SDIO interface function for block data access
 * @sdiodev: brcmfmac sdio device
 * @func: SDIO function
 * @write: direction flag
 * @addr: dongle memory address as source/destination
 * @pktlist: skb buffer head pointer
 *
 * This function takes the respbonsibility as the interface function to MMC
 * stack for block data access. It assumes that the skb passed down by the
 * caller has already been padded and aligned.
 */
static int brcmf_sdiod_sglist_rw(struct brcmf_sdio_dev *sdiodev,
				 struct sdio_func *func,
				 bool write, u32 addr,
				 struct sk_buff_head *pktlist)
{}

int brcmf_sdiod_recv_buf(struct brcmf_sdio_dev *sdiodev, u8 *buf, uint nbytes)
{}

int brcmf_sdiod_recv_pkt(struct brcmf_sdio_dev *sdiodev, struct sk_buff *pkt)
{}

int brcmf_sdiod_recv_chain(struct brcmf_sdio_dev *sdiodev,
			   struct sk_buff_head *pktq, uint totlen)
{}

int brcmf_sdiod_send_buf(struct brcmf_sdio_dev *sdiodev, u8 *buf, uint nbytes)
{}

int brcmf_sdiod_send_pkt(struct brcmf_sdio_dev *sdiodev,
			 struct sk_buff_head *pktq)
{}

int
brcmf_sdiod_ramrw(struct brcmf_sdio_dev *sdiodev, bool write, u32 address,
		  u8 *data, uint size)
{}

int brcmf_sdiod_abort(struct brcmf_sdio_dev *sdiodev, struct sdio_func *func)
{}

void brcmf_sdiod_sgtable_alloc(struct brcmf_sdio_dev *sdiodev)
{}

static int brcmf_sdiod_freezer_attach(struct brcmf_sdio_dev *sdiodev)
{}

static void brcmf_sdiod_freezer_detach(struct brcmf_sdio_dev *sdiodev)
{}

static int brcmf_sdiod_freezer_on(struct brcmf_sdio_dev *sdiodev)
{}

static void brcmf_sdiod_freezer_off(struct brcmf_sdio_dev *sdiodev)
{}

bool brcmf_sdiod_freezing(struct brcmf_sdio_dev *sdiodev)
{}

void brcmf_sdiod_try_freeze(struct brcmf_sdio_dev *sdiodev)
{}

void brcmf_sdiod_freezer_count(struct brcmf_sdio_dev *sdiodev)
{}

void brcmf_sdiod_freezer_uncount(struct brcmf_sdio_dev *sdiodev)
{}

int brcmf_sdiod_remove(struct brcmf_sdio_dev *sdiodev)
{}

static void brcmf_sdiod_host_fixup(struct mmc_host *host)
{}

int brcmf_sdiod_probe(struct brcmf_sdio_dev *sdiodev)
{}

#define BRCMF_SDIO_DEVICE(dev_id, fw_vend)

#define CYW_SDIO_DEVICE(dev_id, fw_vend)

/* devices we support, null terminated */
static const struct sdio_device_id brcmf_sdmmc_ids[] =;
MODULE_DEVICE_TABLE(sdio, brcmf_sdmmc_ids);


static void brcmf_sdiod_acpi_save_power_manageable(struct brcmf_sdio_dev *sdiodev)
{}

static void brcmf_sdiod_acpi_set_power_manageable(struct brcmf_sdio_dev *sdiodev,
						  int enable)
{}

static int brcmf_ops_sdio_probe(struct sdio_func *func,
				const struct sdio_device_id *id)
{}

static void brcmf_ops_sdio_remove(struct sdio_func *func)
{}

void brcmf_sdio_wowl_config(struct device *dev, bool enabled)
{}

static int brcmf_ops_sdio_suspend(struct device *dev)
{}

static int brcmf_ops_sdio_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(brcmf_sdio_pm_ops,
				brcmf_ops_sdio_suspend,
				brcmf_ops_sdio_resume);

static struct sdio_driver brcmf_sdmmc_driver =;

int brcmf_sdio_register(void)
{}

void brcmf_sdio_exit(void)
{}