This source file includes following definitions.
- isp1760_read32
- isp1760_write32
1
2
3
4
5
6
7
8
9
10
11
12
13 #ifndef _ISP1760_CORE_H_
14 #define _ISP1760_CORE_H_
15
16 #include <linux/ioport.h>
17
18 #include "isp1760-hcd.h"
19 #include "isp1760-udc.h"
20
21 struct device;
22 struct gpio_desc;
23
24
25
26
27
28
29 #define ISP1760_FLAG_BUS_WIDTH_16 0x00000002
30 #define ISP1760_FLAG_OTG_EN 0x00000004
31 #define ISP1760_FLAG_ANALOG_OC 0x00000008
32 #define ISP1760_FLAG_DACK_POL_HIGH 0x00000010
33 #define ISP1760_FLAG_DREQ_POL_HIGH 0x00000020
34 #define ISP1760_FLAG_ISP1761 0x00000040
35 #define ISP1760_FLAG_INTR_POL_HIGH 0x00000080
36 #define ISP1760_FLAG_INTR_EDGE_TRIG 0x00000100
37
38 struct isp1760_device {
39 struct device *dev;
40
41 void __iomem *regs;
42 unsigned int devflags;
43 struct gpio_desc *rst_gpio;
44
45 struct isp1760_hcd hcd;
46 struct isp1760_udc udc;
47 };
48
49 int isp1760_register(struct resource *mem, int irq, unsigned long irqflags,
50 struct device *dev, unsigned int devflags);
51 void isp1760_unregister(struct device *dev);
52
53 void isp1760_set_pullup(struct isp1760_device *isp, bool enable);
54
55 static inline u32 isp1760_read32(void __iomem *base, u32 reg)
56 {
57 return readl(base + reg);
58 }
59
60 static inline void isp1760_write32(void __iomem *base, u32 reg, u32 val)
61 {
62 writel(val, base + reg);
63 }
64
65 #endif