]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - drivers/mmc/host/renesas_sdhi.h
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[mirror_ubuntu-jammy-kernel.git] / drivers / mmc / host / renesas_sdhi.h
CommitLineData
c2a96987
SH
1/*
2 * Renesas Mobile SDHI
3 *
4 * Copyright (C) 2017 Horms Solutions Ltd., Simon Horman
5 * Copyright (C) 2017 Renesas Electronics Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#ifndef RENESAS_SDHI_H
13#define RENESAS_SDHI_H
14
9d08428a 15#include <linux/platform_device.h>
c2a96987
SH
16#include "tmio_mmc.h"
17
9d08428a
SH
18struct renesas_sdhi_scc {
19 unsigned long clk_rate; /* clock rate for SDR104 */
20 u32 tap; /* sampling clock position for SDR104 */
21};
22
23struct renesas_sdhi_of_data {
24 unsigned long tmio_flags;
25 u32 tmio_ocr_mask;
26 unsigned long capabilities;
27 unsigned long capabilities2;
28 enum dma_slave_buswidth dma_buswidth;
29 dma_addr_t dma_rx_offset;
f2218db8 30 unsigned int bus_shift;
9d08428a
SH
31 int scc_offset;
32 struct renesas_sdhi_scc *taps;
33 int taps_num;
603aa14d
YS
34 unsigned int max_blk_count;
35 unsigned short max_segs;
9d08428a
SH
36};
37
058db286
MY
38struct tmio_mmc_dma {
39 enum dma_slave_buswidth dma_buswidth;
40 bool (*filter)(struct dma_chan *chan, void *arg);
41 void (*enable)(struct tmio_mmc_host *host, bool enable);
90d95106
MY
42 struct completion dma_dataend;
43 struct tasklet_struct dma_complete;
058db286
MY
44};
45
46struct renesas_sdhi {
47 struct clk *clk;
48 struct clk *clk_cd;
49 struct tmio_mmc_data mmc_data;
50 struct tmio_mmc_dma dma_priv;
51 struct pinctrl *pinctrl;
52 struct pinctrl_state *pins_default, *pins_uhs;
53 void __iomem *scc_ctl;
852d258f 54 u32 scc_tappos;
058db286
MY
55};
56
57#define host_to_priv(host) \
58 container_of((host)->pdata, struct renesas_sdhi, mmc_data)
59
9d08428a 60int renesas_sdhi_probe(struct platform_device *pdev,
2fe35968 61 const struct tmio_mmc_dma_ops *dma_ops);
9d08428a 62int renesas_sdhi_remove(struct platform_device *pdev);
c2a96987 63#endif