blob: e1eb80a265f92f1dd2c49bc96c42bfb191ff27da [file] [log] [blame]
/*
* 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 _EXYNOS_SMU_H_
#define _EXYNOS_SMU_H_
#include <linux/platform_device.h>
#define CFG_DESCTYPE_0 0x0
#define CFG_DESCTYPE_1 0x1
#define CFG_DESCTYPE_2 0x2
#define CFG_DESCTYPE_3 0x3
#if defined(CONFIG_MMC_DW_EXYNOS_FMP)
#define CFG_DESCTYPE CFG_DESCTYPE_3
#else
#define CFG_DESCTYPE CFG_DESCTYPE_0
#endif
#define ACCESS_CONTROL_ABORT 0x14
enum smu_id {
SMU_EMBEDDED = 0,
SMU_UFSCARD = 1,
SMU_SDCARD = 2,
};
enum smu_command {
SMU_INIT = 0,
SMU_SET = 1,
SMU_ABORT = 2,
};
struct smu_data_setting {
int id;
int command;
int desc_type;
};
struct exynos_smu_variant_ops {
const char *name;
int (*init)(struct platform_device *, struct smu_data_setting *);
int (*sec_config)(struct platform_device *, struct smu_data_setting *);
int (*resume)(struct platform_device *, struct smu_data_setting *);
int (*abort)(struct platform_device *, struct smu_data_setting *);
};
struct exynos_smu_variant_ops *exynos_smu_get_variant_ops(struct device_node *node);
struct platform_device *exynos_smu_get_pdevice(struct device_node *node);
#endif /* _EXYNOS_SMU_H_ */