linux/drivers/mmc/host/sdhci-xenon.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Driver for Marvell Xenon SDHC as a platform device
 *
 * Copyright (C) 2016 Marvell, All Rights Reserved.
 *
 * Author:	Hu Ziji <[email protected]>
 * Date:	2016-8-24
 *
 * Inspired by Jisheng Zhang <[email protected]>
 * Special thanks to Video BG4 project team.
 */

#include <linux/acpi.h>
#include <linux/delay.h>
#include <linux/ktime.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/pm.h>
#include <linux/pm_runtime.h>
#include <linux/mm.h>
#include <linux/dma-mapping.h>

#include "sdhci-pltfm.h"
#include "sdhci-xenon.h"

static int xenon_enable_internal_clk(struct sdhci_host *host)
{}

/* Set SDCLK-off-while-idle */
static void xenon_set_sdclk_off_idle(struct sdhci_host *host,
				     unsigned char sdhc_id, bool enable)
{}

/* Enable/Disable the Auto Clock Gating function */
static void xenon_set_acg(struct sdhci_host *host, bool enable)
{}

/* Enable this SDHC */
static void xenon_enable_sdhc(struct sdhci_host *host,
			      unsigned char sdhc_id)
{}

/* Disable this SDHC */
static void xenon_disable_sdhc(struct sdhci_host *host,
			       unsigned char sdhc_id)
{}

/* Enable Parallel Transfer Mode */
static void xenon_enable_sdhc_parallel_tran(struct sdhci_host *host,
					    unsigned char sdhc_id)
{}

/* Mask command conflict error */
static void xenon_mask_cmd_conflict_err(struct sdhci_host *host)
{}

static void xenon_retune_setup(struct sdhci_host *host)
{}

/*
 * Operations inside struct sdhci_ops
 */
/* Recover the Register Setting cleared during SOFTWARE_RESET_ALL */
static void xenon_reset_exit(struct sdhci_host *host,
			     unsigned char sdhc_id, u8 mask)
{}

static void xenon_reset(struct sdhci_host *host, u8 mask)
{}

/*
 * Xenon defines different values for HS200 and HS400
 * in Host_Control_2
 */
static void xenon_set_uhs_signaling(struct sdhci_host *host,
				    unsigned int timing)
{}

static void xenon_set_power(struct sdhci_host *host, unsigned char mode,
		unsigned short vdd)
{}

static void xenon_voltage_switch(struct sdhci_host *host)
{}

static unsigned int xenon_get_max_clock(struct sdhci_host *host)
{}

static const struct sdhci_ops sdhci_xenon_ops =;

static const struct sdhci_pltfm_data sdhci_xenon_pdata =;

/*
 * Xenon Specific Operations in mmc_host_ops
 */
static void xenon_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
{}

static int xenon_start_signal_voltage_switch(struct mmc_host *mmc,
					     struct mmc_ios *ios)
{}

/*
 * Update card type.
 * priv->init_card_type will be used in PHY timing adjustment.
 */
static void xenon_init_card(struct mmc_host *mmc, struct mmc_card *card)
{}

static int xenon_execute_tuning(struct mmc_host *mmc, u32 opcode)
{}

static void xenon_enable_sdio_irq(struct mmc_host *mmc, int enable)
{}

static void xenon_replace_mmc_host_ops(struct sdhci_host *host)
{}

/*
 * Parse Xenon specific DT properties:
 * sdhc-id: the index of current SDHC.
 *	    Refer to XENON_SYS_CFG_INFO register
 * tun-count: the interval between re-tuning
 */
static int xenon_probe_params(struct platform_device *pdev)
{}

static int xenon_sdhc_prepare(struct sdhci_host *host)
{}

static void xenon_sdhc_unprepare(struct sdhci_host *host)
{}

static int xenon_probe(struct platform_device *pdev)
{}

static void xenon_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_PM_SLEEP
static int xenon_suspend(struct device *dev)
{}
#endif

#ifdef CONFIG_PM
static int xenon_runtime_suspend(struct device *dev)
{}

static int xenon_runtime_resume(struct device *dev)
{}
#endif /* CONFIG_PM */

static const struct dev_pm_ops sdhci_xenon_dev_pm_ops =;

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

#ifdef CONFIG_ACPI
static const struct acpi_device_id sdhci_xenon_acpi_ids[] =;
MODULE_DEVICE_TABLE(acpi, sdhci_xenon_acpi_ids);
#endif

static struct platform_driver sdhci_xenon_driver =;

module_platform_driver();

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