summaryrefstree
path: root/kernel/drivers/mmc/host/dw_mmc-exynos-smu.h
blob: 9a31975eea7c9c3aea4420e86cb9a91ae2560957 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * Copyright (C) 2016 Samsung Electronics Co., Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#ifndef _MMC_EXYNOS_SMU_H_
#define _MMC_EXYNOS_SMU_H_

#ifdef CONFIG_MMC_DW_EXYNOS_SMU
int exynos_mmc_smu_get_dev(struct dw_mci *host);
int exynos_mmc_smu_init(struct dw_mci *host);
int exynos_mmc_smu_sec_cfg(struct dw_mci *host);
int exynos_mmc_smu_resume(struct dw_mci *host);
int exynos_mmc_smu_abort(struct dw_mci *host);
#else
inline int exynos_mmc_smu_get_dev(struct dw_mci *host)
{
	struct dw_mci_exynos_priv_data *priv;

	if (!host || !host->priv)
		goto out;

	priv = host->priv;
	priv->smu.pdev = NULL;
	priv->smu.vops = NULL;
out:
	return 0;
}

inline int exynos_mmc_smu_init(struct dw_mci *host)
{
#if 0
	mci_writel(host, MPSBEGIN0, 0);
	mci_writel(host, MPSEND0, 0xffffffff);
	mci_writel(host, MPSLUN0, 0xff);
	mci_writel(host, MPSCTRL0, DWMCI_MPSCTRL_BYPASS);
#endif
	return 0;
}

inline int exynos_mmc_smu_sec_cfg(struct dw_mci *host)
{
	return 0;
}

inline int exynos_mmc_smu_resume(struct dw_mci *host)
{
#if 0
	mci_writel(host, MPSBEGIN0, 0);
	mci_writel(host, MPSEND0, 0xffffffff);
	mci_writel(host, MPSLUN0, 0xff);
	mci_writel(host, MPSCTRL0, DWMCI_MPSCTRL_BYPASS);
#endif
	return 0;
}

inline int exynos_mmc_smu_abort(struct dw_mci *host)
{
	return 0;
}
#endif /* CONFIG_MMC_DW_EXYNOS_SMU */
#endif /* _MMC_EXYNOS_SMU_H_ */