linux/include/linux/platform_data/sh_mmcif.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * platform data for eMMC driver
 *
 * Copyright (C) 2010 Renesas Solutions Corp.
 */

#ifndef LINUX_MMC_SH_MMCIF_H
#define LINUX_MMC_SH_MMCIF_H

#include <linux/io.h>
#include <linux/platform_device.h>

/*
 * MMCIF : CE_CLK_CTRL [19:16]
 * 1000 : Peripheral clock / 512
 * 0111 : Peripheral clock / 256
 * 0110 : Peripheral clock / 128
 * 0101 : Peripheral clock / 64
 * 0100 : Peripheral clock / 32
 * 0011 : Peripheral clock / 16
 * 0010 : Peripheral clock / 8
 * 0001 : Peripheral clock / 4
 * 0000 : Peripheral clock / 2
 * 1111 : Peripheral clock (sup_pclk set '1')
 */

struct sh_mmcif_plat_data {};

#define MMCIF_CE_CMD_SET
#define MMCIF_CE_ARG
#define MMCIF_CE_ARG_CMD12
#define MMCIF_CE_CMD_CTRL
#define MMCIF_CE_BLOCK_SET
#define MMCIF_CE_CLK_CTRL
#define MMCIF_CE_BUF_ACC
#define MMCIF_CE_RESP3
#define MMCIF_CE_RESP2
#define MMCIF_CE_RESP1
#define MMCIF_CE_RESP0
#define MMCIF_CE_RESP_CMD12
#define MMCIF_CE_DATA
#define MMCIF_CE_INT
#define MMCIF_CE_INT_MASK
#define MMCIF_CE_HOST_STS1
#define MMCIF_CE_HOST_STS2
#define MMCIF_CE_CLK_CTRL2
#define MMCIF_CE_VERSION

/* CE_BUF_ACC */
#define BUF_ACC_DMAWEN
#define BUF_ACC_DMAREN
#define BUF_ACC_BUSW_32
#define BUF_ACC_BUSW_16
#define BUF_ACC_ATYP

/* CE_CLK_CTRL */
#define CLK_ENABLE
#define CLK_CLEAR
#define CLK_SUP_PCLK
#define CLKDIV_4
#define CLKDIV_256
#define SRSPTO_256
#define SRBSYTO_29
#define SRWDTO_29
#define SCCSTO_29

/* CE_VERSION */
#define SOFT_RST_ON
#define SOFT_RST_OFF

static inline u32 sh_mmcif_readl(void __iomem *addr, int reg)
{}

static inline void sh_mmcif_writel(void __iomem *addr, int reg, u32 val)
{}

#define SH_MMCIF_BBS

static inline void sh_mmcif_boot_cmd_send(void __iomem *base,
					  unsigned long cmd, unsigned long arg)
{}

static inline int sh_mmcif_boot_cmd_poll(void __iomem *base, unsigned long mask)
{}

static inline int sh_mmcif_boot_cmd(void __iomem *base,
				    unsigned long cmd, unsigned long arg)
{}

static inline int sh_mmcif_boot_do_read_single(void __iomem *base,
					       unsigned int block_nr,
					       unsigned long *buf)
{}

static inline int sh_mmcif_boot_do_read(void __iomem *base,
					unsigned long first_block,
					unsigned long nr_blocks,
					void *buf)
{}

static inline void sh_mmcif_boot_init(void __iomem *base)
{}

#endif /* LINUX_MMC_SH_MMCIF_H */