Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
io.h
Go to the documentation of this file.
1 
39 #ifndef __DRIVERS_USB_DWC3_IO_H
40 #define __DRIVERS_USB_DWC3_IO_H
41 
42 #include <linux/io.h>
43 
44 #include "core.h"
45 
46 static inline u32 dwc3_readl(void __iomem *base, u32 offset)
47 {
48  /*
49  * We requested the mem region starting from the Globals address
50  * space, see dwc3_probe in core.c.
51  * However, the offsets are given starting from xHCI address space.
52  */
53  return readl(base + (offset - DWC3_GLOBALS_REGS_START));
54 }
55 
56 static inline void dwc3_writel(void __iomem *base, u32 offset, u32 value)
57 {
58  /*
59  * We requested the mem region starting from the Globals address
60  * space, see dwc3_probe in core.c.
61  * However, the offsets are given starting from xHCI address space.
62  */
63  writel(value, base + (offset - DWC3_GLOBALS_REGS_START));
64 }
65 
66 #endif /* __DRIVERS_USB_DWC3_IO_H */