diff options
author | Seshagiri Holi <sholi@nvidia.com> | 2013-11-04 17:27:43 +0530 |
---|---|---|
committer | Bharat Nihalani <bnihalani@nvidia.com> | 2014-01-06 00:58:25 -0800 |
commit | a8eef868e27eb50f394365b84191eb4dd807b611 (patch) | |
tree | 1b58ba995579af6cbad0957498b5a9b4b8bee5f4 /include/uapi | |
parent | 6f10f486f8411f0860681ceae79e361c4e49d62f (diff) |
driver: mmc: Add new ioctl to send combo commands
Add ioctl for sending a sequence of commands to the device, atomically.
This combo command (MMC_COMBO_IOC_CMD) is a array of mmc_ioc_cmd.
The user space application can send an array
(mmc_ioc_cmd) of MMC commands.
To ensure atomic operations of all commands
in array, a single lock is acquired.
This is required for user-space tools to issue refresh
and check device's health and status.
bug 1304972
Change-Id: I340b9a95e6471ee578e404a7b01eec3db02662d0
Reviewed-on: http://git-master/r/281699
(cherry picked from commit 8945e061c4c5b26bb17c6e2d7ab610a056e7011f)
Reviewed-on: http://git-master/r/302096
Signed-off-by: Seshagiri Holi <sholi@nvidia.com>
Reviewed-on: http://git-master/r/337181
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/mmc/ioctl.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/uapi/linux/mmc/ioctl.h b/include/uapi/linux/mmc/ioctl.h index 1f5e68923929..35263b31322c 100644 --- a/include/uapi/linux/mmc/ioctl.h +++ b/include/uapi/linux/mmc/ioctl.h @@ -45,8 +45,24 @@ struct mmc_ioc_cmd { }; #define mmc_ioc_cmd_set_data(ic, ptr) ic.data_ptr = (__u64)(unsigned long) ptr -#define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd) +/** + * combo command used ioctl cmd id MMC_COMBO_IOC_CMD + */ +struct mmc_combo_cmd_info { + uint8_t num_of_combo_cmds; + struct mmc_ioc_cmd *mmc_ioc_cmd_list; +}; +#define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd) +/* + * MMC_COMBO_IOC_CMD: This is used to send a array of eMMC commands. + * each entry in struct mmc_ioc_cmd will have details of + * one eMMC command. + * The mmc driver will issue all commands in array in sequence to card. + * To ensure atomic operations of all commands in array, + * a single lock is acquired. + */ +#define MMC_COMBO_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 1, struct mmc_combo_cmd_info) /* * Since this ioctl is only meant to enhance (and not replace) normal access * to the mmc bus device, an upper data transfer limit of MMC_IOC_MAX_BYTES |