include: mmc: Export sanitized mmc headers
Export sanitized mmc.h and core.h for userspace.
Change-Id: I3a6eadde2023d974b0ce260a77082b01d8ba0b5d
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
diff --git a/include/linux/mmc/Kbuild b/include/linux/mmc/Kbuild
index 1fb2644..d71c0a6 100644
--- a/include/linux/mmc/Kbuild
+++ b/include/linux/mmc/Kbuild
@@ -1 +1,3 @@
+header-y += core.h
header-y += ioctl.h
+header-y += mmc.h
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index ea48688..5f1e2d9 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -8,6 +8,7 @@
#ifndef LINUX_MMC_CORE_H
#define LINUX_MMC_CORE_H
+#ifdef __KERNEL__
#include <linux/interrupt.h>
#include <linux/completion.h>
@@ -23,6 +24,7 @@
#define MMC_CMD23_ARG_TAG_REQ (1 << 29)
u32 resp[4];
unsigned int flags; /* expected response type */
+#endif /* __KERNEL__ */
#define MMC_RSP_PRESENT (1 << 0)
#define MMC_RSP_136 (1 << 1) /* 136 bit response */
#define MMC_RSP_CRC (1 << 2) /* expect valid crc */
@@ -55,6 +57,7 @@
#define MMC_RSP_R6 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
#define MMC_RSP_R7 (MMC_RSP_PRESENT|MMC_RSP_CRC|MMC_RSP_OPCODE)
+#ifdef __KERNEL__
#define mmc_resp_type(cmd) ((cmd)->flags & (MMC_RSP_PRESENT|MMC_RSP_136|MMC_RSP_CRC|MMC_RSP_BUSY|MMC_RSP_OPCODE))
/*
@@ -217,4 +220,5 @@
extern u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max);
+#endif /* __KERNEL__ */
#endif /* LINUX_MMC_CORE_H */
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h
index 46479a7..a8eda93 100644
--- a/include/linux/mmc/mmc.h
+++ b/include/linux/mmc/mmc.h
@@ -84,6 +84,7 @@
#define MMC_APP_CMD 55 /* ac [31:16] RCA R1 */
#define MMC_GEN_CMD 56 /* adtc [0] RD/WR R1 */
+#ifdef __KERNEL__
static inline bool mmc_op_multi(u32 opcode)
{
return opcode == MMC_WRITE_MULTIPLE_BLOCK ||
@@ -429,4 +430,5 @@
#define MMC_SWITCH_MODE_CLEAR_BITS 0x02 /* Clear bits which are 1 in value */
#define MMC_SWITCH_MODE_WRITE_BYTE 0x03 /* Set target to value */
+#endif /* __KERNEL__ */
#endif /* LINUX_MMC_MMC_H */