diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/net/wireless/rt2x00/rt2x00pci.h | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00pci.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.h | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h index 15a12487e04b..8149ff68410a 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.h +++ b/drivers/net/wireless/rt2x00/rt2x00pci.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | Copyright (C) 2004 - 2009 rt2x00 SourceForge Project | 2 | Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com> |
3 | <http://rt2x00.serialmonkey.com> | 3 | <http://rt2x00.serialmonkey.com> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
@@ -27,6 +27,7 @@ | |||
27 | #define RT2X00PCI_H | 27 | #define RT2X00PCI_H |
28 | 28 | ||
29 | #include <linux/io.h> | 29 | #include <linux/io.h> |
30 | #include <linux/pci.h> | ||
30 | 31 | ||
31 | /* | 32 | /* |
32 | * This variable should be used with the | 33 | * This variable should be used with the |
@@ -35,15 +36,6 @@ | |||
35 | #define PCI_DEVICE_DATA(__ops) .driver_data = (kernel_ulong_t)(__ops) | 36 | #define PCI_DEVICE_DATA(__ops) .driver_data = (kernel_ulong_t)(__ops) |
36 | 37 | ||
37 | /* | 38 | /* |
38 | * Register defines. | ||
39 | * Some registers require multiple attempts before success, | ||
40 | * in those cases REGISTER_BUSY_COUNT attempts should be | ||
41 | * taken with a REGISTER_BUSY_DELAY interval. | ||
42 | */ | ||
43 | #define REGISTER_BUSY_COUNT 5 | ||
44 | #define REGISTER_BUSY_DELAY 100 | ||
45 | |||
46 | /* | ||
47 | * Register access. | 39 | * Register access. |
48 | */ | 40 | */ |
49 | static inline void rt2x00pci_register_read(struct rt2x00_dev *rt2x00dev, | 41 | static inline void rt2x00pci_register_read(struct rt2x00_dev *rt2x00dev, |
@@ -53,10 +45,9 @@ static inline void rt2x00pci_register_read(struct rt2x00_dev *rt2x00dev, | |||
53 | *value = readl(rt2x00dev->csr.base + offset); | 45 | *value = readl(rt2x00dev->csr.base + offset); |
54 | } | 46 | } |
55 | 47 | ||
56 | static inline void | 48 | static inline void rt2x00pci_register_multiread(struct rt2x00_dev *rt2x00dev, |
57 | rt2x00pci_register_multiread(struct rt2x00_dev *rt2x00dev, | 49 | const unsigned int offset, |
58 | const unsigned int offset, | 50 | void *value, const u32 length) |
59 | void *value, const u16 length) | ||
60 | { | 51 | { |
61 | memcpy_fromio(value, rt2x00dev->csr.base + offset, length); | 52 | memcpy_fromio(value, rt2x00dev->csr.base + offset, length); |
62 | } | 53 | } |
@@ -68,10 +59,10 @@ static inline void rt2x00pci_register_write(struct rt2x00_dev *rt2x00dev, | |||
68 | writel(value, rt2x00dev->csr.base + offset); | 59 | writel(value, rt2x00dev->csr.base + offset); |
69 | } | 60 | } |
70 | 61 | ||
71 | static inline void | 62 | static inline void rt2x00pci_register_multiwrite(struct rt2x00_dev *rt2x00dev, |
72 | rt2x00pci_register_multiwrite(struct rt2x00_dev *rt2x00dev, | 63 | const unsigned int offset, |
73 | const unsigned int offset, | 64 | const void *value, |
74 | const void *value, const u16 length) | 65 | const u32 length) |
75 | { | 66 | { |
76 | memcpy_toio(rt2x00dev->csr.base + offset, value, length); | 67 | memcpy_toio(rt2x00dev->csr.base + offset, value, length); |
77 | } | 68 | } |