linux/drivers/staging/ks7010/ks7010_sdio.c

// SPDX-License-Identifier: GPL-2.0
/*
 *   Driver for KeyStream, KS7010 based SDIO cards.
 *
 *   Copyright (C) 2006-2008 KeyStream Corp.
 *   Copyright (C) 2009 Renesas Technology Corp.
 *   Copyright (C) 2016 Sang Engineering, Wolfram Sang
 */

#include <linux/atomic.h>
#include <linux/firmware.h>
#include <linux/jiffies.h>
#include <linux/mmc/card.h>
#include <linux/mmc/sdio_func.h>
#include <linux/module.h>
#include <linux/workqueue.h>
#include "ks_wlan.h"
#include "ks_hostif.h"

#define ROM_FILE

/*  SDIO KeyStream vendor and device */
#define SDIO_VENDOR_ID_KS_CODE_A
#define SDIO_VENDOR_ID_KS_CODE_B

/* Older sources suggest earlier versions were named 7910 or 79xx */
#define SDIO_DEVICE_ID_KS_7010

/* Read/Write Status Register */
#define READ_STATUS_REG
#define WRITE_STATUS_REG
enum reg_status_type {};

/* Read Index Register */
#define READ_INDEX_REG

/* Read Data Size Register */
#define READ_DATA_SIZE_REG

/* Write Index Register */
#define WRITE_INDEX_REG

/*
 * Write Status/Read Data Size Register
 * for network packet (less than 2048 bytes data)
 */
#define WSTATUS_RSIZE_REG

/* Write Status Register value */
#define WSTATUS_MASK

/* Read Data Size Register value [10:4] */
#define RSIZE_MASK

/* ARM to SD interrupt Enable */
#define INT_ENABLE_REG
/* ARM to SD interrupt Pending */
#define INT_PENDING_REG

#define INT_GCR_B
#define INT_GCR_A
#define INT_WRITE_STATUS
#define INT_WRITE_INDEX
#define INT_WRITE_SIZE
#define INT_READ_STATUS
#define INT_READ_INDEX
#define INT_READ_SIZE

/* General Communication Register A */
#define GCR_A_REG
enum gen_com_reg_a {};

/* General Communication Register B */
#define GCR_B_REG
enum gen_com_reg_b {};

/* Wakeup Register */
#define WAKEUP_REG
#define WAKEUP_REQ

/* AHB Data Window  0x010000-0x01FFFF */
#define DATA_WINDOW
#define WINDOW_SIZE

#define KS7010_IRAM_ADDRESS

#define KS7010_IO_BLOCK_SIZE

/**
 * struct ks_sdio_card - SDIO device data.
 *
 * Structure is used as the &struct sdio_func private data.
 *
 * @func: Pointer to the SDIO function device.
 * @priv: Pointer to the &struct net_device private data.
 */
struct ks_sdio_card {};

static struct sdio_func *ks7010_to_func(struct ks_wlan_private *priv)
{}

/* Read single byte from device address into byte (CMD52) */
static int ks7010_sdio_readb(struct ks_wlan_private *priv,
			     u32 address, u8 *byte)
{}

/* Read length bytes from device address into buffer (CMD53) */
static int ks7010_sdio_read(struct ks_wlan_private *priv, u32 address,
			    u8 *buffer, unsigned int length)
{}

/* Write single byte to device address (CMD52) */
static int ks7010_sdio_writeb(struct ks_wlan_private *priv,
			      u32 address, u8 byte)
{}

/* Write length bytes to device address from buffer (CMD53) */
static int ks7010_sdio_write(struct ks_wlan_private *priv, u32 address,
			     u8 *buffer, unsigned int length)
{}

static void ks_wlan_hw_sleep_doze_request(struct ks_wlan_private *priv)
{}

static void ks_wlan_hw_sleep_wakeup_request(struct ks_wlan_private *priv)
{}

void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv)
{}

static void _ks_wlan_hw_power_save(struct ks_wlan_private *priv)
{}

int ks_wlan_hw_power_save(struct ks_wlan_private *priv)
{}

static int enqueue_txdev(struct ks_wlan_private *priv, unsigned char *p,
			 unsigned long size,
			 void (*complete_handler)(struct ks_wlan_private *priv,
						  struct sk_buff *skb),
			 struct sk_buff *skb)
{}

/* write data */
static int write_to_device(struct ks_wlan_private *priv, u8 *buffer,
			   unsigned long size)
{}

static void tx_device_task(struct ks_wlan_private *priv)
{}

int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
		  void (*complete_handler)(struct ks_wlan_private *priv,
					   struct sk_buff *skb),
		  struct sk_buff *skb)
{}

static void rx_event_task(struct tasklet_struct *t)
{}

static void ks_wlan_hw_rx(struct ks_wlan_private *priv, size_t size)
{}

static void ks7010_rw_function(struct work_struct *work)
{}

static void ks_sdio_interrupt(struct sdio_func *func)
{}

static int trx_device_init(struct ks_wlan_private *priv)
{}

static void trx_device_exit(struct ks_wlan_private *priv)
{}

static int ks7010_sdio_update_index(struct ks_wlan_private *priv, u32 index)
{}

#define ROM_BUFF_SIZE
static int ks7010_sdio_data_compare(struct ks_wlan_private *priv, u32 address,
				    u8 *data, unsigned int size)
{}

static int ks7010_copy_firmware(struct ks_wlan_private *priv,
				const struct firmware *fw_entry)
{}

static int ks7010_upload_firmware(struct ks_sdio_card *card)
{}

static void ks7010_sme_enqueue_events(struct ks_wlan_private *priv)
{}

static void ks7010_card_init(struct ks_wlan_private *priv)
{}

static void ks7010_init_defaults(struct ks_wlan_private *priv)
{}

static int ks7010_sdio_setup_irqs(struct sdio_func *func)
{}

static void ks7010_sdio_init_irqs(struct sdio_func *func,
				  struct ks_wlan_private *priv)
{}

static void ks7010_private_init(struct ks_wlan_private *priv,
				struct ks_sdio_card *card,
				struct net_device *netdev)
{}

static int ks7010_sdio_probe(struct sdio_func *func,
			     const struct sdio_device_id *device)
{}

/* send stop request to MAC */
static int send_stop_request(struct sdio_func *func)
{}

static void ks7010_sdio_remove(struct sdio_func *func)
{}

static const struct sdio_device_id ks7010_sdio_ids[] =;
MODULE_DEVICE_TABLE(sdio, ks7010_sdio_ids);

static struct sdio_driver ks7010_sdio_driver =;

module_sdio_driver();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_FIRMWARE();