#include <linux/bitfield.h>
#include <linux/delay.h>
#include <linux/dma-direction.h>
#include <linux/dma-mapping.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
#include <linux/mmc/mmc.h>
#include <linux/mmc/slot-gpio.h>
#include <linux/module.h>
#include <linux/regulator/consumer.h>
#include <linux/scatterlist.h>
#include <linux/time.h>
#include "cavium.h"
const char *cvm_mmc_irq_names[] = …;
static struct cvm_mmc_cr_type cvm_mmc_cr_types[] = …;
static struct cvm_mmc_cr_mods cvm_mmc_get_cr_mods(struct mmc_command *cmd)
{ … }
static void check_switch_errors(struct cvm_mmc_host *host)
{ … }
static void clear_bus_id(u64 *reg)
{ … }
static void set_bus_id(u64 *reg, int bus_id)
{ … }
static int get_bus_id(u64 reg)
{ … }
static void do_switch(struct cvm_mmc_host *host, u64 emm_switch)
{ … }
static bool switch_val_changed(struct cvm_mmc_slot *slot, u64 new_val)
{ … }
static void set_wdog(struct cvm_mmc_slot *slot, unsigned int ns)
{ … }
static void cvm_mmc_reset_bus(struct cvm_mmc_slot *slot)
{ … }
static void cvm_mmc_switch_to(struct cvm_mmc_slot *slot)
{ … }
static void do_read(struct cvm_mmc_host *host, struct mmc_request *req,
u64 dbuf)
{ … }
static void do_write(struct mmc_request *req)
{ … }
static void set_cmd_response(struct cvm_mmc_host *host, struct mmc_request *req,
u64 rsp_sts)
{ … }
static int get_dma_dir(struct mmc_data *data)
{ … }
static int finish_dma_single(struct cvm_mmc_host *host, struct mmc_data *data)
{ … }
static int finish_dma_sg(struct cvm_mmc_host *host, struct mmc_data *data)
{ … }
static int finish_dma(struct cvm_mmc_host *host, struct mmc_data *data)
{ … }
static int check_status(u64 rsp_sts)
{ … }
static void cleanup_dma(struct cvm_mmc_host *host, u64 rsp_sts)
{ … }
irqreturn_t cvm_mmc_interrupt(int irq, void *dev_id)
{ … }
static u64 prepare_dma_single(struct cvm_mmc_host *host, struct mmc_data *data)
{ … }
static u64 prepare_dma_sg(struct cvm_mmc_host *host, struct mmc_data *data)
{ … }
static u64 prepare_dma(struct cvm_mmc_host *host, struct mmc_data *data)
{ … }
static u64 prepare_ext_dma(struct mmc_host *mmc, struct mmc_request *mrq)
{ … }
static void cvm_mmc_dma_request(struct mmc_host *mmc,
struct mmc_request *mrq)
{ … }
static void do_read_request(struct cvm_mmc_host *host, struct mmc_request *mrq)
{ … }
static void do_write_request(struct cvm_mmc_host *host, struct mmc_request *mrq)
{ … }
static void cvm_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
{ … }
static void cvm_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
{ … }
static const struct mmc_host_ops cvm_mmc_ops = …;
static void cvm_mmc_set_clock(struct cvm_mmc_slot *slot, unsigned int clock)
{ … }
static int cvm_mmc_init_lowlevel(struct cvm_mmc_slot *slot)
{ … }
static int cvm_mmc_of_parse(struct device *dev, struct cvm_mmc_slot *slot)
{ … }
int cvm_mmc_of_slot_probe(struct device *dev, struct cvm_mmc_host *host)
{ … }
int cvm_mmc_of_slot_remove(struct cvm_mmc_slot *slot)
{ … }