diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
commit | af52739b922f656eb1f39016fabaabe4baeda2e2 (patch) | |
tree | 79a7aa810d0493cd0cf4adebac26d37f12e8b545 /drivers/usb/dwc2/core.h | |
parent | 25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff) | |
parent | 33688abb2802ff3a230bd2441f765477b94cc89e (diff) |
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in
drivers/iio/industrialio-trigger.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2/core.h')
-rw-r--r-- | drivers/usb/dwc2/core.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/core.h index 3c58d633ce80..dec0b21fc626 100644 --- a/drivers/usb/dwc2/core.h +++ b/drivers/usb/dwc2/core.h | |||
@@ -64,6 +64,17 @@ | |||
64 | DWC2_TRACE_SCHEDULER_VB(pr_fmt("%s: SCH: " fmt), \ | 64 | DWC2_TRACE_SCHEDULER_VB(pr_fmt("%s: SCH: " fmt), \ |
65 | dev_name(hsotg->dev), ##__VA_ARGS__) | 65 | dev_name(hsotg->dev), ##__VA_ARGS__) |
66 | 66 | ||
67 | #ifdef CONFIG_MIPS | ||
68 | /* | ||
69 | * There are some MIPS machines that can run in either big-endian | ||
70 | * or little-endian mode and that use the dwc2 register without | ||
71 | * a byteswap in both ways. | ||
72 | * Unlike other architectures, MIPS apparently does not require a | ||
73 | * barrier before the __raw_writel() to synchronize with DMA but does | ||
74 | * require the barrier after the __raw_writel() to serialize a set of | ||
75 | * writes. This set of operations was added specifically for MIPS and | ||
76 | * should only be used there. | ||
77 | */ | ||
67 | static inline u32 dwc2_readl(const void __iomem *addr) | 78 | static inline u32 dwc2_readl(const void __iomem *addr) |
68 | { | 79 | { |
69 | u32 value = __raw_readl(addr); | 80 | u32 value = __raw_readl(addr); |
@@ -90,6 +101,22 @@ static inline void dwc2_writel(u32 value, void __iomem *addr) | |||
90 | pr_info("INFO:: wrote %08x to %p\n", value, addr); | 101 | pr_info("INFO:: wrote %08x to %p\n", value, addr); |
91 | #endif | 102 | #endif |
92 | } | 103 | } |
104 | #else | ||
105 | /* Normal architectures just use readl/write */ | ||
106 | static inline u32 dwc2_readl(const void __iomem *addr) | ||
107 | { | ||
108 | return readl(addr); | ||
109 | } | ||
110 | |||
111 | static inline void dwc2_writel(u32 value, void __iomem *addr) | ||
112 | { | ||
113 | writel(value, addr); | ||
114 | |||
115 | #ifdef DWC2_LOG_WRITES | ||
116 | pr_info("info:: wrote %08x to %p\n", value, addr); | ||
117 | #endif | ||
118 | } | ||
119 | #endif | ||
93 | 120 | ||
94 | /* Maximum number of Endpoints/HostChannels */ | 121 | /* Maximum number of Endpoints/HostChannels */ |
95 | #define MAX_EPS_CHANNELS 16 | 122 | #define MAX_EPS_CHANNELS 16 |