summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/bitops.h4
-rw-r--r--include/linux/compat.h1
-rw-r--r--include/linux/dma-mapping.h1
-rw-r--r--include/linux/iopoll.h16
-rw-r--r--include/linux/mtd/rawnand.h1
-rw-r--r--include/linux/mtd/spi-nor.h1
-rw-r--r--include/linux/mtd/spinand.h1
-rw-r--r--include/linux/soc/ti/cppi5.h1
-rw-r--r--include/linux/soc/ti/k3-navss-ringacc.h1
-rw-r--r--include/linux/soc/ti/ti_sci_protocol.h1
-rw-r--r--include/linux/usb/phy.h18
11 files changed, 44 insertions, 2 deletions
diff --git a/include/linux/bitops.h b/include/linux/bitops.h
index a07c70fd485..6b509dce58a 100644
--- a/include/linux/bitops.h
+++ b/include/linux/bitops.h
@@ -1,6 +1,8 @@
#ifndef _LINUX_BITOPS_H
#define _LINUX_BITOPS_H
+#ifndef USE_HOSTCC
+
#include <asm/types.h>
#include <asm-generic/bitsperlong.h>
#include <linux/compiler.h>
@@ -216,4 +218,6 @@ static inline void generic_clear_bit(int nr, volatile unsigned long *addr)
*p &= ~mask;
}
+#endif /* !USE_HOSTCC */
+
#endif
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 171188a76f0..712eeaef4ed 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -1,6 +1,7 @@
#ifndef _LINUX_COMPAT_H_
#define _LINUX_COMPAT_H_
+#include <log.h>
#include <malloc.h>
#include <linux/types.h>
#include <linux/err.h>
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 20b6d60dd88..6a107d52e07 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -2,6 +2,7 @@
#ifndef _LINUX_DMA_MAPPING_H
#define _LINUX_DMA_MAPPING_H
+#include <asm/cache.h>
#include <linux/dma-direction.h>
#include <linux/types.h>
#include <asm/dma-mapping.h>
diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h
index ab0ae1969a4..30cdea0cdc1 100644
--- a/include/linux/iopoll.h
+++ b/include/linux/iopoll.h
@@ -6,16 +6,18 @@
#ifndef _LINUX_IOPOLL_H
#define _LINUX_IOPOLL_H
+#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/io.h>
#include <time.h>
/**
- * readx_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs
+ * read_poll_timeout - Periodically poll an address until a condition is met or a timeout occurs
* @op: accessor function (takes @addr as its only argument)
* @addr: Address to poll
* @val: Variable to read the value into
* @cond: Break condition (usually involving @val)
+ * @sleep_us: Maximum time to sleep in us
* @timeout_us: Timeout in us, 0 means never timeout
*
* Returns 0 on success and -ETIMEDOUT upon a timeout. In either
@@ -24,7 +26,7 @@
* When available, you'll probably want to use one of the specialized
* macros defined below rather than this macro directly.
*/
-#define readx_poll_timeout(op, addr, val, cond, timeout_us) \
+#define read_poll_timeout(op, addr, val, cond, sleep_us, timeout_us) \
({ \
unsigned long timeout = timer_get_us() + timeout_us; \
for (;;) { \
@@ -35,10 +37,20 @@
(val) = op(addr); \
break; \
} \
+ if (sleep_us) \
+ udelay(sleep_us); \
} \
(cond) ? 0 : -ETIMEDOUT; \
})
+#define readx_poll_sleep_timeout(op, addr, val, cond, sleep_us, timeout_us) \
+ read_poll_timeout(op, addr, val, cond, sleep_us, timeout_us)
+
+#define readl_poll_sleep_timeout(addr, val, cond, sleep_us, timeout_us) \
+ readx_poll_sleep_timeout(readl, addr, val, cond, sleep_us, timeout_us)
+
+#define readx_poll_timeout(op, addr, val, cond, timeout_us) \
+ read_poll_timeout(op, addr, val, cond, false, timeout_us)
#define readb_poll_timeout(addr, val, cond, timeout_us) \
readx_poll_timeout(readb, addr, val, cond, timeout_us)
diff --git a/include/linux/mtd/rawnand.h b/include/linux/mtd/rawnand.h
index bd373b96172..66febc6b721 100644
--- a/include/linux/mtd/rawnand.h
+++ b/include/linux/mtd/rawnand.h
@@ -16,6 +16,7 @@
#include <config.h>
#include <dm/device.h>
+#include <linux/bitops.h>
#include <linux/compat.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/flashchip.h>
diff --git a/include/linux/mtd/spi-nor.h b/include/linux/mtd/spi-nor.h
index ec144a08d8f..233fdc341a7 100644
--- a/include/linux/mtd/spi-nor.h
+++ b/include/linux/mtd/spi-nor.h
@@ -22,6 +22,7 @@
#define SNOR_MFR_INTEL CFI_MFR_INTEL
#define SNOR_MFR_ST CFI_MFR_ST /* ST Micro <--> Micron */
#define SNOR_MFR_MICRON CFI_MFR_MICRON /* ST Micro <--> Micron */
+#define SNOR_MFR_ISSI CFI_MFR_PMC
#define SNOR_MFR_MACRONIX CFI_MFR_MACRONIX
#define SNOR_MFR_SPANSION CFI_MFR_AMD
#define SNOR_MFR_SST CFI_MFR_SST
diff --git a/include/linux/mtd/spinand.h b/include/linux/mtd/spinand.h
index be01e1e82e5..83eafb184e6 100644
--- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h
@@ -204,6 +204,7 @@ struct spinand_manufacturer {
extern const struct spinand_manufacturer gigadevice_spinand_manufacturer;
extern const struct spinand_manufacturer macronix_spinand_manufacturer;
extern const struct spinand_manufacturer micron_spinand_manufacturer;
+extern const struct spinand_manufacturer toshiba_spinand_manufacturer;
extern const struct spinand_manufacturer winbond_spinand_manufacturer;
/**
diff --git a/include/linux/soc/ti/cppi5.h b/include/linux/soc/ti/cppi5.h
index 34038b31f70..cfdf7ea29fc 100644
--- a/include/linux/soc/ti/cppi5.h
+++ b/include/linux/soc/ti/cppi5.h
@@ -10,6 +10,7 @@
#include <hexdump.h>
#include <linux/bitops.h>
+#include <linux/bug.h>
/**
* Descriptor header, present in all types of descriptors
diff --git a/include/linux/soc/ti/k3-navss-ringacc.h b/include/linux/soc/ti/k3-navss-ringacc.h
index 487dfe98595..7b027f8bd4b 100644
--- a/include/linux/soc/ti/k3-navss-ringacc.h
+++ b/include/linux/soc/ti/k3-navss-ringacc.h
@@ -9,6 +9,7 @@
#define __SOC_TI_K3_NAVSS_RINGACC_API_H_
#include <dm/ofnode.h>
+#include <linux/bitops.h>
/**
* enum k3_nav_ring_mode - &struct k3_nav_ring_cfg mode
diff --git a/include/linux/soc/ti/ti_sci_protocol.h b/include/linux/soc/ti/ti_sci_protocol.h
index 8c4863efe19..eb916ba1019 100644
--- a/include/linux/soc/ti/ti_sci_protocol.h
+++ b/include/linux/soc/ti/ti_sci_protocol.h
@@ -20,6 +20,7 @@
* @firmware_revision: Firmware revision (not usually used).
* @firmware_description: Firmware description (not usually used).
*/
+#include <linux/bitops.h>
struct ti_sci_version_info {
u8 abi_major;
u8 abi_minor;
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index 158ca9cd853..1e1217a9583 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -10,10 +10,28 @@
#ifndef __LINUX_USB_PHY_H
#define __LINUX_USB_PHY_H
+#include <dm/ofnode.h>
+
enum usb_phy_interface {
USBPHY_INTERFACE_MODE_UNKNOWN,
USBPHY_INTERFACE_MODE_UTMI,
USBPHY_INTERFACE_MODE_UTMIW,
};
+#if CONFIG_IS_ENABLED(DM_USB)
+/**
+ * usb_get_phy_mode - Get phy mode for given device_node
+ * @np: Pointer to the given device_node
+ *
+ * The function gets phy interface string from property 'phy_type',
+ * and returns the corresponding enum usb_phy_interface
+ */
+enum usb_phy_interface usb_get_phy_mode(ofnode node);
+#else
+static inline enum usb_phy_interface usb_get_phy_mode(ofnode node)
+{
+ return USBPHY_INTERFACE_MODE_UNKNOWN;
+}
+#endif
+
#endif /* __LINUX_USB_PHY_H */