aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-24 13:03:02 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-08-03 03:04:16 -0400
commit0ca724d37af370dbf2d55dc4d6359ead558e5756 (patch)
tree994685118202d9bf54f11ec9b39a654f6fb4f21f /include
parentb5cb259e7fac5536c4ddf350af6a3d6cc950e47e (diff)
pcmcia: use struct resource for PCMCIA devices, part 2
Use struct resource * also for iomem resources. CC: linux-mtd@lists.infradead.org CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'include')
-rw-r--r--include/pcmcia/cs.h35
-rw-r--r--include/pcmcia/ds.h15
2 files changed, 27 insertions, 23 deletions
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
index e4faf4420f2a..68d8bde7e8d6 100644
--- a/include/pcmcia/cs.h
+++ b/include/pcmcia/cs.h
@@ -77,26 +77,19 @@ typedef struct win_req_t {
77} win_req_t; 77} win_req_t;
78 78
79/* Attributes for RequestWindow */ 79/* Attributes for RequestWindow */
80#define WIN_ADDR_SPACE 0x0001 80#define WIN_MEMORY_TYPE_CM 0x00 /* default */
81#define WIN_ADDR_SPACE_MEM 0x0000 81#define WIN_MEMORY_TYPE_AM 0x20 /* MAP_ATTRIB */
82#define WIN_ADDR_SPACE_IO 0x0001 82#define WIN_DATA_WIDTH_8 0x00 /* default */
83#define WIN_MEMORY_TYPE 0x0002 83#define WIN_DATA_WIDTH_16 0x02 /* MAP_16BIT */
84#define WIN_MEMORY_TYPE_CM 0x0000 84#define WIN_ENABLE 0x01 /* MAP_ACTIVE */
85#define WIN_MEMORY_TYPE_AM 0x0002 85#define WIN_USE_WAIT 0x40 /* MAP_USE_WAIT */
86#define WIN_ENABLE 0x0004 86
87#define WIN_DATA_WIDTH 0x0018 87#define WIN_FLAGS_MAP 0x63 /* MAP_ATTRIB | MAP_16BIT | MAP_ACTIVE |
88#define WIN_DATA_WIDTH_8 0x0000 88 MAP_USE_WAIT */
89#define WIN_DATA_WIDTH_16 0x0008 89#define WIN_FLAGS_REQ 0x1c /* mapping to socket->win[i]:
90#define WIN_DATA_WIDTH_32 0x0010 90 0x04 -> 0
91#define WIN_PAGED 0x0020 91 0x08 -> 1
92#define WIN_SHARED 0x0040 92 0x0c -> 2
93#define WIN_FIRST_SHARED 0x0080 93 0x10 -> 3 */
94#define WIN_USE_WAIT 0x0100
95#define WIN_STRICT_ALIGN 0x0200
96#define WIN_MAP_BELOW_1MB 0x0400
97#define WIN_PREFETCH 0x0800
98#define WIN_CACHEABLE 0x1000
99#define WIN_BAR_MASK 0xe000
100#define WIN_BAR_SHIFT 13
101 94
102#endif /* _LINUX_CS_H */ 95#endif /* _LINUX_CS_H */
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index a2bf3a702c08..70c58ed2278c 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -36,7 +36,7 @@ struct pcmcia_device;
36struct config_t; 36struct config_t;
37struct net_device; 37struct net_device;
38 38
39typedef unsigned long window_handle_t; 39typedef struct resource *window_handle_t;
40 40
41/* dynamic device IDs for PCMCIA device drivers. See 41/* dynamic device IDs for PCMCIA device drivers. See
42 * Documentation/pcmcia/driver.txt for details. 42 * Documentation/pcmcia/driver.txt for details.
@@ -63,6 +63,17 @@ struct pcmcia_driver {
63int pcmcia_register_driver(struct pcmcia_driver *driver); 63int pcmcia_register_driver(struct pcmcia_driver *driver);
64void pcmcia_unregister_driver(struct pcmcia_driver *driver); 64void pcmcia_unregister_driver(struct pcmcia_driver *driver);
65 65
66/* for struct resource * array embedded in struct pcmcia_device */
67enum {
68 PCMCIA_IOPORT_0,
69 PCMCIA_IOPORT_1,
70 PCMCIA_IOMEM_0,
71 PCMCIA_IOMEM_1,
72 PCMCIA_IOMEM_2,
73 PCMCIA_IOMEM_3,
74 PCMCIA_NUM_RESOURCES,
75};
76
66struct pcmcia_device { 77struct pcmcia_device {
67 /* the socket and the device_no [for multifunction devices] 78 /* the socket and the device_no [for multifunction devices]
68 uniquely define a pcmcia_device */ 79 uniquely define a pcmcia_device */
@@ -85,7 +96,7 @@ struct pcmcia_device {
85 96
86 /* device setup */ 97 /* device setup */
87 unsigned int irq; 98 unsigned int irq;
88 struct resource *resource[MAX_IO_WIN]; 99 struct resource *resource[PCMCIA_NUM_RESOURCES];
89 100
90 unsigned int io_lines; /* number of I/O lines */ 101 unsigned int io_lines; /* number of I/O lines */
91 102