blob: 1989981b363eb7eef9c3478dca3475cceb58b1b4 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Ben Cheng655a7c02013-10-16 16:09:24 -07007#ifndef LINUX_MMC_IOCTL_H
8#define LINUX_MMC_IOCTL_H
9#include <linux/types.h>
Christopher Ferris8177cdf2020-08-03 11:53:55 -070010#include <linux/major.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070011struct mmc_ioc_cmd {
Tao Baod7db5942015-01-28 10:07:51 -080012 int write_flag;
13 int is_acmd;
14 __u32 opcode;
15 __u32 arg;
Tao Baod7db5942015-01-28 10:07:51 -080016 __u32 response[4];
17 unsigned int flags;
18 unsigned int blksz;
19 unsigned int blocks;
Tao Baod7db5942015-01-28 10:07:51 -080020 unsigned int postsleep_min_us;
21 unsigned int postsleep_max_us;
22 unsigned int data_timeout_ns;
23 unsigned int cmd_timeout_ms;
Tao Baod7db5942015-01-28 10:07:51 -080024 __u32 __pad;
25 __u64 data_ptr;
Ben Cheng655a7c02013-10-16 16:09:24 -070026};
Tao Baod7db5942015-01-28 10:07:51 -080027#define mmc_ioc_cmd_set_data(ic,ptr) ic.data_ptr = (__u64) (unsigned long) ptr
Christopher Ferris05d08e92016-02-04 13:16:38 -080028struct mmc_ioc_multi_cmd {
29 __u64 num_of_cmds;
Christopher Ferris7447a1c2022-10-04 18:24:44 -070030 struct mmc_ioc_cmd cmds[];
Christopher Ferris05d08e92016-02-04 13:16:38 -080031};
Ben Cheng655a7c02013-10-16 16:09:24 -070032#define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd)
Christopher Ferris05d08e92016-02-04 13:16:38 -080033#define MMC_IOC_MULTI_CMD _IOWR(MMC_BLOCK_MAJOR, 1, struct mmc_ioc_multi_cmd)
Christopher Ferris48af7cb2017-02-21 12:35:09 -080034#define MMC_IOC_MAX_BYTES (512L * 1024)
Christopher Ferris05d08e92016-02-04 13:16:38 -080035#define MMC_IOC_MAX_CMDS 255
Nick Kralevicha67e4de2013-01-14 11:28:26 -080036#endif