linux/drivers/mmc/host/meson-mx-sdio.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * meson-mx-sdio.c - Meson6, Meson8 and Meson8b SDIO/MMC Host Controller
 *
 * Copyright (C) 2015 Endless Mobile, Inc.
 * Author: Carlo Caione <[email protected]>
 * Copyright (C) 2017 Martin Blumenstingl <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/of_platform.h>
#include <linux/timer.h>
#include <linux/types.h>

#include <linux/mmc/host.h>
#include <linux/mmc/mmc.h>
#include <linux/mmc/sdio.h>
#include <linux/mmc/slot-gpio.h>

#define MESON_MX_SDIO_ARGU

#define MESON_MX_SDIO_SEND
	#define MESON_MX_SDIO_SEND_COMMAND_INDEX_MASK
	#define MESON_MX_SDIO_SEND_CMD_RESP_BITS_MASK
	#define MESON_MX_SDIO_SEND_RESP_WITHOUT_CRC7
	#define MESON_MX_SDIO_SEND_RESP_HAS_DATA
	#define MESON_MX_SDIO_SEND_RESP_CRC7_FROM_8
	#define MESON_MX_SDIO_SEND_CHECK_DAT0_BUSY
	#define MESON_MX_SDIO_SEND_DATA
	#define MESON_MX_SDIO_SEND_USE_INT_WINDOW
	#define MESON_MX_SDIO_SEND_REPEAT_PACKAGE_TIMES_MASK

#define MESON_MX_SDIO_CONF
	#define MESON_MX_SDIO_CONF_CMD_CLK_DIV_SHIFT
	#define MESON_MX_SDIO_CONF_CMD_CLK_DIV_WIDTH
	#define MESON_MX_SDIO_CONF_CMD_DISABLE_CRC
	#define MESON_MX_SDIO_CONF_CMD_OUT_AT_POSITIVE_EDGE
	#define MESON_MX_SDIO_CONF_CMD_ARGUMENT_BITS_MASK
	#define MESON_MX_SDIO_CONF_RESP_LATCH_AT_NEGATIVE_EDGE
	#define MESON_MX_SDIO_CONF_DATA_LATCH_AT_NEGATIVE_EDGE
	#define MESON_MX_SDIO_CONF_BUS_WIDTH
	#define MESON_MX_SDIO_CONF_M_ENDIAN_MASK
	#define MESON_MX_SDIO_CONF_WRITE_NWR_MASK
	#define MESON_MX_SDIO_CONF_WRITE_CRC_OK_STATUS_MASK

#define MESON_MX_SDIO_IRQS
	#define MESON_MX_SDIO_IRQS_STATUS_STATE_MACHINE_MASK
	#define MESON_MX_SDIO_IRQS_CMD_BUSY
	#define MESON_MX_SDIO_IRQS_RESP_CRC7_OK
	#define MESON_MX_SDIO_IRQS_DATA_READ_CRC16_OK
	#define MESON_MX_SDIO_IRQS_DATA_WRITE_CRC16_OK
	#define MESON_MX_SDIO_IRQS_IF_INT
	#define MESON_MX_SDIO_IRQS_CMD_INT
	#define MESON_MX_SDIO_IRQS_STATUS_INFO_MASK
	#define MESON_MX_SDIO_IRQS_TIMING_OUT_INT
	#define MESON_MX_SDIO_IRQS_AMRISC_TIMING_OUT_INT_EN
	#define MESON_MX_SDIO_IRQS_ARC_TIMING_OUT_INT_EN
	#define MESON_MX_SDIO_IRQS_TIMING_OUT_COUNT_MASK

#define MESON_MX_SDIO_IRQC
	#define MESON_MX_SDIO_IRQC_ARC_IF_INT_EN
	#define MESON_MX_SDIO_IRQC_ARC_CMD_INT_EN
	#define MESON_MX_SDIO_IRQC_IF_CONFIG_MASK
	#define MESON_MX_SDIO_IRQC_FORCE_DATA_CLK
	#define MESON_MX_SDIO_IRQC_FORCE_DATA_CMD
	#define MESON_MX_SDIO_IRQC_FORCE_DATA_DAT_MASK
	#define MESON_MX_SDIO_IRQC_SOFT_RESET
	#define MESON_MX_SDIO_IRQC_FORCE_HALT
	#define MESON_MX_SDIO_IRQC_HALT_HOLE

#define MESON_MX_SDIO_MULT
	#define MESON_MX_SDIO_MULT_PORT_SEL_MASK
	#define MESON_MX_SDIO_MULT_MEMORY_STICK_ENABLE
	#define MESON_MX_SDIO_MULT_MEMORY_STICK_SCLK_ALWAYS
	#define MESON_MX_SDIO_MULT_STREAM_ENABLE
	#define MESON_MX_SDIO_MULT_STREAM_8BITS_MODE
	#define MESON_MX_SDIO_MULT_WR_RD_OUT_INDEX
	#define MESON_MX_SDIO_MULT_DAT0_DAT1_SWAPPED
	#define MESON_MX_SDIO_MULT_DAT1_DAT0_SWAPPED
	#define MESON_MX_SDIO_MULT_RESP_READ_INDEX_MASK

#define MESON_MX_SDIO_ADDR

#define MESON_MX_SDIO_EXT
	#define MESON_MX_SDIO_EXT_DATA_RW_NUMBER_MASK

#define MESON_MX_SDIO_BOUNCE_REQ_SIZE
#define MESON_MX_SDIO_RESPONSE_CRC16_BITS
#define MESON_MX_SDIO_MAX_SLOTS

struct meson_mx_mmc_host {};

static void meson_mx_mmc_mask_bits(struct mmc_host *mmc, char reg, u32 mask,
				   u32 val)
{}

static void meson_mx_mmc_soft_reset(struct meson_mx_mmc_host *host)
{}

static struct mmc_command *meson_mx_mmc_get_next_cmd(struct mmc_command *cmd)
{}

static void meson_mx_mmc_start_cmd(struct mmc_host *mmc,
				   struct mmc_command *cmd)
{}

static void meson_mx_mmc_request_done(struct meson_mx_mmc_host *host)
{}

static void meson_mx_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
{}

static int meson_mx_mmc_map_dma(struct mmc_host *mmc, struct mmc_request *mrq)
{}

static void meson_mx_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
{}

static void meson_mx_mmc_read_response(struct mmc_host *mmc,
				       struct mmc_command *cmd)
{}

static irqreturn_t meson_mx_mmc_process_cmd_irq(struct meson_mx_mmc_host *host,
						u32 irqs, u32 send)
{}

static irqreturn_t meson_mx_mmc_irq(int irq, void *data)
{}

static irqreturn_t meson_mx_mmc_irq_thread(int irq, void *irq_data)
{}

static void meson_mx_mmc_timeout(struct timer_list *t)
{}

static struct mmc_host_ops meson_mx_mmc_ops =;

static struct platform_device *meson_mx_mmc_slot_pdev(struct device *parent)
{}

static int meson_mx_mmc_add_host(struct meson_mx_mmc_host *host)
{}

static int meson_mx_mmc_register_clks(struct meson_mx_mmc_host *host)
{}

static int meson_mx_mmc_probe(struct platform_device *pdev)
{}

static void meson_mx_mmc_remove(struct platform_device *pdev)
{}

static const struct of_device_id meson_mx_mmc_of_match[] =;
MODULE_DEVICE_TABLE(of, meson_mx_mmc_of_match);

static struct platform_driver meson_mx_mmc_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_LICENSE();