diff options
173 files changed, 2177 insertions, 1123 deletions
diff --git a/Documentation/PCI/PCI-DMA-mapping.txt b/Documentation/DMA-API-HOWTO.txt index 52618ab069ad..52618ab069ad 100644 --- a/Documentation/PCI/PCI-DMA-mapping.txt +++ b/Documentation/DMA-API-HOWTO.txt | |||
diff --git a/Documentation/cgroups/memory.txt b/Documentation/cgroups/memory.txt index f8bc802d70b9..3a6aecd078ba 100644 --- a/Documentation/cgroups/memory.txt +++ b/Documentation/cgroups/memory.txt | |||
@@ -340,7 +340,7 @@ Note: | |||
340 | 5.3 swappiness | 340 | 5.3 swappiness |
341 | Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. | 341 | Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. |
342 | 342 | ||
343 | Following cgroups' swapiness can't be changed. | 343 | Following cgroups' swappiness can't be changed. |
344 | - root cgroup (uses /proc/sys/vm/swappiness). | 344 | - root cgroup (uses /proc/sys/vm/swappiness). |
345 | - a cgroup which uses hierarchy and it has child cgroup. | 345 | - a cgroup which uses hierarchy and it has child cgroup. |
346 | - a cgroup which uses hierarchy and not the root of hierarchy. | 346 | - a cgroup which uses hierarchy and not the root of hierarchy. |
diff --git a/Documentation/circular-buffers.txt b/Documentation/circular-buffers.txt new file mode 100644 index 000000000000..8117e5bf6065 --- /dev/null +++ b/Documentation/circular-buffers.txt | |||
@@ -0,0 +1,234 @@ | |||
1 | ================ | ||
2 | CIRCULAR BUFFERS | ||
3 | ================ | ||
4 | |||
5 | By: David Howells <dhowells@redhat.com> | ||
6 | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
7 | |||
8 | |||
9 | Linux provides a number of features that can be used to implement circular | ||
10 | buffering. There are two sets of such features: | ||
11 | |||
12 | (1) Convenience functions for determining information about power-of-2 sized | ||
13 | buffers. | ||
14 | |||
15 | (2) Memory barriers for when the producer and the consumer of objects in the | ||
16 | buffer don't want to share a lock. | ||
17 | |||
18 | To use these facilities, as discussed below, there needs to be just one | ||
19 | producer and just one consumer. It is possible to handle multiple producers by | ||
20 | serialising them, and to handle multiple consumers by serialising them. | ||
21 | |||
22 | |||
23 | Contents: | ||
24 | |||
25 | (*) What is a circular buffer? | ||
26 | |||
27 | (*) Measuring power-of-2 buffers. | ||
28 | |||
29 | (*) Using memory barriers with circular buffers. | ||
30 | - The producer. | ||
31 | - The consumer. | ||
32 | |||
33 | |||
34 | ========================== | ||
35 | WHAT IS A CIRCULAR BUFFER? | ||
36 | ========================== | ||
37 | |||
38 | First of all, what is a circular buffer? A circular buffer is a buffer of | ||
39 | fixed, finite size into which there are two indices: | ||
40 | |||
41 | (1) A 'head' index - the point at which the producer inserts items into the | ||
42 | buffer. | ||
43 | |||
44 | (2) A 'tail' index - the point at which the consumer finds the next item in | ||
45 | the buffer. | ||
46 | |||
47 | Typically when the tail pointer is equal to the head pointer, the buffer is | ||
48 | empty; and the buffer is full when the head pointer is one less than the tail | ||
49 | pointer. | ||
50 | |||
51 | The head index is incremented when items are added, and the tail index when | ||
52 | items are removed. The tail index should never jump the head index, and both | ||
53 | indices should be wrapped to 0 when they reach the end of the buffer, thus | ||
54 | allowing an infinite amount of data to flow through the buffer. | ||
55 | |||
56 | Typically, items will all be of the same unit size, but this isn't strictly | ||
57 | required to use the techniques below. The indices can be increased by more | ||
58 | than 1 if multiple items or variable-sized items are to be included in the | ||
59 | buffer, provided that neither index overtakes the other. The implementer must | ||
60 | be careful, however, as a region more than one unit in size may wrap the end of | ||
61 | the buffer and be broken into two segments. | ||
62 | |||
63 | |||
64 | ============================ | ||
65 | MEASURING POWER-OF-2 BUFFERS | ||
66 | ============================ | ||
67 | |||
68 | Calculation of the occupancy or the remaining capacity of an arbitrarily sized | ||
69 | circular buffer would normally be a slow operation, requiring the use of a | ||
70 | modulus (divide) instruction. However, if the buffer is of a power-of-2 size, | ||
71 | then a much quicker bitwise-AND instruction can be used instead. | ||
72 | |||
73 | Linux provides a set of macros for handling power-of-2 circular buffers. These | ||
74 | can be made use of by: | ||
75 | |||
76 | #include <linux/circ_buf.h> | ||
77 | |||
78 | The macros are: | ||
79 | |||
80 | (*) Measure the remaining capacity of a buffer: | ||
81 | |||
82 | CIRC_SPACE(head_index, tail_index, buffer_size); | ||
83 | |||
84 | This returns the amount of space left in the buffer[1] into which items | ||
85 | can be inserted. | ||
86 | |||
87 | |||
88 | (*) Measure the maximum consecutive immediate space in a buffer: | ||
89 | |||
90 | CIRC_SPACE_TO_END(head_index, tail_index, buffer_size); | ||
91 | |||
92 | This returns the amount of consecutive space left in the buffer[1] into | ||
93 | which items can be immediately inserted without having to wrap back to the | ||
94 | beginning of the buffer. | ||
95 | |||
96 | |||
97 | (*) Measure the occupancy of a buffer: | ||
98 | |||
99 | CIRC_CNT(head_index, tail_index, buffer_size); | ||
100 | |||
101 | This returns the number of items currently occupying a buffer[2]. | ||
102 | |||
103 | |||
104 | (*) Measure the non-wrapping occupancy of a buffer: | ||
105 | |||
106 | CIRC_CNT_TO_END(head_index, tail_index, buffer_size); | ||
107 | |||
108 | This returns the number of consecutive items[2] that can be extracted from | ||
109 | the buffer without having to wrap back to the beginning of the buffer. | ||
110 | |||
111 | |||
112 | Each of these macros will nominally return a value between 0 and buffer_size-1, | ||
113 | however: | ||
114 | |||
115 | [1] CIRC_SPACE*() are intended to be used in the producer. To the producer | ||
116 | they will return a lower bound as the producer controls the head index, | ||
117 | but the consumer may still be depleting the buffer on another CPU and | ||
118 | moving the tail index. | ||
119 | |||
120 | To the consumer it will show an upper bound as the producer may be busy | ||
121 | depleting the space. | ||
122 | |||
123 | [2] CIRC_CNT*() are intended to be used in the consumer. To the consumer they | ||
124 | will return a lower bound as the consumer controls the tail index, but the | ||
125 | producer may still be filling the buffer on another CPU and moving the | ||
126 | head index. | ||
127 | |||
128 | To the producer it will show an upper bound as the consumer may be busy | ||
129 | emptying the buffer. | ||
130 | |||
131 | [3] To a third party, the order in which the writes to the indices by the | ||
132 | producer and consumer become visible cannot be guaranteed as they are | ||
133 | independent and may be made on different CPUs - so the result in such a | ||
134 | situation will merely be a guess, and may even be negative. | ||
135 | |||
136 | |||
137 | =========================================== | ||
138 | USING MEMORY BARRIERS WITH CIRCULAR BUFFERS | ||
139 | =========================================== | ||
140 | |||
141 | By using memory barriers in conjunction with circular buffers, you can avoid | ||
142 | the need to: | ||
143 | |||
144 | (1) use a single lock to govern access to both ends of the buffer, thus | ||
145 | allowing the buffer to be filled and emptied at the same time; and | ||
146 | |||
147 | (2) use atomic counter operations. | ||
148 | |||
149 | There are two sides to this: the producer that fills the buffer, and the | ||
150 | consumer that empties it. Only one thing should be filling a buffer at any one | ||
151 | time, and only one thing should be emptying a buffer at any one time, but the | ||
152 | two sides can operate simultaneously. | ||
153 | |||
154 | |||
155 | THE PRODUCER | ||
156 | ------------ | ||
157 | |||
158 | The producer will look something like this: | ||
159 | |||
160 | spin_lock(&producer_lock); | ||
161 | |||
162 | unsigned long head = buffer->head; | ||
163 | unsigned long tail = ACCESS_ONCE(buffer->tail); | ||
164 | |||
165 | if (CIRC_SPACE(head, tail, buffer->size) >= 1) { | ||
166 | /* insert one item into the buffer */ | ||
167 | struct item *item = buffer[head]; | ||
168 | |||
169 | produce_item(item); | ||
170 | |||
171 | smp_wmb(); /* commit the item before incrementing the head */ | ||
172 | |||
173 | buffer->head = (head + 1) & (buffer->size - 1); | ||
174 | |||
175 | /* wake_up() will make sure that the head is committed before | ||
176 | * waking anyone up */ | ||
177 | wake_up(consumer); | ||
178 | } | ||
179 | |||
180 | spin_unlock(&producer_lock); | ||
181 | |||
182 | This will instruct the CPU that the contents of the new item must be written | ||
183 | before the head index makes it available to the consumer and then instructs the | ||
184 | CPU that the revised head index must be written before the consumer is woken. | ||
185 | |||
186 | Note that wake_up() doesn't have to be the exact mechanism used, but whatever | ||
187 | is used must guarantee a (write) memory barrier between the update of the head | ||
188 | index and the change of state of the consumer, if a change of state occurs. | ||
189 | |||
190 | |||
191 | THE CONSUMER | ||
192 | ------------ | ||
193 | |||
194 | The consumer will look something like this: | ||
195 | |||
196 | spin_lock(&consumer_lock); | ||
197 | |||
198 | unsigned long head = ACCESS_ONCE(buffer->head); | ||
199 | unsigned long tail = buffer->tail; | ||
200 | |||
201 | if (CIRC_CNT(head, tail, buffer->size) >= 1) { | ||
202 | /* read index before reading contents at that index */ | ||
203 | smp_read_barrier_depends(); | ||
204 | |||
205 | /* extract one item from the buffer */ | ||
206 | struct item *item = buffer[tail]; | ||
207 | |||
208 | consume_item(item); | ||
209 | |||
210 | smp_mb(); /* finish reading descriptor before incrementing tail */ | ||
211 | |||
212 | buffer->tail = (tail + 1) & (buffer->size - 1); | ||
213 | } | ||
214 | |||
215 | spin_unlock(&consumer_lock); | ||
216 | |||
217 | This will instruct the CPU to make sure the index is up to date before reading | ||
218 | the new item, and then it shall make sure the CPU has finished reading the item | ||
219 | before it writes the new tail pointer, which will erase the item. | ||
220 | |||
221 | |||
222 | Note the use of ACCESS_ONCE() in both algorithms to read the opposition index. | ||
223 | This prevents the compiler from discarding and reloading its cached value - | ||
224 | which some compilers will do across smp_read_barrier_depends(). This isn't | ||
225 | strictly needed if you can be sure that the opposition index will _only_ be | ||
226 | used the once. | ||
227 | |||
228 | |||
229 | =============== | ||
230 | FURTHER READING | ||
231 | =============== | ||
232 | |||
233 | See also Documentation/memory-barriers.txt for a description of Linux's memory | ||
234 | barrier facilities. | ||
diff --git a/Documentation/filesystems/tmpfs.txt b/Documentation/filesystems/tmpfs.txt index 3015da0c6b2a..fe09a2cb1858 100644 --- a/Documentation/filesystems/tmpfs.txt +++ b/Documentation/filesystems/tmpfs.txt | |||
@@ -82,11 +82,13 @@ tmpfs has a mount option to set the NUMA memory allocation policy for | |||
82 | all files in that instance (if CONFIG_NUMA is enabled) - which can be | 82 | all files in that instance (if CONFIG_NUMA is enabled) - which can be |
83 | adjusted on the fly via 'mount -o remount ...' | 83 | adjusted on the fly via 'mount -o remount ...' |
84 | 84 | ||
85 | mpol=default prefers to allocate memory from the local node | 85 | mpol=default use the process allocation policy |
86 | (see set_mempolicy(2)) | ||
86 | mpol=prefer:Node prefers to allocate memory from the given Node | 87 | mpol=prefer:Node prefers to allocate memory from the given Node |
87 | mpol=bind:NodeList allocates memory only from nodes in NodeList | 88 | mpol=bind:NodeList allocates memory only from nodes in NodeList |
88 | mpol=interleave prefers to allocate from each node in turn | 89 | mpol=interleave prefers to allocate from each node in turn |
89 | mpol=interleave:NodeList allocates from each node of NodeList in turn | 90 | mpol=interleave:NodeList allocates from each node of NodeList in turn |
91 | mpol=local prefers to allocate memory from the local node | ||
90 | 92 | ||
91 | NodeList format is a comma-separated list of decimal numbers and ranges, | 93 | NodeList format is a comma-separated list of decimal numbers and ranges, |
92 | a range being two hyphen-separated decimal numbers, the smallest and | 94 | a range being two hyphen-separated decimal numbers, the smallest and |
@@ -134,3 +136,5 @@ Author: | |||
134 | Christoph Rohland <cr@sap.com>, 1.12.01 | 136 | Christoph Rohland <cr@sap.com>, 1.12.01 |
135 | Updated: | 137 | Updated: |
136 | Hugh Dickins, 4 June 2007 | 138 | Hugh Dickins, 4 June 2007 |
139 | Updated: | ||
140 | KOSAKI Motohiro, 16 Mar 2010 | ||
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt index 7f5809eddee6..631ad2f1b229 100644 --- a/Documentation/memory-barriers.txt +++ b/Documentation/memory-barriers.txt | |||
@@ -3,6 +3,7 @@ | |||
3 | ============================ | 3 | ============================ |
4 | 4 | ||
5 | By: David Howells <dhowells@redhat.com> | 5 | By: David Howells <dhowells@redhat.com> |
6 | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
6 | 7 | ||
7 | Contents: | 8 | Contents: |
8 | 9 | ||
@@ -60,6 +61,10 @@ Contents: | |||
60 | 61 | ||
61 | - And then there's the Alpha. | 62 | - And then there's the Alpha. |
62 | 63 | ||
64 | (*) Example uses. | ||
65 | |||
66 | - Circular buffers. | ||
67 | |||
63 | (*) References. | 68 | (*) References. |
64 | 69 | ||
65 | 70 | ||
@@ -2226,6 +2231,21 @@ The Alpha defines the Linux kernel's memory barrier model. | |||
2226 | See the subsection on "Cache Coherency" above. | 2231 | See the subsection on "Cache Coherency" above. |
2227 | 2232 | ||
2228 | 2233 | ||
2234 | ============ | ||
2235 | EXAMPLE USES | ||
2236 | ============ | ||
2237 | |||
2238 | CIRCULAR BUFFERS | ||
2239 | ---------------- | ||
2240 | |||
2241 | Memory barriers can be used to implement circular buffering without the need | ||
2242 | of a lock to serialise the producer with the consumer. See: | ||
2243 | |||
2244 | Documentation/circular-buffers.txt | ||
2245 | |||
2246 | for details. | ||
2247 | |||
2248 | |||
2229 | ========== | 2249 | ========== |
2230 | REFERENCES | 2250 | REFERENCES |
2231 | ========== | 2251 | ========== |
diff --git a/Documentation/volatile-considered-harmful.txt b/Documentation/volatile-considered-harmful.txt index 991c26a6ef64..db0cb228d64a 100644 --- a/Documentation/volatile-considered-harmful.txt +++ b/Documentation/volatile-considered-harmful.txt | |||
@@ -63,9 +63,9 @@ way to perform a busy wait is: | |||
63 | cpu_relax(); | 63 | cpu_relax(); |
64 | 64 | ||
65 | The cpu_relax() call can lower CPU power consumption or yield to a | 65 | The cpu_relax() call can lower CPU power consumption or yield to a |
66 | hyperthreaded twin processor; it also happens to serve as a memory barrier, | 66 | hyperthreaded twin processor; it also happens to serve as a compiler |
67 | so, once again, volatile is unnecessary. Of course, busy-waiting is | 67 | barrier, so, once again, volatile is unnecessary. Of course, busy- |
68 | generally an anti-social act to begin with. | 68 | waiting is generally an anti-social act to begin with. |
69 | 69 | ||
70 | There are still a few rare situations where volatile makes sense in the | 70 | There are still a few rare situations where volatile makes sense in the |
71 | kernel: | 71 | kernel: |
diff --git a/MAINTAINERS b/MAINTAINERS index 449d44402083..fbc3d653d52b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -797,12 +797,12 @@ M: Michael Petchkovsky <mkpetch@internode.on.net> | |||
797 | S: Maintained | 797 | S: Maintained |
798 | 798 | ||
799 | ARM/NOMADIK ARCHITECTURE | 799 | ARM/NOMADIK ARCHITECTURE |
800 | M: Alessandro Rubini <rubini@unipv.it> | 800 | M: Alessandro Rubini <rubini@unipv.it> |
801 | M: STEricsson <STEricsson_nomadik_linux@list.st.com> | 801 | M: STEricsson <STEricsson_nomadik_linux@list.st.com> |
802 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 802 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
803 | S: Maintained | 803 | S: Maintained |
804 | F: arch/arm/mach-nomadik/ | 804 | F: arch/arm/mach-nomadik/ |
805 | F: arch/arm/plat-nomadik/ | 805 | F: arch/arm/plat-nomadik/ |
806 | 806 | ||
807 | ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT | 807 | ARM/OPENMOKO NEO FREERUNNER (GTA02) MACHINE SUPPORT |
808 | M: Nelson Castillo <arhuaco@freaks-unidos.net> | 808 | M: Nelson Castillo <arhuaco@freaks-unidos.net> |
@@ -1926,17 +1926,17 @@ F: drivers/scsi/dpt* | |||
1926 | F: drivers/scsi/dpt/ | 1926 | F: drivers/scsi/dpt/ |
1927 | 1927 | ||
1928 | DRBD DRIVER | 1928 | DRBD DRIVER |
1929 | P: Philipp Reisner | 1929 | P: Philipp Reisner |
1930 | P: Lars Ellenberg | 1930 | P: Lars Ellenberg |
1931 | M: drbd-dev@lists.linbit.com | 1931 | M: drbd-dev@lists.linbit.com |
1932 | L: drbd-user@lists.linbit.com | 1932 | L: drbd-user@lists.linbit.com |
1933 | W: http://www.drbd.org | 1933 | W: http://www.drbd.org |
1934 | T: git git://git.drbd.org/linux-2.6-drbd.git drbd | 1934 | T: git git://git.drbd.org/linux-2.6-drbd.git drbd |
1935 | T: git git://git.drbd.org/drbd-8.3.git | 1935 | T: git git://git.drbd.org/drbd-8.3.git |
1936 | S: Supported | 1936 | S: Supported |
1937 | F: drivers/block/drbd/ | 1937 | F: drivers/block/drbd/ |
1938 | F: lib/lru_cache.c | 1938 | F: lib/lru_cache.c |
1939 | F: Documentation/blockdev/drbd/ | 1939 | F: Documentation/blockdev/drbd/ |
1940 | 1940 | ||
1941 | DRIVER CORE, KOBJECTS, AND SYSFS | 1941 | DRIVER CORE, KOBJECTS, AND SYSFS |
1942 | M: Greg Kroah-Hartman <gregkh@suse.de> | 1942 | M: Greg Kroah-Hartman <gregkh@suse.de> |
@@ -3518,8 +3518,8 @@ F: drivers/scsi/sym53c8xx_2/ | |||
3518 | LTP (Linux Test Project) | 3518 | LTP (Linux Test Project) |
3519 | M: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> | 3519 | M: Rishikesh K Rajak <risrajak@linux.vnet.ibm.com> |
3520 | M: Garrett Cooper <yanegomi@gmail.com> | 3520 | M: Garrett Cooper <yanegomi@gmail.com> |
3521 | M: Mike Frysinger <vapier@gentoo.org> | 3521 | M: Mike Frysinger <vapier@gentoo.org> |
3522 | M: Subrata Modak <subrata@linux.vnet.ibm.com> | 3522 | M: Subrata Modak <subrata@linux.vnet.ibm.com> |
3523 | L: ltp-list@lists.sourceforge.net (subscribers-only) | 3523 | L: ltp-list@lists.sourceforge.net (subscribers-only) |
3524 | W: http://ltp.sourceforge.net/ | 3524 | W: http://ltp.sourceforge.net/ |
3525 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/galak/ltp.git | 3525 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/galak/ltp.git |
@@ -6201,7 +6201,7 @@ F: arch/x86/ | |||
6201 | X86 PLATFORM DRIVERS | 6201 | X86 PLATFORM DRIVERS |
6202 | M: Matthew Garrett <mjg@redhat.com> | 6202 | M: Matthew Garrett <mjg@redhat.com> |
6203 | L: platform-driver-x86@vger.kernel.org | 6203 | L: platform-driver-x86@vger.kernel.org |
6204 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.git | 6204 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/mjg59/platform-drivers-x86.git |
6205 | S: Maintained | 6205 | S: Maintained |
6206 | F: drivers/platform/x86 | 6206 | F: drivers/platform/x86 |
6207 | 6207 | ||
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 90ae00b631c2..9dff07c80ddb 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
@@ -290,7 +290,7 @@ static int locomo_suspend(struct platform_device *dev, pm_message_t state) | |||
290 | save->LCM_GPO = locomo_readl(lchip->base + LOCOMO_GPO); /* GPIO */ | 290 | save->LCM_GPO = locomo_readl(lchip->base + LOCOMO_GPO); /* GPIO */ |
291 | locomo_writel(0x00, lchip->base + LOCOMO_GPO); | 291 | locomo_writel(0x00, lchip->base + LOCOMO_GPO); |
292 | save->LCM_SPICT = locomo_readl(lchip->base + LOCOMO_SPI + LOCOMO_SPICT); /* SPI */ | 292 | save->LCM_SPICT = locomo_readl(lchip->base + LOCOMO_SPI + LOCOMO_SPICT); /* SPI */ |
293 | locomo_writel(0x40, lchip->base + LOCOMO_SPICT); | 293 | locomo_writel(0x40, lchip->base + LOCOMO_SPI + LOCOMO_SPICT); |
294 | save->LCM_GPE = locomo_readl(lchip->base + LOCOMO_GPE); /* GPIO */ | 294 | save->LCM_GPE = locomo_readl(lchip->base + LOCOMO_GPE); /* GPIO */ |
295 | locomo_writel(0x00, lchip->base + LOCOMO_GPE); | 295 | locomo_writel(0x00, lchip->base + LOCOMO_GPE); |
296 | save->LCM_ASD = locomo_readl(lchip->base + LOCOMO_ASD); /* ADSTART */ | 296 | save->LCM_ASD = locomo_readl(lchip->base + LOCOMO_ASD); /* ADSTART */ |
@@ -418,7 +418,7 @@ __locomo_probe(struct device *me, struct resource *mem, int irq) | |||
418 | /* Longtime timer */ | 418 | /* Longtime timer */ |
419 | locomo_writel(0, lchip->base + LOCOMO_LTINT); | 419 | locomo_writel(0, lchip->base + LOCOMO_LTINT); |
420 | /* SPI */ | 420 | /* SPI */ |
421 | locomo_writel(0, lchip->base + LOCOMO_SPIIE); | 421 | locomo_writel(0, lchip->base + LOCOMO_SPI + LOCOMO_SPIIE); |
422 | 422 | ||
423 | locomo_writel(6 + 8 + 320 + 30 - 10, lchip->base + LOCOMO_ASD); | 423 | locomo_writel(6 + 8 + 320 + 30 - 10, lchip->base + LOCOMO_ASD); |
424 | r = locomo_readl(lchip->base + LOCOMO_ASD); | 424 | r = locomo_readl(lchip->base + LOCOMO_ASD); |
@@ -707,7 +707,7 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int | |||
707 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ | 707 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ |
708 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ | 708 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ |
709 | printk(KERN_WARNING "locomo: m62332_senddata Error 1\n"); | 709 | printk(KERN_WARNING "locomo: m62332_senddata Error 1\n"); |
710 | return; | 710 | goto out; |
711 | } | 711 | } |
712 | 712 | ||
713 | /* Send Sub address (LSB is channel select) */ | 713 | /* Send Sub address (LSB is channel select) */ |
@@ -735,7 +735,7 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int | |||
735 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ | 735 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ |
736 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ | 736 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ |
737 | printk(KERN_WARNING "locomo: m62332_senddata Error 2\n"); | 737 | printk(KERN_WARNING "locomo: m62332_senddata Error 2\n"); |
738 | return; | 738 | goto out; |
739 | } | 739 | } |
740 | 740 | ||
741 | /* Send DAC data */ | 741 | /* Send DAC data */ |
@@ -760,9 +760,9 @@ void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int | |||
760 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ | 760 | udelay(DAC_SCL_HIGH_HOLD_TIME); /* 4.7 usec */ |
761 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ | 761 | if (locomo_readl(mapbase + LOCOMO_DAC) & LOCOMO_DAC_SDAOEB) { /* High is error */ |
762 | printk(KERN_WARNING "locomo: m62332_senddata Error 3\n"); | 762 | printk(KERN_WARNING "locomo: m62332_senddata Error 3\n"); |
763 | return; | ||
764 | } | 763 | } |
765 | 764 | ||
765 | out: | ||
766 | /* stop */ | 766 | /* stop */ |
767 | r = locomo_readl(mapbase + LOCOMO_DAC); | 767 | r = locomo_readl(mapbase + LOCOMO_DAC); |
768 | r &= ~(LOCOMO_DAC_SCLOEB); | 768 | r &= ~(LOCOMO_DAC_SCLOEB); |
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h index 94a3a86cfeb8..6ef65d813f16 100644 --- a/arch/arm/mach-ixp23xx/include/mach/memory.h +++ b/arch/arm/mach-ixp23xx/include/mach/memory.h | |||
@@ -19,7 +19,7 @@ | |||
19 | */ | 19 | */ |
20 | #define PHYS_OFFSET (0x00000000) | 20 | #define PHYS_OFFSET (0x00000000) |
21 | 21 | ||
22 | #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)) | 22 | #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0) |
23 | 23 | ||
24 | #define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | 24 | #define __phys_to_bus(x) ((x) + (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) |
25 | #define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) | 25 | #define __bus_to_phys(x) ((x) - (IXP23XX_PCI_SDRAM_OFFSET - PHYS_OFFSET)) |
diff --git a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c index 0358f45766cb..5e6f711b1c67 100644 --- a/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c +++ b/arch/arm/mach-kirkwood/mv88f6281gtw_ge-setup.c | |||
@@ -74,9 +74,9 @@ static struct gpio_keys_button mv88f6281gtw_ge_button_pins[] = { | |||
74 | .desc = "SWR Button", | 74 | .desc = "SWR Button", |
75 | .active_low = 1, | 75 | .active_low = 1, |
76 | }, { | 76 | }, { |
77 | .code = KEY_F1, | 77 | .code = KEY_WPS_BUTTON, |
78 | .gpio = 46, | 78 | .gpio = 46, |
79 | .desc = "WPS Button(F1)", | 79 | .desc = "WPS Button", |
80 | .active_low = 1, | 80 | .active_low = 1, |
81 | }, | 81 | }, |
82 | }; | 82 | }; |
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h index a7dcc5307216..85bd8a2d84b5 100644 --- a/arch/arm/mach-mmp/include/mach/uncompress.h +++ b/arch/arm/mach-mmp/include/mach/uncompress.h | |||
@@ -14,7 +14,7 @@ | |||
14 | #define UART2_BASE (APB_PHYS_BASE + 0x17000) | 14 | #define UART2_BASE (APB_PHYS_BASE + 0x17000) |
15 | #define UART3_BASE (APB_PHYS_BASE + 0x18000) | 15 | #define UART3_BASE (APB_PHYS_BASE + 0x18000) |
16 | 16 | ||
17 | static volatile unsigned long *UART = (unsigned long *)UART2_BASE; | 17 | static volatile unsigned long *UART; |
18 | 18 | ||
19 | static inline void putc(char c) | 19 | static inline void putc(char c) |
20 | { | 20 | { |
@@ -37,6 +37,9 @@ static inline void flush(void) | |||
37 | 37 | ||
38 | static inline void arch_decomp_setup(void) | 38 | static inline void arch_decomp_setup(void) |
39 | { | 39 | { |
40 | /* default to UART2 */ | ||
41 | UART = (unsigned long *)UART2_BASE; | ||
42 | |||
40 | if (machine_is_avengers_lite()) | 43 | if (machine_is_avengers_lite()) |
41 | UART = (unsigned long *)UART3_BASE; | 44 | UART = (unsigned long *)UART3_BASE; |
42 | } | 45 | } |
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index cb0feca193d4..f9f222ebb7ed 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
@@ -77,7 +77,7 @@ static struct gpio_keys_button wrt350n_v2_buttons[] = { | |||
77 | .desc = "Reset Button", | 77 | .desc = "Reset Button", |
78 | .active_low = 1, | 78 | .active_low = 1, |
79 | }, { | 79 | }, { |
80 | .code = KEY_WLAN, | 80 | .code = KEY_WPS_BUTTON, |
81 | .gpio = 2, | 81 | .gpio = 2, |
82 | .desc = "WPS Button", | 82 | .desc = "WPS Button", |
83 | .active_low = 1, | 83 | .active_low = 1, |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 38fbd0a0e402..5b6ee46fa7f6 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -272,7 +272,6 @@ config MACH_H5000 | |||
272 | config MACH_HIMALAYA | 272 | config MACH_HIMALAYA |
273 | bool "HTC Himalaya Support" | 273 | bool "HTC Himalaya Support" |
274 | select CPU_PXA26x | 274 | select CPU_PXA26x |
275 | select FB_W100 | ||
276 | 275 | ||
277 | config MACH_MAGICIAN | 276 | config MACH_MAGICIAN |
278 | bool "Enable HTC Magician Support" | 277 | bool "Enable HTC Magician Support" |
@@ -454,6 +453,13 @@ config PXA_SHARPSL | |||
454 | config SHARPSL_PM | 453 | config SHARPSL_PM |
455 | bool | 454 | bool |
456 | select APM_EMULATION | 455 | select APM_EMULATION |
456 | select SHARPSL_PM_MAX1111 | ||
457 | |||
458 | config SHARPSL_PM_MAX1111 | ||
459 | bool | ||
460 | depends on !CORGI_SSP_DEPRECATED | ||
461 | select HWMON | ||
462 | select SENSORS_MAX1111 | ||
457 | 463 | ||
458 | config CORGI_SSP_DEPRECATED | 464 | config CORGI_SSP_DEPRECATED |
459 | bool | 465 | bool |
@@ -547,7 +553,6 @@ config MACH_E740 | |||
547 | bool "Toshiba e740" | 553 | bool "Toshiba e740" |
548 | default y | 554 | default y |
549 | depends on ARCH_PXA_ESERIES | 555 | depends on ARCH_PXA_ESERIES |
550 | select FB_W100 | ||
551 | help | 556 | help |
552 | Say Y here if you intend to run this kernel on a Toshiba | 557 | Say Y here if you intend to run this kernel on a Toshiba |
553 | e740 family PDA. | 558 | e740 family PDA. |
@@ -556,7 +561,6 @@ config MACH_E750 | |||
556 | bool "Toshiba e750" | 561 | bool "Toshiba e750" |
557 | default y | 562 | default y |
558 | depends on ARCH_PXA_ESERIES | 563 | depends on ARCH_PXA_ESERIES |
559 | select FB_W100 | ||
560 | help | 564 | help |
561 | Say Y here if you intend to run this kernel on a Toshiba | 565 | Say Y here if you intend to run this kernel on a Toshiba |
562 | e750 family PDA. | 566 | e750 family PDA. |
@@ -573,7 +577,6 @@ config MACH_E800 | |||
573 | bool "Toshiba e800" | 577 | bool "Toshiba e800" |
574 | default y | 578 | default y |
575 | depends on ARCH_PXA_ESERIES | 579 | depends on ARCH_PXA_ESERIES |
576 | select FB_W100 | ||
577 | help | 580 | help |
578 | Say Y here if you intend to run this kernel on a Toshiba | 581 | Say Y here if you intend to run this kernel on a Toshiba |
579 | e800 family PDA. | 582 | e800 family PDA. |
diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c index b2f878bd460b..5161dca8ccc0 100644 --- a/arch/arm/mach-pxa/imote2.c +++ b/arch/arm/mach-pxa/imote2.c | |||
@@ -559,10 +559,6 @@ static void __init imote2_init(void) | |||
559 | pxa_set_btuart_info(NULL); | 559 | pxa_set_btuart_info(NULL); |
560 | pxa_set_stuart_info(NULL); | 560 | pxa_set_stuart_info(NULL); |
561 | 561 | ||
562 | /* SPI chip select directions - all other directions should | ||
563 | * be handled by drivers.*/ | ||
564 | gpio_direction_output(37, 0); | ||
565 | |||
566 | platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices)); | 562 | platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices)); |
567 | 563 | ||
568 | pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); | 564 | pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); |
diff --git a/arch/arm/mach-pxa/include/mach/uncompress.h b/arch/arm/mach-pxa/include/mach/uncompress.h index 5ef91d9d17e4..759b851ec985 100644 --- a/arch/arm/mach-pxa/include/mach/uncompress.h +++ b/arch/arm/mach-pxa/include/mach/uncompress.h | |||
@@ -16,9 +16,9 @@ | |||
16 | #define BTUART_BASE (0x40200000) | 16 | #define BTUART_BASE (0x40200000) |
17 | #define STUART_BASE (0x40700000) | 17 | #define STUART_BASE (0x40700000) |
18 | 18 | ||
19 | static unsigned long uart_base = FFUART_BASE; | 19 | static unsigned long uart_base; |
20 | static unsigned int uart_shift = 2; | 20 | static unsigned int uart_shift; |
21 | static unsigned int uart_is_pxa = 1; | 21 | static unsigned int uart_is_pxa; |
22 | 22 | ||
23 | static inline unsigned char uart_read(int offset) | 23 | static inline unsigned char uart_read(int offset) |
24 | { | 24 | { |
@@ -56,6 +56,11 @@ static inline void flush(void) | |||
56 | 56 | ||
57 | static inline void arch_decomp_setup(void) | 57 | static inline void arch_decomp_setup(void) |
58 | { | 58 | { |
59 | /* initialize to default */ | ||
60 | uart_base = FFUART_BASE; | ||
61 | uart_shift = 2; | ||
62 | uart_is_pxa = 1; | ||
63 | |||
59 | if (machine_is_littleton() || machine_is_intelmote2() | 64 | if (machine_is_littleton() || machine_is_intelmote2() |
60 | || machine_is_csb726() || machine_is_stargate2() | 65 | || machine_is_csb726() || machine_is_stargate2() |
61 | || machine_is_cm_x300() || machine_is_balloon3()) | 66 | || machine_is_cm_x300() || machine_is_balloon3()) |
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c index 3184bdc14526..44bb675e47f1 100644 --- a/arch/arm/mach-pxa/raumfeld.c +++ b/arch/arm/mach-pxa/raumfeld.c | |||
@@ -37,8 +37,6 @@ | |||
37 | #include <linux/lis3lv02d.h> | 37 | #include <linux/lis3lv02d.h> |
38 | #include <linux/pda_power.h> | 38 | #include <linux/pda_power.h> |
39 | #include <linux/power_supply.h> | 39 | #include <linux/power_supply.h> |
40 | #include <linux/pda_power.h> | ||
41 | #include <linux/power_supply.h> | ||
42 | #include <linux/regulator/max8660.h> | 40 | #include <linux/regulator/max8660.h> |
43 | #include <linux/regulator/machine.h> | 41 | #include <linux/regulator/machine.h> |
44 | #include <linux/regulator/fixed.h> | 42 | #include <linux/regulator/fixed.h> |
@@ -444,7 +442,7 @@ static struct gpio_keys_button gpio_keys_button[] = { | |||
444 | .active_low = 0, | 442 | .active_low = 0, |
445 | .wakeup = 0, | 443 | .wakeup = 0, |
446 | .debounce_interval = 5, /* ms */ | 444 | .debounce_interval = 5, /* ms */ |
447 | .desc = "on/off button", | 445 | .desc = "on_off button", |
448 | }, | 446 | }, |
449 | }; | 447 | }; |
450 | 448 | ||
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c index a98a434f0111..2041eb1d90ba 100644 --- a/arch/arm/mach-pxa/stargate2.c +++ b/arch/arm/mach-pxa/stargate2.c | |||
@@ -764,11 +764,6 @@ static void __init stargate2_init(void) | |||
764 | pxa_set_btuart_info(NULL); | 764 | pxa_set_btuart_info(NULL); |
765 | pxa_set_stuart_info(NULL); | 765 | pxa_set_stuart_info(NULL); |
766 | 766 | ||
767 | /* spi chip selects */ | ||
768 | gpio_direction_output(37, 0); | ||
769 | gpio_direction_output(24, 0); | ||
770 | gpio_direction_output(39, 0); | ||
771 | |||
772 | platform_add_devices(ARRAY_AND_SIZE(stargate2_devices)); | 767 | platform_add_devices(ARRAY_AND_SIZE(stargate2_devices)); |
773 | 768 | ||
774 | pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); | 769 | pxa2xx_set_spi_info(1, &pxa_ssp_master_0_info); |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index 31c2f4c30a95..1536f1784cac 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # Last update: Sat Feb 20 14:16:15 2010 | 15 | # Last update: Sat Mar 20 15:35:41 2010 |
16 | # | 16 | # |
17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
18 | # | 18 | # |
@@ -2663,7 +2663,7 @@ reb01 MACH_REB01 REB01 2675 | |||
2663 | aquila MACH_AQUILA AQUILA 2676 | 2663 | aquila MACH_AQUILA AQUILA 2676 |
2664 | spark_sls_hw2 MACH_SPARK_SLS_HW2 SPARK_SLS_HW2 2677 | 2664 | spark_sls_hw2 MACH_SPARK_SLS_HW2 SPARK_SLS_HW2 2677 |
2665 | sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 | 2665 | sheeva_esata MACH_ESATA_SHEEVAPLUG ESATA_SHEEVAPLUG 2678 |
2666 | surf7x30 MACH_SURF7X30 SURF7X30 2679 | 2666 | msm7x30_surf MACH_MSM7X30_SURF MSM7X30_SURF 2679 |
2667 | micro2440 MACH_MICRO2440 MICRO2440 2680 | 2667 | micro2440 MACH_MICRO2440 MICRO2440 2680 |
2668 | am2440 MACH_AM2440 AM2440 2681 | 2668 | am2440 MACH_AM2440 AM2440 2681 |
2669 | tq2440 MACH_TQ2440 TQ2440 2682 | 2669 | tq2440 MACH_TQ2440 TQ2440 2682 |
@@ -2678,3 +2678,74 @@ vc088x MACH_VC088X VC088X 2690 | |||
2678 | mioa702 MACH_MIOA702 MIOA702 2691 | 2678 | mioa702 MACH_MIOA702 MIOA702 2691 |
2679 | hpmin MACH_HPMIN HPMIN 2692 | 2679 | hpmin MACH_HPMIN HPMIN 2692 |
2680 | ak880xak MACH_AK880XAK AK880XAK 2693 | 2680 | ak880xak MACH_AK880XAK AK880XAK 2693 |
2681 | arm926tomap850 MACH_ARM926TOMAP850 ARM926TOMAP850 2694 | ||
2682 | lkevm MACH_LKEVM LKEVM 2695 | ||
2683 | mw6410 MACH_MW6410 MW6410 2696 | ||
2684 | terastation_wxl MACH_TERASTATION_WXL TERASTATION_WXL 2697 | ||
2685 | cpu8000e MACH_CPU8000E CPU8000E 2698 | ||
2686 | catania MACH_CATANIA CATANIA 2699 | ||
2687 | tokyo MACH_TOKYO TOKYO 2700 | ||
2688 | msm7201a_surf MACH_MSM7201A_SURF MSM7201A_SURF 2701 | ||
2689 | msm7201a_ffa MACH_MSM7201A_FFA MSM7201A_FFA 2702 | ||
2690 | msm7x25_surf MACH_MSM7X25_SURF MSM7X25_SURF 2703 | ||
2691 | msm7x25_ffa MACH_MSM7X25_FFA MSM7X25_FFA 2704 | ||
2692 | msm7x27_surf MACH_MSM7X27_SURF MSM7X27_SURF 2705 | ||
2693 | msm7x27_ffa MACH_MSM7X27_FFA MSM7X27_FFA 2706 | ||
2694 | msm7x30_ffa MACH_MSM7X30_FFA MSM7X30_FFA 2707 | ||
2695 | qsd8x50_surf MACH_QSD8X50_SURF QSD8X50_SURF 2708 | ||
2696 | qsd8x50_comet MACH_QSD8X50_COMET QSD8X50_COMET 2709 | ||
2697 | qsd8x50_ffa MACH_QSD8X50_FFA QSD8X50_FFA 2710 | ||
2698 | qsd8x50a_surf MACH_QSD8X50A_SURF QSD8X50A_SURF 2711 | ||
2699 | qsd8x50a_ffa MACH_QSD8X50A_FFA QSD8X50A_FFA 2712 | ||
2700 | adx_xgcp10 MACH_ADX_XGCP10 ADX_XGCP10 2713 | ||
2701 | mcgwumts2a MACH_MCGWUMTS2A MCGWUMTS2A 2714 | ||
2702 | mobikt MACH_MOBIKT MOBIKT 2715 | ||
2703 | mx53_evk MACH_MX53_EVK MX53_EVK 2716 | ||
2704 | igep0030 MACH_IGEP0030 IGEP0030 2717 | ||
2705 | axell_h40_h50_ctrl MACH_AXELL_H40_H50_CTRL AXELL_H40_H50_CTRL 2718 | ||
2706 | dtcommod MACH_DTCOMMOD DTCOMMOD 2719 | ||
2707 | gould MACH_GOULD GOULD 2720 | ||
2708 | siberia MACH_SIBERIA SIBERIA 2721 | ||
2709 | sbc3530 MACH_SBC3530 SBC3530 2722 | ||
2710 | qarm MACH_QARM QARM 2723 | ||
2711 | mips MACH_MIPS MIPS 2724 | ||
2712 | mx27grb MACH_MX27GRB MX27GRB 2725 | ||
2713 | sbc8100 MACH_SBC8100 SBC8100 2726 | ||
2714 | saarb MACH_SAARB SAARB 2727 | ||
2715 | omap3mini MACH_OMAP3MINI OMAP3MINI 2728 | ||
2716 | cnmbook7se MACH_CNMBOOK7SE CNMBOOK7SE 2729 | ||
2717 | catan MACH_CATAN CATAN 2730 | ||
2718 | harmony MACH_HARMONY HARMONY 2731 | ||
2719 | tonga MACH_TONGA TONGA 2732 | ||
2720 | cybook_orizon MACH_CYBOOK_ORIZON CYBOOK_ORIZON 2733 | ||
2721 | htcrhodiumcdma MACH_HTCRHODIUMCDMA HTCRHODIUMCDMA 2734 | ||
2722 | epc_g45 MACH_EPC_G45 EPC_G45 2735 | ||
2723 | epc_lpc3250 MACH_EPC_LPC3250 EPC_LPC3250 2736 | ||
2724 | mxc91341evb MACH_MXC91341EVB MXC91341EVB 2737 | ||
2725 | rtw1000 MACH_RTW1000 RTW1000 2738 | ||
2726 | bobcat MACH_BOBCAT BOBCAT 2739 | ||
2727 | trizeps6 MACH_TRIZEPS6 TRIZEPS6 2740 | ||
2728 | msm7x30_fluid MACH_MSM7X30_FLUID MSM7X30_FLUID 2741 | ||
2729 | nedap9263 MACH_NEDAP9263 NEDAP9263 2742 | ||
2730 | netgear_ms2110 MACH_NETGEAR_MS2110 NETGEAR_MS2110 2743 | ||
2731 | bmx MACH_BMX BMX 2744 | ||
2732 | netstream MACH_NETSTREAM NETSTREAM 2745 | ||
2733 | vpnext_rcu MACH_VPNEXT_RCU VPNEXT_RCU 2746 | ||
2734 | vpnext_mpu MACH_VPNEXT_MPU VPNEXT_MPU 2747 | ||
2735 | bcmring_tablet_v1 MACH_BCMRING_TABLET_V1 BCMRING_TABLET_V1 2748 | ||
2736 | sgarm10 MACH_SGARM10 SGARM10 2749 | ||
2737 | cm_t3517 MACH_CM_T3517 CM_T3517 2750 | ||
2738 | omap3_cps MACH_OMAP3_CPS OMAP3_CPS 2751 | ||
2739 | axar1500_receiver MACH_AXAR1500_RECEIVER AXAR1500_RECEIVER 2752 | ||
2740 | wbd222 MACH_WBD222 WBD222 2753 | ||
2741 | mt65xx MACH_MT65XX MT65XX 2754 | ||
2742 | msm8x60_surf MACH_MSM8X60_SURF MSM8X60_SURF 2755 | ||
2743 | msm8x60_sim MACH_MSM8X60_SIM MSM8X60_SIM 2756 | ||
2744 | vmc300 MACH_VMC300 VMC300 2757 | ||
2745 | tcc8000_sdk MACH_TCC8000_SDK TCC8000_SDK 2758 | ||
2746 | nanos MACH_NANOS NANOS 2759 | ||
2747 | stamp9g10 MACH_STAMP9G10 STAMP9G10 2760 | ||
2748 | stamp9g45 MACH_STAMP9G45 STAMP9G45 2761 | ||
2749 | h6053 MACH_H6053 H6053 2762 | ||
2750 | smint01 MACH_SMINT01 SMINT01 2763 | ||
2751 | prtlvt2 MACH_PRTLVT2 PRTLVT2 2764 | ||
diff --git a/arch/s390/boot/compressed/misc.c b/arch/s390/boot/compressed/misc.c index a97d69525829..14e0479d3888 100644 --- a/arch/s390/boot/compressed/misc.c +++ b/arch/s390/boot/compressed/misc.c | |||
@@ -24,8 +24,8 @@ | |||
24 | /* Symbols defined by linker scripts */ | 24 | /* Symbols defined by linker scripts */ |
25 | extern char input_data[]; | 25 | extern char input_data[]; |
26 | extern int input_len; | 26 | extern int input_len; |
27 | extern int _text; | 27 | extern char _text, _end; |
28 | extern int _end; | 28 | extern char _bss, _ebss; |
29 | 29 | ||
30 | static void error(char *m); | 30 | static void error(char *m); |
31 | 31 | ||
@@ -129,12 +129,12 @@ unsigned long decompress_kernel(void) | |||
129 | unsigned long output_addr; | 129 | unsigned long output_addr; |
130 | unsigned char *output; | 130 | unsigned char *output; |
131 | 131 | ||
132 | check_ipl_parmblock((void *) 0, (unsigned long) output + SZ__bss_start); | ||
133 | memset(&_bss, 0, &_ebss - &_bss); | ||
132 | free_mem_ptr = (unsigned long)&_end; | 134 | free_mem_ptr = (unsigned long)&_end; |
133 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; | 135 | free_mem_end_ptr = free_mem_ptr + HEAP_SIZE; |
134 | output = (unsigned char *) ((free_mem_end_ptr + 4095UL) & -4096UL); | 136 | output = (unsigned char *) ((free_mem_end_ptr + 4095UL) & -4096UL); |
135 | 137 | ||
136 | check_ipl_parmblock((void *) 0, (unsigned long) output + SZ__bss_start); | ||
137 | |||
138 | #ifdef CONFIG_BLK_DEV_INITRD | 138 | #ifdef CONFIG_BLK_DEV_INITRD |
139 | /* | 139 | /* |
140 | * Move the initrd right behind the end of the decompressed | 140 | * Move the initrd right behind the end of the decompressed |
diff --git a/arch/s390/include/asm/system.h b/arch/s390/include/asm/system.h index 67ee6c3c6bb3..1741c1556a4e 100644 --- a/arch/s390/include/asm/system.h +++ b/arch/s390/include/asm/system.h | |||
@@ -110,6 +110,7 @@ extern void pfault_fini(void); | |||
110 | #endif /* CONFIG_PFAULT */ | 110 | #endif /* CONFIG_PFAULT */ |
111 | 111 | ||
112 | extern void cmma_init(void); | 112 | extern void cmma_init(void); |
113 | extern int memcpy_real(void *, void *, size_t); | ||
113 | 114 | ||
114 | #define finish_arch_switch(prev) do { \ | 115 | #define finish_arch_switch(prev) do { \ |
115 | set_fs(current->thread.mm_segment); \ | 116 | set_fs(current->thread.mm_segment); \ |
@@ -218,8 +219,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
218 | " l %0,%2\n" | 219 | " l %0,%2\n" |
219 | "0: nr %0,%5\n" | 220 | "0: nr %0,%5\n" |
220 | " lr %1,%0\n" | 221 | " lr %1,%0\n" |
221 | " or %0,%2\n" | 222 | " or %0,%3\n" |
222 | " or %1,%3\n" | 223 | " or %1,%4\n" |
223 | " cs %0,%1,%2\n" | 224 | " cs %0,%1,%2\n" |
224 | " jnl 1f\n" | 225 | " jnl 1f\n" |
225 | " xr %1,%0\n" | 226 | " xr %1,%0\n" |
@@ -239,8 +240,8 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
239 | " l %0,%2\n" | 240 | " l %0,%2\n" |
240 | "0: nr %0,%5\n" | 241 | "0: nr %0,%5\n" |
241 | " lr %1,%0\n" | 242 | " lr %1,%0\n" |
242 | " or %0,%2\n" | 243 | " or %0,%3\n" |
243 | " or %1,%3\n" | 244 | " or %1,%4\n" |
244 | " cs %0,%1,%2\n" | 245 | " cs %0,%1,%2\n" |
245 | " jnl 1f\n" | 246 | " jnl 1f\n" |
246 | " xr %1,%0\n" | 247 | " xr %1,%0\n" |
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index ca4a62bd862f..9d1f76702d47 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -517,7 +517,10 @@ startup: | |||
517 | lhi %r1,2 # mode 2 = esame (dump) | 517 | lhi %r1,2 # mode 2 = esame (dump) |
518 | sigp %r1,%r0,0x12 # switch to esame mode | 518 | sigp %r1,%r0,0x12 # switch to esame mode |
519 | sam64 # switch to 64 bit mode | 519 | sam64 # switch to 64 bit mode |
520 | larl %r13,4f | ||
521 | lmh %r0,%r15,0(%r13) # clear high-order half | ||
520 | jg startup_continue | 522 | jg startup_continue |
523 | 4: .fill 16,4,0x0 | ||
521 | #else | 524 | #else |
522 | mvi __LC_AR_MODE_ID,0 # set ESA flag (mode 0) | 525 | mvi __LC_AR_MODE_ID,0 # set ESA flag (mode 0) |
523 | l %r13,4f-.LPG0(%r13) | 526 | l %r13,4f-.LPG0(%r13) |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index 39580e768658..1f70970de0aa 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -21,7 +21,6 @@ startup_continue: | |||
21 | larl %r1,sched_clock_base_cc | 21 | larl %r1,sched_clock_base_cc |
22 | mvc 0(8,%r1),__LC_LAST_UPDATE_CLOCK | 22 | mvc 0(8,%r1),__LC_LAST_UPDATE_CLOCK |
23 | larl %r13,.LPG1 # get base | 23 | larl %r13,.LPG1 # get base |
24 | lmh %r0,%r15,.Lzero64-.LPG1(%r13) # clear high-order half | ||
25 | lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers | 24 | lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers |
26 | lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area | 25 | lg %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area |
27 | # move IPL device to lowcore | 26 | # move IPL device to lowcore |
@@ -67,7 +66,6 @@ startup_continue: | |||
67 | .L4malign:.quad 0xffffffffffc00000 | 66 | .L4malign:.quad 0xffffffffffc00000 |
68 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 | 67 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 |
69 | .Lnop: .long 0x07000700 | 68 | .Lnop: .long 0x07000700 |
70 | .Lzero64:.fill 16,4,0x0 | ||
71 | .Lparmaddr: | 69 | .Lparmaddr: |
72 | .quad PARMAREA | 70 | .quad PARMAREA |
73 | .align 64 | 71 | .align 64 |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 77a63ae419f0..ba363d99de43 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -401,7 +401,7 @@ setup_lowcore(void) | |||
401 | * Setup lowcore for boot cpu | 401 | * Setup lowcore for boot cpu |
402 | */ | 402 | */ |
403 | BUILD_BUG_ON(sizeof(struct _lowcore) != LC_PAGES * 4096); | 403 | BUILD_BUG_ON(sizeof(struct _lowcore) != LC_PAGES * 4096); |
404 | lc = __alloc_bootmem(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); | 404 | lc = __alloc_bootmem_low(LC_PAGES * PAGE_SIZE, LC_PAGES * PAGE_SIZE, 0); |
405 | lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; | 405 | lc->restart_psw.mask = PSW_BASE_BITS | PSW_DEFAULT_KEY; |
406 | lc->restart_psw.addr = | 406 | lc->restart_psw.addr = |
407 | PSW_ADDR_AMODE | (unsigned long) restart_int_handler; | 407 | PSW_ADDR_AMODE | (unsigned long) restart_int_handler; |
@@ -433,7 +433,7 @@ setup_lowcore(void) | |||
433 | #ifndef CONFIG_64BIT | 433 | #ifndef CONFIG_64BIT |
434 | if (MACHINE_HAS_IEEE) { | 434 | if (MACHINE_HAS_IEEE) { |
435 | lc->extended_save_area_addr = (__u32) | 435 | lc->extended_save_area_addr = (__u32) |
436 | __alloc_bootmem(PAGE_SIZE, PAGE_SIZE, 0); | 436 | __alloc_bootmem_low(PAGE_SIZE, PAGE_SIZE, 0); |
437 | /* enable extended save area */ | 437 | /* enable extended save area */ |
438 | __ctl_set_bit(14, 29); | 438 | __ctl_set_bit(14, 29); |
439 | } | 439 | } |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index 29f65bce55e1..d7d24fc3d6b7 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -292,9 +292,9 @@ static void __init smp_get_save_area(unsigned int cpu, unsigned int phy_cpu) | |||
292 | zfcpdump_save_areas[cpu] = kmalloc(sizeof(struct save_area), GFP_KERNEL); | 292 | zfcpdump_save_areas[cpu] = kmalloc(sizeof(struct save_area), GFP_KERNEL); |
293 | while (raw_sigp(phy_cpu, sigp_stop_and_store_status) == sigp_busy) | 293 | while (raw_sigp(phy_cpu, sigp_stop_and_store_status) == sigp_busy) |
294 | cpu_relax(); | 294 | cpu_relax(); |
295 | memcpy(zfcpdump_save_areas[cpu], | 295 | memcpy_real(zfcpdump_save_areas[cpu], |
296 | (void *)(unsigned long) store_prefix() + SAVE_AREA_BASE, | 296 | (void *)(unsigned long) store_prefix() + SAVE_AREA_BASE, |
297 | sizeof(struct save_area)); | 297 | sizeof(struct save_area)); |
298 | } | 298 | } |
299 | 299 | ||
300 | struct save_area *zfcpdump_save_areas[NR_CPUS + 1]; | 300 | struct save_area *zfcpdump_save_areas[NR_CPUS + 1]; |
diff --git a/arch/s390/mm/maccess.c b/arch/s390/mm/maccess.c index 81756271dc44..a8c2af8c650f 100644 --- a/arch/s390/mm/maccess.c +++ b/arch/s390/mm/maccess.c | |||
@@ -59,3 +59,29 @@ long probe_kernel_write(void *dst, void *src, size_t size) | |||
59 | } | 59 | } |
60 | return copied < 0 ? -EFAULT : 0; | 60 | return copied < 0 ? -EFAULT : 0; |
61 | } | 61 | } |
62 | |||
63 | int memcpy_real(void *dest, void *src, size_t count) | ||
64 | { | ||
65 | register unsigned long _dest asm("2") = (unsigned long) dest; | ||
66 | register unsigned long _len1 asm("3") = (unsigned long) count; | ||
67 | register unsigned long _src asm("4") = (unsigned long) src; | ||
68 | register unsigned long _len2 asm("5") = (unsigned long) count; | ||
69 | unsigned long flags; | ||
70 | int rc = -EFAULT; | ||
71 | |||
72 | if (!count) | ||
73 | return 0; | ||
74 | flags = __raw_local_irq_stnsm(0xf8UL); | ||
75 | asm volatile ( | ||
76 | "0: mvcle %1,%2,0x0\n" | ||
77 | "1: jo 0b\n" | ||
78 | " lhi %0,0x0\n" | ||
79 | "2:\n" | ||
80 | EX_TABLE(1b,2b) | ||
81 | : "+d" (rc), "+d" (_dest), "+d" (_src), "+d" (_len1), | ||
82 | "+d" (_len2), "=m" (*((long *) dest)) | ||
83 | : "m" (*((long *) src)) | ||
84 | : "cc", "memory"); | ||
85 | __raw_local_irq_ssm(flags); | ||
86 | return rc; | ||
87 | } | ||
diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c index 39ed8722d11a..6c13b92742e8 100644 --- a/arch/sh/boards/mach-ecovec24/setup.c +++ b/arch/sh/boards/mach-ecovec24/setup.c | |||
@@ -836,6 +836,8 @@ static void __init sh_eth_init(struct sh_eth_plat_data *pd) | |||
836 | pd->mac_addr[i] = mac_read(a, 0x10 + i); | 836 | pd->mac_addr[i] = mac_read(a, 0x10 + i); |
837 | msleep(10); | 837 | msleep(10); |
838 | } | 838 | } |
839 | |||
840 | i2c_put_adapter(a); | ||
839 | } | 841 | } |
840 | #else | 842 | #else |
841 | static void __init sh_eth_init(struct sh_eth_plat_data *pd) | 843 | static void __init sh_eth_init(struct sh_eth_plat_data *pd) |
diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c index 66cdbc3c7af9..ccaa290e9aba 100644 --- a/arch/sh/boards/mach-se/7724/setup.c +++ b/arch/sh/boards/mach-se/7724/setup.c | |||
@@ -52,6 +52,13 @@ | |||
52 | * and change SW41 to use 720p | 52 | * and change SW41 to use 720p |
53 | */ | 53 | */ |
54 | 54 | ||
55 | /* | ||
56 | * about sound | ||
57 | * | ||
58 | * This setup.c supports FSI slave mode. | ||
59 | * Please change J20, J21, J22 pin to 1-2 connection. | ||
60 | */ | ||
61 | |||
55 | /* Heartbeat */ | 62 | /* Heartbeat */ |
56 | static struct resource heartbeat_resource = { | 63 | static struct resource heartbeat_resource = { |
57 | .start = PA_LED, | 64 | .start = PA_LED, |
@@ -276,6 +283,7 @@ static struct clk fsimcka_clk = { | |||
276 | .rate = 0, /* unknown */ | 283 | .rate = 0, /* unknown */ |
277 | }; | 284 | }; |
278 | 285 | ||
286 | /* change J20, J21, J22 pin to 1-2 connection to use slave mode */ | ||
279 | struct sh_fsi_platform_info fsi_info = { | 287 | struct sh_fsi_platform_info fsi_info = { |
280 | .porta_flags = SH_FSI_BRS_INV | | 288 | .porta_flags = SH_FSI_BRS_INV | |
281 | SH_FSI_OUT_SLAVE_MODE | | 289 | SH_FSI_OUT_SLAVE_MODE | |
diff --git a/arch/sh/configs/ecovec24_defconfig b/arch/sh/configs/ecovec24_defconfig index 18e3356406f3..6041c66dd10e 100644 --- a/arch/sh/configs/ecovec24_defconfig +++ b/arch/sh/configs/ecovec24_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.33-rc2 | 3 | # Linux kernel version: 2.6.34-rc2 |
4 | # Mon Jan 4 11:20:36 2010 | 4 | # Mon Mar 29 02:21:58 2010 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_SUPERH32=y | 7 | CONFIG_SUPERH32=y |
@@ -13,8 +13,8 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
13 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
14 | CONFIG_GENERIC_HARDIRQS=y | 14 | CONFIG_GENERIC_HARDIRQS=y |
15 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 15 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
16 | CONFIG_GENERIC_IRQ_PROBE=y | ||
17 | CONFIG_IRQ_PER_CPU=y | 16 | CONFIG_IRQ_PER_CPU=y |
17 | CONFIG_SPARSE_IRQ=y | ||
18 | CONFIG_GENERIC_GPIO=y | 18 | CONFIG_GENERIC_GPIO=y |
19 | CONFIG_GENERIC_TIME=y | 19 | CONFIG_GENERIC_TIME=y |
20 | CONFIG_GENERIC_CLOCKEVENTS=y | 20 | CONFIG_GENERIC_CLOCKEVENTS=y |
@@ -32,6 +32,7 @@ CONFIG_ARCH_NO_VIRT_TO_BUS=y | |||
32 | CONFIG_ARCH_HAS_DEFAULT_IDLE=y | 32 | CONFIG_ARCH_HAS_DEFAULT_IDLE=y |
33 | CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y | 33 | CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y |
34 | CONFIG_DMA_NONCOHERENT=y | 34 | CONFIG_DMA_NONCOHERENT=y |
35 | CONFIG_NEED_DMA_MAP_STATE=y | ||
35 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 36 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
36 | CONFIG_CONSTRUCTORS=y | 37 | CONFIG_CONSTRUCTORS=y |
37 | 38 | ||
@@ -47,9 +48,11 @@ CONFIG_LOCALVERSION="" | |||
47 | CONFIG_HAVE_KERNEL_GZIP=y | 48 | CONFIG_HAVE_KERNEL_GZIP=y |
48 | CONFIG_HAVE_KERNEL_BZIP2=y | 49 | CONFIG_HAVE_KERNEL_BZIP2=y |
49 | CONFIG_HAVE_KERNEL_LZMA=y | 50 | CONFIG_HAVE_KERNEL_LZMA=y |
51 | CONFIG_HAVE_KERNEL_LZO=y | ||
50 | CONFIG_KERNEL_GZIP=y | 52 | CONFIG_KERNEL_GZIP=y |
51 | # CONFIG_KERNEL_BZIP2 is not set | 53 | # CONFIG_KERNEL_BZIP2 is not set |
52 | # CONFIG_KERNEL_LZMA is not set | 54 | # CONFIG_KERNEL_LZMA is not set |
55 | # CONFIG_KERNEL_LZO is not set | ||
53 | CONFIG_SWAP=y | 56 | CONFIG_SWAP=y |
54 | CONFIG_SYSVIPC=y | 57 | CONFIG_SYSVIPC=y |
55 | CONFIG_SYSVIPC_SYSCTL=y | 58 | CONFIG_SYSVIPC_SYSCTL=y |
@@ -71,14 +74,8 @@ CONFIG_RCU_FANOUT=32 | |||
71 | # CONFIG_TREE_RCU_TRACE is not set | 74 | # CONFIG_TREE_RCU_TRACE is not set |
72 | # CONFIG_IKCONFIG is not set | 75 | # CONFIG_IKCONFIG is not set |
73 | CONFIG_LOG_BUF_SHIFT=14 | 76 | CONFIG_LOG_BUF_SHIFT=14 |
74 | CONFIG_GROUP_SCHED=y | ||
75 | CONFIG_FAIR_GROUP_SCHED=y | ||
76 | # CONFIG_RT_GROUP_SCHED is not set | ||
77 | CONFIG_USER_SCHED=y | ||
78 | # CONFIG_CGROUP_SCHED is not set | ||
79 | # CONFIG_CGROUPS is not set | 77 | # CONFIG_CGROUPS is not set |
80 | CONFIG_SYSFS_DEPRECATED=y | 78 | # CONFIG_SYSFS_DEPRECATED_V2 is not set |
81 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
82 | # CONFIG_RELAY is not set | 79 | # CONFIG_RELAY is not set |
83 | # CONFIG_NAMESPACES is not set | 80 | # CONFIG_NAMESPACES is not set |
84 | # CONFIG_BLK_DEV_INITRD is not set | 81 | # CONFIG_BLK_DEV_INITRD is not set |
@@ -107,7 +104,7 @@ CONFIG_PERF_USE_VMALLOC=y | |||
107 | # | 104 | # |
108 | # Kernel Performance Events And Counters | 105 | # Kernel Performance Events And Counters |
109 | # | 106 | # |
110 | # CONFIG_PERF_EVENTS is not set | 107 | CONFIG_PERF_EVENTS=y |
111 | # CONFIG_PERF_COUNTERS is not set | 108 | # CONFIG_PERF_COUNTERS is not set |
112 | CONFIG_VM_EVENT_COUNTERS=y | 109 | CONFIG_VM_EVENT_COUNTERS=y |
113 | CONFIG_COMPAT_BRK=y | 110 | CONFIG_COMPAT_BRK=y |
@@ -116,13 +113,13 @@ CONFIG_SLAB=y | |||
116 | # CONFIG_SLOB is not set | 113 | # CONFIG_SLOB is not set |
117 | # CONFIG_PROFILING is not set | 114 | # CONFIG_PROFILING is not set |
118 | CONFIG_HAVE_OPROFILE=y | 115 | CONFIG_HAVE_OPROFILE=y |
119 | CONFIG_HAVE_IOREMAP_PROT=y | ||
120 | CONFIG_HAVE_KPROBES=y | 116 | CONFIG_HAVE_KPROBES=y |
121 | CONFIG_HAVE_KRETPROBES=y | 117 | CONFIG_HAVE_KRETPROBES=y |
122 | CONFIG_HAVE_ARCH_TRACEHOOK=y | 118 | CONFIG_HAVE_ARCH_TRACEHOOK=y |
123 | CONFIG_HAVE_DMA_ATTRS=y | 119 | CONFIG_HAVE_DMA_ATTRS=y |
124 | CONFIG_HAVE_CLK=y | 120 | CONFIG_HAVE_CLK=y |
125 | CONFIG_HAVE_DMA_API_DEBUG=y | 121 | CONFIG_HAVE_DMA_API_DEBUG=y |
122 | CONFIG_HAVE_HW_BREAKPOINT=y | ||
126 | 123 | ||
127 | # | 124 | # |
128 | # GCOV-based kernel profiling | 125 | # GCOV-based kernel profiling |
@@ -234,12 +231,12 @@ CONFIG_CPU_SUBTYPE_SH7724=y | |||
234 | CONFIG_QUICKLIST=y | 231 | CONFIG_QUICKLIST=y |
235 | CONFIG_MMU=y | 232 | CONFIG_MMU=y |
236 | CONFIG_PAGE_OFFSET=0x80000000 | 233 | CONFIG_PAGE_OFFSET=0x80000000 |
237 | CONFIG_FORCE_MAX_ZONEORDER=11 | 234 | CONFIG_FORCE_MAX_ZONEORDER=12 |
238 | CONFIG_MEMORY_START=0x08000000 | 235 | CONFIG_MEMORY_START=0x08000000 |
239 | CONFIG_MEMORY_SIZE=0x10000000 | 236 | CONFIG_MEMORY_SIZE=0x10000000 |
240 | CONFIG_29BIT=y | 237 | CONFIG_29BIT=y |
241 | # CONFIG_PMB_ENABLE is not set | 238 | # CONFIG_PMB is not set |
242 | # CONFIG_X2TLB is not set | 239 | CONFIG_X2TLB=y |
243 | CONFIG_VSYSCALL=y | 240 | CONFIG_VSYSCALL=y |
244 | CONFIG_ARCH_FLATMEM_ENABLE=y | 241 | CONFIG_ARCH_FLATMEM_ENABLE=y |
245 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | 242 | CONFIG_ARCH_SPARSEMEM_ENABLE=y |
@@ -247,6 +244,8 @@ CONFIG_ARCH_SPARSEMEM_DEFAULT=y | |||
247 | CONFIG_MAX_ACTIVE_REGIONS=1 | 244 | CONFIG_MAX_ACTIVE_REGIONS=1 |
248 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 245 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
249 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | 246 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y |
247 | CONFIG_IOREMAP_FIXED=y | ||
248 | CONFIG_UNCACHED_MAPPING=y | ||
250 | CONFIG_PAGE_SIZE_4KB=y | 249 | CONFIG_PAGE_SIZE_4KB=y |
251 | # CONFIG_PAGE_SIZE_8KB is not set | 250 | # CONFIG_PAGE_SIZE_8KB is not set |
252 | # CONFIG_PAGE_SIZE_16KB is not set | 251 | # CONFIG_PAGE_SIZE_16KB is not set |
@@ -262,7 +261,7 @@ CONFIG_PAGEFLAGS_EXTENDED=y | |||
262 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 261 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
263 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 262 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
264 | CONFIG_ZONE_DMA_FLAG=0 | 263 | CONFIG_ZONE_DMA_FLAG=0 |
265 | CONFIG_NR_QUICK=2 | 264 | CONFIG_NR_QUICK=1 |
266 | # CONFIG_KSM is not set | 265 | # CONFIG_KSM is not set |
267 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 | 266 | CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 |
268 | 267 | ||
@@ -337,7 +336,6 @@ CONFIG_SECCOMP=y | |||
337 | # CONFIG_PREEMPT_VOLUNTARY is not set | 336 | # CONFIG_PREEMPT_VOLUNTARY is not set |
338 | CONFIG_PREEMPT=y | 337 | CONFIG_PREEMPT=y |
339 | CONFIG_GUSA=y | 338 | CONFIG_GUSA=y |
340 | # CONFIG_SPARSE_IRQ is not set | ||
341 | 339 | ||
342 | # | 340 | # |
343 | # Boot options | 341 | # Boot options |
@@ -347,7 +345,7 @@ CONFIG_BOOT_LINK_OFFSET=0x00800000 | |||
347 | CONFIG_ENTRY_OFFSET=0x00001000 | 345 | CONFIG_ENTRY_OFFSET=0x00001000 |
348 | CONFIG_CMDLINE_OVERWRITE=y | 346 | CONFIG_CMDLINE_OVERWRITE=y |
349 | # CONFIG_CMDLINE_EXTEND is not set | 347 | # CONFIG_CMDLINE_EXTEND is not set |
350 | CONFIG_CMDLINE="console=tty0, console=ttySC0,115200 root=/dev/nfs ip=dhcp mem=120M memchunk.vpu=4m" | 348 | CONFIG_CMDLINE="console=tty0, console=ttySC0,115200 root=/dev/nfs ip=dhcp mem=248M memchunk.vpu=8m memchunk.veu0=4m" |
351 | 349 | ||
352 | # | 350 | # |
353 | # Bus options | 351 | # Bus options |
@@ -373,6 +371,7 @@ CONFIG_SUSPEND=y | |||
373 | CONFIG_SUSPEND_FREEZER=y | 371 | CONFIG_SUSPEND_FREEZER=y |
374 | # CONFIG_HIBERNATION is not set | 372 | # CONFIG_HIBERNATION is not set |
375 | CONFIG_PM_RUNTIME=y | 373 | CONFIG_PM_RUNTIME=y |
374 | CONFIG_PM_OPS=y | ||
376 | # CONFIG_CPU_IDLE is not set | 375 | # CONFIG_CPU_IDLE is not set |
377 | CONFIG_NET=y | 376 | CONFIG_NET=y |
378 | 377 | ||
@@ -380,7 +379,6 @@ CONFIG_NET=y | |||
380 | # Networking options | 379 | # Networking options |
381 | # | 380 | # |
382 | CONFIG_PACKET=y | 381 | CONFIG_PACKET=y |
383 | # CONFIG_PACKET_MMAP is not set | ||
384 | CONFIG_UNIX=y | 382 | CONFIG_UNIX=y |
385 | # CONFIG_NET_KEY is not set | 383 | # CONFIG_NET_KEY is not set |
386 | CONFIG_INET=y | 384 | CONFIG_INET=y |
@@ -445,7 +443,45 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
445 | # CONFIG_NET_PKTGEN is not set | 443 | # CONFIG_NET_PKTGEN is not set |
446 | # CONFIG_HAMRADIO is not set | 444 | # CONFIG_HAMRADIO is not set |
447 | # CONFIG_CAN is not set | 445 | # CONFIG_CAN is not set |
448 | # CONFIG_IRDA is not set | 446 | CONFIG_IRDA=y |
447 | |||
448 | # | ||
449 | # IrDA protocols | ||
450 | # | ||
451 | # CONFIG_IRLAN is not set | ||
452 | # CONFIG_IRCOMM is not set | ||
453 | # CONFIG_IRDA_ULTRA is not set | ||
454 | |||
455 | # | ||
456 | # IrDA options | ||
457 | # | ||
458 | # CONFIG_IRDA_CACHE_LAST_LSAP is not set | ||
459 | # CONFIG_IRDA_FAST_RR is not set | ||
460 | # CONFIG_IRDA_DEBUG is not set | ||
461 | |||
462 | # | ||
463 | # Infrared-port device drivers | ||
464 | # | ||
465 | |||
466 | # | ||
467 | # SIR device drivers | ||
468 | # | ||
469 | # CONFIG_IRTTY_SIR is not set | ||
470 | |||
471 | # | ||
472 | # Dongle support | ||
473 | # | ||
474 | CONFIG_SH_SIR=y | ||
475 | # CONFIG_KINGSUN_DONGLE is not set | ||
476 | # CONFIG_KSDAZZLE_DONGLE is not set | ||
477 | # CONFIG_KS959_DONGLE is not set | ||
478 | |||
479 | # | ||
480 | # FIR device drivers | ||
481 | # | ||
482 | # CONFIG_USB_IRDA is not set | ||
483 | # CONFIG_SIGMATEL_FIR is not set | ||
484 | # CONFIG_MCS_FIR is not set | ||
449 | # CONFIG_BT is not set | 485 | # CONFIG_BT is not set |
450 | # CONFIG_AF_RXRPC is not set | 486 | # CONFIG_AF_RXRPC is not set |
451 | CONFIG_WIRELESS=y | 487 | CONFIG_WIRELESS=y |
@@ -556,6 +592,7 @@ CONFIG_MTD_NAND_IDS=y | |||
556 | # CONFIG_MTD_NAND_NANDSIM is not set | 592 | # CONFIG_MTD_NAND_NANDSIM is not set |
557 | # CONFIG_MTD_NAND_PLATFORM is not set | 593 | # CONFIG_MTD_NAND_PLATFORM is not set |
558 | # CONFIG_MTD_ALAUDA is not set | 594 | # CONFIG_MTD_ALAUDA is not set |
595 | # CONFIG_MTD_NAND_SH_FLCTL is not set | ||
559 | # CONFIG_MTD_ONENAND is not set | 596 | # CONFIG_MTD_ONENAND is not set |
560 | 597 | ||
561 | # | 598 | # |
@@ -597,6 +634,7 @@ CONFIG_MISC_DEVICES=y | |||
597 | # CONFIG_ICS932S401 is not set | 634 | # CONFIG_ICS932S401 is not set |
598 | # CONFIG_ENCLOSURE_SERVICES is not set | 635 | # CONFIG_ENCLOSURE_SERVICES is not set |
599 | # CONFIG_ISL29003 is not set | 636 | # CONFIG_ISL29003 is not set |
637 | # CONFIG_SENSORS_TSL2550 is not set | ||
600 | # CONFIG_DS1682 is not set | 638 | # CONFIG_DS1682 is not set |
601 | # CONFIG_TI_DAC7512 is not set | 639 | # CONFIG_TI_DAC7512 is not set |
602 | # CONFIG_C2PORT is not set | 640 | # CONFIG_C2PORT is not set |
@@ -616,6 +654,7 @@ CONFIG_HAVE_IDE=y | |||
616 | # | 654 | # |
617 | # SCSI device support | 655 | # SCSI device support |
618 | # | 656 | # |
657 | CONFIG_SCSI_MOD=y | ||
619 | # CONFIG_RAID_ATTRS is not set | 658 | # CONFIG_RAID_ATTRS is not set |
620 | CONFIG_SCSI=y | 659 | CONFIG_SCSI=y |
621 | CONFIG_SCSI_DMA=y | 660 | CONFIG_SCSI_DMA=y |
@@ -768,7 +807,29 @@ CONFIG_KEYBOARD_SH_KEYSC=y | |||
768 | # CONFIG_INPUT_MOUSE is not set | 807 | # CONFIG_INPUT_MOUSE is not set |
769 | # CONFIG_INPUT_JOYSTICK is not set | 808 | # CONFIG_INPUT_JOYSTICK is not set |
770 | # CONFIG_INPUT_TABLET is not set | 809 | # CONFIG_INPUT_TABLET is not set |
771 | # CONFIG_INPUT_TOUCHSCREEN is not set | 810 | CONFIG_INPUT_TOUCHSCREEN=y |
811 | # CONFIG_TOUCHSCREEN_ADS7846 is not set | ||
812 | # CONFIG_TOUCHSCREEN_AD7877 is not set | ||
813 | # CONFIG_TOUCHSCREEN_AD7879_I2C is not set | ||
814 | # CONFIG_TOUCHSCREEN_AD7879_SPI is not set | ||
815 | # CONFIG_TOUCHSCREEN_AD7879 is not set | ||
816 | # CONFIG_TOUCHSCREEN_DYNAPRO is not set | ||
817 | # CONFIG_TOUCHSCREEN_EETI is not set | ||
818 | # CONFIG_TOUCHSCREEN_FUJITSU is not set | ||
819 | # CONFIG_TOUCHSCREEN_GUNZE is not set | ||
820 | # CONFIG_TOUCHSCREEN_ELO is not set | ||
821 | # CONFIG_TOUCHSCREEN_WACOM_W8001 is not set | ||
822 | # CONFIG_TOUCHSCREEN_MCS5000 is not set | ||
823 | # CONFIG_TOUCHSCREEN_MTOUCH is not set | ||
824 | # CONFIG_TOUCHSCREEN_INEXIO is not set | ||
825 | # CONFIG_TOUCHSCREEN_MK712 is not set | ||
826 | # CONFIG_TOUCHSCREEN_PENMOUNT is not set | ||
827 | # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set | ||
828 | # CONFIG_TOUCHSCREEN_TOUCHWIN is not set | ||
829 | # CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set | ||
830 | # CONFIG_TOUCHSCREEN_TOUCHIT213 is not set | ||
831 | CONFIG_TOUCHSCREEN_TSC2007=y | ||
832 | # CONFIG_TOUCHSCREEN_W90X900 is not set | ||
772 | # CONFIG_INPUT_MISC is not set | 833 | # CONFIG_INPUT_MISC is not set |
773 | 834 | ||
774 | # | 835 | # |
@@ -802,10 +863,10 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=6 | |||
802 | CONFIG_SERIAL_SH_SCI_CONSOLE=y | 863 | CONFIG_SERIAL_SH_SCI_CONSOLE=y |
803 | CONFIG_SERIAL_CORE=y | 864 | CONFIG_SERIAL_CORE=y |
804 | CONFIG_SERIAL_CORE_CONSOLE=y | 865 | CONFIG_SERIAL_CORE_CONSOLE=y |
866 | # CONFIG_SERIAL_TIMBERDALE is not set | ||
805 | CONFIG_UNIX98_PTYS=y | 867 | CONFIG_UNIX98_PTYS=y |
806 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | 868 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set |
807 | CONFIG_LEGACY_PTYS=y | 869 | # CONFIG_LEGACY_PTYS is not set |
808 | CONFIG_LEGACY_PTY_COUNT=256 | ||
809 | # CONFIG_IPMI_HANDLER is not set | 870 | # CONFIG_IPMI_HANDLER is not set |
810 | CONFIG_HW_RANDOM=y | 871 | CONFIG_HW_RANDOM=y |
811 | # CONFIG_HW_RANDOM_TIMERIOMEM is not set | 872 | # CONFIG_HW_RANDOM_TIMERIOMEM is not set |
@@ -830,6 +891,7 @@ CONFIG_I2C_HELPER_AUTO=y | |||
830 | # CONFIG_I2C_OCORES is not set | 891 | # CONFIG_I2C_OCORES is not set |
831 | CONFIG_I2C_SH_MOBILE=y | 892 | CONFIG_I2C_SH_MOBILE=y |
832 | # CONFIG_I2C_SIMTEC is not set | 893 | # CONFIG_I2C_SIMTEC is not set |
894 | # CONFIG_I2C_XILINX is not set | ||
833 | 895 | ||
834 | # | 896 | # |
835 | # External I2C/SMBus adapter drivers | 897 | # External I2C/SMBus adapter drivers |
@@ -843,15 +905,9 @@ CONFIG_I2C_SH_MOBILE=y | |||
843 | # | 905 | # |
844 | # CONFIG_I2C_PCA_PLATFORM is not set | 906 | # CONFIG_I2C_PCA_PLATFORM is not set |
845 | # CONFIG_I2C_STUB is not set | 907 | # CONFIG_I2C_STUB is not set |
846 | |||
847 | # | ||
848 | # Miscellaneous I2C Chip support | ||
849 | # | ||
850 | # CONFIG_SENSORS_TSL2550 is not set | ||
851 | # CONFIG_I2C_DEBUG_CORE is not set | 908 | # CONFIG_I2C_DEBUG_CORE is not set |
852 | # CONFIG_I2C_DEBUG_ALGO is not set | 909 | # CONFIG_I2C_DEBUG_ALGO is not set |
853 | # CONFIG_I2C_DEBUG_BUS is not set | 910 | # CONFIG_I2C_DEBUG_BUS is not set |
854 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
855 | CONFIG_SPI=y | 911 | CONFIG_SPI=y |
856 | CONFIG_SPI_MASTER=y | 912 | CONFIG_SPI_MASTER=y |
857 | 913 | ||
@@ -882,13 +938,16 @@ CONFIG_GPIOLIB=y | |||
882 | # | 938 | # |
883 | # Memory mapped GPIO expanders: | 939 | # Memory mapped GPIO expanders: |
884 | # | 940 | # |
941 | # CONFIG_GPIO_IT8761E is not set | ||
885 | 942 | ||
886 | # | 943 | # |
887 | # I2C GPIO expanders: | 944 | # I2C GPIO expanders: |
888 | # | 945 | # |
946 | # CONFIG_GPIO_MAX7300 is not set | ||
889 | # CONFIG_GPIO_MAX732X is not set | 947 | # CONFIG_GPIO_MAX732X is not set |
890 | # CONFIG_GPIO_PCA953X is not set | 948 | # CONFIG_GPIO_PCA953X is not set |
891 | # CONFIG_GPIO_PCF857X is not set | 949 | # CONFIG_GPIO_PCF857X is not set |
950 | # CONFIG_GPIO_ADP5588 is not set | ||
892 | 951 | ||
893 | # | 952 | # |
894 | # PCI GPIO expanders: | 953 | # PCI GPIO expanders: |
@@ -919,23 +978,26 @@ CONFIG_SSB_POSSIBLE=y | |||
919 | # | 978 | # |
920 | # Multifunction device drivers | 979 | # Multifunction device drivers |
921 | # | 980 | # |
922 | # CONFIG_MFD_CORE is not set | 981 | CONFIG_MFD_CORE=y |
982 | # CONFIG_MFD_88PM860X is not set | ||
923 | # CONFIG_MFD_SM501 is not set | 983 | # CONFIG_MFD_SM501 is not set |
924 | # CONFIG_MFD_SH_MOBILE_SDHI is not set | 984 | CONFIG_MFD_SH_MOBILE_SDHI=y |
925 | # CONFIG_HTC_PASIC3 is not set | 985 | # CONFIG_HTC_PASIC3 is not set |
986 | # CONFIG_HTC_I2CPLD is not set | ||
926 | # CONFIG_TPS65010 is not set | 987 | # CONFIG_TPS65010 is not set |
927 | # CONFIG_TWL4030_CORE is not set | 988 | # CONFIG_TWL4030_CORE is not set |
928 | # CONFIG_MFD_TMIO is not set | 989 | # CONFIG_MFD_TMIO is not set |
929 | # CONFIG_PMIC_DA903X is not set | 990 | # CONFIG_PMIC_DA903X is not set |
930 | # CONFIG_PMIC_ADP5520 is not set | 991 | # CONFIG_PMIC_ADP5520 is not set |
992 | # CONFIG_MFD_MAX8925 is not set | ||
931 | # CONFIG_MFD_WM8400 is not set | 993 | # CONFIG_MFD_WM8400 is not set |
932 | # CONFIG_MFD_WM831X is not set | 994 | # CONFIG_MFD_WM831X is not set |
933 | # CONFIG_MFD_WM8350_I2C is not set | 995 | # CONFIG_MFD_WM8350_I2C is not set |
996 | # CONFIG_MFD_WM8994 is not set | ||
934 | # CONFIG_MFD_PCF50633 is not set | 997 | # CONFIG_MFD_PCF50633 is not set |
935 | # CONFIG_MFD_MC13783 is not set | 998 | # CONFIG_MFD_MC13783 is not set |
936 | # CONFIG_AB3100_CORE is not set | 999 | # CONFIG_AB3100_CORE is not set |
937 | # CONFIG_EZX_PCAP is not set | 1000 | # CONFIG_EZX_PCAP is not set |
938 | # CONFIG_MFD_88PM8607 is not set | ||
939 | # CONFIG_AB4500_CORE is not set | 1001 | # CONFIG_AB4500_CORE is not set |
940 | # CONFIG_REGULATOR is not set | 1002 | # CONFIG_REGULATOR is not set |
941 | CONFIG_MEDIA_SUPPORT=y | 1003 | CONFIG_MEDIA_SUPPORT=y |
@@ -985,10 +1047,10 @@ CONFIG_SOC_CAMERA=y | |||
985 | # CONFIG_SOC_CAMERA_MT9M001 is not set | 1047 | # CONFIG_SOC_CAMERA_MT9M001 is not set |
986 | # CONFIG_SOC_CAMERA_MT9M111 is not set | 1048 | # CONFIG_SOC_CAMERA_MT9M111 is not set |
987 | # CONFIG_SOC_CAMERA_MT9T031 is not set | 1049 | # CONFIG_SOC_CAMERA_MT9T031 is not set |
988 | # CONFIG_SOC_CAMERA_MT9T112 is not set | 1050 | CONFIG_SOC_CAMERA_MT9T112=y |
989 | # CONFIG_SOC_CAMERA_MT9V022 is not set | 1051 | # CONFIG_SOC_CAMERA_MT9V022 is not set |
990 | # CONFIG_SOC_CAMERA_RJ54N1 is not set | 1052 | # CONFIG_SOC_CAMERA_RJ54N1 is not set |
991 | # CONFIG_SOC_CAMERA_TW9910 is not set | 1053 | CONFIG_SOC_CAMERA_TW9910=y |
992 | # CONFIG_SOC_CAMERA_PLATFORM is not set | 1054 | # CONFIG_SOC_CAMERA_PLATFORM is not set |
993 | # CONFIG_SOC_CAMERA_OV772X is not set | 1055 | # CONFIG_SOC_CAMERA_OV772X is not set |
994 | # CONFIG_SOC_CAMERA_OV9640 is not set | 1056 | # CONFIG_SOC_CAMERA_OV9640 is not set |
@@ -1001,6 +1063,7 @@ CONFIG_RADIO_ADAPTERS=y | |||
1001 | # CONFIG_RADIO_SI470X is not set | 1063 | # CONFIG_RADIO_SI470X is not set |
1002 | # CONFIG_USB_MR800 is not set | 1064 | # CONFIG_USB_MR800 is not set |
1003 | # CONFIG_RADIO_TEA5764 is not set | 1065 | # CONFIG_RADIO_TEA5764 is not set |
1066 | # CONFIG_RADIO_SAA7706H is not set | ||
1004 | # CONFIG_RADIO_TEF6862 is not set | 1067 | # CONFIG_RADIO_TEF6862 is not set |
1005 | # CONFIG_DAB is not set | 1068 | # CONFIG_DAB is not set |
1006 | 1069 | ||
@@ -1034,6 +1097,7 @@ CONFIG_FB_DEFERRED_IO=y | |||
1034 | # | 1097 | # |
1035 | # CONFIG_FB_S1D13XXX is not set | 1098 | # CONFIG_FB_S1D13XXX is not set |
1036 | CONFIG_FB_SH_MOBILE_LCDC=y | 1099 | CONFIG_FB_SH_MOBILE_LCDC=y |
1100 | # CONFIG_FB_TMIO is not set | ||
1037 | # CONFIG_FB_VIRTUAL is not set | 1101 | # CONFIG_FB_VIRTUAL is not set |
1038 | # CONFIG_FB_METRONOME is not set | 1102 | # CONFIG_FB_METRONOME is not set |
1039 | # CONFIG_FB_MB862XX is not set | 1103 | # CONFIG_FB_MB862XX is not set |
@@ -1062,7 +1126,46 @@ CONFIG_LOGO=y | |||
1062 | # CONFIG_LOGO_SUPERH_MONO is not set | 1126 | # CONFIG_LOGO_SUPERH_MONO is not set |
1063 | # CONFIG_LOGO_SUPERH_VGA16 is not set | 1127 | # CONFIG_LOGO_SUPERH_VGA16 is not set |
1064 | CONFIG_LOGO_SUPERH_CLUT224=y | 1128 | CONFIG_LOGO_SUPERH_CLUT224=y |
1065 | # CONFIG_SOUND is not set | 1129 | CONFIG_SOUND=y |
1130 | CONFIG_SOUND_OSS_CORE=y | ||
1131 | CONFIG_SOUND_OSS_CORE_PRECLAIM=y | ||
1132 | CONFIG_SND=y | ||
1133 | CONFIG_SND_TIMER=y | ||
1134 | CONFIG_SND_PCM=y | ||
1135 | CONFIG_SND_JACK=y | ||
1136 | CONFIG_SND_SEQUENCER=y | ||
1137 | CONFIG_SND_SEQ_DUMMY=y | ||
1138 | CONFIG_SND_OSSEMUL=y | ||
1139 | CONFIG_SND_MIXER_OSS=y | ||
1140 | CONFIG_SND_PCM_OSS=y | ||
1141 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
1142 | # CONFIG_SND_SEQUENCER_OSS is not set | ||
1143 | # CONFIG_SND_DYNAMIC_MINORS is not set | ||
1144 | CONFIG_SND_SUPPORT_OLD_API=y | ||
1145 | CONFIG_SND_VERBOSE_PROCFS=y | ||
1146 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
1147 | # CONFIG_SND_DEBUG is not set | ||
1148 | # CONFIG_SND_RAWMIDI_SEQ is not set | ||
1149 | # CONFIG_SND_OPL3_LIB_SEQ is not set | ||
1150 | # CONFIG_SND_OPL4_LIB_SEQ is not set | ||
1151 | # CONFIG_SND_SBAWE_SEQ is not set | ||
1152 | # CONFIG_SND_EMU10K1_SEQ is not set | ||
1153 | # CONFIG_SND_DRIVERS is not set | ||
1154 | # CONFIG_SND_SPI is not set | ||
1155 | CONFIG_SND_SUPERH=y | ||
1156 | # CONFIG_SND_USB is not set | ||
1157 | CONFIG_SND_SOC=y | ||
1158 | |||
1159 | # | ||
1160 | # SoC Audio support for SuperH | ||
1161 | # | ||
1162 | CONFIG_SND_SOC_SH4_FSI=y | ||
1163 | # CONFIG_SND_FSI_AK4642 is not set | ||
1164 | CONFIG_SND_FSI_DA7210=y | ||
1165 | CONFIG_SND_SOC_I2C_AND_SPI=y | ||
1166 | # CONFIG_SND_SOC_ALL_CODECS is not set | ||
1167 | CONFIG_SND_SOC_DA7210=y | ||
1168 | # CONFIG_SOUND_PRIME is not set | ||
1066 | CONFIG_HID_SUPPORT=y | 1169 | CONFIG_HID_SUPPORT=y |
1067 | CONFIG_HID=y | 1170 | CONFIG_HID=y |
1068 | # CONFIG_HIDRAW is not set | 1171 | # CONFIG_HIDRAW is not set |
@@ -1077,6 +1180,7 @@ CONFIG_USB_HID=y | |||
1077 | # | 1180 | # |
1078 | # Special HID drivers | 1181 | # Special HID drivers |
1079 | # | 1182 | # |
1183 | # CONFIG_HID_3M_PCT is not set | ||
1080 | # CONFIG_HID_A4TECH is not set | 1184 | # CONFIG_HID_A4TECH is not set |
1081 | # CONFIG_HID_APPLE is not set | 1185 | # CONFIG_HID_APPLE is not set |
1082 | # CONFIG_HID_BELKIN is not set | 1186 | # CONFIG_HID_BELKIN is not set |
@@ -1091,12 +1195,16 @@ CONFIG_USB_HID=y | |||
1091 | # CONFIG_HID_KENSINGTON is not set | 1195 | # CONFIG_HID_KENSINGTON is not set |
1092 | # CONFIG_HID_LOGITECH is not set | 1196 | # CONFIG_HID_LOGITECH is not set |
1093 | # CONFIG_HID_MICROSOFT is not set | 1197 | # CONFIG_HID_MICROSOFT is not set |
1198 | # CONFIG_HID_MOSART is not set | ||
1094 | # CONFIG_HID_MONTEREY is not set | 1199 | # CONFIG_HID_MONTEREY is not set |
1095 | # CONFIG_HID_NTRIG is not set | 1200 | # CONFIG_HID_NTRIG is not set |
1201 | # CONFIG_HID_ORTEK is not set | ||
1096 | # CONFIG_HID_PANTHERLORD is not set | 1202 | # CONFIG_HID_PANTHERLORD is not set |
1097 | # CONFIG_HID_PETALYNX is not set | 1203 | # CONFIG_HID_PETALYNX is not set |
1204 | # CONFIG_HID_QUANTA is not set | ||
1098 | # CONFIG_HID_SAMSUNG is not set | 1205 | # CONFIG_HID_SAMSUNG is not set |
1099 | # CONFIG_HID_SONY is not set | 1206 | # CONFIG_HID_SONY is not set |
1207 | # CONFIG_HID_STANTUM is not set | ||
1100 | # CONFIG_HID_SUNPLUS is not set | 1208 | # CONFIG_HID_SUNPLUS is not set |
1101 | # CONFIG_HID_GREENASIA is not set | 1209 | # CONFIG_HID_GREENASIA is not set |
1102 | # CONFIG_HID_SMARTJOYPLUS is not set | 1210 | # CONFIG_HID_SMARTJOYPLUS is not set |
@@ -1136,6 +1244,7 @@ CONFIG_USB_MON=y | |||
1136 | # CONFIG_USB_SL811_HCD is not set | 1244 | # CONFIG_USB_SL811_HCD is not set |
1137 | CONFIG_USB_R8A66597_HCD=y | 1245 | CONFIG_USB_R8A66597_HCD=y |
1138 | # CONFIG_USB_HWA_HCD is not set | 1246 | # CONFIG_USB_HWA_HCD is not set |
1247 | # CONFIG_USB_GADGET_MUSB_HDRC is not set | ||
1139 | 1248 | ||
1140 | # | 1249 | # |
1141 | # USB Device Class drivers | 1250 | # USB Device Class drivers |
@@ -1188,7 +1297,6 @@ CONFIG_USB_STORAGE=y | |||
1188 | # CONFIG_USB_RIO500 is not set | 1297 | # CONFIG_USB_RIO500 is not set |
1189 | # CONFIG_USB_LEGOTOWER is not set | 1298 | # CONFIG_USB_LEGOTOWER is not set |
1190 | # CONFIG_USB_LCD is not set | 1299 | # CONFIG_USB_LCD is not set |
1191 | # CONFIG_USB_BERRY_CHARGE is not set | ||
1192 | # CONFIG_USB_LED is not set | 1300 | # CONFIG_USB_LED is not set |
1193 | # CONFIG_USB_CYPRESS_CY7C63 is not set | 1301 | # CONFIG_USB_CYPRESS_CY7C63 is not set |
1194 | # CONFIG_USB_CYTHERM is not set | 1302 | # CONFIG_USB_CYTHERM is not set |
@@ -1200,8 +1308,45 @@ CONFIG_USB_STORAGE=y | |||
1200 | # CONFIG_USB_IOWARRIOR is not set | 1308 | # CONFIG_USB_IOWARRIOR is not set |
1201 | # CONFIG_USB_TEST is not set | 1309 | # CONFIG_USB_TEST is not set |
1202 | # CONFIG_USB_ISIGHTFW is not set | 1310 | # CONFIG_USB_ISIGHTFW is not set |
1203 | # CONFIG_USB_VST is not set | 1311 | CONFIG_USB_GADGET=y |
1204 | # CONFIG_USB_GADGET is not set | 1312 | # CONFIG_USB_GADGET_DEBUG_FILES is not set |
1313 | # CONFIG_USB_GADGET_DEBUG_FS is not set | ||
1314 | CONFIG_USB_GADGET_VBUS_DRAW=2 | ||
1315 | CONFIG_USB_GADGET_SELECTED=y | ||
1316 | # CONFIG_USB_GADGET_AT91 is not set | ||
1317 | # CONFIG_USB_GADGET_ATMEL_USBA is not set | ||
1318 | # CONFIG_USB_GADGET_FSL_USB2 is not set | ||
1319 | # CONFIG_USB_GADGET_LH7A40X is not set | ||
1320 | # CONFIG_USB_GADGET_OMAP is not set | ||
1321 | # CONFIG_USB_GADGET_PXA25X is not set | ||
1322 | CONFIG_USB_GADGET_R8A66597=y | ||
1323 | CONFIG_USB_R8A66597=y | ||
1324 | # CONFIG_USB_GADGET_PXA27X is not set | ||
1325 | # CONFIG_USB_GADGET_S3C_HSOTG is not set | ||
1326 | # CONFIG_USB_GADGET_IMX is not set | ||
1327 | # CONFIG_USB_GADGET_S3C2410 is not set | ||
1328 | # CONFIG_USB_GADGET_M66592 is not set | ||
1329 | # CONFIG_USB_GADGET_AMD5536UDC is not set | ||
1330 | # CONFIG_USB_GADGET_FSL_QE is not set | ||
1331 | # CONFIG_USB_GADGET_CI13XXX is not set | ||
1332 | # CONFIG_USB_GADGET_NET2280 is not set | ||
1333 | # CONFIG_USB_GADGET_GOKU is not set | ||
1334 | # CONFIG_USB_GADGET_LANGWELL is not set | ||
1335 | # CONFIG_USB_GADGET_DUMMY_HCD is not set | ||
1336 | CONFIG_USB_GADGET_DUALSPEED=y | ||
1337 | # CONFIG_USB_ZERO is not set | ||
1338 | # CONFIG_USB_AUDIO is not set | ||
1339 | # CONFIG_USB_ETH is not set | ||
1340 | # CONFIG_USB_GADGETFS is not set | ||
1341 | CONFIG_USB_FILE_STORAGE=m | ||
1342 | # CONFIG_USB_FILE_STORAGE_TEST is not set | ||
1343 | # CONFIG_USB_MASS_STORAGE is not set | ||
1344 | # CONFIG_USB_G_SERIAL is not set | ||
1345 | # CONFIG_USB_MIDI_GADGET is not set | ||
1346 | # CONFIG_USB_G_PRINTER is not set | ||
1347 | # CONFIG_USB_CDC_COMPOSITE is not set | ||
1348 | # CONFIG_USB_G_NOKIA is not set | ||
1349 | # CONFIG_USB_G_MULTI is not set | ||
1205 | 1350 | ||
1206 | # | 1351 | # |
1207 | # OTG and related infrastructure | 1352 | # OTG and related infrastructure |
@@ -1224,10 +1369,8 @@ CONFIG_MMC_BLOCK_BOUNCE=y | |||
1224 | # MMC/SD/SDIO Host Controller Drivers | 1369 | # MMC/SD/SDIO Host Controller Drivers |
1225 | # | 1370 | # |
1226 | # CONFIG_MMC_SDHCI is not set | 1371 | # CONFIG_MMC_SDHCI is not set |
1227 | # CONFIG_MMC_AT91 is not set | ||
1228 | # CONFIG_MMC_ATMELMCI is not set | ||
1229 | CONFIG_MMC_SPI=y | 1372 | CONFIG_MMC_SPI=y |
1230 | # CONFIG_MMC_TMIO is not set | 1373 | CONFIG_MMC_TMIO=y |
1231 | # CONFIG_MEMSTICK is not set | 1374 | # CONFIG_MEMSTICK is not set |
1232 | # CONFIG_NEW_LEDS is not set | 1375 | # CONFIG_NEW_LEDS is not set |
1233 | # CONFIG_ACCESSIBILITY is not set | 1376 | # CONFIG_ACCESSIBILITY is not set |
@@ -1253,10 +1396,10 @@ CONFIG_RTC_INTF_DEV=y | |||
1253 | # CONFIG_RTC_DRV_DS1374 is not set | 1396 | # CONFIG_RTC_DRV_DS1374 is not set |
1254 | # CONFIG_RTC_DRV_DS1672 is not set | 1397 | # CONFIG_RTC_DRV_DS1672 is not set |
1255 | # CONFIG_RTC_DRV_MAX6900 is not set | 1398 | # CONFIG_RTC_DRV_MAX6900 is not set |
1256 | # CONFIG_RTC_DRV_RS5C372 is not set | 1399 | CONFIG_RTC_DRV_RS5C372=y |
1257 | # CONFIG_RTC_DRV_ISL1208 is not set | 1400 | # CONFIG_RTC_DRV_ISL1208 is not set |
1258 | # CONFIG_RTC_DRV_X1205 is not set | 1401 | # CONFIG_RTC_DRV_X1205 is not set |
1259 | CONFIG_RTC_DRV_PCF8563=y | 1402 | # CONFIG_RTC_DRV_PCF8563 is not set |
1260 | # CONFIG_RTC_DRV_PCF8583 is not set | 1403 | # CONFIG_RTC_DRV_PCF8583 is not set |
1261 | # CONFIG_RTC_DRV_M41T80 is not set | 1404 | # CONFIG_RTC_DRV_M41T80 is not set |
1262 | # CONFIG_RTC_DRV_BQ32K is not set | 1405 | # CONFIG_RTC_DRV_BQ32K is not set |
@@ -1303,8 +1446,6 @@ CONFIG_RTC_DRV_PCF8563=y | |||
1303 | CONFIG_UIO=y | 1446 | CONFIG_UIO=y |
1304 | # CONFIG_UIO_PDRV is not set | 1447 | # CONFIG_UIO_PDRV is not set |
1305 | CONFIG_UIO_PDRV_GENIRQ=y | 1448 | CONFIG_UIO_PDRV_GENIRQ=y |
1306 | # CONFIG_UIO_SMX is not set | ||
1307 | # CONFIG_UIO_SERCOS3 is not set | ||
1308 | 1449 | ||
1309 | # | 1450 | # |
1310 | # TI VLYNQ | 1451 | # TI VLYNQ |
@@ -1390,6 +1531,7 @@ CONFIG_MISC_FILESYSTEMS=y | |||
1390 | # CONFIG_EFS_FS is not set | 1531 | # CONFIG_EFS_FS is not set |
1391 | # CONFIG_JFFS2_FS is not set | 1532 | # CONFIG_JFFS2_FS is not set |
1392 | # CONFIG_UBIFS_FS is not set | 1533 | # CONFIG_UBIFS_FS is not set |
1534 | # CONFIG_LOGFS is not set | ||
1393 | # CONFIG_CRAMFS is not set | 1535 | # CONFIG_CRAMFS is not set |
1394 | # CONFIG_SQUASHFS is not set | 1536 | # CONFIG_SQUASHFS is not set |
1395 | # CONFIG_VXFS_FS is not set | 1537 | # CONFIG_VXFS_FS is not set |
@@ -1418,6 +1560,7 @@ CONFIG_SUNRPC=y | |||
1418 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 1560 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
1419 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 1561 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
1420 | # CONFIG_SMB_FS is not set | 1562 | # CONFIG_SMB_FS is not set |
1563 | # CONFIG_CEPH_FS is not set | ||
1421 | # CONFIG_CIFS is not set | 1564 | # CONFIG_CIFS is not set |
1422 | # CONFIG_NCP_FS is not set | 1565 | # CONFIG_NCP_FS is not set |
1423 | # CONFIG_CODA_FS is not set | 1566 | # CONFIG_CODA_FS is not set |
@@ -1487,6 +1630,7 @@ CONFIG_DEBUG_FS=y | |||
1487 | CONFIG_DEBUG_BUGVERBOSE=y | 1630 | CONFIG_DEBUG_BUGVERBOSE=y |
1488 | # CONFIG_DEBUG_MEMORY_INIT is not set | 1631 | # CONFIG_DEBUG_MEMORY_INIT is not set |
1489 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1632 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
1633 | # CONFIG_LKDTM is not set | ||
1490 | # CONFIG_LATENCYTOP is not set | 1634 | # CONFIG_LATENCYTOP is not set |
1491 | CONFIG_SYSCTL_SYSCALL_CHECK=y | 1635 | CONFIG_SYSCTL_SYSCALL_CHECK=y |
1492 | CONFIG_HAVE_FUNCTION_TRACER=y | 1636 | CONFIG_HAVE_FUNCTION_TRACER=y |
@@ -1618,7 +1762,7 @@ CONFIG_CRYPTO_HW=y | |||
1618 | # | 1762 | # |
1619 | CONFIG_BITREVERSE=y | 1763 | CONFIG_BITREVERSE=y |
1620 | CONFIG_GENERIC_FIND_LAST_BIT=y | 1764 | CONFIG_GENERIC_FIND_LAST_BIT=y |
1621 | # CONFIG_CRC_CCITT is not set | 1765 | CONFIG_CRC_CCITT=y |
1622 | # CONFIG_CRC16 is not set | 1766 | # CONFIG_CRC16 is not set |
1623 | CONFIG_CRC_T10DIF=y | 1767 | CONFIG_CRC_T10DIF=y |
1624 | CONFIG_CRC_ITU_T=y | 1768 | CONFIG_CRC_ITU_T=y |
diff --git a/arch/sh/include/asm/clkdev.h b/arch/sh/include/asm/clkdev.h new file mode 100644 index 000000000000..5645f358128b --- /dev/null +++ b/arch/sh/include/asm/clkdev.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * arch/sh/include/asm/clkdev.h | ||
3 | * | ||
4 | * Cloned from arch/arm/include/asm/clkdev.h: | ||
5 | * | ||
6 | * Copyright (C) 2008 Russell King. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * Helper for the clk API to assist looking up a struct clk. | ||
13 | */ | ||
14 | #ifndef __ASM_CLKDEV_H | ||
15 | #define __ASM_CLKDEV_H | ||
16 | |||
17 | struct clk; | ||
18 | |||
19 | struct clk_lookup { | ||
20 | struct list_head node; | ||
21 | const char *dev_id; | ||
22 | const char *con_id; | ||
23 | struct clk *clk; | ||
24 | }; | ||
25 | |||
26 | struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | ||
27 | const char *dev_fmt, ...); | ||
28 | |||
29 | void clkdev_add(struct clk_lookup *cl); | ||
30 | void clkdev_drop(struct clk_lookup *cl); | ||
31 | |||
32 | void clkdev_add_table(struct clk_lookup *, size_t); | ||
33 | int clk_add_alias(const char *, const char *, char *, struct device *); | ||
34 | |||
35 | #endif | ||
diff --git a/arch/sh/include/asm/clock.h b/arch/sh/include/asm/clock.h index 11da4c5beb68..4b19179230fe 100644 --- a/arch/sh/include/asm/clock.h +++ b/arch/sh/include/asm/clock.h | |||
@@ -45,13 +45,6 @@ struct clk { | |||
45 | struct cpufreq_frequency_table *freq_table; | 45 | struct cpufreq_frequency_table *freq_table; |
46 | }; | 46 | }; |
47 | 47 | ||
48 | struct clk_lookup { | ||
49 | struct list_head node; | ||
50 | const char *dev_id; | ||
51 | const char *con_id; | ||
52 | struct clk *clk; | ||
53 | }; | ||
54 | |||
55 | #define CLK_ENABLE_ON_INIT (1 << 0) | 48 | #define CLK_ENABLE_ON_INIT (1 << 0) |
56 | 49 | ||
57 | /* Should be defined by processor-specific code */ | 50 | /* Should be defined by processor-specific code */ |
diff --git a/arch/sh/include/asm/elf.h b/arch/sh/include/asm/elf.h index ac04255022b6..ce830faeebbf 100644 --- a/arch/sh/include/asm/elf.h +++ b/arch/sh/include/asm/elf.h | |||
@@ -211,7 +211,9 @@ extern void __kernel_vsyscall; | |||
211 | 211 | ||
212 | #define VSYSCALL_AUX_ENT \ | 212 | #define VSYSCALL_AUX_ENT \ |
213 | if (vdso_enabled) \ | 213 | if (vdso_enabled) \ |
214 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); | 214 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_BASE); \ |
215 | else \ | ||
216 | NEW_AUX_ENT(AT_IGNORE, 0); | ||
215 | #else | 217 | #else |
216 | #define VSYSCALL_AUX_ENT | 218 | #define VSYSCALL_AUX_ENT |
217 | #endif /* CONFIG_VSYSCALL */ | 219 | #endif /* CONFIG_VSYSCALL */ |
@@ -219,7 +221,7 @@ extern void __kernel_vsyscall; | |||
219 | #ifdef CONFIG_SH_FPU | 221 | #ifdef CONFIG_SH_FPU |
220 | #define FPU_AUX_ENT NEW_AUX_ENT(AT_FPUCW, FPSCR_INIT) | 222 | #define FPU_AUX_ENT NEW_AUX_ENT(AT_FPUCW, FPSCR_INIT) |
221 | #else | 223 | #else |
222 | #define FPU_AUX_ENT | 224 | #define FPU_AUX_ENT NEW_AUX_ENT(AT_IGNORE, 0) |
223 | #endif | 225 | #endif |
224 | 226 | ||
225 | extern int l1i_cache_shape, l1d_cache_shape, l2_cache_shape; | 227 | extern int l1i_cache_shape, l1d_cache_shape, l2_cache_shape; |
diff --git a/arch/sh/include/cpu-sh4/cpu/mmu_context.h b/arch/sh/include/cpu-sh4/cpu/mmu_context.h index 03ea75c5315d..2941be617a5f 100644 --- a/arch/sh/include/cpu-sh4/cpu/mmu_context.h +++ b/arch/sh/include/cpu-sh4/cpu/mmu_context.h | |||
@@ -19,8 +19,17 @@ | |||
19 | 19 | ||
20 | #define MMUCR 0xFF000010 /* MMU Control Register */ | 20 | #define MMUCR 0xFF000010 /* MMU Control Register */ |
21 | 21 | ||
22 | #define MMU_TLB_ENTRY_SHIFT 8 | ||
23 | |||
24 | #define MMU_ITLB_ADDRESS_ARRAY 0xF2000000 | ||
25 | #define MMU_ITLB_ADDRESS_ARRAY2 0xF2800000 | ||
26 | #define MMU_ITLB_DATA_ARRAY 0xF3000000 | ||
27 | #define MMU_ITLB_DATA_ARRAY2 0xF3800000 | ||
28 | |||
22 | #define MMU_UTLB_ADDRESS_ARRAY 0xF6000000 | 29 | #define MMU_UTLB_ADDRESS_ARRAY 0xF6000000 |
23 | #define MMU_UTLB_ADDRESS_ARRAY2 0xF6800000 | 30 | #define MMU_UTLB_ADDRESS_ARRAY2 0xF6800000 |
31 | #define MMU_UTLB_DATA_ARRAY 0xF7000000 | ||
32 | #define MMU_UTLB_DATA_ARRAY2 0xF7800000 | ||
24 | #define MMU_PAGE_ASSOC_BIT 0x80 | 33 | #define MMU_PAGE_ASSOC_BIT 0x80 |
25 | 34 | ||
26 | #define MMUCR_TI (1<<2) | 35 | #define MMUCR_TI (1<<2) |
@@ -28,6 +37,8 @@ | |||
28 | #define MMUCR_URB 0x00FC0000 | 37 | #define MMUCR_URB 0x00FC0000 |
29 | #define MMUCR_URB_SHIFT 18 | 38 | #define MMUCR_URB_SHIFT 18 |
30 | #define MMUCR_URB_NENTRIES 64 | 39 | #define MMUCR_URB_NENTRIES 64 |
40 | #define MMUCR_URC 0x0000FC00 | ||
41 | #define MMUCR_URC_SHIFT 10 | ||
31 | 42 | ||
32 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_SUBTYPE_ST40) | 43 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_SUBTYPE_ST40) |
33 | #define MMUCR_SE (1 << 4) | 44 | #define MMUCR_SE (1 << 4) |
diff --git a/arch/sh/include/cpu-sh4/cpu/watchdog.h b/arch/sh/include/cpu-sh4/cpu/watchdog.h index 7672301d0c70..7f62b9380938 100644 --- a/arch/sh/include/cpu-sh4/cpu/watchdog.h +++ b/arch/sh/include/cpu-sh4/cpu/watchdog.h | |||
@@ -21,6 +21,12 @@ | |||
21 | #define WTCNT 0xffcc0000 /*WDTST*/ | 21 | #define WTCNT 0xffcc0000 /*WDTST*/ |
22 | #define WTST WTCNT | 22 | #define WTST WTCNT |
23 | #define WTBST 0xffcc0008 /*WDTBST*/ | 23 | #define WTBST 0xffcc0008 /*WDTBST*/ |
24 | /* Register definitions */ | ||
25 | #elif defined(CONFIG_CPU_SUBTYPE_SH7722) || \ | ||
26 | defined(CONFIG_CPU_SUBTYPE_SH7723) || \ | ||
27 | defined(CONFIG_CPU_SUBTYPE_SH7724) | ||
28 | #define WTCNT 0xa4520000 | ||
29 | #define WTCSR 0xa4520004 | ||
24 | #else | 30 | #else |
25 | /* Register definitions */ | 31 | /* Register definitions */ |
26 | #define WTCNT 0xffc00008 | 32 | #define WTCNT 0xffc00008 |
diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile index 02fd3ae8b0ee..650b92f00ee5 100644 --- a/arch/sh/kernel/Makefile +++ b/arch/sh/kernel/Makefile | |||
@@ -11,7 +11,7 @@ endif | |||
11 | 11 | ||
12 | CFLAGS_REMOVE_return_address.o = -pg | 12 | CFLAGS_REMOVE_return_address.o = -pg |
13 | 13 | ||
14 | obj-y := debugtraps.o dma-nommu.o dumpstack.o \ | 14 | obj-y := clkdev.o debugtraps.o dma-nommu.o dumpstack.o \ |
15 | idle.o io.o io_generic.o irq.o \ | 15 | idle.o io.o io_generic.o irq.o \ |
16 | irq_$(BITS).o machvec.o nmi_debug.o process.o \ | 16 | irq_$(BITS).o machvec.o nmi_debug.o process.o \ |
17 | process_$(BITS).o ptrace_$(BITS).o \ | 17 | process_$(BITS).o ptrace_$(BITS).o \ |
diff --git a/arch/sh/kernel/clkdev.c b/arch/sh/kernel/clkdev.c new file mode 100644 index 000000000000..defdd6e30908 --- /dev/null +++ b/arch/sh/kernel/clkdev.c | |||
@@ -0,0 +1,169 @@ | |||
1 | /* | ||
2 | * arch/sh/kernel/clkdev.c | ||
3 | * | ||
4 | * Cloned from arch/arm/common/clkdev.c: | ||
5 | * | ||
6 | * Copyright (C) 2008 Russell King. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * Helper for the clk API to assist looking up a struct clk. | ||
13 | */ | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/device.h> | ||
17 | #include <linux/list.h> | ||
18 | #include <linux/errno.h> | ||
19 | #include <linux/err.h> | ||
20 | #include <linux/string.h> | ||
21 | #include <linux/mutex.h> | ||
22 | #include <linux/clk.h> | ||
23 | #include <linux/slab.h> | ||
24 | #include <linux/bootmem.h> | ||
25 | #include <linux/mm.h> | ||
26 | #include <asm/clock.h> | ||
27 | #include <asm/clkdev.h> | ||
28 | |||
29 | static LIST_HEAD(clocks); | ||
30 | static DEFINE_MUTEX(clocks_mutex); | ||
31 | |||
32 | /* | ||
33 | * Find the correct struct clk for the device and connection ID. | ||
34 | * We do slightly fuzzy matching here: | ||
35 | * An entry with a NULL ID is assumed to be a wildcard. | ||
36 | * If an entry has a device ID, it must match | ||
37 | * If an entry has a connection ID, it must match | ||
38 | * Then we take the most specific entry - with the following | ||
39 | * order of precidence: dev+con > dev only > con only. | ||
40 | */ | ||
41 | static struct clk *clk_find(const char *dev_id, const char *con_id) | ||
42 | { | ||
43 | struct clk_lookup *p; | ||
44 | struct clk *clk = NULL; | ||
45 | int match, best = 0; | ||
46 | |||
47 | list_for_each_entry(p, &clocks, node) { | ||
48 | match = 0; | ||
49 | if (p->dev_id) { | ||
50 | if (!dev_id || strcmp(p->dev_id, dev_id)) | ||
51 | continue; | ||
52 | match += 2; | ||
53 | } | ||
54 | if (p->con_id) { | ||
55 | if (!con_id || strcmp(p->con_id, con_id)) | ||
56 | continue; | ||
57 | match += 1; | ||
58 | } | ||
59 | if (match == 0) | ||
60 | continue; | ||
61 | |||
62 | if (match > best) { | ||
63 | clk = p->clk; | ||
64 | best = match; | ||
65 | } | ||
66 | } | ||
67 | return clk; | ||
68 | } | ||
69 | |||
70 | struct clk *clk_get_sys(const char *dev_id, const char *con_id) | ||
71 | { | ||
72 | struct clk *clk; | ||
73 | |||
74 | mutex_lock(&clocks_mutex); | ||
75 | clk = clk_find(dev_id, con_id); | ||
76 | mutex_unlock(&clocks_mutex); | ||
77 | |||
78 | return clk ? clk : ERR_PTR(-ENOENT); | ||
79 | } | ||
80 | EXPORT_SYMBOL(clk_get_sys); | ||
81 | |||
82 | void clkdev_add(struct clk_lookup *cl) | ||
83 | { | ||
84 | mutex_lock(&clocks_mutex); | ||
85 | list_add_tail(&cl->node, &clocks); | ||
86 | mutex_unlock(&clocks_mutex); | ||
87 | } | ||
88 | EXPORT_SYMBOL(clkdev_add); | ||
89 | |||
90 | void __init clkdev_add_table(struct clk_lookup *cl, size_t num) | ||
91 | { | ||
92 | mutex_lock(&clocks_mutex); | ||
93 | while (num--) { | ||
94 | list_add_tail(&cl->node, &clocks); | ||
95 | cl++; | ||
96 | } | ||
97 | mutex_unlock(&clocks_mutex); | ||
98 | } | ||
99 | |||
100 | #define MAX_DEV_ID 20 | ||
101 | #define MAX_CON_ID 16 | ||
102 | |||
103 | struct clk_lookup_alloc { | ||
104 | struct clk_lookup cl; | ||
105 | char dev_id[MAX_DEV_ID]; | ||
106 | char con_id[MAX_CON_ID]; | ||
107 | }; | ||
108 | |||
109 | struct clk_lookup * __init_refok | ||
110 | clkdev_alloc(struct clk *clk, const char *con_id, const char *dev_fmt, ...) | ||
111 | { | ||
112 | struct clk_lookup_alloc *cla; | ||
113 | |||
114 | if (!slab_is_available()) | ||
115 | cla = alloc_bootmem_low_pages(sizeof(*cla)); | ||
116 | else | ||
117 | cla = kzalloc(sizeof(*cla), GFP_KERNEL); | ||
118 | |||
119 | if (!cla) | ||
120 | return NULL; | ||
121 | |||
122 | cla->cl.clk = clk; | ||
123 | if (con_id) { | ||
124 | strlcpy(cla->con_id, con_id, sizeof(cla->con_id)); | ||
125 | cla->cl.con_id = cla->con_id; | ||
126 | } | ||
127 | |||
128 | if (dev_fmt) { | ||
129 | va_list ap; | ||
130 | |||
131 | va_start(ap, dev_fmt); | ||
132 | vscnprintf(cla->dev_id, sizeof(cla->dev_id), dev_fmt, ap); | ||
133 | cla->cl.dev_id = cla->dev_id; | ||
134 | va_end(ap); | ||
135 | } | ||
136 | |||
137 | return &cla->cl; | ||
138 | } | ||
139 | EXPORT_SYMBOL(clkdev_alloc); | ||
140 | |||
141 | int clk_add_alias(const char *alias, const char *alias_dev_name, char *id, | ||
142 | struct device *dev) | ||
143 | { | ||
144 | struct clk *r = clk_get(dev, id); | ||
145 | struct clk_lookup *l; | ||
146 | |||
147 | if (IS_ERR(r)) | ||
148 | return PTR_ERR(r); | ||
149 | |||
150 | l = clkdev_alloc(r, alias, alias_dev_name); | ||
151 | clk_put(r); | ||
152 | if (!l) | ||
153 | return -ENODEV; | ||
154 | clkdev_add(l); | ||
155 | return 0; | ||
156 | } | ||
157 | EXPORT_SYMBOL(clk_add_alias); | ||
158 | |||
159 | /* | ||
160 | * clkdev_drop - remove a clock dynamically allocated | ||
161 | */ | ||
162 | void clkdev_drop(struct clk_lookup *cl) | ||
163 | { | ||
164 | mutex_lock(&clocks_mutex); | ||
165 | list_del(&cl->node); | ||
166 | mutex_unlock(&clocks_mutex); | ||
167 | kfree(cl); | ||
168 | } | ||
169 | EXPORT_SYMBOL(clkdev_drop); | ||
diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c index eed5eaff96ba..17a73ad7a20d 100644 --- a/arch/sh/kernel/cpu/clock-cpg.c +++ b/arch/sh/kernel/cpu/clock-cpg.c | |||
@@ -338,6 +338,11 @@ int __init __deprecated cpg_clk_init(void) | |||
338 | ret |= clk_register(clk); | 338 | ret |= clk_register(clk); |
339 | } | 339 | } |
340 | 340 | ||
341 | clk_add_alias("tmu_fck", NULL, "peripheral_clk", NULL); | ||
342 | clk_add_alias("mtu2_fck", NULL, "peripheral_clk", NULL); | ||
343 | clk_add_alias("cmt_fck", NULL, "peripheral_clk", NULL); | ||
344 | clk_add_alias("sci_ick", NULL, "peripheral_clk", NULL); | ||
345 | |||
341 | return ret; | 346 | return ret; |
342 | } | 347 | } |
343 | 348 | ||
diff --git a/arch/sh/kernel/cpu/clock.c b/arch/sh/kernel/cpu/clock.c index e9fa1bfed53e..9ded1bc29260 100644 --- a/arch/sh/kernel/cpu/clock.c +++ b/arch/sh/kernel/cpu/clock.c | |||
@@ -10,10 +10,6 @@ | |||
10 | * | 10 | * |
11 | * Modified for omap shared clock framework by Tony Lindgren <tony@atomide.com> | 11 | * Modified for omap shared clock framework by Tony Lindgren <tony@atomide.com> |
12 | * | 12 | * |
13 | * With clkdev bits: | ||
14 | * | ||
15 | * Copyright (C) 2008 Russell King. | ||
16 | * | ||
17 | * This file is subject to the terms and conditions of the GNU General Public | 13 | * This file is subject to the terms and conditions of the GNU General Public |
18 | * License. See the file "COPYING" in the main directory of this archive | 14 | * License. See the file "COPYING" in the main directory of this archive |
19 | * for more details. | 15 | * for more details. |
@@ -30,6 +26,7 @@ | |||
30 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
31 | #include <linux/debugfs.h> | 27 | #include <linux/debugfs.h> |
32 | #include <linux/cpufreq.h> | 28 | #include <linux/cpufreq.h> |
29 | #include <linux/clk.h> | ||
33 | #include <asm/clock.h> | 30 | #include <asm/clock.h> |
34 | #include <asm/machvec.h> | 31 | #include <asm/machvec.h> |
35 | 32 | ||
@@ -398,56 +395,6 @@ long clk_round_rate(struct clk *clk, unsigned long rate) | |||
398 | EXPORT_SYMBOL_GPL(clk_round_rate); | 395 | EXPORT_SYMBOL_GPL(clk_round_rate); |
399 | 396 | ||
400 | /* | 397 | /* |
401 | * Find the correct struct clk for the device and connection ID. | ||
402 | * We do slightly fuzzy matching here: | ||
403 | * An entry with a NULL ID is assumed to be a wildcard. | ||
404 | * If an entry has a device ID, it must match | ||
405 | * If an entry has a connection ID, it must match | ||
406 | * Then we take the most specific entry - with the following | ||
407 | * order of precedence: dev+con > dev only > con only. | ||
408 | */ | ||
409 | static struct clk *clk_find(const char *dev_id, const char *con_id) | ||
410 | { | ||
411 | struct clk_lookup *p; | ||
412 | struct clk *clk = NULL; | ||
413 | int match, best = 0; | ||
414 | |||
415 | list_for_each_entry(p, &clock_list, node) { | ||
416 | match = 0; | ||
417 | if (p->dev_id) { | ||
418 | if (!dev_id || strcmp(p->dev_id, dev_id)) | ||
419 | continue; | ||
420 | match += 2; | ||
421 | } | ||
422 | if (p->con_id) { | ||
423 | if (!con_id || strcmp(p->con_id, con_id)) | ||
424 | continue; | ||
425 | match += 1; | ||
426 | } | ||
427 | if (match == 0) | ||
428 | continue; | ||
429 | |||
430 | if (match > best) { | ||
431 | clk = p->clk; | ||
432 | best = match; | ||
433 | } | ||
434 | } | ||
435 | return clk; | ||
436 | } | ||
437 | |||
438 | struct clk *clk_get_sys(const char *dev_id, const char *con_id) | ||
439 | { | ||
440 | struct clk *clk; | ||
441 | |||
442 | mutex_lock(&clock_list_sem); | ||
443 | clk = clk_find(dev_id, con_id); | ||
444 | mutex_unlock(&clock_list_sem); | ||
445 | |||
446 | return clk ? clk : ERR_PTR(-ENOENT); | ||
447 | } | ||
448 | EXPORT_SYMBOL_GPL(clk_get_sys); | ||
449 | |||
450 | /* | ||
451 | * Returns a clock. Note that we first try to use device id on the bus | 398 | * Returns a clock. Note that we first try to use device id on the bus |
452 | * and clock name. If this fails, we try to use clock name only. | 399 | * and clock name. If this fails, we try to use clock name only. |
453 | */ | 400 | */ |
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c index 114c7cee7184..c3638516bffc 100644 --- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c +++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c | |||
@@ -128,17 +128,14 @@ static struct platform_device eth_device = { | |||
128 | }; | 128 | }; |
129 | 129 | ||
130 | static struct sh_timer_config cmt0_platform_data = { | 130 | static struct sh_timer_config cmt0_platform_data = { |
131 | .name = "CMT0", | ||
132 | .channel_offset = 0x02, | 131 | .channel_offset = 0x02, |
133 | .timer_bit = 0, | 132 | .timer_bit = 0, |
134 | .clk = "peripheral_clk", | ||
135 | .clockevent_rating = 125, | 133 | .clockevent_rating = 125, |
136 | .clocksource_rating = 0, /* disabled due to code generation issues */ | 134 | .clocksource_rating = 0, /* disabled due to code generation issues */ |
137 | }; | 135 | }; |
138 | 136 | ||
139 | static struct resource cmt0_resources[] = { | 137 | static struct resource cmt0_resources[] = { |
140 | [0] = { | 138 | [0] = { |
141 | .name = "CMT0", | ||
142 | .start = 0xf84a0072, | 139 | .start = 0xf84a0072, |
143 | .end = 0xf84a0077, | 140 | .end = 0xf84a0077, |
144 | .flags = IORESOURCE_MEM, | 141 | .flags = IORESOURCE_MEM, |
@@ -160,17 +157,14 @@ static struct platform_device cmt0_device = { | |||
160 | }; | 157 | }; |
161 | 158 | ||
162 | static struct sh_timer_config cmt1_platform_data = { | 159 | static struct sh_timer_config cmt1_platform_data = { |
163 | .name = "CMT1", | ||
164 | .channel_offset = 0x08, | 160 | .channel_offset = 0x08, |
165 | .timer_bit = 1, | 161 | .timer_bit = 1, |
166 | .clk = "peripheral_clk", | ||
167 | .clockevent_rating = 125, | 162 | .clockevent_rating = 125, |
168 | .clocksource_rating = 0, /* disabled due to code generation issues */ | 163 | .clocksource_rating = 0, /* disabled due to code generation issues */ |
169 | }; | 164 | }; |
170 | 165 | ||
171 | static struct resource cmt1_resources[] = { | 166 | static struct resource cmt1_resources[] = { |
172 | [0] = { | 167 | [0] = { |
173 | .name = "CMT1", | ||
174 | .start = 0xf84a0078, | 168 | .start = 0xf84a0078, |
175 | .end = 0xf84a007d, | 169 | .end = 0xf84a007d, |
176 | .flags = IORESOURCE_MEM, | 170 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh2a/setup-mxg.c b/arch/sh/kernel/cpu/sh2a/setup-mxg.c index 8f669dc9b0da..6c96ea02bf8d 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-mxg.c +++ b/arch/sh/kernel/cpu/sh2a/setup-mxg.c | |||
@@ -115,16 +115,13 @@ static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups, | |||
115 | mask_registers, prio_registers, NULL); | 115 | mask_registers, prio_registers, NULL); |
116 | 116 | ||
117 | static struct sh_timer_config mtu2_0_platform_data = { | 117 | static struct sh_timer_config mtu2_0_platform_data = { |
118 | .name = "MTU2_0", | ||
119 | .channel_offset = -0x80, | 118 | .channel_offset = -0x80, |
120 | .timer_bit = 0, | 119 | .timer_bit = 0, |
121 | .clk = "peripheral_clk", | ||
122 | .clockevent_rating = 200, | 120 | .clockevent_rating = 200, |
123 | }; | 121 | }; |
124 | 122 | ||
125 | static struct resource mtu2_0_resources[] = { | 123 | static struct resource mtu2_0_resources[] = { |
126 | [0] = { | 124 | [0] = { |
127 | .name = "MTU2_0", | ||
128 | .start = 0xff801300, | 125 | .start = 0xff801300, |
129 | .end = 0xff801326, | 126 | .end = 0xff801326, |
130 | .flags = IORESOURCE_MEM, | 127 | .flags = IORESOURCE_MEM, |
@@ -146,16 +143,13 @@ static struct platform_device mtu2_0_device = { | |||
146 | }; | 143 | }; |
147 | 144 | ||
148 | static struct sh_timer_config mtu2_1_platform_data = { | 145 | static struct sh_timer_config mtu2_1_platform_data = { |
149 | .name = "MTU2_1", | ||
150 | .channel_offset = -0x100, | 146 | .channel_offset = -0x100, |
151 | .timer_bit = 1, | 147 | .timer_bit = 1, |
152 | .clk = "peripheral_clk", | ||
153 | .clockevent_rating = 200, | 148 | .clockevent_rating = 200, |
154 | }; | 149 | }; |
155 | 150 | ||
156 | static struct resource mtu2_1_resources[] = { | 151 | static struct resource mtu2_1_resources[] = { |
157 | [0] = { | 152 | [0] = { |
158 | .name = "MTU2_1", | ||
159 | .start = 0xff801380, | 153 | .start = 0xff801380, |
160 | .end = 0xff801390, | 154 | .end = 0xff801390, |
161 | .flags = IORESOURCE_MEM, | 155 | .flags = IORESOURCE_MEM, |
@@ -177,16 +171,13 @@ static struct platform_device mtu2_1_device = { | |||
177 | }; | 171 | }; |
178 | 172 | ||
179 | static struct sh_timer_config mtu2_2_platform_data = { | 173 | static struct sh_timer_config mtu2_2_platform_data = { |
180 | .name = "MTU2_2", | ||
181 | .channel_offset = 0x80, | 174 | .channel_offset = 0x80, |
182 | .timer_bit = 2, | 175 | .timer_bit = 2, |
183 | .clk = "peripheral_clk", | ||
184 | .clockevent_rating = 200, | 176 | .clockevent_rating = 200, |
185 | }; | 177 | }; |
186 | 178 | ||
187 | static struct resource mtu2_2_resources[] = { | 179 | static struct resource mtu2_2_resources[] = { |
188 | [0] = { | 180 | [0] = { |
189 | .name = "MTU2_2", | ||
190 | .start = 0xff801000, | 181 | .start = 0xff801000, |
191 | .end = 0xff80100a, | 182 | .end = 0xff80100a, |
192 | .flags = IORESOURCE_MEM, | 183 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c index 4ccfeb59eb1a..d08bf4c07d60 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c | |||
@@ -318,16 +318,13 @@ static struct platform_device rtc_device = { | |||
318 | }; | 318 | }; |
319 | 319 | ||
320 | static struct sh_timer_config mtu2_0_platform_data = { | 320 | static struct sh_timer_config mtu2_0_platform_data = { |
321 | .name = "MTU2_0", | ||
322 | .channel_offset = -0x80, | 321 | .channel_offset = -0x80, |
323 | .timer_bit = 0, | 322 | .timer_bit = 0, |
324 | .clk = "peripheral_clk", | ||
325 | .clockevent_rating = 200, | 323 | .clockevent_rating = 200, |
326 | }; | 324 | }; |
327 | 325 | ||
328 | static struct resource mtu2_0_resources[] = { | 326 | static struct resource mtu2_0_resources[] = { |
329 | [0] = { | 327 | [0] = { |
330 | .name = "MTU2_0", | ||
331 | .start = 0xfffe4300, | 328 | .start = 0xfffe4300, |
332 | .end = 0xfffe4326, | 329 | .end = 0xfffe4326, |
333 | .flags = IORESOURCE_MEM, | 330 | .flags = IORESOURCE_MEM, |
@@ -349,16 +346,13 @@ static struct platform_device mtu2_0_device = { | |||
349 | }; | 346 | }; |
350 | 347 | ||
351 | static struct sh_timer_config mtu2_1_platform_data = { | 348 | static struct sh_timer_config mtu2_1_platform_data = { |
352 | .name = "MTU2_1", | ||
353 | .channel_offset = -0x100, | 349 | .channel_offset = -0x100, |
354 | .timer_bit = 1, | 350 | .timer_bit = 1, |
355 | .clk = "peripheral_clk", | ||
356 | .clockevent_rating = 200, | 351 | .clockevent_rating = 200, |
357 | }; | 352 | }; |
358 | 353 | ||
359 | static struct resource mtu2_1_resources[] = { | 354 | static struct resource mtu2_1_resources[] = { |
360 | [0] = { | 355 | [0] = { |
361 | .name = "MTU2_1", | ||
362 | .start = 0xfffe4380, | 356 | .start = 0xfffe4380, |
363 | .end = 0xfffe4390, | 357 | .end = 0xfffe4390, |
364 | .flags = IORESOURCE_MEM, | 358 | .flags = IORESOURCE_MEM, |
@@ -380,16 +374,13 @@ static struct platform_device mtu2_1_device = { | |||
380 | }; | 374 | }; |
381 | 375 | ||
382 | static struct sh_timer_config mtu2_2_platform_data = { | 376 | static struct sh_timer_config mtu2_2_platform_data = { |
383 | .name = "MTU2_2", | ||
384 | .channel_offset = 0x80, | 377 | .channel_offset = 0x80, |
385 | .timer_bit = 2, | 378 | .timer_bit = 2, |
386 | .clk = "peripheral_clk", | ||
387 | .clockevent_rating = 200, | 379 | .clockevent_rating = 200, |
388 | }; | 380 | }; |
389 | 381 | ||
390 | static struct resource mtu2_2_resources[] = { | 382 | static struct resource mtu2_2_resources[] = { |
391 | [0] = { | 383 | [0] = { |
392 | .name = "MTU2_2", | ||
393 | .start = 0xfffe4000, | 384 | .start = 0xfffe4000, |
394 | .end = 0xfffe400a, | 385 | .end = 0xfffe400a, |
395 | .flags = IORESOURCE_MEM, | 386 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c index 3136966cc9b3..832f401b5860 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c | |||
@@ -234,17 +234,14 @@ static struct platform_device scif3_device = { | |||
234 | }; | 234 | }; |
235 | 235 | ||
236 | static struct sh_timer_config cmt0_platform_data = { | 236 | static struct sh_timer_config cmt0_platform_data = { |
237 | .name = "CMT0", | ||
238 | .channel_offset = 0x02, | 237 | .channel_offset = 0x02, |
239 | .timer_bit = 0, | 238 | .timer_bit = 0, |
240 | .clk = "peripheral_clk", | ||
241 | .clockevent_rating = 125, | 239 | .clockevent_rating = 125, |
242 | .clocksource_rating = 0, /* disabled due to code generation issues */ | 240 | .clocksource_rating = 0, /* disabled due to code generation issues */ |
243 | }; | 241 | }; |
244 | 242 | ||
245 | static struct resource cmt0_resources[] = { | 243 | static struct resource cmt0_resources[] = { |
246 | [0] = { | 244 | [0] = { |
247 | .name = "CMT0", | ||
248 | .start = 0xfffec002, | 245 | .start = 0xfffec002, |
249 | .end = 0xfffec007, | 246 | .end = 0xfffec007, |
250 | .flags = IORESOURCE_MEM, | 247 | .flags = IORESOURCE_MEM, |
@@ -266,17 +263,14 @@ static struct platform_device cmt0_device = { | |||
266 | }; | 263 | }; |
267 | 264 | ||
268 | static struct sh_timer_config cmt1_platform_data = { | 265 | static struct sh_timer_config cmt1_platform_data = { |
269 | .name = "CMT1", | ||
270 | .channel_offset = 0x08, | 266 | .channel_offset = 0x08, |
271 | .timer_bit = 1, | 267 | .timer_bit = 1, |
272 | .clk = "peripheral_clk", | ||
273 | .clockevent_rating = 125, | 268 | .clockevent_rating = 125, |
274 | .clocksource_rating = 0, /* disabled due to code generation issues */ | 269 | .clocksource_rating = 0, /* disabled due to code generation issues */ |
275 | }; | 270 | }; |
276 | 271 | ||
277 | static struct resource cmt1_resources[] = { | 272 | static struct resource cmt1_resources[] = { |
278 | [0] = { | 273 | [0] = { |
279 | .name = "CMT1", | ||
280 | .start = 0xfffec008, | 274 | .start = 0xfffec008, |
281 | .end = 0xfffec00d, | 275 | .end = 0xfffec00d, |
282 | .flags = IORESOURCE_MEM, | 276 | .flags = IORESOURCE_MEM, |
@@ -298,16 +292,13 @@ static struct platform_device cmt1_device = { | |||
298 | }; | 292 | }; |
299 | 293 | ||
300 | static struct sh_timer_config mtu2_0_platform_data = { | 294 | static struct sh_timer_config mtu2_0_platform_data = { |
301 | .name = "MTU2_0", | ||
302 | .channel_offset = -0x80, | 295 | .channel_offset = -0x80, |
303 | .timer_bit = 0, | 296 | .timer_bit = 0, |
304 | .clk = "peripheral_clk", | ||
305 | .clockevent_rating = 200, | 297 | .clockevent_rating = 200, |
306 | }; | 298 | }; |
307 | 299 | ||
308 | static struct resource mtu2_0_resources[] = { | 300 | static struct resource mtu2_0_resources[] = { |
309 | [0] = { | 301 | [0] = { |
310 | .name = "MTU2_0", | ||
311 | .start = 0xfffe4300, | 302 | .start = 0xfffe4300, |
312 | .end = 0xfffe4326, | 303 | .end = 0xfffe4326, |
313 | .flags = IORESOURCE_MEM, | 304 | .flags = IORESOURCE_MEM, |
@@ -329,16 +320,13 @@ static struct platform_device mtu2_0_device = { | |||
329 | }; | 320 | }; |
330 | 321 | ||
331 | static struct sh_timer_config mtu2_1_platform_data = { | 322 | static struct sh_timer_config mtu2_1_platform_data = { |
332 | .name = "MTU2_1", | ||
333 | .channel_offset = -0x100, | 323 | .channel_offset = -0x100, |
334 | .timer_bit = 1, | 324 | .timer_bit = 1, |
335 | .clk = "peripheral_clk", | ||
336 | .clockevent_rating = 200, | 325 | .clockevent_rating = 200, |
337 | }; | 326 | }; |
338 | 327 | ||
339 | static struct resource mtu2_1_resources[] = { | 328 | static struct resource mtu2_1_resources[] = { |
340 | [0] = { | 329 | [0] = { |
341 | .name = "MTU2_1", | ||
342 | .start = 0xfffe4380, | 330 | .start = 0xfffe4380, |
343 | .end = 0xfffe4390, | 331 | .end = 0xfffe4390, |
344 | .flags = IORESOURCE_MEM, | 332 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c index 064873585a8b..dc47b04e1049 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c | |||
@@ -194,17 +194,14 @@ static struct platform_device scif3_device = { | |||
194 | }; | 194 | }; |
195 | 195 | ||
196 | static struct sh_timer_config cmt0_platform_data = { | 196 | static struct sh_timer_config cmt0_platform_data = { |
197 | .name = "CMT0", | ||
198 | .channel_offset = 0x02, | 197 | .channel_offset = 0x02, |
199 | .timer_bit = 0, | 198 | .timer_bit = 0, |
200 | .clk = "peripheral_clk", | ||
201 | .clockevent_rating = 125, | 199 | .clockevent_rating = 125, |
202 | .clocksource_rating = 0, /* disabled due to code generation issues */ | 200 | .clocksource_rating = 0, /* disabled due to code generation issues */ |
203 | }; | 201 | }; |
204 | 202 | ||
205 | static struct resource cmt0_resources[] = { | 203 | static struct resource cmt0_resources[] = { |
206 | [0] = { | 204 | [0] = { |
207 | .name = "CMT0", | ||
208 | .start = 0xfffec002, | 205 | .start = 0xfffec002, |
209 | .end = 0xfffec007, | 206 | .end = 0xfffec007, |
210 | .flags = IORESOURCE_MEM, | 207 | .flags = IORESOURCE_MEM, |
@@ -226,17 +223,14 @@ static struct platform_device cmt0_device = { | |||
226 | }; | 223 | }; |
227 | 224 | ||
228 | static struct sh_timer_config cmt1_platform_data = { | 225 | static struct sh_timer_config cmt1_platform_data = { |
229 | .name = "CMT1", | ||
230 | .channel_offset = 0x08, | 226 | .channel_offset = 0x08, |
231 | .timer_bit = 1, | 227 | .timer_bit = 1, |
232 | .clk = "peripheral_clk", | ||
233 | .clockevent_rating = 125, | 228 | .clockevent_rating = 125, |
234 | .clocksource_rating = 0, /* disabled due to code generation issues */ | 229 | .clocksource_rating = 0, /* disabled due to code generation issues */ |
235 | }; | 230 | }; |
236 | 231 | ||
237 | static struct resource cmt1_resources[] = { | 232 | static struct resource cmt1_resources[] = { |
238 | [0] = { | 233 | [0] = { |
239 | .name = "CMT1", | ||
240 | .start = 0xfffec008, | 234 | .start = 0xfffec008, |
241 | .end = 0xfffec00d, | 235 | .end = 0xfffec00d, |
242 | .flags = IORESOURCE_MEM, | 236 | .flags = IORESOURCE_MEM, |
@@ -258,16 +252,13 @@ static struct platform_device cmt1_device = { | |||
258 | }; | 252 | }; |
259 | 253 | ||
260 | static struct sh_timer_config mtu2_0_platform_data = { | 254 | static struct sh_timer_config mtu2_0_platform_data = { |
261 | .name = "MTU2_0", | ||
262 | .channel_offset = -0x80, | 255 | .channel_offset = -0x80, |
263 | .timer_bit = 0, | 256 | .timer_bit = 0, |
264 | .clk = "peripheral_clk", | ||
265 | .clockevent_rating = 200, | 257 | .clockevent_rating = 200, |
266 | }; | 258 | }; |
267 | 259 | ||
268 | static struct resource mtu2_0_resources[] = { | 260 | static struct resource mtu2_0_resources[] = { |
269 | [0] = { | 261 | [0] = { |
270 | .name = "MTU2_0", | ||
271 | .start = 0xfffe4300, | 262 | .start = 0xfffe4300, |
272 | .end = 0xfffe4326, | 263 | .end = 0xfffe4326, |
273 | .flags = IORESOURCE_MEM, | 264 | .flags = IORESOURCE_MEM, |
@@ -289,16 +280,13 @@ static struct platform_device mtu2_0_device = { | |||
289 | }; | 280 | }; |
290 | 281 | ||
291 | static struct sh_timer_config mtu2_1_platform_data = { | 282 | static struct sh_timer_config mtu2_1_platform_data = { |
292 | .name = "MTU2_1", | ||
293 | .channel_offset = -0x100, | 283 | .channel_offset = -0x100, |
294 | .timer_bit = 1, | 284 | .timer_bit = 1, |
295 | .clk = "peripheral_clk", | ||
296 | .clockevent_rating = 200, | 285 | .clockevent_rating = 200, |
297 | }; | 286 | }; |
298 | 287 | ||
299 | static struct resource mtu2_1_resources[] = { | 288 | static struct resource mtu2_1_resources[] = { |
300 | [0] = { | 289 | [0] = { |
301 | .name = "MTU2_1", | ||
302 | .start = 0xfffe4380, | 290 | .start = 0xfffe4380, |
303 | .end = 0xfffe4390, | 291 | .end = 0xfffe4390, |
304 | .flags = IORESOURCE_MEM, | 292 | .flags = IORESOURCE_MEM, |
@@ -320,16 +308,13 @@ static struct platform_device mtu2_1_device = { | |||
320 | }; | 308 | }; |
321 | 309 | ||
322 | static struct sh_timer_config mtu2_2_platform_data = { | 310 | static struct sh_timer_config mtu2_2_platform_data = { |
323 | .name = "MTU2_2", | ||
324 | .channel_offset = 0x80, | 311 | .channel_offset = 0x80, |
325 | .timer_bit = 2, | 312 | .timer_bit = 2, |
326 | .clk = "peripheral_clk", | ||
327 | .clockevent_rating = 200, | 313 | .clockevent_rating = 200, |
328 | }; | 314 | }; |
329 | 315 | ||
330 | static struct resource mtu2_2_resources[] = { | 316 | static struct resource mtu2_2_resources[] = { |
331 | [0] = { | 317 | [0] = { |
332 | .name = "MTU2_2", | ||
333 | .start = 0xfffe4000, | 318 | .start = 0xfffe4000, |
334 | .end = 0xfffe400a, | 319 | .end = 0xfffe400a, |
335 | .flags = IORESOURCE_MEM, | 320 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c index 7b892d60e3a0..baadd7f54d94 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c | |||
@@ -124,16 +124,13 @@ static struct platform_device rtc_device = { | |||
124 | }; | 124 | }; |
125 | 125 | ||
126 | static struct sh_timer_config tmu0_platform_data = { | 126 | static struct sh_timer_config tmu0_platform_data = { |
127 | .name = "TMU0", | ||
128 | .channel_offset = 0x02, | 127 | .channel_offset = 0x02, |
129 | .timer_bit = 0, | 128 | .timer_bit = 0, |
130 | .clk = "peripheral_clk", | ||
131 | .clockevent_rating = 200, | 129 | .clockevent_rating = 200, |
132 | }; | 130 | }; |
133 | 131 | ||
134 | static struct resource tmu0_resources[] = { | 132 | static struct resource tmu0_resources[] = { |
135 | [0] = { | 133 | [0] = { |
136 | .name = "TMU0", | ||
137 | .start = 0xfffffe94, | 134 | .start = 0xfffffe94, |
138 | .end = 0xfffffe9f, | 135 | .end = 0xfffffe9f, |
139 | .flags = IORESOURCE_MEM, | 136 | .flags = IORESOURCE_MEM, |
@@ -155,16 +152,13 @@ static struct platform_device tmu0_device = { | |||
155 | }; | 152 | }; |
156 | 153 | ||
157 | static struct sh_timer_config tmu1_platform_data = { | 154 | static struct sh_timer_config tmu1_platform_data = { |
158 | .name = "TMU1", | ||
159 | .channel_offset = 0xe, | 155 | .channel_offset = 0xe, |
160 | .timer_bit = 1, | 156 | .timer_bit = 1, |
161 | .clk = "peripheral_clk", | ||
162 | .clocksource_rating = 200, | 157 | .clocksource_rating = 200, |
163 | }; | 158 | }; |
164 | 159 | ||
165 | static struct resource tmu1_resources[] = { | 160 | static struct resource tmu1_resources[] = { |
166 | [0] = { | 161 | [0] = { |
167 | .name = "TMU1", | ||
168 | .start = 0xfffffea0, | 162 | .start = 0xfffffea0, |
169 | .end = 0xfffffeab, | 163 | .end = 0xfffffeab, |
170 | .flags = IORESOURCE_MEM, | 164 | .flags = IORESOURCE_MEM, |
@@ -186,15 +180,12 @@ static struct platform_device tmu1_device = { | |||
186 | }; | 180 | }; |
187 | 181 | ||
188 | static struct sh_timer_config tmu2_platform_data = { | 182 | static struct sh_timer_config tmu2_platform_data = { |
189 | .name = "TMU2", | ||
190 | .channel_offset = 0x1a, | 183 | .channel_offset = 0x1a, |
191 | .timer_bit = 2, | 184 | .timer_bit = 2, |
192 | .clk = "peripheral_clk", | ||
193 | }; | 185 | }; |
194 | 186 | ||
195 | static struct resource tmu2_resources[] = { | 187 | static struct resource tmu2_resources[] = { |
196 | [0] = { | 188 | [0] = { |
197 | .name = "TMU2", | ||
198 | .start = 0xfffffeac, | 189 | .start = 0xfffffeac, |
199 | .end = 0xfffffebb, | 190 | .end = 0xfffffebb, |
200 | .flags = IORESOURCE_MEM, | 191 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c index bc0c4f68c7c7..3cf8c8ef7b32 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c | |||
@@ -157,16 +157,13 @@ static struct platform_device scif2_device = { | |||
157 | #endif | 157 | #endif |
158 | 158 | ||
159 | static struct sh_timer_config tmu0_platform_data = { | 159 | static struct sh_timer_config tmu0_platform_data = { |
160 | .name = "TMU0", | ||
161 | .channel_offset = 0x02, | 160 | .channel_offset = 0x02, |
162 | .timer_bit = 0, | 161 | .timer_bit = 0, |
163 | .clk = "peripheral_clk", | ||
164 | .clockevent_rating = 200, | 162 | .clockevent_rating = 200, |
165 | }; | 163 | }; |
166 | 164 | ||
167 | static struct resource tmu0_resources[] = { | 165 | static struct resource tmu0_resources[] = { |
168 | [0] = { | 166 | [0] = { |
169 | .name = "TMU0", | ||
170 | .start = 0xfffffe94, | 167 | .start = 0xfffffe94, |
171 | .end = 0xfffffe9f, | 168 | .end = 0xfffffe9f, |
172 | .flags = IORESOURCE_MEM, | 169 | .flags = IORESOURCE_MEM, |
@@ -188,16 +185,13 @@ static struct platform_device tmu0_device = { | |||
188 | }; | 185 | }; |
189 | 186 | ||
190 | static struct sh_timer_config tmu1_platform_data = { | 187 | static struct sh_timer_config tmu1_platform_data = { |
191 | .name = "TMU1", | ||
192 | .channel_offset = 0xe, | 188 | .channel_offset = 0xe, |
193 | .timer_bit = 1, | 189 | .timer_bit = 1, |
194 | .clk = "peripheral_clk", | ||
195 | .clocksource_rating = 200, | 190 | .clocksource_rating = 200, |
196 | }; | 191 | }; |
197 | 192 | ||
198 | static struct resource tmu1_resources[] = { | 193 | static struct resource tmu1_resources[] = { |
199 | [0] = { | 194 | [0] = { |
200 | .name = "TMU1", | ||
201 | .start = 0xfffffea0, | 195 | .start = 0xfffffea0, |
202 | .end = 0xfffffeab, | 196 | .end = 0xfffffeab, |
203 | .flags = IORESOURCE_MEM, | 197 | .flags = IORESOURCE_MEM, |
@@ -219,15 +213,12 @@ static struct platform_device tmu1_device = { | |||
219 | }; | 213 | }; |
220 | 214 | ||
221 | static struct sh_timer_config tmu2_platform_data = { | 215 | static struct sh_timer_config tmu2_platform_data = { |
222 | .name = "TMU2", | ||
223 | .channel_offset = 0x1a, | 216 | .channel_offset = 0x1a, |
224 | .timer_bit = 2, | 217 | .timer_bit = 2, |
225 | .clk = "peripheral_clk", | ||
226 | }; | 218 | }; |
227 | 219 | ||
228 | static struct resource tmu2_resources[] = { | 220 | static struct resource tmu2_resources[] = { |
229 | [0] = { | 221 | [0] = { |
230 | .name = "TMU2", | ||
231 | .start = 0xfffffeac, | 222 | .start = 0xfffffeac, |
232 | .end = 0xfffffebb, | 223 | .end = 0xfffffebb, |
233 | .flags = IORESOURCE_MEM, | 224 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c index 0845a3ad006d..b0c2fb4ab479 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c | |||
@@ -127,16 +127,13 @@ static struct platform_device scif1_device = { | |||
127 | }; | 127 | }; |
128 | 128 | ||
129 | static struct sh_timer_config tmu0_platform_data = { | 129 | static struct sh_timer_config tmu0_platform_data = { |
130 | .name = "TMU0", | ||
131 | .channel_offset = 0x02, | 130 | .channel_offset = 0x02, |
132 | .timer_bit = 0, | 131 | .timer_bit = 0, |
133 | .clk = "peripheral_clk", | ||
134 | .clockevent_rating = 200, | 132 | .clockevent_rating = 200, |
135 | }; | 133 | }; |
136 | 134 | ||
137 | static struct resource tmu0_resources[] = { | 135 | static struct resource tmu0_resources[] = { |
138 | [0] = { | 136 | [0] = { |
139 | .name = "TMU0", | ||
140 | .start = 0xa412fe94, | 137 | .start = 0xa412fe94, |
141 | .end = 0xa412fe9f, | 138 | .end = 0xa412fe9f, |
142 | .flags = IORESOURCE_MEM, | 139 | .flags = IORESOURCE_MEM, |
@@ -158,16 +155,13 @@ static struct platform_device tmu0_device = { | |||
158 | }; | 155 | }; |
159 | 156 | ||
160 | static struct sh_timer_config tmu1_platform_data = { | 157 | static struct sh_timer_config tmu1_platform_data = { |
161 | .name = "TMU1", | ||
162 | .channel_offset = 0xe, | 158 | .channel_offset = 0xe, |
163 | .timer_bit = 1, | 159 | .timer_bit = 1, |
164 | .clk = "peripheral_clk", | ||
165 | .clocksource_rating = 200, | 160 | .clocksource_rating = 200, |
166 | }; | 161 | }; |
167 | 162 | ||
168 | static struct resource tmu1_resources[] = { | 163 | static struct resource tmu1_resources[] = { |
169 | [0] = { | 164 | [0] = { |
170 | .name = "TMU1", | ||
171 | .start = 0xa412fea0, | 165 | .start = 0xa412fea0, |
172 | .end = 0xa412feab, | 166 | .end = 0xa412feab, |
173 | .flags = IORESOURCE_MEM, | 167 | .flags = IORESOURCE_MEM, |
@@ -189,15 +183,12 @@ static struct platform_device tmu1_device = { | |||
189 | }; | 183 | }; |
190 | 184 | ||
191 | static struct sh_timer_config tmu2_platform_data = { | 185 | static struct sh_timer_config tmu2_platform_data = { |
192 | .name = "TMU2", | ||
193 | .channel_offset = 0x1a, | 186 | .channel_offset = 0x1a, |
194 | .timer_bit = 2, | 187 | .timer_bit = 2, |
195 | .clk = "peripheral_clk", | ||
196 | }; | 188 | }; |
197 | 189 | ||
198 | static struct resource tmu2_resources[] = { | 190 | static struct resource tmu2_resources[] = { |
199 | [0] = { | 191 | [0] = { |
200 | .name = "TMU2", | ||
201 | .start = 0xa412feac, | 192 | .start = 0xa412feac, |
202 | .end = 0xa412feb5, | 193 | .end = 0xa412feb5, |
203 | .flags = IORESOURCE_MEM, | 194 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c index a718a6231091..24b17135d5d2 100644 --- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c +++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c | |||
@@ -130,17 +130,14 @@ static struct platform_device usbf_device = { | |||
130 | }; | 130 | }; |
131 | 131 | ||
132 | static struct sh_timer_config cmt0_platform_data = { | 132 | static struct sh_timer_config cmt0_platform_data = { |
133 | .name = "CMT0", | ||
134 | .channel_offset = 0x10, | 133 | .channel_offset = 0x10, |
135 | .timer_bit = 0, | 134 | .timer_bit = 0, |
136 | .clk = "peripheral_clk", | ||
137 | .clockevent_rating = 125, | 135 | .clockevent_rating = 125, |
138 | .clocksource_rating = 125, | 136 | .clocksource_rating = 125, |
139 | }; | 137 | }; |
140 | 138 | ||
141 | static struct resource cmt0_resources[] = { | 139 | static struct resource cmt0_resources[] = { |
142 | [0] = { | 140 | [0] = { |
143 | .name = "CMT0", | ||
144 | .start = 0x044a0010, | 141 | .start = 0x044a0010, |
145 | .end = 0x044a001b, | 142 | .end = 0x044a001b, |
146 | .flags = IORESOURCE_MEM, | 143 | .flags = IORESOURCE_MEM, |
@@ -162,15 +159,12 @@ static struct platform_device cmt0_device = { | |||
162 | }; | 159 | }; |
163 | 160 | ||
164 | static struct sh_timer_config cmt1_platform_data = { | 161 | static struct sh_timer_config cmt1_platform_data = { |
165 | .name = "CMT1", | ||
166 | .channel_offset = 0x20, | 162 | .channel_offset = 0x20, |
167 | .timer_bit = 1, | 163 | .timer_bit = 1, |
168 | .clk = "peripheral_clk", | ||
169 | }; | 164 | }; |
170 | 165 | ||
171 | static struct resource cmt1_resources[] = { | 166 | static struct resource cmt1_resources[] = { |
172 | [0] = { | 167 | [0] = { |
173 | .name = "CMT1", | ||
174 | .start = 0x044a0020, | 168 | .start = 0x044a0020, |
175 | .end = 0x044a002b, | 169 | .end = 0x044a002b, |
176 | .flags = IORESOURCE_MEM, | 170 | .flags = IORESOURCE_MEM, |
@@ -192,15 +186,12 @@ static struct platform_device cmt1_device = { | |||
192 | }; | 186 | }; |
193 | 187 | ||
194 | static struct sh_timer_config cmt2_platform_data = { | 188 | static struct sh_timer_config cmt2_platform_data = { |
195 | .name = "CMT2", | ||
196 | .channel_offset = 0x30, | 189 | .channel_offset = 0x30, |
197 | .timer_bit = 2, | 190 | .timer_bit = 2, |
198 | .clk = "peripheral_clk", | ||
199 | }; | 191 | }; |
200 | 192 | ||
201 | static struct resource cmt2_resources[] = { | 193 | static struct resource cmt2_resources[] = { |
202 | [0] = { | 194 | [0] = { |
203 | .name = "CMT2", | ||
204 | .start = 0x044a0030, | 195 | .start = 0x044a0030, |
205 | .end = 0x044a003b, | 196 | .end = 0x044a003b, |
206 | .flags = IORESOURCE_MEM, | 197 | .flags = IORESOURCE_MEM, |
@@ -222,15 +213,12 @@ static struct platform_device cmt2_device = { | |||
222 | }; | 213 | }; |
223 | 214 | ||
224 | static struct sh_timer_config cmt3_platform_data = { | 215 | static struct sh_timer_config cmt3_platform_data = { |
225 | .name = "CMT3", | ||
226 | .channel_offset = 0x40, | 216 | .channel_offset = 0x40, |
227 | .timer_bit = 3, | 217 | .timer_bit = 3, |
228 | .clk = "peripheral_clk", | ||
229 | }; | 218 | }; |
230 | 219 | ||
231 | static struct resource cmt3_resources[] = { | 220 | static struct resource cmt3_resources[] = { |
232 | [0] = { | 221 | [0] = { |
233 | .name = "CMT3", | ||
234 | .start = 0x044a0040, | 222 | .start = 0x044a0040, |
235 | .end = 0x044a004b, | 223 | .end = 0x044a004b, |
236 | .flags = IORESOURCE_MEM, | 224 | .flags = IORESOURCE_MEM, |
@@ -252,15 +240,12 @@ static struct platform_device cmt3_device = { | |||
252 | }; | 240 | }; |
253 | 241 | ||
254 | static struct sh_timer_config cmt4_platform_data = { | 242 | static struct sh_timer_config cmt4_platform_data = { |
255 | .name = "CMT4", | ||
256 | .channel_offset = 0x50, | 243 | .channel_offset = 0x50, |
257 | .timer_bit = 4, | 244 | .timer_bit = 4, |
258 | .clk = "peripheral_clk", | ||
259 | }; | 245 | }; |
260 | 246 | ||
261 | static struct resource cmt4_resources[] = { | 247 | static struct resource cmt4_resources[] = { |
262 | [0] = { | 248 | [0] = { |
263 | .name = "CMT4", | ||
264 | .start = 0x044a0050, | 249 | .start = 0x044a0050, |
265 | .end = 0x044a005b, | 250 | .end = 0x044a005b, |
266 | .flags = IORESOURCE_MEM, | 251 | .flags = IORESOURCE_MEM, |
@@ -282,16 +267,13 @@ static struct platform_device cmt4_device = { | |||
282 | }; | 267 | }; |
283 | 268 | ||
284 | static struct sh_timer_config tmu0_platform_data = { | 269 | static struct sh_timer_config tmu0_platform_data = { |
285 | .name = "TMU0", | ||
286 | .channel_offset = 0x02, | 270 | .channel_offset = 0x02, |
287 | .timer_bit = 0, | 271 | .timer_bit = 0, |
288 | .clk = "peripheral_clk", | ||
289 | .clockevent_rating = 200, | 272 | .clockevent_rating = 200, |
290 | }; | 273 | }; |
291 | 274 | ||
292 | static struct resource tmu0_resources[] = { | 275 | static struct resource tmu0_resources[] = { |
293 | [0] = { | 276 | [0] = { |
294 | .name = "TMU0", | ||
295 | .start = 0xa412fe94, | 277 | .start = 0xa412fe94, |
296 | .end = 0xa412fe9f, | 278 | .end = 0xa412fe9f, |
297 | .flags = IORESOURCE_MEM, | 279 | .flags = IORESOURCE_MEM, |
@@ -313,16 +295,13 @@ static struct platform_device tmu0_device = { | |||
313 | }; | 295 | }; |
314 | 296 | ||
315 | static struct sh_timer_config tmu1_platform_data = { | 297 | static struct sh_timer_config tmu1_platform_data = { |
316 | .name = "TMU1", | ||
317 | .channel_offset = 0xe, | 298 | .channel_offset = 0xe, |
318 | .timer_bit = 1, | 299 | .timer_bit = 1, |
319 | .clk = "peripheral_clk", | ||
320 | .clocksource_rating = 200, | 300 | .clocksource_rating = 200, |
321 | }; | 301 | }; |
322 | 302 | ||
323 | static struct resource tmu1_resources[] = { | 303 | static struct resource tmu1_resources[] = { |
324 | [0] = { | 304 | [0] = { |
325 | .name = "TMU1", | ||
326 | .start = 0xa412fea0, | 305 | .start = 0xa412fea0, |
327 | .end = 0xa412feab, | 306 | .end = 0xa412feab, |
328 | .flags = IORESOURCE_MEM, | 307 | .flags = IORESOURCE_MEM, |
@@ -344,15 +323,12 @@ static struct platform_device tmu1_device = { | |||
344 | }; | 323 | }; |
345 | 324 | ||
346 | static struct sh_timer_config tmu2_platform_data = { | 325 | static struct sh_timer_config tmu2_platform_data = { |
347 | .name = "TMU2", | ||
348 | .channel_offset = 0x1a, | 326 | .channel_offset = 0x1a, |
349 | .timer_bit = 2, | 327 | .timer_bit = 2, |
350 | .clk = "peripheral_clk", | ||
351 | }; | 328 | }; |
352 | 329 | ||
353 | static struct resource tmu2_resources[] = { | 330 | static struct resource tmu2_resources[] = { |
354 | [0] = { | 331 | [0] = { |
355 | .name = "TMU2", | ||
356 | .start = 0xa412feac, | 332 | .start = 0xa412feac, |
357 | .end = 0xa412feb5, | 333 | .end = 0xa412feb5, |
358 | .flags = IORESOURCE_MEM, | 334 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c index b9b7e10ad68f..e916b18e1f7c 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c | |||
@@ -31,16 +31,13 @@ static struct platform_device scif0_device = { | |||
31 | }; | 31 | }; |
32 | 32 | ||
33 | static struct sh_timer_config tmu0_platform_data = { | 33 | static struct sh_timer_config tmu0_platform_data = { |
34 | .name = "TMU0", | ||
35 | .channel_offset = 0x04, | 34 | .channel_offset = 0x04, |
36 | .timer_bit = 0, | 35 | .timer_bit = 0, |
37 | .clk = "peripheral_clk", | ||
38 | .clockevent_rating = 200, | 36 | .clockevent_rating = 200, |
39 | }; | 37 | }; |
40 | 38 | ||
41 | static struct resource tmu0_resources[] = { | 39 | static struct resource tmu0_resources[] = { |
42 | [0] = { | 40 | [0] = { |
43 | .name = "TMU0", | ||
44 | .start = 0xffd80008, | 41 | .start = 0xffd80008, |
45 | .end = 0xffd80013, | 42 | .end = 0xffd80013, |
46 | .flags = IORESOURCE_MEM, | 43 | .flags = IORESOURCE_MEM, |
@@ -62,16 +59,13 @@ static struct platform_device tmu0_device = { | |||
62 | }; | 59 | }; |
63 | 60 | ||
64 | static struct sh_timer_config tmu1_platform_data = { | 61 | static struct sh_timer_config tmu1_platform_data = { |
65 | .name = "TMU1", | ||
66 | .channel_offset = 0x10, | 62 | .channel_offset = 0x10, |
67 | .timer_bit = 1, | 63 | .timer_bit = 1, |
68 | .clk = "peripheral_clk", | ||
69 | .clocksource_rating = 200, | 64 | .clocksource_rating = 200, |
70 | }; | 65 | }; |
71 | 66 | ||
72 | static struct resource tmu1_resources[] = { | 67 | static struct resource tmu1_resources[] = { |
73 | [0] = { | 68 | [0] = { |
74 | .name = "TMU1", | ||
75 | .start = 0xffd80014, | 69 | .start = 0xffd80014, |
76 | .end = 0xffd8001f, | 70 | .end = 0xffd8001f, |
77 | .flags = IORESOURCE_MEM, | 71 | .flags = IORESOURCE_MEM, |
@@ -93,15 +87,12 @@ static struct platform_device tmu1_device = { | |||
93 | }; | 87 | }; |
94 | 88 | ||
95 | static struct sh_timer_config tmu2_platform_data = { | 89 | static struct sh_timer_config tmu2_platform_data = { |
96 | .name = "TMU2", | ||
97 | .channel_offset = 0x1c, | 90 | .channel_offset = 0x1c, |
98 | .timer_bit = 2, | 91 | .timer_bit = 2, |
99 | .clk = "peripheral_clk", | ||
100 | }; | 92 | }; |
101 | 93 | ||
102 | static struct resource tmu2_resources[] = { | 94 | static struct resource tmu2_resources[] = { |
103 | [0] = { | 95 | [0] = { |
104 | .name = "TMU2", | ||
105 | .start = 0xffd80020, | 96 | .start = 0xffd80020, |
106 | .end = 0xffd8002f, | 97 | .end = 0xffd8002f, |
107 | .flags = IORESOURCE_MEM, | 98 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c index ffd79e57254f..911d196e86b5 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c | |||
@@ -66,16 +66,13 @@ static struct platform_device scif1_device = { | |||
66 | }; | 66 | }; |
67 | 67 | ||
68 | static struct sh_timer_config tmu0_platform_data = { | 68 | static struct sh_timer_config tmu0_platform_data = { |
69 | .name = "TMU0", | ||
70 | .channel_offset = 0x04, | 69 | .channel_offset = 0x04, |
71 | .timer_bit = 0, | 70 | .timer_bit = 0, |
72 | .clk = "peripheral_clk", | ||
73 | .clockevent_rating = 200, | 71 | .clockevent_rating = 200, |
74 | }; | 72 | }; |
75 | 73 | ||
76 | static struct resource tmu0_resources[] = { | 74 | static struct resource tmu0_resources[] = { |
77 | [0] = { | 75 | [0] = { |
78 | .name = "TMU0", | ||
79 | .start = 0xffd80008, | 76 | .start = 0xffd80008, |
80 | .end = 0xffd80013, | 77 | .end = 0xffd80013, |
81 | .flags = IORESOURCE_MEM, | 78 | .flags = IORESOURCE_MEM, |
@@ -97,16 +94,13 @@ static struct platform_device tmu0_device = { | |||
97 | }; | 94 | }; |
98 | 95 | ||
99 | static struct sh_timer_config tmu1_platform_data = { | 96 | static struct sh_timer_config tmu1_platform_data = { |
100 | .name = "TMU1", | ||
101 | .channel_offset = 0x10, | 97 | .channel_offset = 0x10, |
102 | .timer_bit = 1, | 98 | .timer_bit = 1, |
103 | .clk = "peripheral_clk", | ||
104 | .clocksource_rating = 200, | 99 | .clocksource_rating = 200, |
105 | }; | 100 | }; |
106 | 101 | ||
107 | static struct resource tmu1_resources[] = { | 102 | static struct resource tmu1_resources[] = { |
108 | [0] = { | 103 | [0] = { |
109 | .name = "TMU1", | ||
110 | .start = 0xffd80014, | 104 | .start = 0xffd80014, |
111 | .end = 0xffd8001f, | 105 | .end = 0xffd8001f, |
112 | .flags = IORESOURCE_MEM, | 106 | .flags = IORESOURCE_MEM, |
@@ -128,15 +122,12 @@ static struct platform_device tmu1_device = { | |||
128 | }; | 122 | }; |
129 | 123 | ||
130 | static struct sh_timer_config tmu2_platform_data = { | 124 | static struct sh_timer_config tmu2_platform_data = { |
131 | .name = "TMU2", | ||
132 | .channel_offset = 0x1c, | 125 | .channel_offset = 0x1c, |
133 | .timer_bit = 2, | 126 | .timer_bit = 2, |
134 | .clk = "peripheral_clk", | ||
135 | }; | 127 | }; |
136 | 128 | ||
137 | static struct resource tmu2_resources[] = { | 129 | static struct resource tmu2_resources[] = { |
138 | [0] = { | 130 | [0] = { |
139 | .name = "TMU2", | ||
140 | .start = 0xffd80020, | 131 | .start = 0xffd80020, |
141 | .end = 0xffd8002f, | 132 | .end = 0xffd8002f, |
142 | .flags = IORESOURCE_MEM, | 133 | .flags = IORESOURCE_MEM, |
@@ -163,15 +154,12 @@ static struct platform_device tmu2_device = { | |||
163 | defined(CONFIG_CPU_SUBTYPE_SH7751R) | 154 | defined(CONFIG_CPU_SUBTYPE_SH7751R) |
164 | 155 | ||
165 | static struct sh_timer_config tmu3_platform_data = { | 156 | static struct sh_timer_config tmu3_platform_data = { |
166 | .name = "TMU3", | ||
167 | .channel_offset = 0x04, | 157 | .channel_offset = 0x04, |
168 | .timer_bit = 0, | 158 | .timer_bit = 0, |
169 | .clk = "peripheral_clk", | ||
170 | }; | 159 | }; |
171 | 160 | ||
172 | static struct resource tmu3_resources[] = { | 161 | static struct resource tmu3_resources[] = { |
173 | [0] = { | 162 | [0] = { |
174 | .name = "TMU3", | ||
175 | .start = 0xfe100008, | 163 | .start = 0xfe100008, |
176 | .end = 0xfe100013, | 164 | .end = 0xfe100013, |
177 | .flags = IORESOURCE_MEM, | 165 | .flags = IORESOURCE_MEM, |
@@ -193,15 +181,12 @@ static struct platform_device tmu3_device = { | |||
193 | }; | 181 | }; |
194 | 182 | ||
195 | static struct sh_timer_config tmu4_platform_data = { | 183 | static struct sh_timer_config tmu4_platform_data = { |
196 | .name = "TMU4", | ||
197 | .channel_offset = 0x10, | 184 | .channel_offset = 0x10, |
198 | .timer_bit = 1, | 185 | .timer_bit = 1, |
199 | .clk = "peripheral_clk", | ||
200 | }; | 186 | }; |
201 | 187 | ||
202 | static struct resource tmu4_resources[] = { | 188 | static struct resource tmu4_resources[] = { |
203 | [0] = { | 189 | [0] = { |
204 | .name = "TMU4", | ||
205 | .start = 0xfe100014, | 190 | .start = 0xfe100014, |
206 | .end = 0xfe10001f, | 191 | .end = 0xfe10001f, |
207 | .flags = IORESOURCE_MEM, | 192 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c index a16eb3656f4b..48ea8fe85dc5 100644 --- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c +++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c | |||
@@ -187,16 +187,13 @@ static struct platform_device scif3_device = { | |||
187 | }; | 187 | }; |
188 | 188 | ||
189 | static struct sh_timer_config tmu0_platform_data = { | 189 | static struct sh_timer_config tmu0_platform_data = { |
190 | .name = "TMU0", | ||
191 | .channel_offset = 0x04, | 190 | .channel_offset = 0x04, |
192 | .timer_bit = 0, | 191 | .timer_bit = 0, |
193 | .clk = "peripheral_clk", | ||
194 | .clockevent_rating = 200, | 192 | .clockevent_rating = 200, |
195 | }; | 193 | }; |
196 | 194 | ||
197 | static struct resource tmu0_resources[] = { | 195 | static struct resource tmu0_resources[] = { |
198 | [0] = { | 196 | [0] = { |
199 | .name = "TMU0", | ||
200 | .start = 0xffd80008, | 197 | .start = 0xffd80008, |
201 | .end = 0xffd80013, | 198 | .end = 0xffd80013, |
202 | .flags = IORESOURCE_MEM, | 199 | .flags = IORESOURCE_MEM, |
@@ -218,16 +215,13 @@ static struct platform_device tmu0_device = { | |||
218 | }; | 215 | }; |
219 | 216 | ||
220 | static struct sh_timer_config tmu1_platform_data = { | 217 | static struct sh_timer_config tmu1_platform_data = { |
221 | .name = "TMU1", | ||
222 | .channel_offset = 0x10, | 218 | .channel_offset = 0x10, |
223 | .timer_bit = 1, | 219 | .timer_bit = 1, |
224 | .clk = "peripheral_clk", | ||
225 | .clocksource_rating = 200, | 220 | .clocksource_rating = 200, |
226 | }; | 221 | }; |
227 | 222 | ||
228 | static struct resource tmu1_resources[] = { | 223 | static struct resource tmu1_resources[] = { |
229 | [0] = { | 224 | [0] = { |
230 | .name = "TMU1", | ||
231 | .start = 0xffd80014, | 225 | .start = 0xffd80014, |
232 | .end = 0xffd8001f, | 226 | .end = 0xffd8001f, |
233 | .flags = IORESOURCE_MEM, | 227 | .flags = IORESOURCE_MEM, |
@@ -249,15 +243,12 @@ static struct platform_device tmu1_device = { | |||
249 | }; | 243 | }; |
250 | 244 | ||
251 | static struct sh_timer_config tmu2_platform_data = { | 245 | static struct sh_timer_config tmu2_platform_data = { |
252 | .name = "TMU2", | ||
253 | .channel_offset = 0x1c, | 246 | .channel_offset = 0x1c, |
254 | .timer_bit = 2, | 247 | .timer_bit = 2, |
255 | .clk = "peripheral_clk", | ||
256 | }; | 248 | }; |
257 | 249 | ||
258 | static struct resource tmu2_resources[] = { | 250 | static struct resource tmu2_resources[] = { |
259 | [0] = { | 251 | [0] = { |
260 | .name = "TMU2", | ||
261 | .start = 0xffd80020, | 252 | .start = 0xffd80020, |
262 | .end = 0xffd8002f, | 253 | .end = 0xffd8002f, |
263 | .flags = IORESOURCE_MEM, | 254 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7343.c b/arch/sh/kernel/cpu/sh4a/clock-sh7343.c index 2c16df37eda6..a63cdcaee0b2 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7343.c | |||
@@ -154,15 +154,15 @@ static struct clk mstp_clks[] = { | |||
154 | MSTP("sh0", &div4_clks[DIV4_P], MSTPCR0, 20, 0), | 154 | MSTP("sh0", &div4_clks[DIV4_P], MSTPCR0, 20, 0), |
155 | MSTP("hudi0", &div4_clks[DIV4_P], MSTPCR0, 19, 0), | 155 | MSTP("hudi0", &div4_clks[DIV4_P], MSTPCR0, 19, 0), |
156 | MSTP("ubc0", &div4_clks[DIV4_P], MSTPCR0, 17, 0), | 156 | MSTP("ubc0", &div4_clks[DIV4_P], MSTPCR0, 17, 0), |
157 | MSTP("tmu0", &div4_clks[DIV4_P], MSTPCR0, 15, 0), | 157 | MSTP("tmu_fck", &div4_clks[DIV4_P], MSTPCR0, 15, 0), |
158 | MSTP("cmt0", &r_clk, MSTPCR0, 14, 0), | 158 | MSTP("cmt_fck", &r_clk, MSTPCR0, 14, 0), |
159 | MSTP("rwdt0", &r_clk, MSTPCR0, 13, 0), | 159 | MSTP("rwdt0", &r_clk, MSTPCR0, 13, 0), |
160 | MSTP("mfi0", &div4_clks[DIV4_P], MSTPCR0, 11, 0), | 160 | MSTP("mfi0", &div4_clks[DIV4_P], MSTPCR0, 11, 0), |
161 | MSTP("flctl0", &div4_clks[DIV4_P], MSTPCR0, 10, 0), | 161 | MSTP("flctl0", &div4_clks[DIV4_P], MSTPCR0, 10, 0), |
162 | MSTP("scif0", &div4_clks[DIV4_P], MSTPCR0, 7, 0), | 162 | SH_CLK_MSTP32("sci_fck", 0, &div4_clks[DIV4_P], MSTPCR0, 7, 0), |
163 | MSTP("scif1", &div4_clks[DIV4_P], MSTPCR0, 6, 0), | 163 | SH_CLK_MSTP32("sci_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 6, 0), |
164 | MSTP("scif2", &div4_clks[DIV4_P], MSTPCR0, 5, 0), | 164 | SH_CLK_MSTP32("sci_fck", 2, &div4_clks[DIV4_P], MSTPCR0, 5, 0), |
165 | MSTP("scif3", &div4_clks[DIV4_P], MSTPCR0, 4, 0), | 165 | SH_CLK_MSTP32("sci_fck", 3, &div4_clks[DIV4_P], MSTPCR0, 4, 0), |
166 | MSTP("sio0", &div4_clks[DIV4_P], MSTPCR0, 3, 0), | 166 | MSTP("sio0", &div4_clks[DIV4_P], MSTPCR0, 3, 0), |
167 | MSTP("siof0", &div4_clks[DIV4_P], MSTPCR0, 2, 0), | 167 | MSTP("siof0", &div4_clks[DIV4_P], MSTPCR0, 2, 0), |
168 | MSTP("siof1", &div4_clks[DIV4_P], MSTPCR0, 1, 0), | 168 | MSTP("siof1", &div4_clks[DIV4_P], MSTPCR0, 1, 0), |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7366.c b/arch/sh/kernel/cpu/sh4a/clock-sh7366.c index 91588d280cd8..f99db94cf8fb 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7366.c | |||
@@ -158,14 +158,14 @@ static struct clk mstp_clks[] = { | |||
158 | MSTP("sh0", &div4_clks[DIV4_P], MSTPCR0, 20, 0), | 158 | MSTP("sh0", &div4_clks[DIV4_P], MSTPCR0, 20, 0), |
159 | MSTP("hudi0", &div4_clks[DIV4_P], MSTPCR0, 19, 0), | 159 | MSTP("hudi0", &div4_clks[DIV4_P], MSTPCR0, 19, 0), |
160 | MSTP("ubc0", &div4_clks[DIV4_P], MSTPCR0, 17, 0), | 160 | MSTP("ubc0", &div4_clks[DIV4_P], MSTPCR0, 17, 0), |
161 | MSTP("tmu0", &div4_clks[DIV4_P], MSTPCR0, 15, 0), | 161 | MSTP("tmu_fck", &div4_clks[DIV4_P], MSTPCR0, 15, 0), |
162 | MSTP("cmt0", &r_clk, MSTPCR0, 14, 0), | 162 | MSTP("cmt_fck", &r_clk, MSTPCR0, 14, 0), |
163 | MSTP("rwdt0", &r_clk, MSTPCR0, 13, 0), | 163 | MSTP("rwdt0", &r_clk, MSTPCR0, 13, 0), |
164 | MSTP("mfi0", &div4_clks[DIV4_P], MSTPCR0, 11, 0), | 164 | MSTP("mfi0", &div4_clks[DIV4_P], MSTPCR0, 11, 0), |
165 | MSTP("flctl0", &div4_clks[DIV4_P], MSTPCR0, 10, 0), | 165 | MSTP("flctl0", &div4_clks[DIV4_P], MSTPCR0, 10, 0), |
166 | MSTP("scif0", &div4_clks[DIV4_P], MSTPCR0, 7, 0), | 166 | SH_CLK_MSTP32("sci_fck", 0, &div4_clks[DIV4_P], MSTPCR0, 7, 0), |
167 | MSTP("scif1", &div4_clks[DIV4_P], MSTPCR0, 6, 0), | 167 | SH_CLK_MSTP32("sci_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 6, 0), |
168 | MSTP("scif2", &div4_clks[DIV4_P], MSTPCR0, 5, 0), | 168 | SH_CLK_MSTP32("sci_fck", 2, &div4_clks[DIV4_P], MSTPCR0, 5, 0), |
169 | MSTP("msiof0", &div4_clks[DIV4_P], MSTPCR0, 2, 0), | 169 | MSTP("msiof0", &div4_clks[DIV4_P], MSTPCR0, 2, 0), |
170 | MSTP("sbr0", &div4_clks[DIV4_P], MSTPCR0, 1, 0), | 170 | MSTP("sbr0", &div4_clks[DIV4_P], MSTPCR0, 1, 0), |
171 | 171 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c index 15db6d521c5c..107b200e78bd 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c | |||
@@ -160,13 +160,13 @@ struct clk div6_clks[] = { | |||
160 | static struct clk mstp_clks[] = { | 160 | static struct clk mstp_clks[] = { |
161 | SH_HWBLK_CLK("uram0", -1, U_CLK, HWBLK_URAM, CLK_ENABLE_ON_INIT), | 161 | SH_HWBLK_CLK("uram0", -1, U_CLK, HWBLK_URAM, CLK_ENABLE_ON_INIT), |
162 | SH_HWBLK_CLK("xymem0", -1, B_CLK, HWBLK_XYMEM, CLK_ENABLE_ON_INIT), | 162 | SH_HWBLK_CLK("xymem0", -1, B_CLK, HWBLK_XYMEM, CLK_ENABLE_ON_INIT), |
163 | SH_HWBLK_CLK("tmu0", -1, P_CLK, HWBLK_TMU, 0), | 163 | SH_HWBLK_CLK("tmu_fck", -1, P_CLK, HWBLK_TMU, 0), |
164 | SH_HWBLK_CLK("cmt0", -1, R_CLK, HWBLK_CMT, 0), | 164 | SH_HWBLK_CLK("cmt_fck", -1, R_CLK, HWBLK_CMT, 0), |
165 | SH_HWBLK_CLK("rwdt0", -1, R_CLK, HWBLK_RWDT, 0), | 165 | SH_HWBLK_CLK("rwdt0", -1, R_CLK, HWBLK_RWDT, 0), |
166 | SH_HWBLK_CLK("flctl0", -1, P_CLK, HWBLK_FLCTL, 0), | 166 | SH_HWBLK_CLK("flctl0", -1, P_CLK, HWBLK_FLCTL, 0), |
167 | SH_HWBLK_CLK("scif0", -1, P_CLK, HWBLK_SCIF0, 0), | 167 | SH_HWBLK_CLK("sci_fck", 0, P_CLK, HWBLK_SCIF0, 0), |
168 | SH_HWBLK_CLK("scif1", -1, P_CLK, HWBLK_SCIF1, 0), | 168 | SH_HWBLK_CLK("sci_fck", 1, P_CLK, HWBLK_SCIF1, 0), |
169 | SH_HWBLK_CLK("scif2", -1, P_CLK, HWBLK_SCIF2, 0), | 169 | SH_HWBLK_CLK("sci_fck", 2, P_CLK, HWBLK_SCIF2, 0), |
170 | 170 | ||
171 | SH_HWBLK_CLK("i2c0", -1, P_CLK, HWBLK_IIC, 0), | 171 | SH_HWBLK_CLK("i2c0", -1, P_CLK, HWBLK_IIC, 0), |
172 | SH_HWBLK_CLK("rtc0", -1, R_CLK, HWBLK_RTC, 0), | 172 | SH_HWBLK_CLK("rtc0", -1, R_CLK, HWBLK_RTC, 0), |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c index 50babe01fe44..fc86c88223f4 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/clk.h> | ||
25 | #include <asm/clkdev.h> | ||
24 | #include <asm/clock.h> | 26 | #include <asm/clock.h> |
25 | #include <asm/hwblk.h> | 27 | #include <asm/hwblk.h> |
26 | #include <cpu/sh7723.h> | 28 | #include <cpu/sh7723.h> |
@@ -171,18 +173,18 @@ static struct clk mstp_clks[] = { | |||
171 | SH_HWBLK_CLK("sh0", -1, SH_CLK, HWBLK_SHYWAY, CLK_ENABLE_ON_INIT), | 173 | SH_HWBLK_CLK("sh0", -1, SH_CLK, HWBLK_SHYWAY, CLK_ENABLE_ON_INIT), |
172 | SH_HWBLK_CLK("hudi0", -1, P_CLK, HWBLK_HUDI, 0), | 174 | SH_HWBLK_CLK("hudi0", -1, P_CLK, HWBLK_HUDI, 0), |
173 | SH_HWBLK_CLK("ubc0", -1, I_CLK, HWBLK_UBC, 0), | 175 | SH_HWBLK_CLK("ubc0", -1, I_CLK, HWBLK_UBC, 0), |
174 | SH_HWBLK_CLK("tmu0", -1, P_CLK, HWBLK_TMU0, 0), | 176 | SH_HWBLK_CLK("tmu012_fck", -1, P_CLK, HWBLK_TMU0, 0), |
175 | SH_HWBLK_CLK("cmt0", -1, R_CLK, HWBLK_CMT, 0), | 177 | SH_HWBLK_CLK("cmt_fck", -1, R_CLK, HWBLK_CMT, 0), |
176 | SH_HWBLK_CLK("rwdt0", -1, R_CLK, HWBLK_RWDT, 0), | 178 | SH_HWBLK_CLK("rwdt0", -1, R_CLK, HWBLK_RWDT, 0), |
177 | SH_HWBLK_CLK("dmac1", -1, B_CLK, HWBLK_DMAC1, 0), | 179 | SH_HWBLK_CLK("dmac1", -1, B_CLK, HWBLK_DMAC1, 0), |
178 | SH_HWBLK_CLK("tmu1", -1, P_CLK, HWBLK_TMU1, 0), | 180 | SH_HWBLK_CLK("tmu345_fck", -1, P_CLK, HWBLK_TMU1, 0), |
179 | SH_HWBLK_CLK("flctl0", -1, P_CLK, HWBLK_FLCTL, 0), | 181 | SH_HWBLK_CLK("flctl0", -1, P_CLK, HWBLK_FLCTL, 0), |
180 | SH_HWBLK_CLK("scif0", -1, P_CLK, HWBLK_SCIF0, 0), | 182 | SH_HWBLK_CLK("sci_fck", 0, P_CLK, HWBLK_SCIF0, 0), |
181 | SH_HWBLK_CLK("scif1", -1, P_CLK, HWBLK_SCIF1, 0), | 183 | SH_HWBLK_CLK("sci_fck", 1, P_CLK, HWBLK_SCIF1, 0), |
182 | SH_HWBLK_CLK("scif2", -1, P_CLK, HWBLK_SCIF2, 0), | 184 | SH_HWBLK_CLK("sci_fck", 2, P_CLK, HWBLK_SCIF2, 0), |
183 | SH_HWBLK_CLK("scif3", -1, B_CLK, HWBLK_SCIF3, 0), | 185 | SH_HWBLK_CLK("sci_fck", 3, B_CLK, HWBLK_SCIF3, 0), |
184 | SH_HWBLK_CLK("scif4", -1, B_CLK, HWBLK_SCIF4, 0), | 186 | SH_HWBLK_CLK("sci_fck", 4, B_CLK, HWBLK_SCIF4, 0), |
185 | SH_HWBLK_CLK("scif5", -1, B_CLK, HWBLK_SCIF5, 0), | 187 | SH_HWBLK_CLK("sci_fck", 5, B_CLK, HWBLK_SCIF5, 0), |
186 | SH_HWBLK_CLK("msiof0", -1, B_CLK, HWBLK_MSIOF0, 0), | 188 | SH_HWBLK_CLK("msiof0", -1, B_CLK, HWBLK_MSIOF0, 0), |
187 | SH_HWBLK_CLK("msiof1", -1, B_CLK, HWBLK_MSIOF1, 0), | 189 | SH_HWBLK_CLK("msiof1", -1, B_CLK, HWBLK_MSIOF1, 0), |
188 | SH_HWBLK_CLK("meram0", -1, SH_CLK, HWBLK_MERAM, 0), | 190 | SH_HWBLK_CLK("meram0", -1, SH_CLK, HWBLK_MERAM, 0), |
@@ -211,6 +213,40 @@ static struct clk mstp_clks[] = { | |||
211 | SH_HWBLK_CLK("lcdc0", -1, B_CLK, HWBLK_LCDC, 0), | 213 | SH_HWBLK_CLK("lcdc0", -1, B_CLK, HWBLK_LCDC, 0), |
212 | }; | 214 | }; |
213 | 215 | ||
216 | static struct clk_lookup lookups[] = { | ||
217 | { | ||
218 | /* TMU0 */ | ||
219 | .dev_id = "sh_tmu.0", | ||
220 | .con_id = "tmu_fck", | ||
221 | .clk = &mstp_clks[11], /* tmu012_fck */ | ||
222 | }, { | ||
223 | /* TMU1 */ | ||
224 | .dev_id = "sh_tmu.1", | ||
225 | .con_id = "tmu_fck", | ||
226 | .clk = &mstp_clks[11], | ||
227 | }, { | ||
228 | /* TMU2 */ | ||
229 | .dev_id = "sh_tmu.2", | ||
230 | .con_id = "tmu_fck", | ||
231 | .clk = &mstp_clks[11], | ||
232 | }, { | ||
233 | /* TMU3 */ | ||
234 | .dev_id = "sh_tmu.3", | ||
235 | .con_id = "tmu_fck", | ||
236 | .clk = &mstp_clks[15], /* tmu345_fck */ | ||
237 | }, { | ||
238 | /* TMU4 */ | ||
239 | .dev_id = "sh_tmu.4", | ||
240 | .con_id = "tmu_fck", | ||
241 | .clk = &mstp_clks[15], | ||
242 | }, { | ||
243 | /* TMU5 */ | ||
244 | .dev_id = "sh_tmu.5", | ||
245 | .con_id = "tmu_fck", | ||
246 | .clk = &mstp_clks[15], | ||
247 | }, | ||
248 | }; | ||
249 | |||
214 | int __init arch_clk_init(void) | 250 | int __init arch_clk_init(void) |
215 | { | 251 | { |
216 | int k, ret = 0; | 252 | int k, ret = 0; |
@@ -222,7 +258,9 @@ int __init arch_clk_init(void) | |||
222 | pll_clk.parent = &extal_clk; | 258 | pll_clk.parent = &extal_clk; |
223 | 259 | ||
224 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) | 260 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) |
225 | ret = clk_register(main_clks[k]); | 261 | ret |= clk_register(main_clks[k]); |
262 | |||
263 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
226 | 264 | ||
227 | if (!ret) | 265 | if (!ret) |
228 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); | 266 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c index 6707061fbf54..f1583a23b3a5 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/clk.h> | ||
25 | #include <asm/clkdev.h> | ||
24 | #include <asm/clock.h> | 26 | #include <asm/clock.h> |
25 | #include <asm/hwblk.h> | 27 | #include <asm/hwblk.h> |
26 | #include <cpu/sh7724.h> | 28 | #include <cpu/sh7724.h> |
@@ -189,17 +191,17 @@ static struct clk mstp_clks[] = { | |||
189 | SH_HWBLK_CLK("sh0", -1, SH_CLK, HWBLK_SHYWAY, CLK_ENABLE_ON_INIT), | 191 | SH_HWBLK_CLK("sh0", -1, SH_CLK, HWBLK_SHYWAY, CLK_ENABLE_ON_INIT), |
190 | SH_HWBLK_CLK("hudi0", -1, P_CLK, HWBLK_HUDI, 0), | 192 | SH_HWBLK_CLK("hudi0", -1, P_CLK, HWBLK_HUDI, 0), |
191 | SH_HWBLK_CLK("ubc0", -1, I_CLK, HWBLK_UBC, 0), | 193 | SH_HWBLK_CLK("ubc0", -1, I_CLK, HWBLK_UBC, 0), |
192 | SH_HWBLK_CLK("tmu0", -1, P_CLK, HWBLK_TMU0, 0), | 194 | SH_HWBLK_CLK("tmu012_fck", -1, P_CLK, HWBLK_TMU0, 0), |
193 | SH_HWBLK_CLK("cmt0", -1, R_CLK, HWBLK_CMT, 0), | 195 | SH_HWBLK_CLK("cmt_fck", -1, R_CLK, HWBLK_CMT, 0), |
194 | SH_HWBLK_CLK("rwdt0", -1, R_CLK, HWBLK_RWDT, 0), | 196 | SH_HWBLK_CLK("rwdt0", -1, R_CLK, HWBLK_RWDT, 0), |
195 | SH_HWBLK_CLK("dmac1", -1, B_CLK, HWBLK_DMAC1, 0), | 197 | SH_HWBLK_CLK("dmac1", -1, B_CLK, HWBLK_DMAC1, 0), |
196 | SH_HWBLK_CLK("tmu1", -1, P_CLK, HWBLK_TMU1, 0), | 198 | SH_HWBLK_CLK("tmu345_fck", -1, P_CLK, HWBLK_TMU1, 0), |
197 | SH_HWBLK_CLK("scif0", -1, P_CLK, HWBLK_SCIF0, 0), | 199 | SH_HWBLK_CLK("sci_fck", 0, P_CLK, HWBLK_SCIF0, 0), |
198 | SH_HWBLK_CLK("scif1", -1, P_CLK, HWBLK_SCIF1, 0), | 200 | SH_HWBLK_CLK("sci_fck", 1, P_CLK, HWBLK_SCIF1, 0), |
199 | SH_HWBLK_CLK("scif2", -1, P_CLK, HWBLK_SCIF2, 0), | 201 | SH_HWBLK_CLK("sci_fck", 2, P_CLK, HWBLK_SCIF2, 0), |
200 | SH_HWBLK_CLK("scif3", -1, B_CLK, HWBLK_SCIF3, 0), | 202 | SH_HWBLK_CLK("sci_fck", 3, B_CLK, HWBLK_SCIF3, 0), |
201 | SH_HWBLK_CLK("scif4", -1, B_CLK, HWBLK_SCIF4, 0), | 203 | SH_HWBLK_CLK("sci_fck", 4, B_CLK, HWBLK_SCIF4, 0), |
202 | SH_HWBLK_CLK("scif5", -1, B_CLK, HWBLK_SCIF5, 0), | 204 | SH_HWBLK_CLK("sci_fck", 5, B_CLK, HWBLK_SCIF5, 0), |
203 | SH_HWBLK_CLK("msiof0", -1, B_CLK, HWBLK_MSIOF0, 0), | 205 | SH_HWBLK_CLK("msiof0", -1, B_CLK, HWBLK_MSIOF0, 0), |
204 | SH_HWBLK_CLK("msiof1", -1, B_CLK, HWBLK_MSIOF1, 0), | 206 | SH_HWBLK_CLK("msiof1", -1, B_CLK, HWBLK_MSIOF1, 0), |
205 | 207 | ||
@@ -233,6 +235,40 @@ static struct clk mstp_clks[] = { | |||
233 | SH_HWBLK_CLK("lcdc0", -1, B_CLK, HWBLK_LCDC, 0), | 235 | SH_HWBLK_CLK("lcdc0", -1, B_CLK, HWBLK_LCDC, 0), |
234 | }; | 236 | }; |
235 | 237 | ||
238 | static struct clk_lookup lookups[] = { | ||
239 | { | ||
240 | /* TMU0 */ | ||
241 | .dev_id = "sh_tmu.0", | ||
242 | .con_id = "tmu_fck", | ||
243 | .clk = &mstp_clks[12], /* tmu012_fck */ | ||
244 | }, { | ||
245 | /* TMU1 */ | ||
246 | .dev_id = "sh_tmu.1", | ||
247 | .con_id = "tmu_fck", | ||
248 | .clk = &mstp_clks[12], | ||
249 | }, { | ||
250 | /* TMU2 */ | ||
251 | .dev_id = "sh_tmu.2", | ||
252 | .con_id = "tmu_fck", | ||
253 | .clk = &mstp_clks[12], | ||
254 | }, { | ||
255 | /* TMU3 */ | ||
256 | .dev_id = "sh_tmu.3", | ||
257 | .con_id = "tmu_fck", | ||
258 | .clk = &mstp_clks[16], /* tmu345_fck */ | ||
259 | }, { | ||
260 | /* TMU4 */ | ||
261 | .dev_id = "sh_tmu.4", | ||
262 | .con_id = "tmu_fck", | ||
263 | .clk = &mstp_clks[16], | ||
264 | }, { | ||
265 | /* TMU5 */ | ||
266 | .dev_id = "sh_tmu.5", | ||
267 | .con_id = "tmu_fck", | ||
268 | .clk = &mstp_clks[16], | ||
269 | }, | ||
270 | }; | ||
271 | |||
236 | int __init arch_clk_init(void) | 272 | int __init arch_clk_init(void) |
237 | { | 273 | { |
238 | int k, ret = 0; | 274 | int k, ret = 0; |
@@ -246,6 +282,8 @@ int __init arch_clk_init(void) | |||
246 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) | 282 | for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++) |
247 | ret = clk_register(main_clks[k]); | 283 | ret = clk_register(main_clks[k]); |
248 | 284 | ||
285 | clkdev_add_table(lookups, ARRAY_SIZE(lookups)); | ||
286 | |||
249 | if (!ret) | 287 | if (!ret) |
250 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); | 288 | ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table); |
251 | 289 | ||
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c index d997f0a25b10..28de049a59b1 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * SH7785 support for the clock framework | 4 | * SH7785 support for the clock framework |
5 | * | 5 | * |
6 | * Copyright (C) 2007 - 2009 Paul Mundt | 6 | * Copyright (C) 2007 - 2010 Paul Mundt |
7 | * | 7 | * |
8 | * This file is subject to the terms and conditions of the GNU General Public | 8 | * This file is subject to the terms and conditions of the GNU General Public |
9 | * License. See the file "COPYING" in the main directory of this archive | 9 | * License. See the file "COPYING" in the main directory of this archive |
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/cpufreq.h> | 16 | #include <linux/cpufreq.h> |
17 | #include <asm/clkdev.h> | ||
17 | #include <asm/clock.h> | 18 | #include <asm/clock.h> |
18 | #include <asm/freq.h> | 19 | #include <asm/freq.h> |
19 | #include <cpu/sh7785.h> | 20 | #include <cpu/sh7785.h> |
@@ -88,12 +89,12 @@ struct clk div4_clks[DIV4_NR] = { | |||
88 | 89 | ||
89 | static struct clk mstp_clks[] = { | 90 | static struct clk mstp_clks[] = { |
90 | /* MSTPCR0 */ | 91 | /* MSTPCR0 */ |
91 | SH_CLK_MSTP32("scif_fck", 5, &div4_clks[DIV4_P], MSTPCR0, 29, 0), | 92 | SH_CLK_MSTP32("sci_fck", 5, &div4_clks[DIV4_P], MSTPCR0, 29, 0), |
92 | SH_CLK_MSTP32("scif_fck", 4, &div4_clks[DIV4_P], MSTPCR0, 28, 0), | 93 | SH_CLK_MSTP32("sci_fck", 4, &div4_clks[DIV4_P], MSTPCR0, 28, 0), |
93 | SH_CLK_MSTP32("scif_fck", 3, &div4_clks[DIV4_P], MSTPCR0, 27, 0), | 94 | SH_CLK_MSTP32("sci_fck", 3, &div4_clks[DIV4_P], MSTPCR0, 27, 0), |
94 | SH_CLK_MSTP32("scif_fck", 2, &div4_clks[DIV4_P], MSTPCR0, 26, 0), | 95 | SH_CLK_MSTP32("sci_fck", 2, &div4_clks[DIV4_P], MSTPCR0, 26, 0), |
95 | SH_CLK_MSTP32("scif_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 25, 0), | 96 | SH_CLK_MSTP32("sci_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 25, 0), |
96 | SH_CLK_MSTP32("scif_fck", 0, &div4_clks[DIV4_P], MSTPCR0, 24, 0), | 97 | SH_CLK_MSTP32("sci_fck", 0, &div4_clks[DIV4_P], MSTPCR0, 24, 0), |
97 | SH_CLK_MSTP32("ssi_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 21, 0), | 98 | SH_CLK_MSTP32("ssi_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 21, 0), |
98 | SH_CLK_MSTP32("ssi_fck", 0, &div4_clks[DIV4_P], MSTPCR0, 20, 0), | 99 | SH_CLK_MSTP32("ssi_fck", 0, &div4_clks[DIV4_P], MSTPCR0, 20, 0), |
99 | SH_CLK_MSTP32("hac_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 17, 0), | 100 | SH_CLK_MSTP32("hac_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 17, 0), |
@@ -113,12 +114,48 @@ static struct clk mstp_clks[] = { | |||
113 | SH_CLK_MSTP32("gdta_fck", -1, NULL, MSTPCR1, 0, 0), | 114 | SH_CLK_MSTP32("gdta_fck", -1, NULL, MSTPCR1, 0, 0), |
114 | }; | 115 | }; |
115 | 116 | ||
117 | static struct clk_lookup lookups[] = { | ||
118 | { | ||
119 | /* TMU0 */ | ||
120 | .dev_id = "sh_tmu.0", | ||
121 | .con_id = "tmu_fck", | ||
122 | .clk = &mstp_clks[13], /* tmu012_fck */ | ||
123 | }, { | ||
124 | /* TMU1 */ | ||
125 | .dev_id = "sh_tmu.1", | ||
126 | .con_id = "tmu_fck", | ||
127 | .clk = &mstp_clks[13], | ||
128 | }, { | ||
129 | /* TMU2 */ | ||
130 | .dev_id = "sh_tmu.2", | ||
131 | .con_id = "tmu_fck", | ||
132 | .clk = &mstp_clks[13], | ||
133 | }, { | ||
134 | /* TMU3 */ | ||
135 | .dev_id = "sh_tmu.3", | ||
136 | .con_id = "tmu_fck", | ||
137 | .clk = &mstp_clks[12], /* tmu345_fck */ | ||
138 | }, { | ||
139 | /* TMU4 */ | ||
140 | .dev_id = "sh_tmu.4", | ||
141 | .con_id = "tmu_fck", | ||
142 | .clk = &mstp_clks[12], | ||
143 | }, { | ||
144 | /* TMU5 */ | ||
145 | .dev_id = "sh_tmu.5", | ||
146 | .con_id = "tmu_fck", | ||
147 | .clk = &mstp_clks[12], | ||
148 | }, | ||
149 | }; | ||
150 | |||
116 | int __init arch_clk_init(void) | 151 | int __init arch_clk_init(void) |
117 | { | 152 | { |
118 | int i, ret = 0; | 153 | int i, ret = 0; |
119 | 154 | ||
120 | for (i = 0; i < ARRAY_SIZE(clks); i++) | 155 | for (i = 0; i < ARRAY_SIZE(clks); i++) |
121 | ret |= clk_register(clks[i]); | 156 | ret |= clk_register(clks[i]); |
157 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | ||
158 | clkdev_add(&lookups[i]); | ||
122 | 159 | ||
123 | if (!ret) | 160 | if (!ret) |
124 | ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks), | 161 | ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks), |
diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c index af69fd468703..c4a84bb2f3d9 100644 --- a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c | |||
@@ -13,6 +13,8 @@ | |||
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/clk.h> | 14 | #include <linux/clk.h> |
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/clk.h> | ||
17 | #include <asm/clkdev.h> | ||
16 | #include <asm/clock.h> | 18 | #include <asm/clock.h> |
17 | #include <asm/freq.h> | 19 | #include <asm/freq.h> |
18 | 20 | ||
@@ -87,12 +89,12 @@ struct clk div4_clks[DIV4_NR] = { | |||
87 | 89 | ||
88 | static struct clk mstp_clks[] = { | 90 | static struct clk mstp_clks[] = { |
89 | /* MSTPCR0 */ | 91 | /* MSTPCR0 */ |
90 | SH_CLK_MSTP32("scif_fck", 5, &div4_clks[DIV4_P], MSTPCR0, 29, 0), | 92 | SH_CLK_MSTP32("sci_fck", 5, &div4_clks[DIV4_P], MSTPCR0, 29, 0), |
91 | SH_CLK_MSTP32("scif_fck", 4, &div4_clks[DIV4_P], MSTPCR0, 28, 0), | 93 | SH_CLK_MSTP32("sci_fck", 4, &div4_clks[DIV4_P], MSTPCR0, 28, 0), |
92 | SH_CLK_MSTP32("scif_fck", 3, &div4_clks[DIV4_P], MSTPCR0, 27, 0), | 94 | SH_CLK_MSTP32("sci_fck", 3, &div4_clks[DIV4_P], MSTPCR0, 27, 0), |
93 | SH_CLK_MSTP32("scif_fck", 2, &div4_clks[DIV4_P], MSTPCR0, 26, 0), | 95 | SH_CLK_MSTP32("sci_fck", 2, &div4_clks[DIV4_P], MSTPCR0, 26, 0), |
94 | SH_CLK_MSTP32("scif_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 25, 0), | 96 | SH_CLK_MSTP32("sci_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 25, 0), |
95 | SH_CLK_MSTP32("scif_fck", 0, &div4_clks[DIV4_P], MSTPCR0, 24, 0), | 97 | SH_CLK_MSTP32("sci_fck", 0, &div4_clks[DIV4_P], MSTPCR0, 24, 0), |
96 | SH_CLK_MSTP32("ssi_fck", 3, &div4_clks[DIV4_P], MSTPCR0, 23, 0), | 98 | SH_CLK_MSTP32("ssi_fck", 3, &div4_clks[DIV4_P], MSTPCR0, 23, 0), |
97 | SH_CLK_MSTP32("ssi_fck", 2, &div4_clks[DIV4_P], MSTPCR0, 22, 0), | 99 | SH_CLK_MSTP32("ssi_fck", 2, &div4_clks[DIV4_P], MSTPCR0, 22, 0), |
98 | SH_CLK_MSTP32("ssi_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 21, 0), | 100 | SH_CLK_MSTP32("ssi_fck", 1, &div4_clks[DIV4_P], MSTPCR0, 21, 0), |
@@ -120,12 +122,78 @@ static struct clk mstp_clks[] = { | |||
120 | SH_CLK_MSTP32("ether_fck", -1, NULL, MSTPCR1, 2, 0), | 122 | SH_CLK_MSTP32("ether_fck", -1, NULL, MSTPCR1, 2, 0), |
121 | }; | 123 | }; |
122 | 124 | ||
125 | static struct clk_lookup lookups[] = { | ||
126 | { | ||
127 | /* TMU0 */ | ||
128 | .dev_id = "sh_tmu.0", | ||
129 | .con_id = "tmu_fck", | ||
130 | .clk = &mstp_clks[17], /* tmu012_fck */ | ||
131 | }, { | ||
132 | /* TMU1 */ | ||
133 | .dev_id = "sh_tmu.1", | ||
134 | .con_id = "tmu_fck", | ||
135 | .clk = &mstp_clks[17], | ||
136 | }, { | ||
137 | /* TMU2 */ | ||
138 | .dev_id = "sh_tmu.2", | ||
139 | .con_id = "tmu_fck", | ||
140 | .clk = &mstp_clks[17], | ||
141 | }, { | ||
142 | /* TMU3 */ | ||
143 | .dev_id = "sh_tmu.3", | ||
144 | .con_id = "tmu_fck", | ||
145 | .clk = &mstp_clks[16], /* tmu345_fck */ | ||
146 | }, { | ||
147 | /* TMU4 */ | ||
148 | .dev_id = "sh_tmu.4", | ||
149 | .con_id = "tmu_fck", | ||
150 | .clk = &mstp_clks[16], | ||
151 | }, { | ||
152 | /* TMU5 */ | ||
153 | .dev_id = "sh_tmu.5", | ||
154 | .con_id = "tmu_fck", | ||
155 | .clk = &mstp_clks[16], | ||
156 | }, { | ||
157 | /* TMU6 */ | ||
158 | .dev_id = "sh_tmu.6", | ||
159 | .con_id = "tmu_fck", | ||
160 | .clk = &mstp_clks[15], /* tmu678_fck */ | ||
161 | }, { | ||
162 | /* TMU7 */ | ||
163 | .dev_id = "sh_tmu.7", | ||
164 | .con_id = "tmu_fck", | ||
165 | .clk = &mstp_clks[15], | ||
166 | }, { | ||
167 | /* TMU8 */ | ||
168 | .dev_id = "sh_tmu.8", | ||
169 | .con_id = "tmu_fck", | ||
170 | .clk = &mstp_clks[15], | ||
171 | }, { | ||
172 | /* TMU9 */ | ||
173 | .dev_id = "sh_tmu.9", | ||
174 | .con_id = "tmu_fck", | ||
175 | .clk = &mstp_clks[14], /* tmu9_11_fck */ | ||
176 | }, { | ||
177 | /* TMU10 */ | ||
178 | .dev_id = "sh_tmu.10", | ||
179 | .con_id = "tmu_fck", | ||
180 | .clk = &mstp_clks[14], | ||
181 | }, { | ||
182 | /* TMU11 */ | ||
183 | .dev_id = "sh_tmu.11", | ||
184 | .con_id = "tmu_fck", | ||
185 | .clk = &mstp_clks[14], | ||
186 | } | ||
187 | }; | ||
188 | |||
123 | int __init arch_clk_init(void) | 189 | int __init arch_clk_init(void) |
124 | { | 190 | { |
125 | int i, ret = 0; | 191 | int i, ret = 0; |
126 | 192 | ||
127 | for (i = 0; i < ARRAY_SIZE(clks); i++) | 193 | for (i = 0; i < ARRAY_SIZE(clks); i++) |
128 | ret |= clk_register(clks[i]); | 194 | ret |= clk_register(clks[i]); |
195 | for (i = 0; i < ARRAY_SIZE(lookups); i++) | ||
196 | clkdev_add(&lookups[i]); | ||
129 | 197 | ||
130 | if (!ret) | 198 | if (!ret) |
131 | ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks), | 199 | ret = sh_clk_div4_register(div4_clks, ARRAY_SIZE(div4_clks), |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c index 45eb1bfd42c9..3681cafdb4af 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c | |||
@@ -21,7 +21,6 @@ static struct plat_sci_port scif0_platform_data = { | |||
21 | .flags = UPF_BOOT_AUTOCONF, | 21 | .flags = UPF_BOOT_AUTOCONF, |
22 | .type = PORT_SCIF, | 22 | .type = PORT_SCIF, |
23 | .irqs = { 80, 80, 80, 80 }, | 23 | .irqs = { 80, 80, 80, 80 }, |
24 | .clk = "scif0", | ||
25 | }; | 24 | }; |
26 | 25 | ||
27 | static struct platform_device scif0_device = { | 26 | static struct platform_device scif0_device = { |
@@ -37,7 +36,6 @@ static struct plat_sci_port scif1_platform_data = { | |||
37 | .flags = UPF_BOOT_AUTOCONF, | 36 | .flags = UPF_BOOT_AUTOCONF, |
38 | .type = PORT_SCIF, | 37 | .type = PORT_SCIF, |
39 | .irqs = { 81, 81, 81, 81 }, | 38 | .irqs = { 81, 81, 81, 81 }, |
40 | .clk = "scif1", | ||
41 | }; | 39 | }; |
42 | 40 | ||
43 | static struct platform_device scif1_device = { | 41 | static struct platform_device scif1_device = { |
@@ -53,7 +51,6 @@ static struct plat_sci_port scif2_platform_data = { | |||
53 | .flags = UPF_BOOT_AUTOCONF, | 51 | .flags = UPF_BOOT_AUTOCONF, |
54 | .type = PORT_SCIF, | 52 | .type = PORT_SCIF, |
55 | .irqs = { 82, 82, 82, 82 }, | 53 | .irqs = { 82, 82, 82, 82 }, |
56 | .clk = "scif2", | ||
57 | }; | 54 | }; |
58 | 55 | ||
59 | static struct platform_device scif2_device = { | 56 | static struct platform_device scif2_device = { |
@@ -69,7 +66,6 @@ static struct plat_sci_port scif3_platform_data = { | |||
69 | .flags = UPF_BOOT_AUTOCONF, | 66 | .flags = UPF_BOOT_AUTOCONF, |
70 | .type = PORT_SCIF, | 67 | .type = PORT_SCIF, |
71 | .irqs = { 83, 83, 83, 83 }, | 68 | .irqs = { 83, 83, 83, 83 }, |
72 | .clk = "scif3", | ||
73 | }; | 69 | }; |
74 | 70 | ||
75 | static struct platform_device scif3_device = { | 71 | static struct platform_device scif3_device = { |
@@ -207,17 +203,14 @@ static struct platform_device jpu_device = { | |||
207 | }; | 203 | }; |
208 | 204 | ||
209 | static struct sh_timer_config cmt_platform_data = { | 205 | static struct sh_timer_config cmt_platform_data = { |
210 | .name = "CMT", | ||
211 | .channel_offset = 0x60, | 206 | .channel_offset = 0x60, |
212 | .timer_bit = 5, | 207 | .timer_bit = 5, |
213 | .clk = "cmt0", | ||
214 | .clockevent_rating = 125, | 208 | .clockevent_rating = 125, |
215 | .clocksource_rating = 200, | 209 | .clocksource_rating = 200, |
216 | }; | 210 | }; |
217 | 211 | ||
218 | static struct resource cmt_resources[] = { | 212 | static struct resource cmt_resources[] = { |
219 | [0] = { | 213 | [0] = { |
220 | .name = "CMT", | ||
221 | .start = 0x044a0060, | 214 | .start = 0x044a0060, |
222 | .end = 0x044a006b, | 215 | .end = 0x044a006b, |
223 | .flags = IORESOURCE_MEM, | 216 | .flags = IORESOURCE_MEM, |
@@ -239,16 +232,13 @@ static struct platform_device cmt_device = { | |||
239 | }; | 232 | }; |
240 | 233 | ||
241 | static struct sh_timer_config tmu0_platform_data = { | 234 | static struct sh_timer_config tmu0_platform_data = { |
242 | .name = "TMU0", | ||
243 | .channel_offset = 0x04, | 235 | .channel_offset = 0x04, |
244 | .timer_bit = 0, | 236 | .timer_bit = 0, |
245 | .clk = "tmu0", | ||
246 | .clockevent_rating = 200, | 237 | .clockevent_rating = 200, |
247 | }; | 238 | }; |
248 | 239 | ||
249 | static struct resource tmu0_resources[] = { | 240 | static struct resource tmu0_resources[] = { |
250 | [0] = { | 241 | [0] = { |
251 | .name = "TMU0", | ||
252 | .start = 0xffd80008, | 242 | .start = 0xffd80008, |
253 | .end = 0xffd80013, | 243 | .end = 0xffd80013, |
254 | .flags = IORESOURCE_MEM, | 244 | .flags = IORESOURCE_MEM, |
@@ -270,16 +260,13 @@ static struct platform_device tmu0_device = { | |||
270 | }; | 260 | }; |
271 | 261 | ||
272 | static struct sh_timer_config tmu1_platform_data = { | 262 | static struct sh_timer_config tmu1_platform_data = { |
273 | .name = "TMU1", | ||
274 | .channel_offset = 0x10, | 263 | .channel_offset = 0x10, |
275 | .timer_bit = 1, | 264 | .timer_bit = 1, |
276 | .clk = "tmu0", | ||
277 | .clocksource_rating = 200, | 265 | .clocksource_rating = 200, |
278 | }; | 266 | }; |
279 | 267 | ||
280 | static struct resource tmu1_resources[] = { | 268 | static struct resource tmu1_resources[] = { |
281 | [0] = { | 269 | [0] = { |
282 | .name = "TMU1", | ||
283 | .start = 0xffd80014, | 270 | .start = 0xffd80014, |
284 | .end = 0xffd8001f, | 271 | .end = 0xffd8001f, |
285 | .flags = IORESOURCE_MEM, | 272 | .flags = IORESOURCE_MEM, |
@@ -301,15 +288,12 @@ static struct platform_device tmu1_device = { | |||
301 | }; | 288 | }; |
302 | 289 | ||
303 | static struct sh_timer_config tmu2_platform_data = { | 290 | static struct sh_timer_config tmu2_platform_data = { |
304 | .name = "TMU2", | ||
305 | .channel_offset = 0x1c, | 291 | .channel_offset = 0x1c, |
306 | .timer_bit = 2, | 292 | .timer_bit = 2, |
307 | .clk = "tmu0", | ||
308 | }; | 293 | }; |
309 | 294 | ||
310 | static struct resource tmu2_resources[] = { | 295 | static struct resource tmu2_resources[] = { |
311 | [0] = { | 296 | [0] = { |
312 | .name = "TMU2", | ||
313 | .start = 0xffd80020, | 297 | .start = 0xffd80020, |
314 | .end = 0xffd8002b, | 298 | .end = 0xffd8002b, |
315 | .flags = IORESOURCE_MEM, | 299 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c index c494c193e3b6..8dab9e1bbd89 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c | |||
@@ -23,7 +23,6 @@ static struct plat_sci_port scif0_platform_data = { | |||
23 | .flags = UPF_BOOT_AUTOCONF, | 23 | .flags = UPF_BOOT_AUTOCONF, |
24 | .type = PORT_SCIF, | 24 | .type = PORT_SCIF, |
25 | .irqs = { 80, 80, 80, 80 }, | 25 | .irqs = { 80, 80, 80, 80 }, |
26 | .clk = "scif0", | ||
27 | }; | 26 | }; |
28 | 27 | ||
29 | static struct platform_device scif0_device = { | 28 | static struct platform_device scif0_device = { |
@@ -169,17 +168,14 @@ static struct platform_device veu1_device = { | |||
169 | }; | 168 | }; |
170 | 169 | ||
171 | static struct sh_timer_config cmt_platform_data = { | 170 | static struct sh_timer_config cmt_platform_data = { |
172 | .name = "CMT", | ||
173 | .channel_offset = 0x60, | 171 | .channel_offset = 0x60, |
174 | .timer_bit = 5, | 172 | .timer_bit = 5, |
175 | .clk = "cmt0", | ||
176 | .clockevent_rating = 125, | 173 | .clockevent_rating = 125, |
177 | .clocksource_rating = 200, | 174 | .clocksource_rating = 200, |
178 | }; | 175 | }; |
179 | 176 | ||
180 | static struct resource cmt_resources[] = { | 177 | static struct resource cmt_resources[] = { |
181 | [0] = { | 178 | [0] = { |
182 | .name = "CMT", | ||
183 | .start = 0x044a0060, | 179 | .start = 0x044a0060, |
184 | .end = 0x044a006b, | 180 | .end = 0x044a006b, |
185 | .flags = IORESOURCE_MEM, | 181 | .flags = IORESOURCE_MEM, |
@@ -201,16 +197,13 @@ static struct platform_device cmt_device = { | |||
201 | }; | 197 | }; |
202 | 198 | ||
203 | static struct sh_timer_config tmu0_platform_data = { | 199 | static struct sh_timer_config tmu0_platform_data = { |
204 | .name = "TMU0", | ||
205 | .channel_offset = 0x04, | 200 | .channel_offset = 0x04, |
206 | .timer_bit = 0, | 201 | .timer_bit = 0, |
207 | .clk = "tmu0", | ||
208 | .clockevent_rating = 200, | 202 | .clockevent_rating = 200, |
209 | }; | 203 | }; |
210 | 204 | ||
211 | static struct resource tmu0_resources[] = { | 205 | static struct resource tmu0_resources[] = { |
212 | [0] = { | 206 | [0] = { |
213 | .name = "TMU0", | ||
214 | .start = 0xffd80008, | 207 | .start = 0xffd80008, |
215 | .end = 0xffd80013, | 208 | .end = 0xffd80013, |
216 | .flags = IORESOURCE_MEM, | 209 | .flags = IORESOURCE_MEM, |
@@ -232,16 +225,13 @@ static struct platform_device tmu0_device = { | |||
232 | }; | 225 | }; |
233 | 226 | ||
234 | static struct sh_timer_config tmu1_platform_data = { | 227 | static struct sh_timer_config tmu1_platform_data = { |
235 | .name = "TMU1", | ||
236 | .channel_offset = 0x10, | 228 | .channel_offset = 0x10, |
237 | .timer_bit = 1, | 229 | .timer_bit = 1, |
238 | .clk = "tmu0", | ||
239 | .clocksource_rating = 200, | 230 | .clocksource_rating = 200, |
240 | }; | 231 | }; |
241 | 232 | ||
242 | static struct resource tmu1_resources[] = { | 233 | static struct resource tmu1_resources[] = { |
243 | [0] = { | 234 | [0] = { |
244 | .name = "TMU1", | ||
245 | .start = 0xffd80014, | 235 | .start = 0xffd80014, |
246 | .end = 0xffd8001f, | 236 | .end = 0xffd8001f, |
247 | .flags = IORESOURCE_MEM, | 237 | .flags = IORESOURCE_MEM, |
@@ -263,15 +253,12 @@ static struct platform_device tmu1_device = { | |||
263 | }; | 253 | }; |
264 | 254 | ||
265 | static struct sh_timer_config tmu2_platform_data = { | 255 | static struct sh_timer_config tmu2_platform_data = { |
266 | .name = "TMU2", | ||
267 | .channel_offset = 0x1c, | 256 | .channel_offset = 0x1c, |
268 | .timer_bit = 2, | 257 | .timer_bit = 2, |
269 | .clk = "tmu0", | ||
270 | }; | 258 | }; |
271 | 259 | ||
272 | static struct resource tmu2_resources[] = { | 260 | static struct resource tmu2_resources[] = { |
273 | [0] = { | 261 | [0] = { |
274 | .name = "TMU2", | ||
275 | .start = 0xffd80020, | 262 | .start = 0xffd80020, |
276 | .end = 0xffd8002b, | 263 | .end = 0xffd8002b, |
277 | .flags = IORESOURCE_MEM, | 264 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index fd7e3639e845..dc9b30d086a4 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -174,7 +174,6 @@ static struct plat_sci_port scif0_platform_data = { | |||
174 | .flags = UPF_BOOT_AUTOCONF, | 174 | .flags = UPF_BOOT_AUTOCONF, |
175 | .type = PORT_SCIF, | 175 | .type = PORT_SCIF, |
176 | .irqs = { 80, 80, 80, 80 }, | 176 | .irqs = { 80, 80, 80, 80 }, |
177 | .clk = "scif0", | ||
178 | }; | 177 | }; |
179 | 178 | ||
180 | static struct platform_device scif0_device = { | 179 | static struct platform_device scif0_device = { |
@@ -190,7 +189,6 @@ static struct plat_sci_port scif1_platform_data = { | |||
190 | .flags = UPF_BOOT_AUTOCONF, | 189 | .flags = UPF_BOOT_AUTOCONF, |
191 | .type = PORT_SCIF, | 190 | .type = PORT_SCIF, |
192 | .irqs = { 81, 81, 81, 81 }, | 191 | .irqs = { 81, 81, 81, 81 }, |
193 | .clk = "scif1", | ||
194 | }; | 192 | }; |
195 | 193 | ||
196 | static struct platform_device scif1_device = { | 194 | static struct platform_device scif1_device = { |
@@ -206,7 +204,6 @@ static struct plat_sci_port scif2_platform_data = { | |||
206 | .flags = UPF_BOOT_AUTOCONF, | 204 | .flags = UPF_BOOT_AUTOCONF, |
207 | .type = PORT_SCIF, | 205 | .type = PORT_SCIF, |
208 | .irqs = { 82, 82, 82, 82 }, | 206 | .irqs = { 82, 82, 82, 82 }, |
209 | .clk = "scif2", | ||
210 | }; | 207 | }; |
211 | 208 | ||
212 | static struct platform_device scif2_device = { | 209 | static struct platform_device scif2_device = { |
@@ -401,17 +398,14 @@ static struct platform_device jpu_device = { | |||
401 | }; | 398 | }; |
402 | 399 | ||
403 | static struct sh_timer_config cmt_platform_data = { | 400 | static struct sh_timer_config cmt_platform_data = { |
404 | .name = "CMT", | ||
405 | .channel_offset = 0x60, | 401 | .channel_offset = 0x60, |
406 | .timer_bit = 5, | 402 | .timer_bit = 5, |
407 | .clk = "cmt0", | ||
408 | .clockevent_rating = 125, | 403 | .clockevent_rating = 125, |
409 | .clocksource_rating = 125, | 404 | .clocksource_rating = 125, |
410 | }; | 405 | }; |
411 | 406 | ||
412 | static struct resource cmt_resources[] = { | 407 | static struct resource cmt_resources[] = { |
413 | [0] = { | 408 | [0] = { |
414 | .name = "CMT", | ||
415 | .start = 0x044a0060, | 409 | .start = 0x044a0060, |
416 | .end = 0x044a006b, | 410 | .end = 0x044a006b, |
417 | .flags = IORESOURCE_MEM, | 411 | .flags = IORESOURCE_MEM, |
@@ -436,16 +430,13 @@ static struct platform_device cmt_device = { | |||
436 | }; | 430 | }; |
437 | 431 | ||
438 | static struct sh_timer_config tmu0_platform_data = { | 432 | static struct sh_timer_config tmu0_platform_data = { |
439 | .name = "TMU0", | ||
440 | .channel_offset = 0x04, | 433 | .channel_offset = 0x04, |
441 | .timer_bit = 0, | 434 | .timer_bit = 0, |
442 | .clk = "tmu0", | ||
443 | .clockevent_rating = 200, | 435 | .clockevent_rating = 200, |
444 | }; | 436 | }; |
445 | 437 | ||
446 | static struct resource tmu0_resources[] = { | 438 | static struct resource tmu0_resources[] = { |
447 | [0] = { | 439 | [0] = { |
448 | .name = "TMU0", | ||
449 | .start = 0xffd80008, | 440 | .start = 0xffd80008, |
450 | .end = 0xffd80013, | 441 | .end = 0xffd80013, |
451 | .flags = IORESOURCE_MEM, | 442 | .flags = IORESOURCE_MEM, |
@@ -470,16 +461,13 @@ static struct platform_device tmu0_device = { | |||
470 | }; | 461 | }; |
471 | 462 | ||
472 | static struct sh_timer_config tmu1_platform_data = { | 463 | static struct sh_timer_config tmu1_platform_data = { |
473 | .name = "TMU1", | ||
474 | .channel_offset = 0x10, | 464 | .channel_offset = 0x10, |
475 | .timer_bit = 1, | 465 | .timer_bit = 1, |
476 | .clk = "tmu0", | ||
477 | .clocksource_rating = 200, | 466 | .clocksource_rating = 200, |
478 | }; | 467 | }; |
479 | 468 | ||
480 | static struct resource tmu1_resources[] = { | 469 | static struct resource tmu1_resources[] = { |
481 | [0] = { | 470 | [0] = { |
482 | .name = "TMU1", | ||
483 | .start = 0xffd80014, | 471 | .start = 0xffd80014, |
484 | .end = 0xffd8001f, | 472 | .end = 0xffd8001f, |
485 | .flags = IORESOURCE_MEM, | 473 | .flags = IORESOURCE_MEM, |
@@ -504,15 +492,12 @@ static struct platform_device tmu1_device = { | |||
504 | }; | 492 | }; |
505 | 493 | ||
506 | static struct sh_timer_config tmu2_platform_data = { | 494 | static struct sh_timer_config tmu2_platform_data = { |
507 | .name = "TMU2", | ||
508 | .channel_offset = 0x1c, | 495 | .channel_offset = 0x1c, |
509 | .timer_bit = 2, | 496 | .timer_bit = 2, |
510 | .clk = "tmu0", | ||
511 | }; | 497 | }; |
512 | 498 | ||
513 | static struct resource tmu2_resources[] = { | 499 | static struct resource tmu2_resources[] = { |
514 | [0] = { | 500 | [0] = { |
515 | .name = "TMU2", | ||
516 | .start = 0xffd80020, | 501 | .start = 0xffd80020, |
517 | .end = 0xffd8002b, | 502 | .end = 0xffd8002b, |
518 | .flags = IORESOURCE_MEM, | 503 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c index 85c61f624702..0eadefdbbba1 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c | |||
@@ -26,7 +26,6 @@ static struct plat_sci_port scif0_platform_data = { | |||
26 | .flags = UPF_BOOT_AUTOCONF, | 26 | .flags = UPF_BOOT_AUTOCONF, |
27 | .type = PORT_SCIF, | 27 | .type = PORT_SCIF, |
28 | .irqs = { 80, 80, 80, 80 }, | 28 | .irqs = { 80, 80, 80, 80 }, |
29 | .clk = "scif0", | ||
30 | }; | 29 | }; |
31 | 30 | ||
32 | static struct platform_device scif0_device = { | 31 | static struct platform_device scif0_device = { |
@@ -42,7 +41,6 @@ static struct plat_sci_port scif1_platform_data = { | |||
42 | .flags = UPF_BOOT_AUTOCONF, | 41 | .flags = UPF_BOOT_AUTOCONF, |
43 | .type = PORT_SCIF, | 42 | .type = PORT_SCIF, |
44 | .irqs = { 81, 81, 81, 81 }, | 43 | .irqs = { 81, 81, 81, 81 }, |
45 | .clk = "scif1", | ||
46 | }; | 44 | }; |
47 | 45 | ||
48 | static struct platform_device scif1_device = { | 46 | static struct platform_device scif1_device = { |
@@ -58,7 +56,6 @@ static struct plat_sci_port scif2_platform_data = { | |||
58 | .flags = UPF_BOOT_AUTOCONF, | 56 | .flags = UPF_BOOT_AUTOCONF, |
59 | .type = PORT_SCIF, | 57 | .type = PORT_SCIF, |
60 | .irqs = { 82, 82, 82, 82 }, | 58 | .irqs = { 82, 82, 82, 82 }, |
61 | .clk = "scif2", | ||
62 | }; | 59 | }; |
63 | 60 | ||
64 | static struct platform_device scif2_device = { | 61 | static struct platform_device scif2_device = { |
@@ -74,7 +71,6 @@ static struct plat_sci_port scif3_platform_data = { | |||
74 | .flags = UPF_BOOT_AUTOCONF, | 71 | .flags = UPF_BOOT_AUTOCONF, |
75 | .type = PORT_SCIFA, | 72 | .type = PORT_SCIFA, |
76 | .irqs = { 56, 56, 56, 56 }, | 73 | .irqs = { 56, 56, 56, 56 }, |
77 | .clk = "scif3", | ||
78 | }; | 74 | }; |
79 | 75 | ||
80 | static struct platform_device scif3_device = { | 76 | static struct platform_device scif3_device = { |
@@ -90,7 +86,6 @@ static struct plat_sci_port scif4_platform_data = { | |||
90 | .flags = UPF_BOOT_AUTOCONF, | 86 | .flags = UPF_BOOT_AUTOCONF, |
91 | .type = PORT_SCIFA, | 87 | .type = PORT_SCIFA, |
92 | .irqs = { 88, 88, 88, 88 }, | 88 | .irqs = { 88, 88, 88, 88 }, |
93 | .clk = "scif4", | ||
94 | }; | 89 | }; |
95 | 90 | ||
96 | static struct platform_device scif4_device = { | 91 | static struct platform_device scif4_device = { |
@@ -106,7 +101,6 @@ static struct plat_sci_port scif5_platform_data = { | |||
106 | .flags = UPF_BOOT_AUTOCONF, | 101 | .flags = UPF_BOOT_AUTOCONF, |
107 | .type = PORT_SCIFA, | 102 | .type = PORT_SCIFA, |
108 | .irqs = { 109, 109, 109, 109 }, | 103 | .irqs = { 109, 109, 109, 109 }, |
109 | .clk = "scif5", | ||
110 | }; | 104 | }; |
111 | 105 | ||
112 | static struct platform_device scif5_device = { | 106 | static struct platform_device scif5_device = { |
@@ -211,17 +205,14 @@ static struct platform_device veu1_device = { | |||
211 | }; | 205 | }; |
212 | 206 | ||
213 | static struct sh_timer_config cmt_platform_data = { | 207 | static struct sh_timer_config cmt_platform_data = { |
214 | .name = "CMT", | ||
215 | .channel_offset = 0x60, | 208 | .channel_offset = 0x60, |
216 | .timer_bit = 5, | 209 | .timer_bit = 5, |
217 | .clk = "cmt0", | ||
218 | .clockevent_rating = 125, | 210 | .clockevent_rating = 125, |
219 | .clocksource_rating = 125, | 211 | .clocksource_rating = 125, |
220 | }; | 212 | }; |
221 | 213 | ||
222 | static struct resource cmt_resources[] = { | 214 | static struct resource cmt_resources[] = { |
223 | [0] = { | 215 | [0] = { |
224 | .name = "CMT", | ||
225 | .start = 0x044a0060, | 216 | .start = 0x044a0060, |
226 | .end = 0x044a006b, | 217 | .end = 0x044a006b, |
227 | .flags = IORESOURCE_MEM, | 218 | .flags = IORESOURCE_MEM, |
@@ -246,16 +237,13 @@ static struct platform_device cmt_device = { | |||
246 | }; | 237 | }; |
247 | 238 | ||
248 | static struct sh_timer_config tmu0_platform_data = { | 239 | static struct sh_timer_config tmu0_platform_data = { |
249 | .name = "TMU0", | ||
250 | .channel_offset = 0x04, | 240 | .channel_offset = 0x04, |
251 | .timer_bit = 0, | 241 | .timer_bit = 0, |
252 | .clk = "tmu0", | ||
253 | .clockevent_rating = 200, | 242 | .clockevent_rating = 200, |
254 | }; | 243 | }; |
255 | 244 | ||
256 | static struct resource tmu0_resources[] = { | 245 | static struct resource tmu0_resources[] = { |
257 | [0] = { | 246 | [0] = { |
258 | .name = "TMU0", | ||
259 | .start = 0xffd80008, | 247 | .start = 0xffd80008, |
260 | .end = 0xffd80013, | 248 | .end = 0xffd80013, |
261 | .flags = IORESOURCE_MEM, | 249 | .flags = IORESOURCE_MEM, |
@@ -280,16 +268,13 @@ static struct platform_device tmu0_device = { | |||
280 | }; | 268 | }; |
281 | 269 | ||
282 | static struct sh_timer_config tmu1_platform_data = { | 270 | static struct sh_timer_config tmu1_platform_data = { |
283 | .name = "TMU1", | ||
284 | .channel_offset = 0x10, | 271 | .channel_offset = 0x10, |
285 | .timer_bit = 1, | 272 | .timer_bit = 1, |
286 | .clk = "tmu0", | ||
287 | .clocksource_rating = 200, | 273 | .clocksource_rating = 200, |
288 | }; | 274 | }; |
289 | 275 | ||
290 | static struct resource tmu1_resources[] = { | 276 | static struct resource tmu1_resources[] = { |
291 | [0] = { | 277 | [0] = { |
292 | .name = "TMU1", | ||
293 | .start = 0xffd80014, | 278 | .start = 0xffd80014, |
294 | .end = 0xffd8001f, | 279 | .end = 0xffd8001f, |
295 | .flags = IORESOURCE_MEM, | 280 | .flags = IORESOURCE_MEM, |
@@ -314,15 +299,12 @@ static struct platform_device tmu1_device = { | |||
314 | }; | 299 | }; |
315 | 300 | ||
316 | static struct sh_timer_config tmu2_platform_data = { | 301 | static struct sh_timer_config tmu2_platform_data = { |
317 | .name = "TMU2", | ||
318 | .channel_offset = 0x1c, | 302 | .channel_offset = 0x1c, |
319 | .timer_bit = 2, | 303 | .timer_bit = 2, |
320 | .clk = "tmu0", | ||
321 | }; | 304 | }; |
322 | 305 | ||
323 | static struct resource tmu2_resources[] = { | 306 | static struct resource tmu2_resources[] = { |
324 | [0] = { | 307 | [0] = { |
325 | .name = "TMU2", | ||
326 | .start = 0xffd80020, | 308 | .start = 0xffd80020, |
327 | .end = 0xffd8002b, | 309 | .end = 0xffd8002b, |
328 | .flags = IORESOURCE_MEM, | 310 | .flags = IORESOURCE_MEM, |
@@ -347,15 +329,12 @@ static struct platform_device tmu2_device = { | |||
347 | }; | 329 | }; |
348 | 330 | ||
349 | static struct sh_timer_config tmu3_platform_data = { | 331 | static struct sh_timer_config tmu3_platform_data = { |
350 | .name = "TMU3", | ||
351 | .channel_offset = 0x04, | 332 | .channel_offset = 0x04, |
352 | .timer_bit = 0, | 333 | .timer_bit = 0, |
353 | .clk = "tmu1", | ||
354 | }; | 334 | }; |
355 | 335 | ||
356 | static struct resource tmu3_resources[] = { | 336 | static struct resource tmu3_resources[] = { |
357 | [0] = { | 337 | [0] = { |
358 | .name = "TMU3", | ||
359 | .start = 0xffd90008, | 338 | .start = 0xffd90008, |
360 | .end = 0xffd90013, | 339 | .end = 0xffd90013, |
361 | .flags = IORESOURCE_MEM, | 340 | .flags = IORESOURCE_MEM, |
@@ -380,15 +359,12 @@ static struct platform_device tmu3_device = { | |||
380 | }; | 359 | }; |
381 | 360 | ||
382 | static struct sh_timer_config tmu4_platform_data = { | 361 | static struct sh_timer_config tmu4_platform_data = { |
383 | .name = "TMU4", | ||
384 | .channel_offset = 0x10, | 362 | .channel_offset = 0x10, |
385 | .timer_bit = 1, | 363 | .timer_bit = 1, |
386 | .clk = "tmu1", | ||
387 | }; | 364 | }; |
388 | 365 | ||
389 | static struct resource tmu4_resources[] = { | 366 | static struct resource tmu4_resources[] = { |
390 | [0] = { | 367 | [0] = { |
391 | .name = "TMU4", | ||
392 | .start = 0xffd90014, | 368 | .start = 0xffd90014, |
393 | .end = 0xffd9001f, | 369 | .end = 0xffd9001f, |
394 | .flags = IORESOURCE_MEM, | 370 | .flags = IORESOURCE_MEM, |
@@ -413,15 +389,12 @@ static struct platform_device tmu4_device = { | |||
413 | }; | 389 | }; |
414 | 390 | ||
415 | static struct sh_timer_config tmu5_platform_data = { | 391 | static struct sh_timer_config tmu5_platform_data = { |
416 | .name = "TMU5", | ||
417 | .channel_offset = 0x1c, | 392 | .channel_offset = 0x1c, |
418 | .timer_bit = 2, | 393 | .timer_bit = 2, |
419 | .clk = "tmu1", | ||
420 | }; | 394 | }; |
421 | 395 | ||
422 | static struct resource tmu5_resources[] = { | 396 | static struct resource tmu5_resources[] = { |
423 | [0] = { | 397 | [0] = { |
424 | .name = "TMU5", | ||
425 | .start = 0xffd90020, | 398 | .start = 0xffd90020, |
426 | .end = 0xffd9002b, | 399 | .end = 0xffd9002b, |
427 | .flags = IORESOURCE_MEM, | 400 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c index e7fa2a92fc1f..8a0a4a99f86b 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c | |||
@@ -213,7 +213,6 @@ static struct plat_sci_port scif0_platform_data = { | |||
213 | .flags = UPF_BOOT_AUTOCONF, | 213 | .flags = UPF_BOOT_AUTOCONF, |
214 | .type = PORT_SCIF, | 214 | .type = PORT_SCIF, |
215 | .irqs = { 80, 80, 80, 80 }, | 215 | .irqs = { 80, 80, 80, 80 }, |
216 | .clk = "scif0", | ||
217 | }; | 216 | }; |
218 | 217 | ||
219 | static struct platform_device scif0_device = { | 218 | static struct platform_device scif0_device = { |
@@ -229,7 +228,6 @@ static struct plat_sci_port scif1_platform_data = { | |||
229 | .flags = UPF_BOOT_AUTOCONF, | 228 | .flags = UPF_BOOT_AUTOCONF, |
230 | .type = PORT_SCIF, | 229 | .type = PORT_SCIF, |
231 | .irqs = { 81, 81, 81, 81 }, | 230 | .irqs = { 81, 81, 81, 81 }, |
232 | .clk = "scif1", | ||
233 | }; | 231 | }; |
234 | 232 | ||
235 | static struct platform_device scif1_device = { | 233 | static struct platform_device scif1_device = { |
@@ -245,7 +243,6 @@ static struct plat_sci_port scif2_platform_data = { | |||
245 | .flags = UPF_BOOT_AUTOCONF, | 243 | .flags = UPF_BOOT_AUTOCONF, |
246 | .type = PORT_SCIF, | 244 | .type = PORT_SCIF, |
247 | .irqs = { 82, 82, 82, 82 }, | 245 | .irqs = { 82, 82, 82, 82 }, |
248 | .clk = "scif2", | ||
249 | }; | 246 | }; |
250 | 247 | ||
251 | static struct platform_device scif2_device = { | 248 | static struct platform_device scif2_device = { |
@@ -261,7 +258,6 @@ static struct plat_sci_port scif3_platform_data = { | |||
261 | .flags = UPF_BOOT_AUTOCONF, | 258 | .flags = UPF_BOOT_AUTOCONF, |
262 | .type = PORT_SCIFA, | 259 | .type = PORT_SCIFA, |
263 | .irqs = { 56, 56, 56, 56 }, | 260 | .irqs = { 56, 56, 56, 56 }, |
264 | .clk = "scif3", | ||
265 | }; | 261 | }; |
266 | 262 | ||
267 | static struct platform_device scif3_device = { | 263 | static struct platform_device scif3_device = { |
@@ -277,7 +273,6 @@ static struct plat_sci_port scif4_platform_data = { | |||
277 | .flags = UPF_BOOT_AUTOCONF, | 273 | .flags = UPF_BOOT_AUTOCONF, |
278 | .type = PORT_SCIFA, | 274 | .type = PORT_SCIFA, |
279 | .irqs = { 88, 88, 88, 88 }, | 275 | .irqs = { 88, 88, 88, 88 }, |
280 | .clk = "scif4", | ||
281 | }; | 276 | }; |
282 | 277 | ||
283 | static struct platform_device scif4_device = { | 278 | static struct platform_device scif4_device = { |
@@ -293,7 +288,6 @@ static struct plat_sci_port scif5_platform_data = { | |||
293 | .flags = UPF_BOOT_AUTOCONF, | 288 | .flags = UPF_BOOT_AUTOCONF, |
294 | .type = PORT_SCIFA, | 289 | .type = PORT_SCIFA, |
295 | .irqs = { 109, 109, 109, 109 }, | 290 | .irqs = { 109, 109, 109, 109 }, |
296 | .clk = "scif5", | ||
297 | }; | 291 | }; |
298 | 292 | ||
299 | static struct platform_device scif5_device = { | 293 | static struct platform_device scif5_device = { |
@@ -485,17 +479,14 @@ static struct platform_device veu1_device = { | |||
485 | }; | 479 | }; |
486 | 480 | ||
487 | static struct sh_timer_config cmt_platform_data = { | 481 | static struct sh_timer_config cmt_platform_data = { |
488 | .name = "CMT", | ||
489 | .channel_offset = 0x60, | 482 | .channel_offset = 0x60, |
490 | .timer_bit = 5, | 483 | .timer_bit = 5, |
491 | .clk = "cmt0", | ||
492 | .clockevent_rating = 125, | 484 | .clockevent_rating = 125, |
493 | .clocksource_rating = 200, | 485 | .clocksource_rating = 200, |
494 | }; | 486 | }; |
495 | 487 | ||
496 | static struct resource cmt_resources[] = { | 488 | static struct resource cmt_resources[] = { |
497 | [0] = { | 489 | [0] = { |
498 | .name = "CMT", | ||
499 | .start = 0x044a0060, | 490 | .start = 0x044a0060, |
500 | .end = 0x044a006b, | 491 | .end = 0x044a006b, |
501 | .flags = IORESOURCE_MEM, | 492 | .flags = IORESOURCE_MEM, |
@@ -520,16 +511,13 @@ static struct platform_device cmt_device = { | |||
520 | }; | 511 | }; |
521 | 512 | ||
522 | static struct sh_timer_config tmu0_platform_data = { | 513 | static struct sh_timer_config tmu0_platform_data = { |
523 | .name = "TMU0", | ||
524 | .channel_offset = 0x04, | 514 | .channel_offset = 0x04, |
525 | .timer_bit = 0, | 515 | .timer_bit = 0, |
526 | .clk = "tmu0", | ||
527 | .clockevent_rating = 200, | 516 | .clockevent_rating = 200, |
528 | }; | 517 | }; |
529 | 518 | ||
530 | static struct resource tmu0_resources[] = { | 519 | static struct resource tmu0_resources[] = { |
531 | [0] = { | 520 | [0] = { |
532 | .name = "TMU0", | ||
533 | .start = 0xffd80008, | 521 | .start = 0xffd80008, |
534 | .end = 0xffd80013, | 522 | .end = 0xffd80013, |
535 | .flags = IORESOURCE_MEM, | 523 | .flags = IORESOURCE_MEM, |
@@ -554,16 +542,13 @@ static struct platform_device tmu0_device = { | |||
554 | }; | 542 | }; |
555 | 543 | ||
556 | static struct sh_timer_config tmu1_platform_data = { | 544 | static struct sh_timer_config tmu1_platform_data = { |
557 | .name = "TMU1", | ||
558 | .channel_offset = 0x10, | 545 | .channel_offset = 0x10, |
559 | .timer_bit = 1, | 546 | .timer_bit = 1, |
560 | .clk = "tmu0", | ||
561 | .clocksource_rating = 200, | 547 | .clocksource_rating = 200, |
562 | }; | 548 | }; |
563 | 549 | ||
564 | static struct resource tmu1_resources[] = { | 550 | static struct resource tmu1_resources[] = { |
565 | [0] = { | 551 | [0] = { |
566 | .name = "TMU1", | ||
567 | .start = 0xffd80014, | 552 | .start = 0xffd80014, |
568 | .end = 0xffd8001f, | 553 | .end = 0xffd8001f, |
569 | .flags = IORESOURCE_MEM, | 554 | .flags = IORESOURCE_MEM, |
@@ -588,15 +573,12 @@ static struct platform_device tmu1_device = { | |||
588 | }; | 573 | }; |
589 | 574 | ||
590 | static struct sh_timer_config tmu2_platform_data = { | 575 | static struct sh_timer_config tmu2_platform_data = { |
591 | .name = "TMU2", | ||
592 | .channel_offset = 0x1c, | 576 | .channel_offset = 0x1c, |
593 | .timer_bit = 2, | 577 | .timer_bit = 2, |
594 | .clk = "tmu0", | ||
595 | }; | 578 | }; |
596 | 579 | ||
597 | static struct resource tmu2_resources[] = { | 580 | static struct resource tmu2_resources[] = { |
598 | [0] = { | 581 | [0] = { |
599 | .name = "TMU2", | ||
600 | .start = 0xffd80020, | 582 | .start = 0xffd80020, |
601 | .end = 0xffd8002b, | 583 | .end = 0xffd8002b, |
602 | .flags = IORESOURCE_MEM, | 584 | .flags = IORESOURCE_MEM, |
@@ -622,15 +604,12 @@ static struct platform_device tmu2_device = { | |||
622 | 604 | ||
623 | 605 | ||
624 | static struct sh_timer_config tmu3_platform_data = { | 606 | static struct sh_timer_config tmu3_platform_data = { |
625 | .name = "TMU3", | ||
626 | .channel_offset = 0x04, | 607 | .channel_offset = 0x04, |
627 | .timer_bit = 0, | 608 | .timer_bit = 0, |
628 | .clk = "tmu1", | ||
629 | }; | 609 | }; |
630 | 610 | ||
631 | static struct resource tmu3_resources[] = { | 611 | static struct resource tmu3_resources[] = { |
632 | [0] = { | 612 | [0] = { |
633 | .name = "TMU3", | ||
634 | .start = 0xffd90008, | 613 | .start = 0xffd90008, |
635 | .end = 0xffd90013, | 614 | .end = 0xffd90013, |
636 | .flags = IORESOURCE_MEM, | 615 | .flags = IORESOURCE_MEM, |
@@ -655,15 +634,12 @@ static struct platform_device tmu3_device = { | |||
655 | }; | 634 | }; |
656 | 635 | ||
657 | static struct sh_timer_config tmu4_platform_data = { | 636 | static struct sh_timer_config tmu4_platform_data = { |
658 | .name = "TMU4", | ||
659 | .channel_offset = 0x10, | 637 | .channel_offset = 0x10, |
660 | .timer_bit = 1, | 638 | .timer_bit = 1, |
661 | .clk = "tmu1", | ||
662 | }; | 639 | }; |
663 | 640 | ||
664 | static struct resource tmu4_resources[] = { | 641 | static struct resource tmu4_resources[] = { |
665 | [0] = { | 642 | [0] = { |
666 | .name = "TMU4", | ||
667 | .start = 0xffd90014, | 643 | .start = 0xffd90014, |
668 | .end = 0xffd9001f, | 644 | .end = 0xffd9001f, |
669 | .flags = IORESOURCE_MEM, | 645 | .flags = IORESOURCE_MEM, |
@@ -688,15 +664,12 @@ static struct platform_device tmu4_device = { | |||
688 | }; | 664 | }; |
689 | 665 | ||
690 | static struct sh_timer_config tmu5_platform_data = { | 666 | static struct sh_timer_config tmu5_platform_data = { |
691 | .name = "TMU5", | ||
692 | .channel_offset = 0x1c, | 667 | .channel_offset = 0x1c, |
693 | .timer_bit = 2, | 668 | .timer_bit = 2, |
694 | .clk = "tmu1", | ||
695 | }; | 669 | }; |
696 | 670 | ||
697 | static struct resource tmu5_resources[] = { | 671 | static struct resource tmu5_resources[] = { |
698 | [0] = { | 672 | [0] = { |
699 | .name = "TMU5", | ||
700 | .start = 0xffd90020, | 673 | .start = 0xffd90020, |
701 | .end = 0xffd9002b, | 674 | .end = 0xffd9002b, |
702 | .flags = IORESOURCE_MEM, | 675 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c index e75edf58796a..444aca95b20d 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c | |||
@@ -63,16 +63,13 @@ static struct platform_device scif4_device = { | |||
63 | }; | 63 | }; |
64 | 64 | ||
65 | static struct sh_timer_config tmu0_platform_data = { | 65 | static struct sh_timer_config tmu0_platform_data = { |
66 | .name = "TMU0", | ||
67 | .channel_offset = 0x04, | 66 | .channel_offset = 0x04, |
68 | .timer_bit = 0, | 67 | .timer_bit = 0, |
69 | .clk = "peripheral_clk", | ||
70 | .clockevent_rating = 200, | 68 | .clockevent_rating = 200, |
71 | }; | 69 | }; |
72 | 70 | ||
73 | static struct resource tmu0_resources[] = { | 71 | static struct resource tmu0_resources[] = { |
74 | [0] = { | 72 | [0] = { |
75 | .name = "TMU0", | ||
76 | .start = 0xfe430008, | 73 | .start = 0xfe430008, |
77 | .end = 0xfe430013, | 74 | .end = 0xfe430013, |
78 | .flags = IORESOURCE_MEM, | 75 | .flags = IORESOURCE_MEM, |
@@ -94,16 +91,13 @@ static struct platform_device tmu0_device = { | |||
94 | }; | 91 | }; |
95 | 92 | ||
96 | static struct sh_timer_config tmu1_platform_data = { | 93 | static struct sh_timer_config tmu1_platform_data = { |
97 | .name = "TMU1", | ||
98 | .channel_offset = 0x10, | 94 | .channel_offset = 0x10, |
99 | .timer_bit = 1, | 95 | .timer_bit = 1, |
100 | .clk = "peripheral_clk", | ||
101 | .clocksource_rating = 200, | 96 | .clocksource_rating = 200, |
102 | }; | 97 | }; |
103 | 98 | ||
104 | static struct resource tmu1_resources[] = { | 99 | static struct resource tmu1_resources[] = { |
105 | [0] = { | 100 | [0] = { |
106 | .name = "TMU1", | ||
107 | .start = 0xfe430014, | 101 | .start = 0xfe430014, |
108 | .end = 0xfe43001f, | 102 | .end = 0xfe43001f, |
109 | .flags = IORESOURCE_MEM, | 103 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c index 7f6b0a5f7f82..5b5f6b005fc5 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c | |||
@@ -131,16 +131,13 @@ static struct platform_device usbf_device = { | |||
131 | }; | 131 | }; |
132 | 132 | ||
133 | static struct sh_timer_config tmu0_platform_data = { | 133 | static struct sh_timer_config tmu0_platform_data = { |
134 | .name = "TMU0", | ||
135 | .channel_offset = 0x04, | 134 | .channel_offset = 0x04, |
136 | .timer_bit = 0, | 135 | .timer_bit = 0, |
137 | .clk = "peripheral_clk", | ||
138 | .clockevent_rating = 200, | 136 | .clockevent_rating = 200, |
139 | }; | 137 | }; |
140 | 138 | ||
141 | static struct resource tmu0_resources[] = { | 139 | static struct resource tmu0_resources[] = { |
142 | [0] = { | 140 | [0] = { |
143 | .name = "TMU0", | ||
144 | .start = 0xffd80008, | 141 | .start = 0xffd80008, |
145 | .end = 0xffd80013, | 142 | .end = 0xffd80013, |
146 | .flags = IORESOURCE_MEM, | 143 | .flags = IORESOURCE_MEM, |
@@ -162,16 +159,13 @@ static struct platform_device tmu0_device = { | |||
162 | }; | 159 | }; |
163 | 160 | ||
164 | static struct sh_timer_config tmu1_platform_data = { | 161 | static struct sh_timer_config tmu1_platform_data = { |
165 | .name = "TMU1", | ||
166 | .channel_offset = 0x10, | 162 | .channel_offset = 0x10, |
167 | .timer_bit = 1, | 163 | .timer_bit = 1, |
168 | .clk = "peripheral_clk", | ||
169 | .clocksource_rating = 200, | 164 | .clocksource_rating = 200, |
170 | }; | 165 | }; |
171 | 166 | ||
172 | static struct resource tmu1_resources[] = { | 167 | static struct resource tmu1_resources[] = { |
173 | [0] = { | 168 | [0] = { |
174 | .name = "TMU1", | ||
175 | .start = 0xffd80014, | 169 | .start = 0xffd80014, |
176 | .end = 0xffd8001f, | 170 | .end = 0xffd8001f, |
177 | .flags = IORESOURCE_MEM, | 171 | .flags = IORESOURCE_MEM, |
@@ -193,15 +187,12 @@ static struct platform_device tmu1_device = { | |||
193 | }; | 187 | }; |
194 | 188 | ||
195 | static struct sh_timer_config tmu2_platform_data = { | 189 | static struct sh_timer_config tmu2_platform_data = { |
196 | .name = "TMU2", | ||
197 | .channel_offset = 0x1c, | 190 | .channel_offset = 0x1c, |
198 | .timer_bit = 2, | 191 | .timer_bit = 2, |
199 | .clk = "peripheral_clk", | ||
200 | }; | 192 | }; |
201 | 193 | ||
202 | static struct resource tmu2_resources[] = { | 194 | static struct resource tmu2_resources[] = { |
203 | [0] = { | 195 | [0] = { |
204 | .name = "TMU2", | ||
205 | .start = 0xffd80020, | 196 | .start = 0xffd80020, |
206 | .end = 0xffd8002f, | 197 | .end = 0xffd8002f, |
207 | .flags = IORESOURCE_MEM, | 198 | .flags = IORESOURCE_MEM, |
@@ -223,15 +214,12 @@ static struct platform_device tmu2_device = { | |||
223 | }; | 214 | }; |
224 | 215 | ||
225 | static struct sh_timer_config tmu3_platform_data = { | 216 | static struct sh_timer_config tmu3_platform_data = { |
226 | .name = "TMU3", | ||
227 | .channel_offset = 0x04, | 217 | .channel_offset = 0x04, |
228 | .timer_bit = 0, | 218 | .timer_bit = 0, |
229 | .clk = "peripheral_clk", | ||
230 | }; | 219 | }; |
231 | 220 | ||
232 | static struct resource tmu3_resources[] = { | 221 | static struct resource tmu3_resources[] = { |
233 | [0] = { | 222 | [0] = { |
234 | .name = "TMU3", | ||
235 | .start = 0xffd88008, | 223 | .start = 0xffd88008, |
236 | .end = 0xffd88013, | 224 | .end = 0xffd88013, |
237 | .flags = IORESOURCE_MEM, | 225 | .flags = IORESOURCE_MEM, |
@@ -253,15 +241,12 @@ static struct platform_device tmu3_device = { | |||
253 | }; | 241 | }; |
254 | 242 | ||
255 | static struct sh_timer_config tmu4_platform_data = { | 243 | static struct sh_timer_config tmu4_platform_data = { |
256 | .name = "TMU4", | ||
257 | .channel_offset = 0x10, | 244 | .channel_offset = 0x10, |
258 | .timer_bit = 1, | 245 | .timer_bit = 1, |
259 | .clk = "peripheral_clk", | ||
260 | }; | 246 | }; |
261 | 247 | ||
262 | static struct resource tmu4_resources[] = { | 248 | static struct resource tmu4_resources[] = { |
263 | [0] = { | 249 | [0] = { |
264 | .name = "TMU4", | ||
265 | .start = 0xffd88014, | 250 | .start = 0xffd88014, |
266 | .end = 0xffd8801f, | 251 | .end = 0xffd8801f, |
267 | .flags = IORESOURCE_MEM, | 252 | .flags = IORESOURCE_MEM, |
@@ -283,15 +268,12 @@ static struct platform_device tmu4_device = { | |||
283 | }; | 268 | }; |
284 | 269 | ||
285 | static struct sh_timer_config tmu5_platform_data = { | 270 | static struct sh_timer_config tmu5_platform_data = { |
286 | .name = "TMU5", | ||
287 | .channel_offset = 0x1c, | 271 | .channel_offset = 0x1c, |
288 | .timer_bit = 2, | 272 | .timer_bit = 2, |
289 | .clk = "peripheral_clk", | ||
290 | }; | 273 | }; |
291 | 274 | ||
292 | static struct resource tmu5_resources[] = { | 275 | static struct resource tmu5_resources[] = { |
293 | [0] = { | 276 | [0] = { |
294 | .name = "TMU5", | ||
295 | .start = 0xffd88020, | 277 | .start = 0xffd88020, |
296 | .end = 0xffd8802b, | 278 | .end = 0xffd8802b, |
297 | .flags = IORESOURCE_MEM, | 279 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c index 86d681ecf90e..7270d7fd6761 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c | |||
@@ -165,16 +165,13 @@ static struct platform_device scif9_device = { | |||
165 | }; | 165 | }; |
166 | 166 | ||
167 | static struct sh_timer_config tmu0_platform_data = { | 167 | static struct sh_timer_config tmu0_platform_data = { |
168 | .name = "TMU0", | ||
169 | .channel_offset = 0x04, | 168 | .channel_offset = 0x04, |
170 | .timer_bit = 0, | 169 | .timer_bit = 0, |
171 | .clk = "peripheral_clk", | ||
172 | .clockevent_rating = 200, | 170 | .clockevent_rating = 200, |
173 | }; | 171 | }; |
174 | 172 | ||
175 | static struct resource tmu0_resources[] = { | 173 | static struct resource tmu0_resources[] = { |
176 | [0] = { | 174 | [0] = { |
177 | .name = "TMU0", | ||
178 | .start = 0xffd80008, | 175 | .start = 0xffd80008, |
179 | .end = 0xffd80013, | 176 | .end = 0xffd80013, |
180 | .flags = IORESOURCE_MEM, | 177 | .flags = IORESOURCE_MEM, |
@@ -196,16 +193,13 @@ static struct platform_device tmu0_device = { | |||
196 | }; | 193 | }; |
197 | 194 | ||
198 | static struct sh_timer_config tmu1_platform_data = { | 195 | static struct sh_timer_config tmu1_platform_data = { |
199 | .name = "TMU1", | ||
200 | .channel_offset = 0x10, | 196 | .channel_offset = 0x10, |
201 | .timer_bit = 1, | 197 | .timer_bit = 1, |
202 | .clk = "peripheral_clk", | ||
203 | .clocksource_rating = 200, | 198 | .clocksource_rating = 200, |
204 | }; | 199 | }; |
205 | 200 | ||
206 | static struct resource tmu1_resources[] = { | 201 | static struct resource tmu1_resources[] = { |
207 | [0] = { | 202 | [0] = { |
208 | .name = "TMU1", | ||
209 | .start = 0xffd80014, | 203 | .start = 0xffd80014, |
210 | .end = 0xffd8001f, | 204 | .end = 0xffd8001f, |
211 | .flags = IORESOURCE_MEM, | 205 | .flags = IORESOURCE_MEM, |
@@ -227,15 +221,12 @@ static struct platform_device tmu1_device = { | |||
227 | }; | 221 | }; |
228 | 222 | ||
229 | static struct sh_timer_config tmu2_platform_data = { | 223 | static struct sh_timer_config tmu2_platform_data = { |
230 | .name = "TMU2", | ||
231 | .channel_offset = 0x1c, | 224 | .channel_offset = 0x1c, |
232 | .timer_bit = 2, | 225 | .timer_bit = 2, |
233 | .clk = "peripheral_clk", | ||
234 | }; | 226 | }; |
235 | 227 | ||
236 | static struct resource tmu2_resources[] = { | 228 | static struct resource tmu2_resources[] = { |
237 | [0] = { | 229 | [0] = { |
238 | .name = "TMU2", | ||
239 | .start = 0xffd80020, | 230 | .start = 0xffd80020, |
240 | .end = 0xffd8002f, | 231 | .end = 0xffd8002f, |
241 | .flags = IORESOURCE_MEM, | 232 | .flags = IORESOURCE_MEM, |
@@ -257,15 +248,12 @@ static struct platform_device tmu2_device = { | |||
257 | }; | 248 | }; |
258 | 249 | ||
259 | static struct sh_timer_config tmu3_platform_data = { | 250 | static struct sh_timer_config tmu3_platform_data = { |
260 | .name = "TMU3", | ||
261 | .channel_offset = 0x04, | 251 | .channel_offset = 0x04, |
262 | .timer_bit = 0, | 252 | .timer_bit = 0, |
263 | .clk = "peripheral_clk", | ||
264 | }; | 253 | }; |
265 | 254 | ||
266 | static struct resource tmu3_resources[] = { | 255 | static struct resource tmu3_resources[] = { |
267 | [0] = { | 256 | [0] = { |
268 | .name = "TMU3", | ||
269 | .start = 0xffd81008, | 257 | .start = 0xffd81008, |
270 | .end = 0xffd81013, | 258 | .end = 0xffd81013, |
271 | .flags = IORESOURCE_MEM, | 259 | .flags = IORESOURCE_MEM, |
@@ -287,15 +275,12 @@ static struct platform_device tmu3_device = { | |||
287 | }; | 275 | }; |
288 | 276 | ||
289 | static struct sh_timer_config tmu4_platform_data = { | 277 | static struct sh_timer_config tmu4_platform_data = { |
290 | .name = "TMU4", | ||
291 | .channel_offset = 0x10, | 278 | .channel_offset = 0x10, |
292 | .timer_bit = 1, | 279 | .timer_bit = 1, |
293 | .clk = "peripheral_clk", | ||
294 | }; | 280 | }; |
295 | 281 | ||
296 | static struct resource tmu4_resources[] = { | 282 | static struct resource tmu4_resources[] = { |
297 | [0] = { | 283 | [0] = { |
298 | .name = "TMU4", | ||
299 | .start = 0xffd81014, | 284 | .start = 0xffd81014, |
300 | .end = 0xffd8101f, | 285 | .end = 0xffd8101f, |
301 | .flags = IORESOURCE_MEM, | 286 | .flags = IORESOURCE_MEM, |
@@ -317,15 +302,12 @@ static struct platform_device tmu4_device = { | |||
317 | }; | 302 | }; |
318 | 303 | ||
319 | static struct sh_timer_config tmu5_platform_data = { | 304 | static struct sh_timer_config tmu5_platform_data = { |
320 | .name = "TMU5", | ||
321 | .channel_offset = 0x1c, | 305 | .channel_offset = 0x1c, |
322 | .timer_bit = 2, | 306 | .timer_bit = 2, |
323 | .clk = "peripheral_clk", | ||
324 | }; | 307 | }; |
325 | 308 | ||
326 | static struct resource tmu5_resources[] = { | 309 | static struct resource tmu5_resources[] = { |
327 | [0] = { | 310 | [0] = { |
328 | .name = "TMU5", | ||
329 | .start = 0xffd81020, | 311 | .start = 0xffd81020, |
330 | .end = 0xffd8102f, | 312 | .end = 0xffd8102f, |
331 | .flags = IORESOURCE_MEM, | 313 | .flags = IORESOURCE_MEM, |
@@ -347,15 +329,12 @@ static struct platform_device tmu5_device = { | |||
347 | }; | 329 | }; |
348 | 330 | ||
349 | static struct sh_timer_config tmu6_platform_data = { | 331 | static struct sh_timer_config tmu6_platform_data = { |
350 | .name = "TMU6", | ||
351 | .channel_offset = 0x04, | 332 | .channel_offset = 0x04, |
352 | .timer_bit = 0, | 333 | .timer_bit = 0, |
353 | .clk = "peripheral_clk", | ||
354 | }; | 334 | }; |
355 | 335 | ||
356 | static struct resource tmu6_resources[] = { | 336 | static struct resource tmu6_resources[] = { |
357 | [0] = { | 337 | [0] = { |
358 | .name = "TMU6", | ||
359 | .start = 0xffd82008, | 338 | .start = 0xffd82008, |
360 | .end = 0xffd82013, | 339 | .end = 0xffd82013, |
361 | .flags = IORESOURCE_MEM, | 340 | .flags = IORESOURCE_MEM, |
@@ -377,15 +356,12 @@ static struct platform_device tmu6_device = { | |||
377 | }; | 356 | }; |
378 | 357 | ||
379 | static struct sh_timer_config tmu7_platform_data = { | 358 | static struct sh_timer_config tmu7_platform_data = { |
380 | .name = "TMU7", | ||
381 | .channel_offset = 0x10, | 359 | .channel_offset = 0x10, |
382 | .timer_bit = 1, | 360 | .timer_bit = 1, |
383 | .clk = "peripheral_clk", | ||
384 | }; | 361 | }; |
385 | 362 | ||
386 | static struct resource tmu7_resources[] = { | 363 | static struct resource tmu7_resources[] = { |
387 | [0] = { | 364 | [0] = { |
388 | .name = "TMU7", | ||
389 | .start = 0xffd82014, | 365 | .start = 0xffd82014, |
390 | .end = 0xffd8201f, | 366 | .end = 0xffd8201f, |
391 | .flags = IORESOURCE_MEM, | 367 | .flags = IORESOURCE_MEM, |
@@ -407,15 +383,12 @@ static struct platform_device tmu7_device = { | |||
407 | }; | 383 | }; |
408 | 384 | ||
409 | static struct sh_timer_config tmu8_platform_data = { | 385 | static struct sh_timer_config tmu8_platform_data = { |
410 | .name = "TMU8", | ||
411 | .channel_offset = 0x1c, | 386 | .channel_offset = 0x1c, |
412 | .timer_bit = 2, | 387 | .timer_bit = 2, |
413 | .clk = "peripheral_clk", | ||
414 | }; | 388 | }; |
415 | 389 | ||
416 | static struct resource tmu8_resources[] = { | 390 | static struct resource tmu8_resources[] = { |
417 | [0] = { | 391 | [0] = { |
418 | .name = "TMU8", | ||
419 | .start = 0xffd82020, | 392 | .start = 0xffd82020, |
420 | .end = 0xffd8202b, | 393 | .end = 0xffd8202b, |
421 | .flags = IORESOURCE_MEM, | 394 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c index 02e792c90de6..05fc38df1582 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c | |||
@@ -49,16 +49,13 @@ static struct platform_device scif1_device = { | |||
49 | }; | 49 | }; |
50 | 50 | ||
51 | static struct sh_timer_config tmu0_platform_data = { | 51 | static struct sh_timer_config tmu0_platform_data = { |
52 | .name = "TMU0", | ||
53 | .channel_offset = 0x04, | 52 | .channel_offset = 0x04, |
54 | .timer_bit = 0, | 53 | .timer_bit = 0, |
55 | .clk = "peripheral_clk", | ||
56 | .clockevent_rating = 200, | 54 | .clockevent_rating = 200, |
57 | }; | 55 | }; |
58 | 56 | ||
59 | static struct resource tmu0_resources[] = { | 57 | static struct resource tmu0_resources[] = { |
60 | [0] = { | 58 | [0] = { |
61 | .name = "TMU0", | ||
62 | .start = 0xffd80008, | 59 | .start = 0xffd80008, |
63 | .end = 0xffd80013, | 60 | .end = 0xffd80013, |
64 | .flags = IORESOURCE_MEM, | 61 | .flags = IORESOURCE_MEM, |
@@ -80,16 +77,13 @@ static struct platform_device tmu0_device = { | |||
80 | }; | 77 | }; |
81 | 78 | ||
82 | static struct sh_timer_config tmu1_platform_data = { | 79 | static struct sh_timer_config tmu1_platform_data = { |
83 | .name = "TMU1", | ||
84 | .channel_offset = 0x10, | 80 | .channel_offset = 0x10, |
85 | .timer_bit = 1, | 81 | .timer_bit = 1, |
86 | .clk = "peripheral_clk", | ||
87 | .clocksource_rating = 200, | 82 | .clocksource_rating = 200, |
88 | }; | 83 | }; |
89 | 84 | ||
90 | static struct resource tmu1_resources[] = { | 85 | static struct resource tmu1_resources[] = { |
91 | [0] = { | 86 | [0] = { |
92 | .name = "TMU1", | ||
93 | .start = 0xffd80014, | 87 | .start = 0xffd80014, |
94 | .end = 0xffd8001f, | 88 | .end = 0xffd8001f, |
95 | .flags = IORESOURCE_MEM, | 89 | .flags = IORESOURCE_MEM, |
@@ -111,15 +105,12 @@ static struct platform_device tmu1_device = { | |||
111 | }; | 105 | }; |
112 | 106 | ||
113 | static struct sh_timer_config tmu2_platform_data = { | 107 | static struct sh_timer_config tmu2_platform_data = { |
114 | .name = "TMU2", | ||
115 | .channel_offset = 0x1c, | 108 | .channel_offset = 0x1c, |
116 | .timer_bit = 2, | 109 | .timer_bit = 2, |
117 | .clk = "peripheral_clk", | ||
118 | }; | 110 | }; |
119 | 111 | ||
120 | static struct resource tmu2_resources[] = { | 112 | static struct resource tmu2_resources[] = { |
121 | [0] = { | 113 | [0] = { |
122 | .name = "TMU2", | ||
123 | .start = 0xffd80020, | 114 | .start = 0xffd80020, |
124 | .end = 0xffd8002f, | 115 | .end = 0xffd8002f, |
125 | .flags = IORESOURCE_MEM, | 116 | .flags = IORESOURCE_MEM, |
@@ -141,15 +132,12 @@ static struct platform_device tmu2_device = { | |||
141 | }; | 132 | }; |
142 | 133 | ||
143 | static struct sh_timer_config tmu3_platform_data = { | 134 | static struct sh_timer_config tmu3_platform_data = { |
144 | .name = "TMU3", | ||
145 | .channel_offset = 0x04, | 135 | .channel_offset = 0x04, |
146 | .timer_bit = 0, | 136 | .timer_bit = 0, |
147 | .clk = "peripheral_clk", | ||
148 | }; | 137 | }; |
149 | 138 | ||
150 | static struct resource tmu3_resources[] = { | 139 | static struct resource tmu3_resources[] = { |
151 | [0] = { | 140 | [0] = { |
152 | .name = "TMU3", | ||
153 | .start = 0xffdc0008, | 141 | .start = 0xffdc0008, |
154 | .end = 0xffdc0013, | 142 | .end = 0xffdc0013, |
155 | .flags = IORESOURCE_MEM, | 143 | .flags = IORESOURCE_MEM, |
@@ -171,15 +159,12 @@ static struct platform_device tmu3_device = { | |||
171 | }; | 159 | }; |
172 | 160 | ||
173 | static struct sh_timer_config tmu4_platform_data = { | 161 | static struct sh_timer_config tmu4_platform_data = { |
174 | .name = "TMU4", | ||
175 | .channel_offset = 0x10, | 162 | .channel_offset = 0x10, |
176 | .timer_bit = 1, | 163 | .timer_bit = 1, |
177 | .clk = "peripheral_clk", | ||
178 | }; | 164 | }; |
179 | 165 | ||
180 | static struct resource tmu4_resources[] = { | 166 | static struct resource tmu4_resources[] = { |
181 | [0] = { | 167 | [0] = { |
182 | .name = "TMU4", | ||
183 | .start = 0xffdc0014, | 168 | .start = 0xffdc0014, |
184 | .end = 0xffdc001f, | 169 | .end = 0xffdc001f, |
185 | .flags = IORESOURCE_MEM, | 170 | .flags = IORESOURCE_MEM, |
@@ -201,15 +186,12 @@ static struct platform_device tmu4_device = { | |||
201 | }; | 186 | }; |
202 | 187 | ||
203 | static struct sh_timer_config tmu5_platform_data = { | 188 | static struct sh_timer_config tmu5_platform_data = { |
204 | .name = "TMU5", | ||
205 | .channel_offset = 0x1c, | 189 | .channel_offset = 0x1c, |
206 | .timer_bit = 2, | 190 | .timer_bit = 2, |
207 | .clk = "peripheral_clk", | ||
208 | }; | 191 | }; |
209 | 192 | ||
210 | static struct resource tmu5_resources[] = { | 193 | static struct resource tmu5_resources[] = { |
211 | [0] = { | 194 | [0] = { |
212 | .name = "TMU5", | ||
213 | .start = 0xffdc0020, | 195 | .start = 0xffdc0020, |
214 | .end = 0xffdc002b, | 196 | .end = 0xffdc002b, |
215 | .flags = IORESOURCE_MEM, | 197 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c index 1fcd88b1671e..07bb2d4619f8 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c | |||
@@ -25,7 +25,6 @@ static struct plat_sci_port scif0_platform_data = { | |||
25 | .flags = UPF_BOOT_AUTOCONF, | 25 | .flags = UPF_BOOT_AUTOCONF, |
26 | .type = PORT_SCIF, | 26 | .type = PORT_SCIF, |
27 | .irqs = { 40, 40, 40, 40 }, | 27 | .irqs = { 40, 40, 40, 40 }, |
28 | .clk = "scif_fck", | ||
29 | }; | 28 | }; |
30 | 29 | ||
31 | static struct platform_device scif0_device = { | 30 | static struct platform_device scif0_device = { |
@@ -41,7 +40,6 @@ static struct plat_sci_port scif1_platform_data = { | |||
41 | .flags = UPF_BOOT_AUTOCONF, | 40 | .flags = UPF_BOOT_AUTOCONF, |
42 | .type = PORT_SCIF, | 41 | .type = PORT_SCIF, |
43 | .irqs = { 44, 44, 44, 44 }, | 42 | .irqs = { 44, 44, 44, 44 }, |
44 | .clk = "scif_fck", | ||
45 | }; | 43 | }; |
46 | 44 | ||
47 | static struct platform_device scif1_device = { | 45 | static struct platform_device scif1_device = { |
@@ -57,7 +55,6 @@ static struct plat_sci_port scif2_platform_data = { | |||
57 | .flags = UPF_BOOT_AUTOCONF, | 55 | .flags = UPF_BOOT_AUTOCONF, |
58 | .type = PORT_SCIF, | 56 | .type = PORT_SCIF, |
59 | .irqs = { 60, 60, 60, 60 }, | 57 | .irqs = { 60, 60, 60, 60 }, |
60 | .clk = "scif_fck", | ||
61 | }; | 58 | }; |
62 | 59 | ||
63 | static struct platform_device scif2_device = { | 60 | static struct platform_device scif2_device = { |
@@ -73,7 +70,6 @@ static struct plat_sci_port scif3_platform_data = { | |||
73 | .flags = UPF_BOOT_AUTOCONF, | 70 | .flags = UPF_BOOT_AUTOCONF, |
74 | .type = PORT_SCIF, | 71 | .type = PORT_SCIF, |
75 | .irqs = { 61, 61, 61, 61 }, | 72 | .irqs = { 61, 61, 61, 61 }, |
76 | .clk = "scif_fck", | ||
77 | }; | 73 | }; |
78 | 74 | ||
79 | static struct platform_device scif3_device = { | 75 | static struct platform_device scif3_device = { |
@@ -89,7 +85,6 @@ static struct plat_sci_port scif4_platform_data = { | |||
89 | .flags = UPF_BOOT_AUTOCONF, | 85 | .flags = UPF_BOOT_AUTOCONF, |
90 | .type = PORT_SCIF, | 86 | .type = PORT_SCIF, |
91 | .irqs = { 62, 62, 62, 62 }, | 87 | .irqs = { 62, 62, 62, 62 }, |
92 | .clk = "scif_fck", | ||
93 | }; | 88 | }; |
94 | 89 | ||
95 | static struct platform_device scif4_device = { | 90 | static struct platform_device scif4_device = { |
@@ -105,7 +100,6 @@ static struct plat_sci_port scif5_platform_data = { | |||
105 | .flags = UPF_BOOT_AUTOCONF, | 100 | .flags = UPF_BOOT_AUTOCONF, |
106 | .type = PORT_SCIF, | 101 | .type = PORT_SCIF, |
107 | .irqs = { 63, 63, 63, 63 }, | 102 | .irqs = { 63, 63, 63, 63 }, |
108 | .clk = "scif_fck", | ||
109 | }; | 103 | }; |
110 | 104 | ||
111 | static struct platform_device scif5_device = { | 105 | static struct platform_device scif5_device = { |
@@ -117,16 +111,13 @@ static struct platform_device scif5_device = { | |||
117 | }; | 111 | }; |
118 | 112 | ||
119 | static struct sh_timer_config tmu0_platform_data = { | 113 | static struct sh_timer_config tmu0_platform_data = { |
120 | .name = "TMU0", | ||
121 | .channel_offset = 0x04, | 114 | .channel_offset = 0x04, |
122 | .timer_bit = 0, | 115 | .timer_bit = 0, |
123 | .clk = "tmu012_fck", | ||
124 | .clockevent_rating = 200, | 116 | .clockevent_rating = 200, |
125 | }; | 117 | }; |
126 | 118 | ||
127 | static struct resource tmu0_resources[] = { | 119 | static struct resource tmu0_resources[] = { |
128 | [0] = { | 120 | [0] = { |
129 | .name = "TMU0", | ||
130 | .start = 0xffd80008, | 121 | .start = 0xffd80008, |
131 | .end = 0xffd80013, | 122 | .end = 0xffd80013, |
132 | .flags = IORESOURCE_MEM, | 123 | .flags = IORESOURCE_MEM, |
@@ -148,16 +139,13 @@ static struct platform_device tmu0_device = { | |||
148 | }; | 139 | }; |
149 | 140 | ||
150 | static struct sh_timer_config tmu1_platform_data = { | 141 | static struct sh_timer_config tmu1_platform_data = { |
151 | .name = "TMU1", | ||
152 | .channel_offset = 0x10, | 142 | .channel_offset = 0x10, |
153 | .timer_bit = 1, | 143 | .timer_bit = 1, |
154 | .clk = "tmu012_fck", | ||
155 | .clocksource_rating = 200, | 144 | .clocksource_rating = 200, |
156 | }; | 145 | }; |
157 | 146 | ||
158 | static struct resource tmu1_resources[] = { | 147 | static struct resource tmu1_resources[] = { |
159 | [0] = { | 148 | [0] = { |
160 | .name = "TMU1", | ||
161 | .start = 0xffd80014, | 149 | .start = 0xffd80014, |
162 | .end = 0xffd8001f, | 150 | .end = 0xffd8001f, |
163 | .flags = IORESOURCE_MEM, | 151 | .flags = IORESOURCE_MEM, |
@@ -179,15 +167,12 @@ static struct platform_device tmu1_device = { | |||
179 | }; | 167 | }; |
180 | 168 | ||
181 | static struct sh_timer_config tmu2_platform_data = { | 169 | static struct sh_timer_config tmu2_platform_data = { |
182 | .name = "TMU2", | ||
183 | .channel_offset = 0x1c, | 170 | .channel_offset = 0x1c, |
184 | .timer_bit = 2, | 171 | .timer_bit = 2, |
185 | .clk = "tmu012_fck", | ||
186 | }; | 172 | }; |
187 | 173 | ||
188 | static struct resource tmu2_resources[] = { | 174 | static struct resource tmu2_resources[] = { |
189 | [0] = { | 175 | [0] = { |
190 | .name = "TMU2", | ||
191 | .start = 0xffd80020, | 176 | .start = 0xffd80020, |
192 | .end = 0xffd8002f, | 177 | .end = 0xffd8002f, |
193 | .flags = IORESOURCE_MEM, | 178 | .flags = IORESOURCE_MEM, |
@@ -209,15 +194,12 @@ static struct platform_device tmu2_device = { | |||
209 | }; | 194 | }; |
210 | 195 | ||
211 | static struct sh_timer_config tmu3_platform_data = { | 196 | static struct sh_timer_config tmu3_platform_data = { |
212 | .name = "TMU3", | ||
213 | .channel_offset = 0x04, | 197 | .channel_offset = 0x04, |
214 | .timer_bit = 0, | 198 | .timer_bit = 0, |
215 | .clk = "tmu345_fck", | ||
216 | }; | 199 | }; |
217 | 200 | ||
218 | static struct resource tmu3_resources[] = { | 201 | static struct resource tmu3_resources[] = { |
219 | [0] = { | 202 | [0] = { |
220 | .name = "TMU3", | ||
221 | .start = 0xffdc0008, | 203 | .start = 0xffdc0008, |
222 | .end = 0xffdc0013, | 204 | .end = 0xffdc0013, |
223 | .flags = IORESOURCE_MEM, | 205 | .flags = IORESOURCE_MEM, |
@@ -239,15 +221,12 @@ static struct platform_device tmu3_device = { | |||
239 | }; | 221 | }; |
240 | 222 | ||
241 | static struct sh_timer_config tmu4_platform_data = { | 223 | static struct sh_timer_config tmu4_platform_data = { |
242 | .name = "TMU4", | ||
243 | .channel_offset = 0x10, | 224 | .channel_offset = 0x10, |
244 | .timer_bit = 1, | 225 | .timer_bit = 1, |
245 | .clk = "tmu345_fck", | ||
246 | }; | 226 | }; |
247 | 227 | ||
248 | static struct resource tmu4_resources[] = { | 228 | static struct resource tmu4_resources[] = { |
249 | [0] = { | 229 | [0] = { |
250 | .name = "TMU4", | ||
251 | .start = 0xffdc0014, | 230 | .start = 0xffdc0014, |
252 | .end = 0xffdc001f, | 231 | .end = 0xffdc001f, |
253 | .flags = IORESOURCE_MEM, | 232 | .flags = IORESOURCE_MEM, |
@@ -269,15 +248,12 @@ static struct platform_device tmu4_device = { | |||
269 | }; | 248 | }; |
270 | 249 | ||
271 | static struct sh_timer_config tmu5_platform_data = { | 250 | static struct sh_timer_config tmu5_platform_data = { |
272 | .name = "TMU5", | ||
273 | .channel_offset = 0x1c, | 251 | .channel_offset = 0x1c, |
274 | .timer_bit = 2, | 252 | .timer_bit = 2, |
275 | .clk = "tmu345_fck", | ||
276 | }; | 253 | }; |
277 | 254 | ||
278 | static struct resource tmu5_resources[] = { | 255 | static struct resource tmu5_resources[] = { |
279 | [0] = { | 256 | [0] = { |
280 | .name = "TMU5", | ||
281 | .start = 0xffdc0020, | 257 | .start = 0xffdc0020, |
282 | .end = 0xffdc002b, | 258 | .end = 0xffdc002b, |
283 | .flags = IORESOURCE_MEM, | 259 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c index 7e585320710a..f5599907ac3d 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c | |||
@@ -117,16 +117,13 @@ static struct platform_device scif5_device = { | |||
117 | }; | 117 | }; |
118 | 118 | ||
119 | static struct sh_timer_config tmu0_platform_data = { | 119 | static struct sh_timer_config tmu0_platform_data = { |
120 | .name = "TMU0", | ||
121 | .channel_offset = 0x04, | 120 | .channel_offset = 0x04, |
122 | .timer_bit = 0, | 121 | .timer_bit = 0, |
123 | .clk = "peripheral_clk", | ||
124 | .clockevent_rating = 200, | 122 | .clockevent_rating = 200, |
125 | }; | 123 | }; |
126 | 124 | ||
127 | static struct resource tmu0_resources[] = { | 125 | static struct resource tmu0_resources[] = { |
128 | [0] = { | 126 | [0] = { |
129 | .name = "TMU0", | ||
130 | .start = 0xffd80008, | 127 | .start = 0xffd80008, |
131 | .end = 0xffd80013, | 128 | .end = 0xffd80013, |
132 | .flags = IORESOURCE_MEM, | 129 | .flags = IORESOURCE_MEM, |
@@ -148,16 +145,13 @@ static struct platform_device tmu0_device = { | |||
148 | }; | 145 | }; |
149 | 146 | ||
150 | static struct sh_timer_config tmu1_platform_data = { | 147 | static struct sh_timer_config tmu1_platform_data = { |
151 | .name = "TMU1", | ||
152 | .channel_offset = 0x10, | 148 | .channel_offset = 0x10, |
153 | .timer_bit = 1, | 149 | .timer_bit = 1, |
154 | .clk = "peripheral_clk", | ||
155 | .clocksource_rating = 200, | 150 | .clocksource_rating = 200, |
156 | }; | 151 | }; |
157 | 152 | ||
158 | static struct resource tmu1_resources[] = { | 153 | static struct resource tmu1_resources[] = { |
159 | [0] = { | 154 | [0] = { |
160 | .name = "TMU1", | ||
161 | .start = 0xffd80014, | 155 | .start = 0xffd80014, |
162 | .end = 0xffd8001f, | 156 | .end = 0xffd8001f, |
163 | .flags = IORESOURCE_MEM, | 157 | .flags = IORESOURCE_MEM, |
@@ -179,15 +173,12 @@ static struct platform_device tmu1_device = { | |||
179 | }; | 173 | }; |
180 | 174 | ||
181 | static struct sh_timer_config tmu2_platform_data = { | 175 | static struct sh_timer_config tmu2_platform_data = { |
182 | .name = "TMU2", | ||
183 | .channel_offset = 0x1c, | 176 | .channel_offset = 0x1c, |
184 | .timer_bit = 2, | 177 | .timer_bit = 2, |
185 | .clk = "peripheral_clk", | ||
186 | }; | 178 | }; |
187 | 179 | ||
188 | static struct resource tmu2_resources[] = { | 180 | static struct resource tmu2_resources[] = { |
189 | [0] = { | 181 | [0] = { |
190 | .name = "TMU2", | ||
191 | .start = 0xffd80020, | 182 | .start = 0xffd80020, |
192 | .end = 0xffd8002f, | 183 | .end = 0xffd8002f, |
193 | .flags = IORESOURCE_MEM, | 184 | .flags = IORESOURCE_MEM, |
@@ -209,15 +200,12 @@ static struct platform_device tmu2_device = { | |||
209 | }; | 200 | }; |
210 | 201 | ||
211 | static struct sh_timer_config tmu3_platform_data = { | 202 | static struct sh_timer_config tmu3_platform_data = { |
212 | .name = "TMU3", | ||
213 | .channel_offset = 0x04, | 203 | .channel_offset = 0x04, |
214 | .timer_bit = 0, | 204 | .timer_bit = 0, |
215 | .clk = "peripheral_clk", | ||
216 | }; | 205 | }; |
217 | 206 | ||
218 | static struct resource tmu3_resources[] = { | 207 | static struct resource tmu3_resources[] = { |
219 | [0] = { | 208 | [0] = { |
220 | .name = "TMU3", | ||
221 | .start = 0xffda0008, | 209 | .start = 0xffda0008, |
222 | .end = 0xffda0013, | 210 | .end = 0xffda0013, |
223 | .flags = IORESOURCE_MEM, | 211 | .flags = IORESOURCE_MEM, |
@@ -239,15 +227,12 @@ static struct platform_device tmu3_device = { | |||
239 | }; | 227 | }; |
240 | 228 | ||
241 | static struct sh_timer_config tmu4_platform_data = { | 229 | static struct sh_timer_config tmu4_platform_data = { |
242 | .name = "TMU4", | ||
243 | .channel_offset = 0x10, | 230 | .channel_offset = 0x10, |
244 | .timer_bit = 1, | 231 | .timer_bit = 1, |
245 | .clk = "peripheral_clk", | ||
246 | }; | 232 | }; |
247 | 233 | ||
248 | static struct resource tmu4_resources[] = { | 234 | static struct resource tmu4_resources[] = { |
249 | [0] = { | 235 | [0] = { |
250 | .name = "TMU4", | ||
251 | .start = 0xffda0014, | 236 | .start = 0xffda0014, |
252 | .end = 0xffda001f, | 237 | .end = 0xffda001f, |
253 | .flags = IORESOURCE_MEM, | 238 | .flags = IORESOURCE_MEM, |
@@ -269,15 +254,12 @@ static struct platform_device tmu4_device = { | |||
269 | }; | 254 | }; |
270 | 255 | ||
271 | static struct sh_timer_config tmu5_platform_data = { | 256 | static struct sh_timer_config tmu5_platform_data = { |
272 | .name = "TMU5", | ||
273 | .channel_offset = 0x1c, | 257 | .channel_offset = 0x1c, |
274 | .timer_bit = 2, | 258 | .timer_bit = 2, |
275 | .clk = "peripheral_clk", | ||
276 | }; | 259 | }; |
277 | 260 | ||
278 | static struct resource tmu5_resources[] = { | 261 | static struct resource tmu5_resources[] = { |
279 | [0] = { | 262 | [0] = { |
280 | .name = "TMU5", | ||
281 | .start = 0xffda0020, | 263 | .start = 0xffda0020, |
282 | .end = 0xffda002b, | 264 | .end = 0xffda002b, |
283 | .flags = IORESOURCE_MEM, | 265 | .flags = IORESOURCE_MEM, |
@@ -299,15 +281,12 @@ static struct platform_device tmu5_device = { | |||
299 | }; | 281 | }; |
300 | 282 | ||
301 | static struct sh_timer_config tmu6_platform_data = { | 283 | static struct sh_timer_config tmu6_platform_data = { |
302 | .name = "TMU6", | ||
303 | .channel_offset = 0x04, | 284 | .channel_offset = 0x04, |
304 | .timer_bit = 0, | 285 | .timer_bit = 0, |
305 | .clk = "peripheral_clk", | ||
306 | }; | 286 | }; |
307 | 287 | ||
308 | static struct resource tmu6_resources[] = { | 288 | static struct resource tmu6_resources[] = { |
309 | [0] = { | 289 | [0] = { |
310 | .name = "TMU6", | ||
311 | .start = 0xffdc0008, | 290 | .start = 0xffdc0008, |
312 | .end = 0xffdc0013, | 291 | .end = 0xffdc0013, |
313 | .flags = IORESOURCE_MEM, | 292 | .flags = IORESOURCE_MEM, |
@@ -329,15 +308,12 @@ static struct platform_device tmu6_device = { | |||
329 | }; | 308 | }; |
330 | 309 | ||
331 | static struct sh_timer_config tmu7_platform_data = { | 310 | static struct sh_timer_config tmu7_platform_data = { |
332 | .name = "TMU7", | ||
333 | .channel_offset = 0x10, | 311 | .channel_offset = 0x10, |
334 | .timer_bit = 1, | 312 | .timer_bit = 1, |
335 | .clk = "peripheral_clk", | ||
336 | }; | 313 | }; |
337 | 314 | ||
338 | static struct resource tmu7_resources[] = { | 315 | static struct resource tmu7_resources[] = { |
339 | [0] = { | 316 | [0] = { |
340 | .name = "TMU7", | ||
341 | .start = 0xffdc0014, | 317 | .start = 0xffdc0014, |
342 | .end = 0xffdc001f, | 318 | .end = 0xffdc001f, |
343 | .flags = IORESOURCE_MEM, | 319 | .flags = IORESOURCE_MEM, |
@@ -359,15 +335,12 @@ static struct platform_device tmu7_device = { | |||
359 | }; | 335 | }; |
360 | 336 | ||
361 | static struct sh_timer_config tmu8_platform_data = { | 337 | static struct sh_timer_config tmu8_platform_data = { |
362 | .name = "TMU8", | ||
363 | .channel_offset = 0x1c, | 338 | .channel_offset = 0x1c, |
364 | .timer_bit = 2, | 339 | .timer_bit = 2, |
365 | .clk = "peripheral_clk", | ||
366 | }; | 340 | }; |
367 | 341 | ||
368 | static struct resource tmu8_resources[] = { | 342 | static struct resource tmu8_resources[] = { |
369 | [0] = { | 343 | [0] = { |
370 | .name = "TMU8", | ||
371 | .start = 0xffdc0020, | 344 | .start = 0xffdc0020, |
372 | .end = 0xffdc002b, | 345 | .end = 0xffdc002b, |
373 | .flags = IORESOURCE_MEM, | 346 | .flags = IORESOURCE_MEM, |
@@ -389,15 +362,12 @@ static struct platform_device tmu8_device = { | |||
389 | }; | 362 | }; |
390 | 363 | ||
391 | static struct sh_timer_config tmu9_platform_data = { | 364 | static struct sh_timer_config tmu9_platform_data = { |
392 | .name = "TMU9", | ||
393 | .channel_offset = 0x04, | 365 | .channel_offset = 0x04, |
394 | .timer_bit = 0, | 366 | .timer_bit = 0, |
395 | .clk = "peripheral_clk", | ||
396 | }; | 367 | }; |
397 | 368 | ||
398 | static struct resource tmu9_resources[] = { | 369 | static struct resource tmu9_resources[] = { |
399 | [0] = { | 370 | [0] = { |
400 | .name = "TMU9", | ||
401 | .start = 0xffde0008, | 371 | .start = 0xffde0008, |
402 | .end = 0xffde0013, | 372 | .end = 0xffde0013, |
403 | .flags = IORESOURCE_MEM, | 373 | .flags = IORESOURCE_MEM, |
@@ -419,15 +389,12 @@ static struct platform_device tmu9_device = { | |||
419 | }; | 389 | }; |
420 | 390 | ||
421 | static struct sh_timer_config tmu10_platform_data = { | 391 | static struct sh_timer_config tmu10_platform_data = { |
422 | .name = "TMU10", | ||
423 | .channel_offset = 0x10, | 392 | .channel_offset = 0x10, |
424 | .timer_bit = 1, | 393 | .timer_bit = 1, |
425 | .clk = "peripheral_clk", | ||
426 | }; | 394 | }; |
427 | 395 | ||
428 | static struct resource tmu10_resources[] = { | 396 | static struct resource tmu10_resources[] = { |
429 | [0] = { | 397 | [0] = { |
430 | .name = "TMU10", | ||
431 | .start = 0xffde0014, | 398 | .start = 0xffde0014, |
432 | .end = 0xffde001f, | 399 | .end = 0xffde001f, |
433 | .flags = IORESOURCE_MEM, | 400 | .flags = IORESOURCE_MEM, |
@@ -449,15 +416,12 @@ static struct platform_device tmu10_device = { | |||
449 | }; | 416 | }; |
450 | 417 | ||
451 | static struct sh_timer_config tmu11_platform_data = { | 418 | static struct sh_timer_config tmu11_platform_data = { |
452 | .name = "TMU11", | ||
453 | .channel_offset = 0x1c, | 419 | .channel_offset = 0x1c, |
454 | .timer_bit = 2, | 420 | .timer_bit = 2, |
455 | .clk = "peripheral_clk", | ||
456 | }; | 421 | }; |
457 | 422 | ||
458 | static struct resource tmu11_resources[] = { | 423 | static struct resource tmu11_resources[] = { |
459 | [0] = { | 424 | [0] = { |
460 | .name = "TMU11", | ||
461 | .start = 0xffde0020, | 425 | .start = 0xffde0020, |
462 | .end = 0xffde002b, | 426 | .end = 0xffde002b, |
463 | .flags = IORESOURCE_MEM, | 427 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c index 780ba17a5599..9158bc5ea38b 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c +++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c | |||
@@ -70,16 +70,13 @@ static struct platform_device scif2_device = { | |||
70 | }; | 70 | }; |
71 | 71 | ||
72 | static struct sh_timer_config tmu0_platform_data = { | 72 | static struct sh_timer_config tmu0_platform_data = { |
73 | .name = "TMU0", | ||
74 | .channel_offset = 0x04, | 73 | .channel_offset = 0x04, |
75 | .timer_bit = 0, | 74 | .timer_bit = 0, |
76 | .clk = "peripheral_clk", | ||
77 | .clockevent_rating = 200, | 75 | .clockevent_rating = 200, |
78 | }; | 76 | }; |
79 | 77 | ||
80 | static struct resource tmu0_resources[] = { | 78 | static struct resource tmu0_resources[] = { |
81 | [0] = { | 79 | [0] = { |
82 | .name = "TMU0", | ||
83 | .start = 0xffc10008, | 80 | .start = 0xffc10008, |
84 | .end = 0xffc10013, | 81 | .end = 0xffc10013, |
85 | .flags = IORESOURCE_MEM, | 82 | .flags = IORESOURCE_MEM, |
@@ -101,16 +98,13 @@ static struct platform_device tmu0_device = { | |||
101 | }; | 98 | }; |
102 | 99 | ||
103 | static struct sh_timer_config tmu1_platform_data = { | 100 | static struct sh_timer_config tmu1_platform_data = { |
104 | .name = "TMU1", | ||
105 | .channel_offset = 0x10, | 101 | .channel_offset = 0x10, |
106 | .timer_bit = 1, | 102 | .timer_bit = 1, |
107 | .clk = "peripheral_clk", | ||
108 | .clocksource_rating = 200, | 103 | .clocksource_rating = 200, |
109 | }; | 104 | }; |
110 | 105 | ||
111 | static struct resource tmu1_resources[] = { | 106 | static struct resource tmu1_resources[] = { |
112 | [0] = { | 107 | [0] = { |
113 | .name = "TMU1", | ||
114 | .start = 0xffc10014, | 108 | .start = 0xffc10014, |
115 | .end = 0xffc1001f, | 109 | .end = 0xffc1001f, |
116 | .flags = IORESOURCE_MEM, | 110 | .flags = IORESOURCE_MEM, |
@@ -132,15 +126,12 @@ static struct platform_device tmu1_device = { | |||
132 | }; | 126 | }; |
133 | 127 | ||
134 | static struct sh_timer_config tmu2_platform_data = { | 128 | static struct sh_timer_config tmu2_platform_data = { |
135 | .name = "TMU2", | ||
136 | .channel_offset = 0x1c, | 129 | .channel_offset = 0x1c, |
137 | .timer_bit = 2, | 130 | .timer_bit = 2, |
138 | .clk = "peripheral_clk", | ||
139 | }; | 131 | }; |
140 | 132 | ||
141 | static struct resource tmu2_resources[] = { | 133 | static struct resource tmu2_resources[] = { |
142 | [0] = { | 134 | [0] = { |
143 | .name = "TMU2", | ||
144 | .start = 0xffc10020, | 135 | .start = 0xffc10020, |
145 | .end = 0xffc1002f, | 136 | .end = 0xffc1002f, |
146 | .flags = IORESOURCE_MEM, | 137 | .flags = IORESOURCE_MEM, |
@@ -162,15 +153,12 @@ static struct platform_device tmu2_device = { | |||
162 | }; | 153 | }; |
163 | 154 | ||
164 | static struct sh_timer_config tmu3_platform_data = { | 155 | static struct sh_timer_config tmu3_platform_data = { |
165 | .name = "TMU3", | ||
166 | .channel_offset = 0x04, | 156 | .channel_offset = 0x04, |
167 | .timer_bit = 0, | 157 | .timer_bit = 0, |
168 | .clk = "peripheral_clk", | ||
169 | }; | 158 | }; |
170 | 159 | ||
171 | static struct resource tmu3_resources[] = { | 160 | static struct resource tmu3_resources[] = { |
172 | [0] = { | 161 | [0] = { |
173 | .name = "TMU3", | ||
174 | .start = 0xffc20008, | 162 | .start = 0xffc20008, |
175 | .end = 0xffc20013, | 163 | .end = 0xffc20013, |
176 | .flags = IORESOURCE_MEM, | 164 | .flags = IORESOURCE_MEM, |
@@ -192,15 +180,12 @@ static struct platform_device tmu3_device = { | |||
192 | }; | 180 | }; |
193 | 181 | ||
194 | static struct sh_timer_config tmu4_platform_data = { | 182 | static struct sh_timer_config tmu4_platform_data = { |
195 | .name = "TMU4", | ||
196 | .channel_offset = 0x10, | 183 | .channel_offset = 0x10, |
197 | .timer_bit = 1, | 184 | .timer_bit = 1, |
198 | .clk = "peripheral_clk", | ||
199 | }; | 185 | }; |
200 | 186 | ||
201 | static struct resource tmu4_resources[] = { | 187 | static struct resource tmu4_resources[] = { |
202 | [0] = { | 188 | [0] = { |
203 | .name = "TMU4", | ||
204 | .start = 0xffc20014, | 189 | .start = 0xffc20014, |
205 | .end = 0xffc2001f, | 190 | .end = 0xffc2001f, |
206 | .flags = IORESOURCE_MEM, | 191 | .flags = IORESOURCE_MEM, |
@@ -222,15 +207,12 @@ static struct platform_device tmu4_device = { | |||
222 | }; | 207 | }; |
223 | 208 | ||
224 | static struct sh_timer_config tmu5_platform_data = { | 209 | static struct sh_timer_config tmu5_platform_data = { |
225 | .name = "TMU5", | ||
226 | .channel_offset = 0x1c, | 210 | .channel_offset = 0x1c, |
227 | .timer_bit = 2, | 211 | .timer_bit = 2, |
228 | .clk = "peripheral_clk", | ||
229 | }; | 212 | }; |
230 | 213 | ||
231 | static struct resource tmu5_resources[] = { | 214 | static struct resource tmu5_resources[] = { |
232 | [0] = { | 215 | [0] = { |
233 | .name = "TMU5", | ||
234 | .start = 0xffc20020, | 216 | .start = 0xffc20020, |
235 | .end = 0xffc2002b, | 217 | .end = 0xffc2002b, |
236 | .flags = IORESOURCE_MEM, | 218 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpu/sh5/setup-sh5.c b/arch/sh/kernel/cpu/sh5/setup-sh5.c index e7a3c1e4b604..d910666142b1 100644 --- a/arch/sh/kernel/cpu/sh5/setup-sh5.c +++ b/arch/sh/kernel/cpu/sh5/setup-sh5.c | |||
@@ -68,16 +68,13 @@ static struct platform_device rtc_device = { | |||
68 | #define TMU2_BASE (TMU_BASE + 0x8 + (0xc * 0x2)) | 68 | #define TMU2_BASE (TMU_BASE + 0x8 + (0xc * 0x2)) |
69 | 69 | ||
70 | static struct sh_timer_config tmu0_platform_data = { | 70 | static struct sh_timer_config tmu0_platform_data = { |
71 | .name = "TMU0", | ||
72 | .channel_offset = 0x04, | 71 | .channel_offset = 0x04, |
73 | .timer_bit = 0, | 72 | .timer_bit = 0, |
74 | .clk = "peripheral_clk", | ||
75 | .clockevent_rating = 200, | 73 | .clockevent_rating = 200, |
76 | }; | 74 | }; |
77 | 75 | ||
78 | static struct resource tmu0_resources[] = { | 76 | static struct resource tmu0_resources[] = { |
79 | [0] = { | 77 | [0] = { |
80 | .name = "TMU0", | ||
81 | .start = TMU0_BASE, | 78 | .start = TMU0_BASE, |
82 | .end = TMU0_BASE + 0xc - 1, | 79 | .end = TMU0_BASE + 0xc - 1, |
83 | .flags = IORESOURCE_MEM, | 80 | .flags = IORESOURCE_MEM, |
@@ -99,16 +96,13 @@ static struct platform_device tmu0_device = { | |||
99 | }; | 96 | }; |
100 | 97 | ||
101 | static struct sh_timer_config tmu1_platform_data = { | 98 | static struct sh_timer_config tmu1_platform_data = { |
102 | .name = "TMU1", | ||
103 | .channel_offset = 0x10, | 99 | .channel_offset = 0x10, |
104 | .timer_bit = 1, | 100 | .timer_bit = 1, |
105 | .clk = "peripheral_clk", | ||
106 | .clocksource_rating = 200, | 101 | .clocksource_rating = 200, |
107 | }; | 102 | }; |
108 | 103 | ||
109 | static struct resource tmu1_resources[] = { | 104 | static struct resource tmu1_resources[] = { |
110 | [0] = { | 105 | [0] = { |
111 | .name = "TMU1", | ||
112 | .start = TMU1_BASE, | 106 | .start = TMU1_BASE, |
113 | .end = TMU1_BASE + 0xc - 1, | 107 | .end = TMU1_BASE + 0xc - 1, |
114 | .flags = IORESOURCE_MEM, | 108 | .flags = IORESOURCE_MEM, |
@@ -130,15 +124,12 @@ static struct platform_device tmu1_device = { | |||
130 | }; | 124 | }; |
131 | 125 | ||
132 | static struct sh_timer_config tmu2_platform_data = { | 126 | static struct sh_timer_config tmu2_platform_data = { |
133 | .name = "TMU2", | ||
134 | .channel_offset = 0x1c, | 127 | .channel_offset = 0x1c, |
135 | .timer_bit = 2, | 128 | .timer_bit = 2, |
136 | .clk = "peripheral_clk", | ||
137 | }; | 129 | }; |
138 | 130 | ||
139 | static struct resource tmu2_resources[] = { | 131 | static struct resource tmu2_resources[] = { |
140 | [0] = { | 132 | [0] = { |
141 | .name = "TMU2", | ||
142 | .start = TMU2_BASE, | 133 | .start = TMU2_BASE, |
143 | .end = TMU2_BASE + 0xc - 1, | 134 | .end = TMU2_BASE + 0xc - 1, |
144 | .flags = IORESOURCE_MEM, | 135 | .flags = IORESOURCE_MEM, |
diff --git a/arch/sh/kernel/cpufreq.c b/arch/sh/kernel/cpufreq.c index dce4f3ff0932..0fffacea6ed9 100644 --- a/arch/sh/kernel/cpufreq.c +++ b/arch/sh/kernel/cpufreq.c | |||
@@ -48,7 +48,7 @@ static int sh_cpufreq_target(struct cpufreq_policy *policy, | |||
48 | return -ENODEV; | 48 | return -ENODEV; |
49 | 49 | ||
50 | cpus_allowed = current->cpus_allowed; | 50 | cpus_allowed = current->cpus_allowed; |
51 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 51 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
52 | 52 | ||
53 | BUG_ON(smp_processor_id() != cpu); | 53 | BUG_ON(smp_processor_id() != cpu); |
54 | 54 | ||
@@ -66,7 +66,7 @@ static int sh_cpufreq_target(struct cpufreq_policy *policy, | |||
66 | freqs.flags = 0; | 66 | freqs.flags = 0; |
67 | 67 | ||
68 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 68 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
69 | set_cpus_allowed(current, cpus_allowed); | 69 | set_cpus_allowed_ptr(current, &cpus_allowed); |
70 | clk_set_rate(cpuclk, freq); | 70 | clk_set_rate(cpuclk, freq); |
71 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 71 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
72 | 72 | ||
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index bd1c497280a6..94739ee7aa74 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c | |||
@@ -727,7 +727,7 @@ static int dwarf_parse_cie(void *entry, void *p, unsigned long len, | |||
727 | unsigned char *end, struct module *mod) | 727 | unsigned char *end, struct module *mod) |
728 | { | 728 | { |
729 | struct rb_node **rb_node = &cie_root.rb_node; | 729 | struct rb_node **rb_node = &cie_root.rb_node; |
730 | struct rb_node *parent; | 730 | struct rb_node *parent = *rb_node; |
731 | struct dwarf_cie *cie; | 731 | struct dwarf_cie *cie; |
732 | unsigned long flags; | 732 | unsigned long flags; |
733 | int count; | 733 | int count; |
@@ -856,7 +856,7 @@ static int dwarf_parse_fde(void *entry, u32 entry_type, | |||
856 | unsigned char *end, struct module *mod) | 856 | unsigned char *end, struct module *mod) |
857 | { | 857 | { |
858 | struct rb_node **rb_node = &fde_root.rb_node; | 858 | struct rb_node **rb_node = &fde_root.rb_node; |
859 | struct rb_node *parent; | 859 | struct rb_node *parent = *rb_node; |
860 | struct dwarf_fde *fde; | 860 | struct dwarf_fde *fde; |
861 | struct dwarf_cie *cie; | 861 | struct dwarf_cie *cie; |
862 | unsigned long flags; | 862 | unsigned long flags; |
diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index 0fd7b41f0a22..273f890b17ae 100644 --- a/arch/sh/kernel/idle.c +++ b/arch/sh/kernel/idle.c | |||
@@ -112,7 +112,7 @@ void cpu_idle(void) | |||
112 | } | 112 | } |
113 | } | 113 | } |
114 | 114 | ||
115 | void __cpuinit select_idle_routine(void) | 115 | void __init select_idle_routine(void) |
116 | { | 116 | { |
117 | /* | 117 | /* |
118 | * If a platform has set its own idle routine, leave it alone. | 118 | * If a platform has set its own idle routine, leave it alone. |
diff --git a/arch/sh/kernel/perf_event.c b/arch/sh/kernel/perf_event.c index 9f253e9cce01..81b6de41ae5d 100644 --- a/arch/sh/kernel/perf_event.c +++ b/arch/sh/kernel/perf_event.c | |||
@@ -315,7 +315,7 @@ void hw_perf_disable(void) | |||
315 | sh_pmu->disable_all(); | 315 | sh_pmu->disable_all(); |
316 | } | 316 | } |
317 | 317 | ||
318 | int register_sh_pmu(struct sh_pmu *pmu) | 318 | int __cpuinit register_sh_pmu(struct sh_pmu *pmu) |
319 | { | 319 | { |
320 | if (sh_pmu) | 320 | if (sh_pmu) |
321 | return -EBUSY; | 321 | return -EBUSY; |
diff --git a/arch/sh/kernel/process_64.c b/arch/sh/kernel/process_64.c index c90957a459ac..c0d40f671ecd 100644 --- a/arch/sh/kernel/process_64.c +++ b/arch/sh/kernel/process_64.c | |||
@@ -504,13 +504,6 @@ out: | |||
504 | return error; | 504 | return error; |
505 | } | 505 | } |
506 | 506 | ||
507 | /* | ||
508 | * These bracket the sleeping functions.. | ||
509 | */ | ||
510 | extern void interruptible_sleep_on(wait_queue_head_t *q); | ||
511 | |||
512 | #define mid_sched ((unsigned long) interruptible_sleep_on) | ||
513 | |||
514 | #ifdef CONFIG_FRAME_POINTER | 507 | #ifdef CONFIG_FRAME_POINTER |
515 | static int in_sh64_switch_to(unsigned long pc) | 508 | static int in_sh64_switch_to(unsigned long pc) |
516 | { | 509 | { |
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c index e124cf7008df..002cc612deef 100644 --- a/arch/sh/kernel/smp.c +++ b/arch/sh/kernel/smp.c | |||
@@ -69,6 +69,7 @@ asmlinkage void __cpuinit start_secondary(void) | |||
69 | unsigned int cpu; | 69 | unsigned int cpu; |
70 | struct mm_struct *mm = &init_mm; | 70 | struct mm_struct *mm = &init_mm; |
71 | 71 | ||
72 | enable_mmu(); | ||
72 | atomic_inc(&mm->mm_count); | 73 | atomic_inc(&mm->mm_count); |
73 | atomic_inc(&mm->mm_users); | 74 | atomic_inc(&mm->mm_users); |
74 | current->active_mm = mm; | 75 | current->active_mm = mm; |
diff --git a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile index 3dc8a8a63822..c73018a9972c 100644 --- a/arch/sh/mm/Makefile +++ b/arch/sh/mm/Makefile | |||
@@ -18,13 +18,14 @@ mmu-$(CONFIG_MMU) := extable_$(BITS).o fault_$(BITS).o \ | |||
18 | ioremap.o kmap.o pgtable.o tlbflush_$(BITS).o | 18 | ioremap.o kmap.o pgtable.o tlbflush_$(BITS).o |
19 | 19 | ||
20 | obj-y += $(mmu-y) | 20 | obj-y += $(mmu-y) |
21 | obj-$(CONFIG_DEBUG_FS) += asids-debugfs.o | ||
22 | 21 | ||
23 | ifdef CONFIG_DEBUG_FS | 22 | debugfs-y := asids-debugfs.o |
24 | obj-$(CONFIG_CPU_SH4) += cache-debugfs.o | 23 | ifndef CONFIG_CACHE_OFF |
24 | debugfs-$(CONFIG_CPU_SH4) += cache-debugfs.o | ||
25 | endif | 25 | endif |
26 | 26 | ||
27 | ifdef CONFIG_MMU | 27 | ifdef CONFIG_MMU |
28 | debugfs-$(CONFIG_CPU_SH4) += tlb-debugfs.o | ||
28 | tlb-$(CONFIG_CPU_SH3) := tlb-sh3.o | 29 | tlb-$(CONFIG_CPU_SH3) := tlb-sh3.o |
29 | tlb-$(CONFIG_CPU_SH4) := tlb-sh4.o tlb-urb.o | 30 | tlb-$(CONFIG_CPU_SH4) := tlb-sh4.o tlb-urb.o |
30 | tlb-$(CONFIG_CPU_SH5) := tlb-sh5.o | 31 | tlb-$(CONFIG_CPU_SH5) := tlb-sh5.o |
@@ -32,6 +33,7 @@ tlb-$(CONFIG_CPU_HAS_PTEAEX) := tlb-pteaex.o tlb-urb.o | |||
32 | obj-y += $(tlb-y) | 33 | obj-y += $(tlb-y) |
33 | endif | 34 | endif |
34 | 35 | ||
36 | obj-$(CONFIG_DEBUG_FS) += $(debugfs-y) | ||
35 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o | 37 | obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o |
36 | obj-$(CONFIG_PMB) += pmb.o | 38 | obj-$(CONFIG_PMB) += pmb.o |
37 | obj-$(CONFIG_NUMA) += numa.o | 39 | obj-$(CONFIG_NUMA) += numa.o |
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c index a4662e2782c3..3cc21933063b 100644 --- a/arch/sh/mm/pmb.c +++ b/arch/sh/mm/pmb.c | |||
@@ -323,6 +323,7 @@ static void __clear_pmb_entry(struct pmb_entry *pmbe) | |||
323 | writel_uncached(data_val & ~PMB_V, data); | 323 | writel_uncached(data_val & ~PMB_V, data); |
324 | } | 324 | } |
325 | 325 | ||
326 | #ifdef CONFIG_PM | ||
326 | static void set_pmb_entry(struct pmb_entry *pmbe) | 327 | static void set_pmb_entry(struct pmb_entry *pmbe) |
327 | { | 328 | { |
328 | unsigned long flags; | 329 | unsigned long flags; |
@@ -331,6 +332,7 @@ static void set_pmb_entry(struct pmb_entry *pmbe) | |||
331 | __set_pmb_entry(pmbe); | 332 | __set_pmb_entry(pmbe); |
332 | spin_unlock_irqrestore(&pmbe->lock, flags); | 333 | spin_unlock_irqrestore(&pmbe->lock, flags); |
333 | } | 334 | } |
335 | #endif /* CONFIG_PM */ | ||
334 | 336 | ||
335 | int pmb_bolt_mapping(unsigned long vaddr, phys_addr_t phys, | 337 | int pmb_bolt_mapping(unsigned long vaddr, phys_addr_t phys, |
336 | unsigned long size, pgprot_t prot) | 338 | unsigned long size, pgprot_t prot) |
@@ -802,7 +804,7 @@ void __init pmb_init(void) | |||
802 | writel_uncached(0, PMB_IRMCR); | 804 | writel_uncached(0, PMB_IRMCR); |
803 | 805 | ||
804 | /* Flush out the TLB */ | 806 | /* Flush out the TLB */ |
805 | __raw_writel(__raw_readl(MMUCR) | MMUCR_TI, MMUCR); | 807 | local_flush_tlb_all(); |
806 | ctrl_barrier(); | 808 | ctrl_barrier(); |
807 | } | 809 | } |
808 | 810 | ||
diff --git a/arch/sh/mm/tlb-debugfs.c b/arch/sh/mm/tlb-debugfs.c new file mode 100644 index 000000000000..229bf75f28df --- /dev/null +++ b/arch/sh/mm/tlb-debugfs.c | |||
@@ -0,0 +1,179 @@ | |||
1 | /* | ||
2 | * arch/sh/mm/tlb-debugfs.c | ||
3 | * | ||
4 | * debugfs ops for SH-4 ITLB/UTLBs. | ||
5 | * | ||
6 | * Copyright (C) 2010 Matt Fleming | ||
7 | * | ||
8 | * This file is subject to the terms and conditions of the GNU General Public | ||
9 | * License. See the file "COPYING" in the main directory of this archive | ||
10 | * for more details. | ||
11 | */ | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/debugfs.h> | ||
15 | #include <linux/seq_file.h> | ||
16 | #include <asm/processor.h> | ||
17 | #include <asm/mmu_context.h> | ||
18 | #include <asm/tlbflush.h> | ||
19 | |||
20 | enum tlb_type { | ||
21 | TLB_TYPE_ITLB, | ||
22 | TLB_TYPE_UTLB, | ||
23 | }; | ||
24 | |||
25 | static struct { | ||
26 | int bits; | ||
27 | const char *size; | ||
28 | } tlb_sizes[] = { | ||
29 | { 0x0, " 1KB" }, | ||
30 | { 0x1, " 4KB" }, | ||
31 | { 0x2, " 8KB" }, | ||
32 | { 0x4, " 64KB" }, | ||
33 | { 0x5, "256KB" }, | ||
34 | { 0x7, " 1MB" }, | ||
35 | { 0x8, " 4MB" }, | ||
36 | { 0xc, " 64MB" }, | ||
37 | }; | ||
38 | |||
39 | static int tlb_seq_show(struct seq_file *file, void *iter) | ||
40 | { | ||
41 | unsigned int tlb_type = (unsigned int)file->private; | ||
42 | unsigned long addr1, addr2, data1, data2; | ||
43 | unsigned long flags; | ||
44 | unsigned long mmucr; | ||
45 | unsigned int nentries, entry; | ||
46 | unsigned int urb; | ||
47 | |||
48 | mmucr = __raw_readl(MMUCR); | ||
49 | if ((mmucr & 0x1) == 0) { | ||
50 | seq_printf(file, "address translation disabled\n"); | ||
51 | return 0; | ||
52 | } | ||
53 | |||
54 | if (tlb_type == TLB_TYPE_ITLB) { | ||
55 | addr1 = MMU_ITLB_ADDRESS_ARRAY; | ||
56 | addr2 = MMU_ITLB_ADDRESS_ARRAY2; | ||
57 | data1 = MMU_ITLB_DATA_ARRAY; | ||
58 | data2 = MMU_ITLB_DATA_ARRAY2; | ||
59 | nentries = 4; | ||
60 | } else { | ||
61 | addr1 = MMU_UTLB_ADDRESS_ARRAY; | ||
62 | addr2 = MMU_UTLB_ADDRESS_ARRAY2; | ||
63 | data1 = MMU_UTLB_DATA_ARRAY; | ||
64 | data2 = MMU_UTLB_DATA_ARRAY2; | ||
65 | nentries = 64; | ||
66 | } | ||
67 | |||
68 | local_irq_save(flags); | ||
69 | jump_to_uncached(); | ||
70 | |||
71 | urb = (mmucr & MMUCR_URB) >> MMUCR_URB_SHIFT; | ||
72 | |||
73 | /* Make the "entry >= urb" test fail. */ | ||
74 | if (urb == 0) | ||
75 | urb = MMUCR_URB_NENTRIES + 1; | ||
76 | |||
77 | if (tlb_type == TLB_TYPE_ITLB) { | ||
78 | addr1 = MMU_ITLB_ADDRESS_ARRAY; | ||
79 | addr2 = MMU_ITLB_ADDRESS_ARRAY2; | ||
80 | data1 = MMU_ITLB_DATA_ARRAY; | ||
81 | data2 = MMU_ITLB_DATA_ARRAY2; | ||
82 | nentries = 4; | ||
83 | } else { | ||
84 | addr1 = MMU_UTLB_ADDRESS_ARRAY; | ||
85 | addr2 = MMU_UTLB_ADDRESS_ARRAY2; | ||
86 | data1 = MMU_UTLB_DATA_ARRAY; | ||
87 | data2 = MMU_UTLB_DATA_ARRAY2; | ||
88 | nentries = 64; | ||
89 | } | ||
90 | |||
91 | seq_printf(file, "entry: vpn ppn asid size valid wired\n"); | ||
92 | |||
93 | for (entry = 0; entry < nentries; entry++) { | ||
94 | unsigned long vpn, ppn, asid, size; | ||
95 | unsigned long valid; | ||
96 | unsigned long val; | ||
97 | const char *sz = " ?"; | ||
98 | int i; | ||
99 | |||
100 | val = __raw_readl(addr1 | (entry << MMU_TLB_ENTRY_SHIFT)); | ||
101 | ctrl_barrier(); | ||
102 | vpn = val & 0xfffffc00; | ||
103 | valid = val & 0x100; | ||
104 | |||
105 | val = __raw_readl(addr2 | (entry << MMU_TLB_ENTRY_SHIFT)); | ||
106 | ctrl_barrier(); | ||
107 | asid = val & MMU_CONTEXT_ASID_MASK; | ||
108 | |||
109 | val = __raw_readl(data1 | (entry << MMU_TLB_ENTRY_SHIFT)); | ||
110 | ctrl_barrier(); | ||
111 | ppn = (val & 0x0ffffc00) << 4; | ||
112 | |||
113 | val = __raw_readl(data2 | (entry << MMU_TLB_ENTRY_SHIFT)); | ||
114 | ctrl_barrier(); | ||
115 | size = (val & 0xf0) >> 4; | ||
116 | |||
117 | for (i = 0; i < ARRAY_SIZE(tlb_sizes); i++) { | ||
118 | if (tlb_sizes[i].bits == size) | ||
119 | break; | ||
120 | } | ||
121 | |||
122 | if (i != ARRAY_SIZE(tlb_sizes)) | ||
123 | sz = tlb_sizes[i].size; | ||
124 | |||
125 | seq_printf(file, "%2d: 0x%08lx 0x%08lx %5lu %s %s %s\n", | ||
126 | entry, vpn, ppn, asid, | ||
127 | sz, valid ? "V" : "-", | ||
128 | (urb <= entry) ? "W" : "-"); | ||
129 | } | ||
130 | |||
131 | back_to_cached(); | ||
132 | local_irq_restore(flags); | ||
133 | |||
134 | return 0; | ||
135 | } | ||
136 | |||
137 | static int tlb_debugfs_open(struct inode *inode, struct file *file) | ||
138 | { | ||
139 | return single_open(file, tlb_seq_show, inode->i_private); | ||
140 | } | ||
141 | |||
142 | static const struct file_operations tlb_debugfs_fops = { | ||
143 | .owner = THIS_MODULE, | ||
144 | .open = tlb_debugfs_open, | ||
145 | .read = seq_read, | ||
146 | .llseek = seq_lseek, | ||
147 | .release = single_release, | ||
148 | }; | ||
149 | |||
150 | static int __init tlb_debugfs_init(void) | ||
151 | { | ||
152 | struct dentry *itlb, *utlb; | ||
153 | |||
154 | itlb = debugfs_create_file("itlb", S_IRUSR, sh_debugfs_root, | ||
155 | (unsigned int *)TLB_TYPE_ITLB, | ||
156 | &tlb_debugfs_fops); | ||
157 | if (unlikely(!itlb)) | ||
158 | return -ENOMEM; | ||
159 | if (IS_ERR(itlb)) | ||
160 | return PTR_ERR(itlb); | ||
161 | |||
162 | utlb = debugfs_create_file("utlb", S_IRUSR, sh_debugfs_root, | ||
163 | (unsigned int *)TLB_TYPE_UTLB, | ||
164 | &tlb_debugfs_fops); | ||
165 | if (unlikely(!utlb)) { | ||
166 | debugfs_remove(itlb); | ||
167 | return -ENOMEM; | ||
168 | } | ||
169 | |||
170 | if (IS_ERR(utlb)) { | ||
171 | debugfs_remove(itlb); | ||
172 | return PTR_ERR(utlb); | ||
173 | } | ||
174 | |||
175 | return 0; | ||
176 | } | ||
177 | module_init(tlb_debugfs_init); | ||
178 | |||
179 | MODULE_LICENSE("GPL v2"); | ||
diff --git a/arch/sh/mm/tlb-pteaex.c b/arch/sh/mm/tlb-pteaex.c index 32dc674c550c..bdd0982b56ee 100644 --- a/arch/sh/mm/tlb-pteaex.c +++ b/arch/sh/mm/tlb-pteaex.c | |||
@@ -73,5 +73,7 @@ void local_flush_tlb_one(unsigned long asid, unsigned long page) | |||
73 | jump_to_uncached(); | 73 | jump_to_uncached(); |
74 | __raw_writel(page, MMU_UTLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT); | 74 | __raw_writel(page, MMU_UTLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT); |
75 | __raw_writel(asid, MMU_UTLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT); | 75 | __raw_writel(asid, MMU_UTLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT); |
76 | __raw_writel(page, MMU_ITLB_ADDRESS_ARRAY | MMU_PAGE_ASSOC_BIT); | ||
77 | __raw_writel(asid, MMU_ITLB_ADDRESS_ARRAY2 | MMU_PAGE_ASSOC_BIT); | ||
76 | back_to_cached(); | 78 | back_to_cached(); |
77 | } | 79 | } |
diff --git a/arch/sh/mm/tlb-urb.c b/arch/sh/mm/tlb-urb.c index bb5b9098956d..c92ce20db39b 100644 --- a/arch/sh/mm/tlb-urb.c +++ b/arch/sh/mm/tlb-urb.c | |||
@@ -24,13 +24,9 @@ void tlb_wire_entry(struct vm_area_struct *vma, unsigned long addr, pte_t pte) | |||
24 | 24 | ||
25 | local_irq_save(flags); | 25 | local_irq_save(flags); |
26 | 26 | ||
27 | /* Load the entry into the TLB */ | ||
28 | __update_tlb(vma, addr, pte); | ||
29 | |||
30 | /* ... and wire it up. */ | ||
31 | status = __raw_readl(MMUCR); | 27 | status = __raw_readl(MMUCR); |
32 | urb = (status & MMUCR_URB) >> MMUCR_URB_SHIFT; | 28 | urb = (status & MMUCR_URB) >> MMUCR_URB_SHIFT; |
33 | status &= ~MMUCR_URB; | 29 | status &= ~MMUCR_URC; |
34 | 30 | ||
35 | /* | 31 | /* |
36 | * Make sure we're not trying to wire the last TLB entry slot. | 32 | * Make sure we're not trying to wire the last TLB entry slot. |
@@ -39,7 +35,23 @@ void tlb_wire_entry(struct vm_area_struct *vma, unsigned long addr, pte_t pte) | |||
39 | 35 | ||
40 | urb = urb % MMUCR_URB_NENTRIES; | 36 | urb = urb % MMUCR_URB_NENTRIES; |
41 | 37 | ||
38 | /* | ||
39 | * Insert this entry into the highest non-wired TLB slot (via | ||
40 | * the URC field). | ||
41 | */ | ||
42 | status |= (urb << MMUCR_URC_SHIFT); | ||
43 | __raw_writel(status, MMUCR); | ||
44 | ctrl_barrier(); | ||
45 | |||
46 | /* Load the entry into the TLB */ | ||
47 | __update_tlb(vma, addr, pte); | ||
48 | |||
49 | /* ... and wire it up. */ | ||
50 | status = __raw_readl(MMUCR); | ||
51 | |||
52 | status &= ~MMUCR_URB; | ||
42 | status |= (urb << MMUCR_URB_SHIFT); | 53 | status |= (urb << MMUCR_URB_SHIFT); |
54 | |||
43 | __raw_writel(status, MMUCR); | 55 | __raw_writel(status, MMUCR); |
44 | ctrl_barrier(); | 56 | ctrl_barrier(); |
45 | 57 | ||
diff --git a/arch/sh/mm/tlbflush_32.c b/arch/sh/mm/tlbflush_32.c index 004bb3f25b5f..77dc5efa7127 100644 --- a/arch/sh/mm/tlbflush_32.c +++ b/arch/sh/mm/tlbflush_32.c | |||
@@ -123,18 +123,27 @@ void local_flush_tlb_mm(struct mm_struct *mm) | |||
123 | void local_flush_tlb_all(void) | 123 | void local_flush_tlb_all(void) |
124 | { | 124 | { |
125 | unsigned long flags, status; | 125 | unsigned long flags, status; |
126 | int i; | ||
126 | 127 | ||
127 | /* | 128 | /* |
128 | * Flush all the TLB. | 129 | * Flush all the TLB. |
129 | * | ||
130 | * Write to the MMU control register's bit: | ||
131 | * TF-bit for SH-3, TI-bit for SH-4. | ||
132 | * It's same position, bit #2. | ||
133 | */ | 130 | */ |
134 | local_irq_save(flags); | 131 | local_irq_save(flags); |
132 | jump_to_uncached(); | ||
133 | |||
135 | status = __raw_readl(MMUCR); | 134 | status = __raw_readl(MMUCR); |
136 | status |= 0x04; | 135 | status = ((status & MMUCR_URB) >> MMUCR_URB_SHIFT); |
137 | __raw_writel(status, MMUCR); | 136 | |
137 | if (status == 0) | ||
138 | status = MMUCR_URB_NENTRIES; | ||
139 | |||
140 | for (i = 0; i < status; i++) | ||
141 | __raw_writel(0x0, MMU_UTLB_ADDRESS_ARRAY | (i << 8)); | ||
142 | |||
143 | for (i = 0; i < 4; i++) | ||
144 | __raw_writel(0x0, MMU_ITLB_ADDRESS_ARRAY | (i << 8)); | ||
145 | |||
146 | back_to_cached(); | ||
138 | ctrl_barrier(); | 147 | ctrl_barrier(); |
139 | local_irq_restore(flags); | 148 | local_irq_restore(flags); |
140 | } | 149 | } |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index fb7fc24fe727..189cbc2585fa 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/acpi.h> | 8 | #include <linux/acpi.h> |
9 | #include <linux/signal.h> | 9 | #include <linux/signal.h> |
10 | #include <linux/kthread.h> | 10 | #include <linux/kthread.h> |
11 | #include <linux/dmi.h> | ||
11 | 12 | ||
12 | #include <acpi/acpi_drivers.h> | 13 | #include <acpi/acpi_drivers.h> |
13 | 14 | ||
@@ -1032,6 +1033,41 @@ static void acpi_add_id(struct acpi_device *device, const char *dev_id) | |||
1032 | list_add_tail(&id->list, &device->pnp.ids); | 1033 | list_add_tail(&id->list, &device->pnp.ids); |
1033 | } | 1034 | } |
1034 | 1035 | ||
1036 | /* | ||
1037 | * Old IBM workstations have a DSDT bug wherein the SMBus object | ||
1038 | * lacks the SMBUS01 HID and the methods do not have the necessary "_" | ||
1039 | * prefix. Work around this. | ||
1040 | */ | ||
1041 | static int acpi_ibm_smbus_match(struct acpi_device *device) | ||
1042 | { | ||
1043 | acpi_handle h_dummy; | ||
1044 | struct acpi_buffer path = {ACPI_ALLOCATE_BUFFER, NULL}; | ||
1045 | int result; | ||
1046 | |||
1047 | if (!dmi_name_in_vendors("IBM")) | ||
1048 | return -ENODEV; | ||
1049 | |||
1050 | /* Look for SMBS object */ | ||
1051 | result = acpi_get_name(device->handle, ACPI_SINGLE_NAME, &path); | ||
1052 | if (result) | ||
1053 | return result; | ||
1054 | |||
1055 | if (strcmp("SMBS", path.pointer)) { | ||
1056 | result = -ENODEV; | ||
1057 | goto out; | ||
1058 | } | ||
1059 | |||
1060 | /* Does it have the necessary (but misnamed) methods? */ | ||
1061 | result = -ENODEV; | ||
1062 | if (ACPI_SUCCESS(acpi_get_handle(device->handle, "SBI", &h_dummy)) && | ||
1063 | ACPI_SUCCESS(acpi_get_handle(device->handle, "SBR", &h_dummy)) && | ||
1064 | ACPI_SUCCESS(acpi_get_handle(device->handle, "SBW", &h_dummy))) | ||
1065 | result = 0; | ||
1066 | out: | ||
1067 | kfree(path.pointer); | ||
1068 | return result; | ||
1069 | } | ||
1070 | |||
1035 | static void acpi_device_set_id(struct acpi_device *device) | 1071 | static void acpi_device_set_id(struct acpi_device *device) |
1036 | { | 1072 | { |
1037 | acpi_status status; | 1073 | acpi_status status; |
@@ -1082,6 +1118,8 @@ static void acpi_device_set_id(struct acpi_device *device) | |||
1082 | acpi_add_id(device, ACPI_BAY_HID); | 1118 | acpi_add_id(device, ACPI_BAY_HID); |
1083 | else if (ACPI_SUCCESS(acpi_dock_match(device))) | 1119 | else if (ACPI_SUCCESS(acpi_dock_match(device))) |
1084 | acpi_add_id(device, ACPI_DOCK_HID); | 1120 | acpi_add_id(device, ACPI_DOCK_HID); |
1121 | else if (!acpi_ibm_smbus_match(device)) | ||
1122 | acpi_add_id(device, ACPI_SMBUS_IBM_HID); | ||
1085 | 1123 | ||
1086 | break; | 1124 | break; |
1087 | case ACPI_BUS_TYPE_POWER: | 1125 | case ACPI_BUS_TYPE_POWER: |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 561dec2481cb..277477251a86 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -1667,6 +1667,7 @@ unsigned int ata_sff_host_intr(struct ata_port *ap, | |||
1667 | { | 1667 | { |
1668 | struct ata_eh_info *ehi = &ap->link.eh_info; | 1668 | struct ata_eh_info *ehi = &ap->link.eh_info; |
1669 | u8 status, host_stat = 0; | 1669 | u8 status, host_stat = 0; |
1670 | bool bmdma_stopped = false; | ||
1670 | 1671 | ||
1671 | VPRINTK("ata%u: protocol %d task_state %d\n", | 1672 | VPRINTK("ata%u: protocol %d task_state %d\n", |
1672 | ap->print_id, qc->tf.protocol, ap->hsm_task_state); | 1673 | ap->print_id, qc->tf.protocol, ap->hsm_task_state); |
@@ -1699,6 +1700,7 @@ unsigned int ata_sff_host_intr(struct ata_port *ap, | |||
1699 | 1700 | ||
1700 | /* before we do anything else, clear DMA-Start bit */ | 1701 | /* before we do anything else, clear DMA-Start bit */ |
1701 | ap->ops->bmdma_stop(qc); | 1702 | ap->ops->bmdma_stop(qc); |
1703 | bmdma_stopped = true; | ||
1702 | 1704 | ||
1703 | if (unlikely(host_stat & ATA_DMA_ERR)) { | 1705 | if (unlikely(host_stat & ATA_DMA_ERR)) { |
1704 | /* error when transfering data to/from memory */ | 1706 | /* error when transfering data to/from memory */ |
@@ -1716,8 +1718,14 @@ unsigned int ata_sff_host_intr(struct ata_port *ap, | |||
1716 | 1718 | ||
1717 | /* check main status, clearing INTRQ if needed */ | 1719 | /* check main status, clearing INTRQ if needed */ |
1718 | status = ata_sff_irq_status(ap); | 1720 | status = ata_sff_irq_status(ap); |
1719 | if (status & ATA_BUSY) | 1721 | if (status & ATA_BUSY) { |
1720 | goto idle_irq; | 1722 | if (bmdma_stopped) { |
1723 | /* BMDMA engine is already stopped, we're screwed */ | ||
1724 | qc->err_mask |= AC_ERR_HSM; | ||
1725 | ap->hsm_task_state = HSM_ST_ERR; | ||
1726 | } else | ||
1727 | goto idle_irq; | ||
1728 | } | ||
1721 | 1729 | ||
1722 | /* ack bmdma irq events */ | 1730 | /* ack bmdma irq events */ |
1723 | ap->ops->sff_irq_clear(ap); | 1731 | ap->ops->sff_irq_clear(ap); |
@@ -1762,13 +1770,16 @@ EXPORT_SYMBOL_GPL(ata_sff_host_intr); | |||
1762 | irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | 1770 | irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) |
1763 | { | 1771 | { |
1764 | struct ata_host *host = dev_instance; | 1772 | struct ata_host *host = dev_instance; |
1773 | bool retried = false; | ||
1765 | unsigned int i; | 1774 | unsigned int i; |
1766 | unsigned int handled = 0, polling = 0; | 1775 | unsigned int handled, idle, polling; |
1767 | unsigned long flags; | 1776 | unsigned long flags; |
1768 | 1777 | ||
1769 | /* TODO: make _irqsave conditional on x86 PCI IDE legacy mode */ | 1778 | /* TODO: make _irqsave conditional on x86 PCI IDE legacy mode */ |
1770 | spin_lock_irqsave(&host->lock, flags); | 1779 | spin_lock_irqsave(&host->lock, flags); |
1771 | 1780 | ||
1781 | retry: | ||
1782 | handled = idle = polling = 0; | ||
1772 | for (i = 0; i < host->n_ports; i++) { | 1783 | for (i = 0; i < host->n_ports; i++) { |
1773 | struct ata_port *ap = host->ports[i]; | 1784 | struct ata_port *ap = host->ports[i]; |
1774 | struct ata_queued_cmd *qc; | 1785 | struct ata_queued_cmd *qc; |
@@ -1782,7 +1793,8 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | |||
1782 | handled |= ata_sff_host_intr(ap, qc); | 1793 | handled |= ata_sff_host_intr(ap, qc); |
1783 | else | 1794 | else |
1784 | polling |= 1 << i; | 1795 | polling |= 1 << i; |
1785 | } | 1796 | } else |
1797 | idle |= 1 << i; | ||
1786 | } | 1798 | } |
1787 | 1799 | ||
1788 | /* | 1800 | /* |
@@ -1790,7 +1802,9 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | |||
1790 | * asserting IRQ line, nobody cared will ensue. Check IRQ | 1802 | * asserting IRQ line, nobody cared will ensue. Check IRQ |
1791 | * pending status if available and clear spurious IRQ. | 1803 | * pending status if available and clear spurious IRQ. |
1792 | */ | 1804 | */ |
1793 | if (!handled) { | 1805 | if (!handled && !retried) { |
1806 | bool retry = false; | ||
1807 | |||
1794 | for (i = 0; i < host->n_ports; i++) { | 1808 | for (i = 0; i < host->n_ports; i++) { |
1795 | struct ata_port *ap = host->ports[i]; | 1809 | struct ata_port *ap = host->ports[i]; |
1796 | 1810 | ||
@@ -1805,8 +1819,23 @@ irqreturn_t ata_sff_interrupt(int irq, void *dev_instance) | |||
1805 | ata_port_printk(ap, KERN_INFO, | 1819 | ata_port_printk(ap, KERN_INFO, |
1806 | "clearing spurious IRQ\n"); | 1820 | "clearing spurious IRQ\n"); |
1807 | 1821 | ||
1808 | ap->ops->sff_check_status(ap); | 1822 | if (idle & (1 << i)) { |
1809 | ap->ops->sff_irq_clear(ap); | 1823 | ap->ops->sff_check_status(ap); |
1824 | ap->ops->sff_irq_clear(ap); | ||
1825 | } else { | ||
1826 | /* clear INTRQ and check if BUSY cleared */ | ||
1827 | if (!(ap->ops->sff_check_status(ap) & ATA_BUSY)) | ||
1828 | retry |= true; | ||
1829 | /* | ||
1830 | * With command in flight, we can't do | ||
1831 | * sff_irq_clear() w/o racing with completion. | ||
1832 | */ | ||
1833 | } | ||
1834 | } | ||
1835 | |||
1836 | if (retry) { | ||
1837 | retried = true; | ||
1838 | goto retry; | ||
1810 | } | 1839 | } |
1811 | } | 1840 | } |
1812 | 1841 | ||
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 3059ec017de3..95d39c36acea 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -677,6 +677,7 @@ static const struct pci_device_id via[] = { | |||
677 | { PCI_VDEVICE(VIA, 0x3164), }, | 677 | { PCI_VDEVICE(VIA, 0x3164), }, |
678 | { PCI_VDEVICE(VIA, 0x5324), }, | 678 | { PCI_VDEVICE(VIA, 0x5324), }, |
679 | { PCI_VDEVICE(VIA, 0xC409), VIA_IDFLAG_SINGLE }, | 679 | { PCI_VDEVICE(VIA, 0xC409), VIA_IDFLAG_SINGLE }, |
680 | { PCI_VDEVICE(VIA, 0x9001), VIA_IDFLAG_SINGLE }, | ||
680 | 681 | ||
681 | { }, | 682 | { }, |
682 | }; | 683 | }; |
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 4b4b565c835f..d10230adeb36 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -1254,6 +1254,26 @@ static int __init early_platform_driver_probe_id(char *class_str, | |||
1254 | } | 1254 | } |
1255 | 1255 | ||
1256 | if (match) { | 1256 | if (match) { |
1257 | /* | ||
1258 | * Set up a sensible init_name to enable | ||
1259 | * dev_name() and others to be used before the | ||
1260 | * rest of the driver core is initialized. | ||
1261 | */ | ||
1262 | if (!match->dev.init_name) { | ||
1263 | if (match->id != -1) | ||
1264 | match->dev.init_name = | ||
1265 | kasprintf(GFP_KERNEL, "%s.%d", | ||
1266 | match->name, | ||
1267 | match->id); | ||
1268 | else | ||
1269 | match->dev.init_name = | ||
1270 | kasprintf(GFP_KERNEL, "%s", | ||
1271 | match->name); | ||
1272 | |||
1273 | if (!match->dev.init_name) | ||
1274 | return -ENOMEM; | ||
1275 | } | ||
1276 | |||
1257 | if (epdrv->pdrv->probe(match)) | 1277 | if (epdrv->pdrv->probe(match)) |
1258 | pr_warning("%s: unable to probe %s early.\n", | 1278 | pr_warning("%s: unable to probe %s early.\n", |
1259 | class_str, match->name); | 1279 | class_str, match->name); |
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c index a3e10dc7cc25..b78d5c381efe 100644 --- a/drivers/char/agp/intel-agp.c +++ b/drivers/char/agp/intel-agp.c | |||
@@ -97,6 +97,9 @@ EXPORT_SYMBOL(intel_agp_enabled); | |||
97 | #define IS_PINEVIEW (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB || \ | 97 | #define IS_PINEVIEW (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_M_HB || \ |
98 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_HB) | 98 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_PINEVIEW_HB) |
99 | 99 | ||
100 | #define IS_SNB (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB || \ | ||
101 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB) | ||
102 | |||
100 | #define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_EAGLELAKE_HB || \ | 103 | #define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_EAGLELAKE_HB || \ |
101 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \ | 104 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \ |
102 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \ | 105 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \ |
@@ -107,8 +110,7 @@ EXPORT_SYMBOL(intel_agp_enabled); | |||
107 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB || \ | 110 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB || \ |
108 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB || \ | 111 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB || \ |
109 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB || \ | 112 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB || \ |
110 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB || \ | 113 | IS_SNB) |
111 | agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB) | ||
112 | 114 | ||
113 | extern int agp_memory_reserved; | 115 | extern int agp_memory_reserved; |
114 | 116 | ||
@@ -175,6 +177,10 @@ extern int agp_memory_reserved; | |||
175 | #define SNB_GMCH_GMS_STOLEN_448M (0xe << 3) | 177 | #define SNB_GMCH_GMS_STOLEN_448M (0xe << 3) |
176 | #define SNB_GMCH_GMS_STOLEN_480M (0xf << 3) | 178 | #define SNB_GMCH_GMS_STOLEN_480M (0xf << 3) |
177 | #define SNB_GMCH_GMS_STOLEN_512M (0x10 << 3) | 179 | #define SNB_GMCH_GMS_STOLEN_512M (0x10 << 3) |
180 | #define SNB_GTT_SIZE_0M (0 << 8) | ||
181 | #define SNB_GTT_SIZE_1M (1 << 8) | ||
182 | #define SNB_GTT_SIZE_2M (2 << 8) | ||
183 | #define SNB_GTT_SIZE_MASK (3 << 8) | ||
178 | 184 | ||
179 | static const struct aper_size_info_fixed intel_i810_sizes[] = | 185 | static const struct aper_size_info_fixed intel_i810_sizes[] = |
180 | { | 186 | { |
@@ -1200,6 +1206,9 @@ static void intel_i9xx_setup_flush(void) | |||
1200 | if (intel_private.ifp_resource.start) | 1206 | if (intel_private.ifp_resource.start) |
1201 | return; | 1207 | return; |
1202 | 1208 | ||
1209 | if (IS_SNB) | ||
1210 | return; | ||
1211 | |||
1203 | /* setup a resource for this object */ | 1212 | /* setup a resource for this object */ |
1204 | intel_private.ifp_resource.name = "Intel Flush Page"; | 1213 | intel_private.ifp_resource.name = "Intel Flush Page"; |
1205 | intel_private.ifp_resource.flags = IORESOURCE_MEM; | 1214 | intel_private.ifp_resource.flags = IORESOURCE_MEM; |
@@ -1438,6 +1447,8 @@ static unsigned long intel_i965_mask_memory(struct agp_bridge_data *bridge, | |||
1438 | 1447 | ||
1439 | static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) | 1448 | static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) |
1440 | { | 1449 | { |
1450 | u16 snb_gmch_ctl; | ||
1451 | |||
1441 | switch (agp_bridge->dev->device) { | 1452 | switch (agp_bridge->dev->device) { |
1442 | case PCI_DEVICE_ID_INTEL_GM45_HB: | 1453 | case PCI_DEVICE_ID_INTEL_GM45_HB: |
1443 | case PCI_DEVICE_ID_INTEL_EAGLELAKE_HB: | 1454 | case PCI_DEVICE_ID_INTEL_EAGLELAKE_HB: |
@@ -1449,9 +1460,26 @@ static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size) | |||
1449 | case PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB: | 1460 | case PCI_DEVICE_ID_INTEL_IRONLAKE_M_HB: |
1450 | case PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB: | 1461 | case PCI_DEVICE_ID_INTEL_IRONLAKE_MA_HB: |
1451 | case PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB: | 1462 | case PCI_DEVICE_ID_INTEL_IRONLAKE_MC2_HB: |
1463 | *gtt_offset = *gtt_size = MB(2); | ||
1464 | break; | ||
1452 | case PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB: | 1465 | case PCI_DEVICE_ID_INTEL_SANDYBRIDGE_HB: |
1453 | case PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB: | 1466 | case PCI_DEVICE_ID_INTEL_SANDYBRIDGE_M_HB: |
1454 | *gtt_offset = *gtt_size = MB(2); | 1467 | *gtt_offset = MB(2); |
1468 | |||
1469 | pci_read_config_word(intel_private.pcidev, SNB_GMCH_CTRL, &snb_gmch_ctl); | ||
1470 | switch (snb_gmch_ctl & SNB_GTT_SIZE_MASK) { | ||
1471 | default: | ||
1472 | case SNB_GTT_SIZE_0M: | ||
1473 | printk(KERN_ERR "Bad GTT size mask: 0x%04x.\n", snb_gmch_ctl); | ||
1474 | *gtt_size = MB(0); | ||
1475 | break; | ||
1476 | case SNB_GTT_SIZE_1M: | ||
1477 | *gtt_size = MB(1); | ||
1478 | break; | ||
1479 | case SNB_GTT_SIZE_2M: | ||
1480 | *gtt_size = MB(2); | ||
1481 | break; | ||
1482 | } | ||
1455 | break; | 1483 | break; |
1456 | default: | 1484 | default: |
1457 | *gtt_offset = *gtt_size = KB(512); | 1485 | *gtt_offset = *gtt_size = KB(512); |
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 578595c4425d..c5f66171a713 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c | |||
@@ -149,13 +149,12 @@ static void sh_cmt_start_stop_ch(struct sh_cmt_priv *p, int start) | |||
149 | 149 | ||
150 | static int sh_cmt_enable(struct sh_cmt_priv *p, unsigned long *rate) | 150 | static int sh_cmt_enable(struct sh_cmt_priv *p, unsigned long *rate) |
151 | { | 151 | { |
152 | struct sh_timer_config *cfg = p->pdev->dev.platform_data; | ||
153 | int ret; | 152 | int ret; |
154 | 153 | ||
155 | /* enable clock */ | 154 | /* enable clock */ |
156 | ret = clk_enable(p->clk); | 155 | ret = clk_enable(p->clk); |
157 | if (ret) { | 156 | if (ret) { |
158 | pr_err("sh_cmt: cannot enable clock \"%s\"\n", cfg->clk); | 157 | dev_err(&p->pdev->dev, "cannot enable clock\n"); |
159 | return ret; | 158 | return ret; |
160 | } | 159 | } |
161 | 160 | ||
@@ -278,7 +277,7 @@ static void sh_cmt_clock_event_program_verify(struct sh_cmt_priv *p, | |||
278 | delay = 1; | 277 | delay = 1; |
279 | 278 | ||
280 | if (!delay) | 279 | if (!delay) |
281 | pr_warning("sh_cmt: too long delay\n"); | 280 | dev_warn(&p->pdev->dev, "too long delay\n"); |
282 | 281 | ||
283 | } while (delay); | 282 | } while (delay); |
284 | } | 283 | } |
@@ -288,7 +287,7 @@ static void sh_cmt_set_next(struct sh_cmt_priv *p, unsigned long delta) | |||
288 | unsigned long flags; | 287 | unsigned long flags; |
289 | 288 | ||
290 | if (delta > p->max_match_value) | 289 | if (delta > p->max_match_value) |
291 | pr_warning("sh_cmt: delta out of range\n"); | 290 | dev_warn(&p->pdev->dev, "delta out of range\n"); |
292 | 291 | ||
293 | spin_lock_irqsave(&p->lock, flags); | 292 | spin_lock_irqsave(&p->lock, flags); |
294 | p->next_match_value = delta; | 293 | p->next_match_value = delta; |
@@ -450,7 +449,7 @@ static int sh_cmt_register_clocksource(struct sh_cmt_priv *p, | |||
450 | cs->resume = sh_cmt_clocksource_resume; | 449 | cs->resume = sh_cmt_clocksource_resume; |
451 | cs->mask = CLOCKSOURCE_MASK(sizeof(unsigned long) * 8); | 450 | cs->mask = CLOCKSOURCE_MASK(sizeof(unsigned long) * 8); |
452 | cs->flags = CLOCK_SOURCE_IS_CONTINUOUS; | 451 | cs->flags = CLOCK_SOURCE_IS_CONTINUOUS; |
453 | pr_info("sh_cmt: %s used as clock source\n", cs->name); | 452 | dev_info(&p->pdev->dev, "used as clock source\n"); |
454 | clocksource_register(cs); | 453 | clocksource_register(cs); |
455 | return 0; | 454 | return 0; |
456 | } | 455 | } |
@@ -496,13 +495,11 @@ static void sh_cmt_clock_event_mode(enum clock_event_mode mode, | |||
496 | 495 | ||
497 | switch (mode) { | 496 | switch (mode) { |
498 | case CLOCK_EVT_MODE_PERIODIC: | 497 | case CLOCK_EVT_MODE_PERIODIC: |
499 | pr_info("sh_cmt: %s used for periodic clock events\n", | 498 | dev_info(&p->pdev->dev, "used for periodic clock events\n"); |
500 | ced->name); | ||
501 | sh_cmt_clock_event_start(p, 1); | 499 | sh_cmt_clock_event_start(p, 1); |
502 | break; | 500 | break; |
503 | case CLOCK_EVT_MODE_ONESHOT: | 501 | case CLOCK_EVT_MODE_ONESHOT: |
504 | pr_info("sh_cmt: %s used for oneshot clock events\n", | 502 | dev_info(&p->pdev->dev, "used for oneshot clock events\n"); |
505 | ced->name); | ||
506 | sh_cmt_clock_event_start(p, 0); | 503 | sh_cmt_clock_event_start(p, 0); |
507 | break; | 504 | break; |
508 | case CLOCK_EVT_MODE_SHUTDOWN: | 505 | case CLOCK_EVT_MODE_SHUTDOWN: |
@@ -543,7 +540,7 @@ static void sh_cmt_register_clockevent(struct sh_cmt_priv *p, | |||
543 | ced->set_next_event = sh_cmt_clock_event_next; | 540 | ced->set_next_event = sh_cmt_clock_event_next; |
544 | ced->set_mode = sh_cmt_clock_event_mode; | 541 | ced->set_mode = sh_cmt_clock_event_mode; |
545 | 542 | ||
546 | pr_info("sh_cmt: %s used for clock events\n", ced->name); | 543 | dev_info(&p->pdev->dev, "used for clock events\n"); |
547 | clockevents_register_device(ced); | 544 | clockevents_register_device(ced); |
548 | } | 545 | } |
549 | 546 | ||
@@ -600,22 +597,26 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev) | |||
600 | /* map memory, let mapbase point to our channel */ | 597 | /* map memory, let mapbase point to our channel */ |
601 | p->mapbase = ioremap_nocache(res->start, resource_size(res)); | 598 | p->mapbase = ioremap_nocache(res->start, resource_size(res)); |
602 | if (p->mapbase == NULL) { | 599 | if (p->mapbase == NULL) { |
603 | pr_err("sh_cmt: failed to remap I/O memory\n"); | 600 | dev_err(&p->pdev->dev, "failed to remap I/O memory\n"); |
604 | goto err0; | 601 | goto err0; |
605 | } | 602 | } |
606 | 603 | ||
607 | /* request irq using setup_irq() (too early for request_irq()) */ | 604 | /* request irq using setup_irq() (too early for request_irq()) */ |
608 | p->irqaction.name = cfg->name; | 605 | p->irqaction.name = dev_name(&p->pdev->dev); |
609 | p->irqaction.handler = sh_cmt_interrupt; | 606 | p->irqaction.handler = sh_cmt_interrupt; |
610 | p->irqaction.dev_id = p; | 607 | p->irqaction.dev_id = p; |
611 | p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; | 608 | p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; |
612 | 609 | ||
613 | /* get hold of clock */ | 610 | /* get hold of clock */ |
614 | p->clk = clk_get(&p->pdev->dev, cfg->clk); | 611 | p->clk = clk_get(&p->pdev->dev, "cmt_fck"); |
615 | if (IS_ERR(p->clk)) { | 612 | if (IS_ERR(p->clk)) { |
616 | pr_err("sh_cmt: cannot get clock \"%s\"\n", cfg->clk); | 613 | dev_warn(&p->pdev->dev, "using deprecated clock lookup\n"); |
617 | ret = PTR_ERR(p->clk); | 614 | p->clk = clk_get(&p->pdev->dev, cfg->clk); |
618 | goto err1; | 615 | if (IS_ERR(p->clk)) { |
616 | dev_err(&p->pdev->dev, "cannot get clock\n"); | ||
617 | ret = PTR_ERR(p->clk); | ||
618 | goto err1; | ||
619 | } | ||
619 | } | 620 | } |
620 | 621 | ||
621 | if (resource_size(res) == 6) { | 622 | if (resource_size(res) == 6) { |
@@ -628,17 +629,17 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev) | |||
628 | p->clear_bits = ~0xc000; | 629 | p->clear_bits = ~0xc000; |
629 | } | 630 | } |
630 | 631 | ||
631 | ret = sh_cmt_register(p, cfg->name, | 632 | ret = sh_cmt_register(p, (char *)dev_name(&p->pdev->dev), |
632 | cfg->clockevent_rating, | 633 | cfg->clockevent_rating, |
633 | cfg->clocksource_rating); | 634 | cfg->clocksource_rating); |
634 | if (ret) { | 635 | if (ret) { |
635 | pr_err("sh_cmt: registration failed\n"); | 636 | dev_err(&p->pdev->dev, "registration failed\n"); |
636 | goto err1; | 637 | goto err1; |
637 | } | 638 | } |
638 | 639 | ||
639 | ret = setup_irq(irq, &p->irqaction); | 640 | ret = setup_irq(irq, &p->irqaction); |
640 | if (ret) { | 641 | if (ret) { |
641 | pr_err("sh_cmt: failed to request irq %d\n", irq); | 642 | dev_err(&p->pdev->dev, "failed to request irq %d\n", irq); |
642 | goto err1; | 643 | goto err1; |
643 | } | 644 | } |
644 | 645 | ||
@@ -653,11 +654,10 @@ err0: | |||
653 | static int __devinit sh_cmt_probe(struct platform_device *pdev) | 654 | static int __devinit sh_cmt_probe(struct platform_device *pdev) |
654 | { | 655 | { |
655 | struct sh_cmt_priv *p = platform_get_drvdata(pdev); | 656 | struct sh_cmt_priv *p = platform_get_drvdata(pdev); |
656 | struct sh_timer_config *cfg = pdev->dev.platform_data; | ||
657 | int ret; | 657 | int ret; |
658 | 658 | ||
659 | if (p) { | 659 | if (p) { |
660 | pr_info("sh_cmt: %s kept as earlytimer\n", cfg->name); | 660 | dev_info(&pdev->dev, "kept as earlytimer\n"); |
661 | return 0; | 661 | return 0; |
662 | } | 662 | } |
663 | 663 | ||
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c index 4c8a759e60cd..b11882e0f1bd 100644 --- a/drivers/clocksource/sh_mtu2.c +++ b/drivers/clocksource/sh_mtu2.c | |||
@@ -118,13 +118,12 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start) | |||
118 | 118 | ||
119 | static int sh_mtu2_enable(struct sh_mtu2_priv *p) | 119 | static int sh_mtu2_enable(struct sh_mtu2_priv *p) |
120 | { | 120 | { |
121 | struct sh_timer_config *cfg = p->pdev->dev.platform_data; | ||
122 | int ret; | 121 | int ret; |
123 | 122 | ||
124 | /* enable clock */ | 123 | /* enable clock */ |
125 | ret = clk_enable(p->clk); | 124 | ret = clk_enable(p->clk); |
126 | if (ret) { | 125 | if (ret) { |
127 | pr_err("sh_mtu2: cannot enable clock \"%s\"\n", cfg->clk); | 126 | dev_err(&p->pdev->dev, "cannot enable clock\n"); |
128 | return ret; | 127 | return ret; |
129 | } | 128 | } |
130 | 129 | ||
@@ -193,8 +192,7 @@ static void sh_mtu2_clock_event_mode(enum clock_event_mode mode, | |||
193 | 192 | ||
194 | switch (mode) { | 193 | switch (mode) { |
195 | case CLOCK_EVT_MODE_PERIODIC: | 194 | case CLOCK_EVT_MODE_PERIODIC: |
196 | pr_info("sh_mtu2: %s used for periodic clock events\n", | 195 | dev_info(&p->pdev->dev, "used for periodic clock events\n"); |
197 | ced->name); | ||
198 | sh_mtu2_enable(p); | 196 | sh_mtu2_enable(p); |
199 | break; | 197 | break; |
200 | case CLOCK_EVT_MODE_UNUSED: | 198 | case CLOCK_EVT_MODE_UNUSED: |
@@ -221,13 +219,13 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_priv *p, | |||
221 | ced->cpumask = cpumask_of(0); | 219 | ced->cpumask = cpumask_of(0); |
222 | ced->set_mode = sh_mtu2_clock_event_mode; | 220 | ced->set_mode = sh_mtu2_clock_event_mode; |
223 | 221 | ||
224 | pr_info("sh_mtu2: %s used for clock events\n", ced->name); | 222 | dev_info(&p->pdev->dev, "used for clock events\n"); |
225 | clockevents_register_device(ced); | 223 | clockevents_register_device(ced); |
226 | 224 | ||
227 | ret = setup_irq(p->irqaction.irq, &p->irqaction); | 225 | ret = setup_irq(p->irqaction.irq, &p->irqaction); |
228 | if (ret) { | 226 | if (ret) { |
229 | pr_err("sh_mtu2: failed to request irq %d\n", | 227 | dev_err(&p->pdev->dev, "failed to request irq %d\n", |
230 | p->irqaction.irq); | 228 | p->irqaction.irq); |
231 | return; | 229 | return; |
232 | } | 230 | } |
233 | } | 231 | } |
@@ -273,26 +271,31 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev) | |||
273 | /* map memory, let mapbase point to our channel */ | 271 | /* map memory, let mapbase point to our channel */ |
274 | p->mapbase = ioremap_nocache(res->start, resource_size(res)); | 272 | p->mapbase = ioremap_nocache(res->start, resource_size(res)); |
275 | if (p->mapbase == NULL) { | 273 | if (p->mapbase == NULL) { |
276 | pr_err("sh_mtu2: failed to remap I/O memory\n"); | 274 | dev_err(&p->pdev->dev, "failed to remap I/O memory\n"); |
277 | goto err0; | 275 | goto err0; |
278 | } | 276 | } |
279 | 277 | ||
280 | /* setup data for setup_irq() (too early for request_irq()) */ | 278 | /* setup data for setup_irq() (too early for request_irq()) */ |
281 | p->irqaction.name = cfg->name; | 279 | p->irqaction.name = dev_name(&p->pdev->dev); |
282 | p->irqaction.handler = sh_mtu2_interrupt; | 280 | p->irqaction.handler = sh_mtu2_interrupt; |
283 | p->irqaction.dev_id = p; | 281 | p->irqaction.dev_id = p; |
284 | p->irqaction.irq = irq; | 282 | p->irqaction.irq = irq; |
285 | p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; | 283 | p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; |
286 | 284 | ||
287 | /* get hold of clock */ | 285 | /* get hold of clock */ |
288 | p->clk = clk_get(&p->pdev->dev, cfg->clk); | 286 | p->clk = clk_get(&p->pdev->dev, "mtu2_fck"); |
289 | if (IS_ERR(p->clk)) { | 287 | if (IS_ERR(p->clk)) { |
290 | pr_err("sh_mtu2: cannot get clock \"%s\"\n", cfg->clk); | 288 | dev_warn(&p->pdev->dev, "using deprecated clock lookup\n"); |
291 | ret = PTR_ERR(p->clk); | 289 | p->clk = clk_get(&p->pdev->dev, cfg->clk); |
292 | goto err1; | 290 | if (IS_ERR(p->clk)) { |
291 | dev_err(&p->pdev->dev, "cannot get clock\n"); | ||
292 | ret = PTR_ERR(p->clk); | ||
293 | goto err1; | ||
294 | } | ||
293 | } | 295 | } |
294 | 296 | ||
295 | return sh_mtu2_register(p, cfg->name, cfg->clockevent_rating); | 297 | return sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev), |
298 | cfg->clockevent_rating); | ||
296 | err1: | 299 | err1: |
297 | iounmap(p->mapbase); | 300 | iounmap(p->mapbase); |
298 | err0: | 301 | err0: |
@@ -302,11 +305,10 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev) | |||
302 | static int __devinit sh_mtu2_probe(struct platform_device *pdev) | 305 | static int __devinit sh_mtu2_probe(struct platform_device *pdev) |
303 | { | 306 | { |
304 | struct sh_mtu2_priv *p = platform_get_drvdata(pdev); | 307 | struct sh_mtu2_priv *p = platform_get_drvdata(pdev); |
305 | struct sh_timer_config *cfg = pdev->dev.platform_data; | ||
306 | int ret; | 308 | int ret; |
307 | 309 | ||
308 | if (p) { | 310 | if (p) { |
309 | pr_info("sh_mtu2: %s kept as earlytimer\n", cfg->name); | 311 | dev_info(&pdev->dev, "kept as earlytimer\n"); |
310 | return 0; | 312 | return 0; |
311 | } | 313 | } |
312 | 314 | ||
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index 961f5b5ef6a3..6b62283c1aba 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c | |||
@@ -106,13 +106,12 @@ static void sh_tmu_start_stop_ch(struct sh_tmu_priv *p, int start) | |||
106 | 106 | ||
107 | static int sh_tmu_enable(struct sh_tmu_priv *p) | 107 | static int sh_tmu_enable(struct sh_tmu_priv *p) |
108 | { | 108 | { |
109 | struct sh_timer_config *cfg = p->pdev->dev.platform_data; | ||
110 | int ret; | 109 | int ret; |
111 | 110 | ||
112 | /* enable clock */ | 111 | /* enable clock */ |
113 | ret = clk_enable(p->clk); | 112 | ret = clk_enable(p->clk); |
114 | if (ret) { | 113 | if (ret) { |
115 | pr_err("sh_tmu: cannot enable clock \"%s\"\n", cfg->clk); | 114 | dev_err(&p->pdev->dev, "cannot enable clock\n"); |
116 | return ret; | 115 | return ret; |
117 | } | 116 | } |
118 | 117 | ||
@@ -228,7 +227,7 @@ static int sh_tmu_register_clocksource(struct sh_tmu_priv *p, | |||
228 | cs->disable = sh_tmu_clocksource_disable; | 227 | cs->disable = sh_tmu_clocksource_disable; |
229 | cs->mask = CLOCKSOURCE_MASK(32); | 228 | cs->mask = CLOCKSOURCE_MASK(32); |
230 | cs->flags = CLOCK_SOURCE_IS_CONTINUOUS; | 229 | cs->flags = CLOCK_SOURCE_IS_CONTINUOUS; |
231 | pr_info("sh_tmu: %s used as clock source\n", cs->name); | 230 | dev_info(&p->pdev->dev, "used as clock source\n"); |
232 | clocksource_register(cs); | 231 | clocksource_register(cs); |
233 | return 0; | 232 | return 0; |
234 | } | 233 | } |
@@ -276,13 +275,11 @@ static void sh_tmu_clock_event_mode(enum clock_event_mode mode, | |||
276 | 275 | ||
277 | switch (mode) { | 276 | switch (mode) { |
278 | case CLOCK_EVT_MODE_PERIODIC: | 277 | case CLOCK_EVT_MODE_PERIODIC: |
279 | pr_info("sh_tmu: %s used for periodic clock events\n", | 278 | dev_info(&p->pdev->dev, "used for periodic clock events\n"); |
280 | ced->name); | ||
281 | sh_tmu_clock_event_start(p, 1); | 279 | sh_tmu_clock_event_start(p, 1); |
282 | break; | 280 | break; |
283 | case CLOCK_EVT_MODE_ONESHOT: | 281 | case CLOCK_EVT_MODE_ONESHOT: |
284 | pr_info("sh_tmu: %s used for oneshot clock events\n", | 282 | dev_info(&p->pdev->dev, "used for oneshot clock events\n"); |
285 | ced->name); | ||
286 | sh_tmu_clock_event_start(p, 0); | 283 | sh_tmu_clock_event_start(p, 0); |
287 | break; | 284 | break; |
288 | case CLOCK_EVT_MODE_UNUSED: | 285 | case CLOCK_EVT_MODE_UNUSED: |
@@ -323,13 +320,13 @@ static void sh_tmu_register_clockevent(struct sh_tmu_priv *p, | |||
323 | ced->set_next_event = sh_tmu_clock_event_next; | 320 | ced->set_next_event = sh_tmu_clock_event_next; |
324 | ced->set_mode = sh_tmu_clock_event_mode; | 321 | ced->set_mode = sh_tmu_clock_event_mode; |
325 | 322 | ||
326 | pr_info("sh_tmu: %s used for clock events\n", ced->name); | 323 | dev_info(&p->pdev->dev, "used for clock events\n"); |
327 | clockevents_register_device(ced); | 324 | clockevents_register_device(ced); |
328 | 325 | ||
329 | ret = setup_irq(p->irqaction.irq, &p->irqaction); | 326 | ret = setup_irq(p->irqaction.irq, &p->irqaction); |
330 | if (ret) { | 327 | if (ret) { |
331 | pr_err("sh_tmu: failed to request irq %d\n", | 328 | dev_err(&p->pdev->dev, "failed to request irq %d\n", |
332 | p->irqaction.irq); | 329 | p->irqaction.irq); |
333 | return; | 330 | return; |
334 | } | 331 | } |
335 | } | 332 | } |
@@ -378,26 +375,30 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev) | |||
378 | /* map memory, let mapbase point to our channel */ | 375 | /* map memory, let mapbase point to our channel */ |
379 | p->mapbase = ioremap_nocache(res->start, resource_size(res)); | 376 | p->mapbase = ioremap_nocache(res->start, resource_size(res)); |
380 | if (p->mapbase == NULL) { | 377 | if (p->mapbase == NULL) { |
381 | pr_err("sh_tmu: failed to remap I/O memory\n"); | 378 | dev_err(&p->pdev->dev, "failed to remap I/O memory\n"); |
382 | goto err0; | 379 | goto err0; |
383 | } | 380 | } |
384 | 381 | ||
385 | /* setup data for setup_irq() (too early for request_irq()) */ | 382 | /* setup data for setup_irq() (too early for request_irq()) */ |
386 | p->irqaction.name = cfg->name; | 383 | p->irqaction.name = dev_name(&p->pdev->dev); |
387 | p->irqaction.handler = sh_tmu_interrupt; | 384 | p->irqaction.handler = sh_tmu_interrupt; |
388 | p->irqaction.dev_id = p; | 385 | p->irqaction.dev_id = p; |
389 | p->irqaction.irq = irq; | 386 | p->irqaction.irq = irq; |
390 | p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; | 387 | p->irqaction.flags = IRQF_DISABLED | IRQF_TIMER | IRQF_IRQPOLL; |
391 | 388 | ||
392 | /* get hold of clock */ | 389 | /* get hold of clock */ |
393 | p->clk = clk_get(&p->pdev->dev, cfg->clk); | 390 | p->clk = clk_get(&p->pdev->dev, "tmu_fck"); |
394 | if (IS_ERR(p->clk)) { | 391 | if (IS_ERR(p->clk)) { |
395 | pr_err("sh_tmu: cannot get clock \"%s\"\n", cfg->clk); | 392 | dev_warn(&p->pdev->dev, "using deprecated clock lookup\n"); |
396 | ret = PTR_ERR(p->clk); | 393 | p->clk = clk_get(&p->pdev->dev, cfg->clk); |
397 | goto err1; | 394 | if (IS_ERR(p->clk)) { |
395 | dev_err(&p->pdev->dev, "cannot get clock\n"); | ||
396 | ret = PTR_ERR(p->clk); | ||
397 | goto err1; | ||
398 | } | ||
398 | } | 399 | } |
399 | 400 | ||
400 | return sh_tmu_register(p, cfg->name, | 401 | return sh_tmu_register(p, (char *)dev_name(&p->pdev->dev), |
401 | cfg->clockevent_rating, | 402 | cfg->clockevent_rating, |
402 | cfg->clocksource_rating); | 403 | cfg->clocksource_rating); |
403 | err1: | 404 | err1: |
@@ -409,11 +410,10 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev) | |||
409 | static int __devinit sh_tmu_probe(struct platform_device *pdev) | 410 | static int __devinit sh_tmu_probe(struct platform_device *pdev) |
410 | { | 411 | { |
411 | struct sh_tmu_priv *p = platform_get_drvdata(pdev); | 412 | struct sh_tmu_priv *p = platform_get_drvdata(pdev); |
412 | struct sh_timer_config *cfg = pdev->dev.platform_data; | ||
413 | int ret; | 413 | int ret; |
414 | 414 | ||
415 | if (p) { | 415 | if (p) { |
416 | pr_info("sh_tmu: %s kept as earlytimer\n", cfg->name); | 416 | dev_info(&pdev->dev, "kept as earlytimer\n"); |
417 | return 0; | 417 | return 0; |
418 | } | 418 | } |
419 | 419 | ||
diff --git a/drivers/gpio/max730x.c b/drivers/gpio/max730x.c index c9bced55f82b..4a7d662ff9b7 100644 --- a/drivers/gpio/max730x.c +++ b/drivers/gpio/max730x.c | |||
@@ -242,3 +242,7 @@ int __devexit __max730x_remove(struct device *dev) | |||
242 | return ret; | 242 | return ret; |
243 | } | 243 | } |
244 | EXPORT_SYMBOL_GPL(__max730x_remove); | 244 | EXPORT_SYMBOL_GPL(__max730x_remove); |
245 | |||
246 | MODULE_AUTHOR("Juergen Beisert, Wolfram Sang"); | ||
247 | MODULE_LICENSE("GPL v2"); | ||
248 | MODULE_DESCRIPTION("MAX730x GPIO-Expanders, generic parts"); | ||
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index 8bfc0bbf13e6..a9f8589490cf 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -1881,29 +1881,29 @@ struct drm_ioctl_desc i915_ioctls[] = { | |||
1881 | DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE, i915_vblank_pipe_get, DRM_AUTH ), | 1881 | DRM_IOCTL_DEF(DRM_I915_GET_VBLANK_PIPE, i915_vblank_pipe_get, DRM_AUTH ), |
1882 | DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH), | 1882 | DRM_IOCTL_DEF(DRM_I915_VBLANK_SWAP, i915_vblank_swap, DRM_AUTH), |
1883 | DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), | 1883 | DRM_IOCTL_DEF(DRM_I915_HWS_ADDR, i915_set_status_page, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), |
1884 | DRM_IOCTL_DEF(DRM_I915_GEM_INIT, i915_gem_init_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), | 1884 | DRM_IOCTL_DEF(DRM_I915_GEM_INIT, i915_gem_init_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED), |
1885 | DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER, i915_gem_execbuffer, DRM_AUTH), | 1885 | DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER, i915_gem_execbuffer, DRM_AUTH|DRM_UNLOCKED), |
1886 | DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER2, i915_gem_execbuffer2, DRM_AUTH), | 1886 | DRM_IOCTL_DEF(DRM_I915_GEM_EXECBUFFER2, i915_gem_execbuffer2, DRM_AUTH|DRM_UNLOCKED), |
1887 | DRM_IOCTL_DEF(DRM_I915_GEM_PIN, i915_gem_pin_ioctl, DRM_AUTH|DRM_ROOT_ONLY), | 1887 | DRM_IOCTL_DEF(DRM_I915_GEM_PIN, i915_gem_pin_ioctl, DRM_AUTH|DRM_ROOT_ONLY|DRM_UNLOCKED), |
1888 | DRM_IOCTL_DEF(DRM_I915_GEM_UNPIN, i915_gem_unpin_ioctl, DRM_AUTH|DRM_ROOT_ONLY), | 1888 | DRM_IOCTL_DEF(DRM_I915_GEM_UNPIN, i915_gem_unpin_ioctl, DRM_AUTH|DRM_ROOT_ONLY|DRM_UNLOCKED), |
1889 | DRM_IOCTL_DEF(DRM_I915_GEM_BUSY, i915_gem_busy_ioctl, DRM_AUTH), | 1889 | DRM_IOCTL_DEF(DRM_I915_GEM_BUSY, i915_gem_busy_ioctl, DRM_AUTH|DRM_UNLOCKED), |
1890 | DRM_IOCTL_DEF(DRM_I915_GEM_THROTTLE, i915_gem_throttle_ioctl, DRM_AUTH), | 1890 | DRM_IOCTL_DEF(DRM_I915_GEM_THROTTLE, i915_gem_throttle_ioctl, DRM_AUTH|DRM_UNLOCKED), |
1891 | DRM_IOCTL_DEF(DRM_I915_GEM_ENTERVT, i915_gem_entervt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), | 1891 | DRM_IOCTL_DEF(DRM_I915_GEM_ENTERVT, i915_gem_entervt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED), |
1892 | DRM_IOCTL_DEF(DRM_I915_GEM_LEAVEVT, i915_gem_leavevt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), | 1892 | DRM_IOCTL_DEF(DRM_I915_GEM_LEAVEVT, i915_gem_leavevt_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY|DRM_UNLOCKED), |
1893 | DRM_IOCTL_DEF(DRM_I915_GEM_CREATE, i915_gem_create_ioctl, 0), | 1893 | DRM_IOCTL_DEF(DRM_I915_GEM_CREATE, i915_gem_create_ioctl, DRM_UNLOCKED), |
1894 | DRM_IOCTL_DEF(DRM_I915_GEM_PREAD, i915_gem_pread_ioctl, 0), | 1894 | DRM_IOCTL_DEF(DRM_I915_GEM_PREAD, i915_gem_pread_ioctl, DRM_UNLOCKED), |
1895 | DRM_IOCTL_DEF(DRM_I915_GEM_PWRITE, i915_gem_pwrite_ioctl, 0), | 1895 | DRM_IOCTL_DEF(DRM_I915_GEM_PWRITE, i915_gem_pwrite_ioctl, DRM_UNLOCKED), |
1896 | DRM_IOCTL_DEF(DRM_I915_GEM_MMAP, i915_gem_mmap_ioctl, 0), | 1896 | DRM_IOCTL_DEF(DRM_I915_GEM_MMAP, i915_gem_mmap_ioctl, DRM_UNLOCKED), |
1897 | DRM_IOCTL_DEF(DRM_I915_GEM_MMAP_GTT, i915_gem_mmap_gtt_ioctl, 0), | 1897 | DRM_IOCTL_DEF(DRM_I915_GEM_MMAP_GTT, i915_gem_mmap_gtt_ioctl, DRM_UNLOCKED), |
1898 | DRM_IOCTL_DEF(DRM_I915_GEM_SET_DOMAIN, i915_gem_set_domain_ioctl, 0), | 1898 | DRM_IOCTL_DEF(DRM_I915_GEM_SET_DOMAIN, i915_gem_set_domain_ioctl, DRM_UNLOCKED), |
1899 | DRM_IOCTL_DEF(DRM_I915_GEM_SW_FINISH, i915_gem_sw_finish_ioctl, 0), | 1899 | DRM_IOCTL_DEF(DRM_I915_GEM_SW_FINISH, i915_gem_sw_finish_ioctl, DRM_UNLOCKED), |
1900 | DRM_IOCTL_DEF(DRM_I915_GEM_SET_TILING, i915_gem_set_tiling, 0), | 1900 | DRM_IOCTL_DEF(DRM_I915_GEM_SET_TILING, i915_gem_set_tiling, DRM_UNLOCKED), |
1901 | DRM_IOCTL_DEF(DRM_I915_GEM_GET_TILING, i915_gem_get_tiling, 0), | 1901 | DRM_IOCTL_DEF(DRM_I915_GEM_GET_TILING, i915_gem_get_tiling, DRM_UNLOCKED), |
1902 | DRM_IOCTL_DEF(DRM_I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, 0), | 1902 | DRM_IOCTL_DEF(DRM_I915_GEM_GET_APERTURE, i915_gem_get_aperture_ioctl, DRM_UNLOCKED), |
1903 | DRM_IOCTL_DEF(DRM_I915_GET_PIPE_FROM_CRTC_ID, intel_get_pipe_from_crtc_id, 0), | 1903 | DRM_IOCTL_DEF(DRM_I915_GET_PIPE_FROM_CRTC_ID, intel_get_pipe_from_crtc_id, DRM_UNLOCKED), |
1904 | DRM_IOCTL_DEF(DRM_I915_GEM_MADVISE, i915_gem_madvise_ioctl, 0), | 1904 | DRM_IOCTL_DEF(DRM_I915_GEM_MADVISE, i915_gem_madvise_ioctl, DRM_UNLOCKED), |
1905 | DRM_IOCTL_DEF(DRM_I915_OVERLAY_PUT_IMAGE, intel_overlay_put_image, DRM_MASTER|DRM_CONTROL_ALLOW), | 1905 | DRM_IOCTL_DEF(DRM_I915_OVERLAY_PUT_IMAGE, intel_overlay_put_image, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), |
1906 | DRM_IOCTL_DEF(DRM_I915_OVERLAY_ATTRS, intel_overlay_attrs, DRM_MASTER|DRM_CONTROL_ALLOW), | 1906 | DRM_IOCTL_DEF(DRM_I915_OVERLAY_ATTRS, intel_overlay_attrs, DRM_MASTER|DRM_CONTROL_ALLOW|DRM_UNLOCKED), |
1907 | }; | 1907 | }; |
1908 | 1908 | ||
1909 | int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); | 1909 | int i915_max_ioctl = DRM_ARRAY_SIZE(i915_ioctls); |
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 1b2e95455c05..4b26919abdb2 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c | |||
@@ -139,12 +139,12 @@ const static struct intel_device_info intel_ironlake_m_info = { | |||
139 | 139 | ||
140 | const static struct intel_device_info intel_sandybridge_d_info = { | 140 | const static struct intel_device_info intel_sandybridge_d_info = { |
141 | .is_i965g = 1, .is_i9xx = 1, .need_gfx_hws = 1, | 141 | .is_i965g = 1, .is_i9xx = 1, .need_gfx_hws = 1, |
142 | .has_hotplug = 1, | 142 | .has_hotplug = 1, .is_gen6 = 1, |
143 | }; | 143 | }; |
144 | 144 | ||
145 | const static struct intel_device_info intel_sandybridge_m_info = { | 145 | const static struct intel_device_info intel_sandybridge_m_info = { |
146 | .is_i965g = 1, .is_mobile = 1, .is_i9xx = 1, .need_gfx_hws = 1, | 146 | .is_i965g = 1, .is_mobile = 1, .is_i9xx = 1, .need_gfx_hws = 1, |
147 | .has_hotplug = 1, | 147 | .has_hotplug = 1, .is_gen6 = 1, |
148 | }; | 148 | }; |
149 | 149 | ||
150 | const static struct pci_device_id pciidlist[] = { | 150 | const static struct pci_device_id pciidlist[] = { |
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 979439cfb827..aba8260fbc5e 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -205,6 +205,7 @@ struct intel_device_info { | |||
205 | u8 is_g4x : 1; | 205 | u8 is_g4x : 1; |
206 | u8 is_pineview : 1; | 206 | u8 is_pineview : 1; |
207 | u8 is_ironlake : 1; | 207 | u8 is_ironlake : 1; |
208 | u8 is_gen6 : 1; | ||
208 | u8 has_fbc : 1; | 209 | u8 has_fbc : 1; |
209 | u8 has_rc6 : 1; | 210 | u8 has_rc6 : 1; |
210 | u8 has_pipe_cxsr : 1; | 211 | u8 has_pipe_cxsr : 1; |
@@ -1084,6 +1085,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
1084 | #define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046) | 1085 | #define IS_IRONLAKE_M(dev) ((dev)->pci_device == 0x0046) |
1085 | #define IS_IRONLAKE(dev) (INTEL_INFO(dev)->is_ironlake) | 1086 | #define IS_IRONLAKE(dev) (INTEL_INFO(dev)->is_ironlake) |
1086 | #define IS_I9XX(dev) (INTEL_INFO(dev)->is_i9xx) | 1087 | #define IS_I9XX(dev) (INTEL_INFO(dev)->is_i9xx) |
1088 | #define IS_GEN6(dev) (INTEL_INFO(dev)->is_gen6) | ||
1087 | #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) | 1089 | #define IS_MOBILE(dev) (INTEL_INFO(dev)->is_mobile) |
1088 | 1090 | ||
1089 | #define IS_GEN3(dev) (IS_I915G(dev) || \ | 1091 | #define IS_GEN3(dev) (IS_I915G(dev) || \ |
@@ -1107,8 +1109,6 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller); | |||
1107 | 1109 | ||
1108 | #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws) | 1110 | #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws) |
1109 | 1111 | ||
1110 | #define IS_GEN6(dev) ((dev)->pci_device == 0x0102) | ||
1111 | |||
1112 | /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte | 1112 | /* With the 945 and later, Y tiling got adjusted so that it was 32 128-byte |
1113 | * rows, which changed the alignment requirements and fence programming. | 1113 | * rows, which changed the alignment requirements and fence programming. |
1114 | */ | 1114 | */ |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index fba37e9f775d..933e865a8929 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1466,9 +1466,6 @@ i915_gem_object_put_pages(struct drm_gem_object *obj) | |||
1466 | obj_priv->dirty = 0; | 1466 | obj_priv->dirty = 0; |
1467 | 1467 | ||
1468 | for (i = 0; i < page_count; i++) { | 1468 | for (i = 0; i < page_count; i++) { |
1469 | if (obj_priv->pages[i] == NULL) | ||
1470 | break; | ||
1471 | |||
1472 | if (obj_priv->dirty) | 1469 | if (obj_priv->dirty) |
1473 | set_page_dirty(obj_priv->pages[i]); | 1470 | set_page_dirty(obj_priv->pages[i]); |
1474 | 1471 | ||
@@ -2227,11 +2224,6 @@ i915_gem_evict_something(struct drm_device *dev, int min_size) | |||
2227 | seqno = i915_add_request(dev, NULL, obj->write_domain); | 2224 | seqno = i915_add_request(dev, NULL, obj->write_domain); |
2228 | if (seqno == 0) | 2225 | if (seqno == 0) |
2229 | return -ENOMEM; | 2226 | return -ENOMEM; |
2230 | |||
2231 | ret = i915_wait_request(dev, seqno); | ||
2232 | if (ret) | ||
2233 | return ret; | ||
2234 | |||
2235 | continue; | 2227 | continue; |
2236 | } | 2228 | } |
2237 | } | 2229 | } |
@@ -2256,7 +2248,6 @@ i915_gem_object_get_pages(struct drm_gem_object *obj, | |||
2256 | struct address_space *mapping; | 2248 | struct address_space *mapping; |
2257 | struct inode *inode; | 2249 | struct inode *inode; |
2258 | struct page *page; | 2250 | struct page *page; |
2259 | int ret; | ||
2260 | 2251 | ||
2261 | if (obj_priv->pages_refcount++ != 0) | 2252 | if (obj_priv->pages_refcount++ != 0) |
2262 | return 0; | 2253 | return 0; |
@@ -2279,11 +2270,9 @@ i915_gem_object_get_pages(struct drm_gem_object *obj, | |||
2279 | mapping_gfp_mask (mapping) | | 2270 | mapping_gfp_mask (mapping) | |
2280 | __GFP_COLD | | 2271 | __GFP_COLD | |
2281 | gfpmask); | 2272 | gfpmask); |
2282 | if (IS_ERR(page)) { | 2273 | if (IS_ERR(page)) |
2283 | ret = PTR_ERR(page); | 2274 | goto err_pages; |
2284 | i915_gem_object_put_pages(obj); | 2275 | |
2285 | return ret; | ||
2286 | } | ||
2287 | obj_priv->pages[i] = page; | 2276 | obj_priv->pages[i] = page; |
2288 | } | 2277 | } |
2289 | 2278 | ||
@@ -2291,6 +2280,15 @@ i915_gem_object_get_pages(struct drm_gem_object *obj, | |||
2291 | i915_gem_object_do_bit_17_swizzle(obj); | 2280 | i915_gem_object_do_bit_17_swizzle(obj); |
2292 | 2281 | ||
2293 | return 0; | 2282 | return 0; |
2283 | |||
2284 | err_pages: | ||
2285 | while (i--) | ||
2286 | page_cache_release(obj_priv->pages[i]); | ||
2287 | |||
2288 | drm_free_large(obj_priv->pages); | ||
2289 | obj_priv->pages = NULL; | ||
2290 | obj_priv->pages_refcount--; | ||
2291 | return PTR_ERR(page); | ||
2294 | } | 2292 | } |
2295 | 2293 | ||
2296 | static void sandybridge_write_fence_reg(struct drm_i915_fence_reg *reg) | 2294 | static void sandybridge_write_fence_reg(struct drm_i915_fence_reg *reg) |
@@ -4730,6 +4728,11 @@ i915_gem_init_ringbuffer(struct drm_device *dev) | |||
4730 | ring->space += ring->Size; | 4728 | ring->space += ring->Size; |
4731 | } | 4729 | } |
4732 | 4730 | ||
4731 | if (IS_I9XX(dev) && !IS_GEN3(dev)) { | ||
4732 | I915_WRITE(MI_MODE, | ||
4733 | (VS_TIMER_DISPATCH) << 16 | VS_TIMER_DISPATCH); | ||
4734 | } | ||
4735 | |||
4733 | return 0; | 4736 | return 0; |
4734 | } | 4737 | } |
4735 | 4738 | ||
diff --git a/drivers/gpu/drm/i915/i915_gem_tiling.c b/drivers/gpu/drm/i915/i915_gem_tiling.c index b5c55d88ff76..c01c878e51ba 100644 --- a/drivers/gpu/drm/i915/i915_gem_tiling.c +++ b/drivers/gpu/drm/i915/i915_gem_tiling.c | |||
@@ -325,9 +325,12 @@ i915_gem_set_tiling(struct drm_device *dev, void *data, | |||
325 | * need to ensure that any fence register is cleared. | 325 | * need to ensure that any fence register is cleared. |
326 | */ | 326 | */ |
327 | if (!i915_gem_object_fence_offset_ok(obj, args->tiling_mode)) | 327 | if (!i915_gem_object_fence_offset_ok(obj, args->tiling_mode)) |
328 | ret = i915_gem_object_unbind(obj); | 328 | ret = i915_gem_object_unbind(obj); |
329 | else if (obj_priv->fence_reg != I915_FENCE_REG_NONE) | ||
330 | ret = i915_gem_object_put_fence_reg(obj); | ||
329 | else | 331 | else |
330 | ret = i915_gem_object_put_fence_reg(obj); | 332 | i915_gem_release_mmap(obj); |
333 | |||
331 | if (ret != 0) { | 334 | if (ret != 0) { |
332 | WARN(ret != -ERESTARTSYS, | 335 | WARN(ret != -ERESTARTSYS, |
333 | "failed to reset object for tiling switch"); | 336 | "failed to reset object for tiling switch"); |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 3d59862c7ccd..cbbf59f56dfa 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -298,6 +298,10 @@ | |||
298 | #define INSTDONE 0x02090 | 298 | #define INSTDONE 0x02090 |
299 | #define NOPID 0x02094 | 299 | #define NOPID 0x02094 |
300 | #define HWSTAM 0x02098 | 300 | #define HWSTAM 0x02098 |
301 | |||
302 | #define MI_MODE 0x0209c | ||
303 | # define VS_TIMER_DISPATCH (1 << 6) | ||
304 | |||
301 | #define SCPD0 0x0209c /* 915+ only */ | 305 | #define SCPD0 0x0209c /* 915+ only */ |
302 | #define IER 0x020a0 | 306 | #define IER 0x020a0 |
303 | #define IIR 0x020a4 | 307 | #define IIR 0x020a4 |
@@ -366,7 +370,7 @@ | |||
366 | #define FBC_CTL_PERIODIC (1<<30) | 370 | #define FBC_CTL_PERIODIC (1<<30) |
367 | #define FBC_CTL_INTERVAL_SHIFT (16) | 371 | #define FBC_CTL_INTERVAL_SHIFT (16) |
368 | #define FBC_CTL_UNCOMPRESSIBLE (1<<14) | 372 | #define FBC_CTL_UNCOMPRESSIBLE (1<<14) |
369 | #define FBC_C3_IDLE (1<<13) | 373 | #define FBC_CTL_C3_IDLE (1<<13) |
370 | #define FBC_CTL_STRIDE_SHIFT (5) | 374 | #define FBC_CTL_STRIDE_SHIFT (5) |
371 | #define FBC_CTL_FENCENO (1<<0) | 375 | #define FBC_CTL_FENCENO (1<<0) |
372 | #define FBC_COMMAND 0x0320c | 376 | #define FBC_COMMAND 0x0320c |
@@ -2172,6 +2176,14 @@ | |||
2172 | #define DISPLAY_PORT_PLL_BIOS_1 0x46010 | 2176 | #define DISPLAY_PORT_PLL_BIOS_1 0x46010 |
2173 | #define DISPLAY_PORT_PLL_BIOS_2 0x46014 | 2177 | #define DISPLAY_PORT_PLL_BIOS_2 0x46014 |
2174 | 2178 | ||
2179 | #define PCH_DSPCLK_GATE_D 0x42020 | ||
2180 | # define DPFDUNIT_CLOCK_GATE_DISABLE (1 << 7) | ||
2181 | # define DPARBUNIT_CLOCK_GATE_DISABLE (1 << 5) | ||
2182 | |||
2183 | #define PCH_3DCGDIS0 0x46020 | ||
2184 | # define MARIUNIT_CLOCK_GATE_DISABLE (1 << 18) | ||
2185 | # define SVSMUNIT_CLOCK_GATE_DISABLE (1 << 1) | ||
2186 | |||
2175 | #define FDI_PLL_FREQ_CTL 0x46030 | 2187 | #define FDI_PLL_FREQ_CTL 0x46030 |
2176 | #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) | 2188 | #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) |
2177 | #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 | 2189 | #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 |
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 70c9d4ba7042..f9ba452f0cbf 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
@@ -417,8 +417,9 @@ parse_edp(struct drm_i915_private *dev_priv, struct bdb_header *bdb) | |||
417 | edp = find_section(bdb, BDB_EDP); | 417 | edp = find_section(bdb, BDB_EDP); |
418 | if (!edp) { | 418 | if (!edp) { |
419 | if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp_support) { | 419 | if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp_support) { |
420 | DRM_DEBUG_KMS("No eDP BDB found but eDP panel supported,\ | 420 | DRM_DEBUG_KMS("No eDP BDB found but eDP panel " |
421 | assume 18bpp panel color depth.\n"); | 421 | "supported, assume 18bpp panel color " |
422 | "depth.\n"); | ||
422 | dev_priv->edp_bpp = 18; | 423 | dev_priv->edp_bpp = 18; |
423 | } | 424 | } |
424 | return; | 425 | return; |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 9cd6de5f9906..58fc7fa0eb1d 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -1032,7 +1032,7 @@ static void i8xx_enable_fbc(struct drm_crtc *crtc, unsigned long interval) | |||
1032 | /* enable it... */ | 1032 | /* enable it... */ |
1033 | fbc_ctl = FBC_CTL_EN | FBC_CTL_PERIODIC; | 1033 | fbc_ctl = FBC_CTL_EN | FBC_CTL_PERIODIC; |
1034 | if (IS_I945GM(dev)) | 1034 | if (IS_I945GM(dev)) |
1035 | fbc_ctl |= FBC_C3_IDLE; /* 945 needs special SR handling */ | 1035 | fbc_ctl |= FBC_CTL_C3_IDLE; /* 945 needs special SR handling */ |
1036 | fbc_ctl |= (dev_priv->cfb_pitch & 0xff) << FBC_CTL_STRIDE_SHIFT; | 1036 | fbc_ctl |= (dev_priv->cfb_pitch & 0xff) << FBC_CTL_STRIDE_SHIFT; |
1037 | fbc_ctl |= (interval & 0x2fff) << FBC_CTL_INTERVAL_SHIFT; | 1037 | fbc_ctl |= (interval & 0x2fff) << FBC_CTL_INTERVAL_SHIFT; |
1038 | if (obj_priv->tiling_mode != I915_TILING_NONE) | 1038 | if (obj_priv->tiling_mode != I915_TILING_NONE) |
@@ -4717,6 +4717,20 @@ void intel_init_clock_gating(struct drm_device *dev) | |||
4717 | * specs, but enable as much else as we can. | 4717 | * specs, but enable as much else as we can. |
4718 | */ | 4718 | */ |
4719 | if (HAS_PCH_SPLIT(dev)) { | 4719 | if (HAS_PCH_SPLIT(dev)) { |
4720 | uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE; | ||
4721 | |||
4722 | if (IS_IRONLAKE(dev)) { | ||
4723 | /* Required for FBC */ | ||
4724 | dspclk_gate |= DPFDUNIT_CLOCK_GATE_DISABLE; | ||
4725 | /* Required for CxSR */ | ||
4726 | dspclk_gate |= DPARBUNIT_CLOCK_GATE_DISABLE; | ||
4727 | |||
4728 | I915_WRITE(PCH_3DCGDIS0, | ||
4729 | MARIUNIT_CLOCK_GATE_DISABLE | | ||
4730 | SVSMUNIT_CLOCK_GATE_DISABLE); | ||
4731 | } | ||
4732 | |||
4733 | I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate); | ||
4720 | return; | 4734 | return; |
4721 | } else if (IS_G4X(dev)) { | 4735 | } else if (IS_G4X(dev)) { |
4722 | uint32_t dspclk_gate; | 4736 | uint32_t dspclk_gate; |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index 14e516fdc2dd..2b3fa7a3c028 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -607,53 +607,6 @@ static void intel_lvds_mode_set(struct drm_encoder *encoder, | |||
607 | I915_WRITE(PFIT_CONTROL, lvds_priv->pfit_control); | 607 | I915_WRITE(PFIT_CONTROL, lvds_priv->pfit_control); |
608 | } | 608 | } |
609 | 609 | ||
610 | /* Some lid devices report incorrect lid status, assume they're connected */ | ||
611 | static const struct dmi_system_id bad_lid_status[] = { | ||
612 | { | ||
613 | .ident = "Compaq nx9020", | ||
614 | .matches = { | ||
615 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
616 | DMI_MATCH(DMI_BOARD_NAME, "3084"), | ||
617 | }, | ||
618 | }, | ||
619 | { | ||
620 | .ident = "Samsung SX20S", | ||
621 | .matches = { | ||
622 | DMI_MATCH(DMI_SYS_VENDOR, "Samsung Electronics"), | ||
623 | DMI_MATCH(DMI_BOARD_NAME, "SX20S"), | ||
624 | }, | ||
625 | }, | ||
626 | { | ||
627 | .ident = "Aspire One", | ||
628 | .matches = { | ||
629 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
630 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire one"), | ||
631 | }, | ||
632 | }, | ||
633 | { | ||
634 | .ident = "Aspire 1810T", | ||
635 | .matches = { | ||
636 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
637 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1810T"), | ||
638 | }, | ||
639 | }, | ||
640 | { | ||
641 | .ident = "PC-81005", | ||
642 | .matches = { | ||
643 | DMI_MATCH(DMI_SYS_VENDOR, "MALATA"), | ||
644 | DMI_MATCH(DMI_PRODUCT_NAME, "PC-81005"), | ||
645 | }, | ||
646 | }, | ||
647 | { | ||
648 | .ident = "Clevo M5x0N", | ||
649 | .matches = { | ||
650 | DMI_MATCH(DMI_SYS_VENDOR, "CLEVO Co."), | ||
651 | DMI_MATCH(DMI_BOARD_NAME, "M5x0N"), | ||
652 | }, | ||
653 | }, | ||
654 | { } | ||
655 | }; | ||
656 | |||
657 | /** | 610 | /** |
658 | * Detect the LVDS connection. | 611 | * Detect the LVDS connection. |
659 | * | 612 | * |
@@ -669,12 +622,9 @@ static enum drm_connector_status intel_lvds_detect(struct drm_connector *connect | |||
669 | /* ACPI lid methods were generally unreliable in this generation, so | 622 | /* ACPI lid methods were generally unreliable in this generation, so |
670 | * don't even bother. | 623 | * don't even bother. |
671 | */ | 624 | */ |
672 | if (IS_GEN2(dev)) | 625 | if (IS_GEN2(dev) || IS_GEN3(dev)) |
673 | return connector_status_connected; | 626 | return connector_status_connected; |
674 | 627 | ||
675 | if (!dmi_check_system(bad_lid_status) && !acpi_lid_open()) | ||
676 | status = connector_status_disconnected; | ||
677 | |||
678 | return status; | 628 | return status; |
679 | } | 629 | } |
680 | 630 | ||
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c index d355d1d527e7..60595fc26fdd 100644 --- a/drivers/gpu/drm/i915/intel_overlay.c +++ b/drivers/gpu/drm/i915/intel_overlay.c | |||
@@ -1068,14 +1068,18 @@ int intel_overlay_put_image(struct drm_device *dev, void *data, | |||
1068 | 1068 | ||
1069 | drmmode_obj = drm_mode_object_find(dev, put_image_rec->crtc_id, | 1069 | drmmode_obj = drm_mode_object_find(dev, put_image_rec->crtc_id, |
1070 | DRM_MODE_OBJECT_CRTC); | 1070 | DRM_MODE_OBJECT_CRTC); |
1071 | if (!drmmode_obj) | 1071 | if (!drmmode_obj) { |
1072 | return -ENOENT; | 1072 | ret = -ENOENT; |
1073 | goto out_free; | ||
1074 | } | ||
1073 | crtc = to_intel_crtc(obj_to_crtc(drmmode_obj)); | 1075 | crtc = to_intel_crtc(obj_to_crtc(drmmode_obj)); |
1074 | 1076 | ||
1075 | new_bo = drm_gem_object_lookup(dev, file_priv, | 1077 | new_bo = drm_gem_object_lookup(dev, file_priv, |
1076 | put_image_rec->bo_handle); | 1078 | put_image_rec->bo_handle); |
1077 | if (!new_bo) | 1079 | if (!new_bo) { |
1078 | return -ENOENT; | 1080 | ret = -ENOENT; |
1081 | goto out_free; | ||
1082 | } | ||
1079 | 1083 | ||
1080 | mutex_lock(&dev->mode_config.mutex); | 1084 | mutex_lock(&dev->mode_config.mutex); |
1081 | mutex_lock(&dev->struct_mutex); | 1085 | mutex_lock(&dev->struct_mutex); |
@@ -1165,6 +1169,7 @@ out_unlock: | |||
1165 | mutex_unlock(&dev->struct_mutex); | 1169 | mutex_unlock(&dev->struct_mutex); |
1166 | mutex_unlock(&dev->mode_config.mutex); | 1170 | mutex_unlock(&dev->mode_config.mutex); |
1167 | drm_gem_object_unreference_unlocked(new_bo); | 1171 | drm_gem_object_unreference_unlocked(new_bo); |
1172 | out_free: | ||
1168 | kfree(params); | 1173 | kfree(params); |
1169 | 1174 | ||
1170 | return ret; | 1175 | return ret; |
diff --git a/drivers/i2c/busses/i2c-scmi.c b/drivers/i2c/busses/i2c-scmi.c index 365e0becaf12..388cbdc96db7 100644 --- a/drivers/i2c/busses/i2c-scmi.c +++ b/drivers/i2c/busses/i2c-scmi.c | |||
@@ -33,6 +33,7 @@ struct acpi_smbus_cmi { | |||
33 | u8 cap_info:1; | 33 | u8 cap_info:1; |
34 | u8 cap_read:1; | 34 | u8 cap_read:1; |
35 | u8 cap_write:1; | 35 | u8 cap_write:1; |
36 | struct smbus_methods_t *methods; | ||
36 | }; | 37 | }; |
37 | 38 | ||
38 | static const struct smbus_methods_t smbus_methods = { | 39 | static const struct smbus_methods_t smbus_methods = { |
@@ -41,10 +42,19 @@ static const struct smbus_methods_t smbus_methods = { | |||
41 | .mt_sbw = "_SBW", | 42 | .mt_sbw = "_SBW", |
42 | }; | 43 | }; |
43 | 44 | ||
45 | /* Some IBM BIOSes omit the leading underscore */ | ||
46 | static const struct smbus_methods_t ibm_smbus_methods = { | ||
47 | .mt_info = "SBI_", | ||
48 | .mt_sbr = "SBR_", | ||
49 | .mt_sbw = "SBW_", | ||
50 | }; | ||
51 | |||
44 | static const struct acpi_device_id acpi_smbus_cmi_ids[] = { | 52 | static const struct acpi_device_id acpi_smbus_cmi_ids[] = { |
45 | {"SMBUS01", 0}, | 53 | {"SMBUS01", (kernel_ulong_t)&smbus_methods}, |
54 | {ACPI_SMBUS_IBM_HID, (kernel_ulong_t)&ibm_smbus_methods}, | ||
46 | {"", 0} | 55 | {"", 0} |
47 | }; | 56 | }; |
57 | MODULE_DEVICE_TABLE(acpi, acpi_smbus_cmi_ids); | ||
48 | 58 | ||
49 | #define ACPI_SMBUS_STATUS_OK 0x00 | 59 | #define ACPI_SMBUS_STATUS_OK 0x00 |
50 | #define ACPI_SMBUS_STATUS_FAIL 0x07 | 60 | #define ACPI_SMBUS_STATUS_FAIL 0x07 |
@@ -150,11 +160,11 @@ acpi_smbus_cmi_access(struct i2c_adapter *adap, u16 addr, unsigned short flags, | |||
150 | 160 | ||
151 | if (read_write == I2C_SMBUS_READ) { | 161 | if (read_write == I2C_SMBUS_READ) { |
152 | protocol |= ACPI_SMBUS_PRTCL_READ; | 162 | protocol |= ACPI_SMBUS_PRTCL_READ; |
153 | method = smbus_methods.mt_sbr; | 163 | method = smbus_cmi->methods->mt_sbr; |
154 | input.count = 3; | 164 | input.count = 3; |
155 | } else { | 165 | } else { |
156 | protocol |= ACPI_SMBUS_PRTCL_WRITE; | 166 | protocol |= ACPI_SMBUS_PRTCL_WRITE; |
157 | method = smbus_methods.mt_sbw; | 167 | method = smbus_cmi->methods->mt_sbw; |
158 | input.count = 5; | 168 | input.count = 5; |
159 | } | 169 | } |
160 | 170 | ||
@@ -290,13 +300,13 @@ static int acpi_smbus_cmi_add_cap(struct acpi_smbus_cmi *smbus_cmi, | |||
290 | union acpi_object *obj; | 300 | union acpi_object *obj; |
291 | acpi_status status; | 301 | acpi_status status; |
292 | 302 | ||
293 | if (!strcmp(name, smbus_methods.mt_info)) { | 303 | if (!strcmp(name, smbus_cmi->methods->mt_info)) { |
294 | status = acpi_evaluate_object(smbus_cmi->handle, | 304 | status = acpi_evaluate_object(smbus_cmi->handle, |
295 | smbus_methods.mt_info, | 305 | smbus_cmi->methods->mt_info, |
296 | NULL, &buffer); | 306 | NULL, &buffer); |
297 | if (ACPI_FAILURE(status)) { | 307 | if (ACPI_FAILURE(status)) { |
298 | ACPI_ERROR((AE_INFO, "Evaluating %s: %i", | 308 | ACPI_ERROR((AE_INFO, "Evaluating %s: %i", |
299 | smbus_methods.mt_info, status)); | 309 | smbus_cmi->methods->mt_info, status)); |
300 | return -EIO; | 310 | return -EIO; |
301 | } | 311 | } |
302 | 312 | ||
@@ -319,9 +329,9 @@ static int acpi_smbus_cmi_add_cap(struct acpi_smbus_cmi *smbus_cmi, | |||
319 | 329 | ||
320 | kfree(buffer.pointer); | 330 | kfree(buffer.pointer); |
321 | smbus_cmi->cap_info = 1; | 331 | smbus_cmi->cap_info = 1; |
322 | } else if (!strcmp(name, smbus_methods.mt_sbr)) | 332 | } else if (!strcmp(name, smbus_cmi->methods->mt_sbr)) |
323 | smbus_cmi->cap_read = 1; | 333 | smbus_cmi->cap_read = 1; |
324 | else if (!strcmp(name, smbus_methods.mt_sbw)) | 334 | else if (!strcmp(name, smbus_cmi->methods->mt_sbw)) |
325 | smbus_cmi->cap_write = 1; | 335 | smbus_cmi->cap_write = 1; |
326 | else | 336 | else |
327 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unsupported CMI method: %s\n", | 337 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Unsupported CMI method: %s\n", |
@@ -349,6 +359,7 @@ static acpi_status acpi_smbus_cmi_query_methods(acpi_handle handle, u32 level, | |||
349 | static int acpi_smbus_cmi_add(struct acpi_device *device) | 359 | static int acpi_smbus_cmi_add(struct acpi_device *device) |
350 | { | 360 | { |
351 | struct acpi_smbus_cmi *smbus_cmi; | 361 | struct acpi_smbus_cmi *smbus_cmi; |
362 | const struct acpi_device_id *id; | ||
352 | 363 | ||
353 | smbus_cmi = kzalloc(sizeof(struct acpi_smbus_cmi), GFP_KERNEL); | 364 | smbus_cmi = kzalloc(sizeof(struct acpi_smbus_cmi), GFP_KERNEL); |
354 | if (!smbus_cmi) | 365 | if (!smbus_cmi) |
@@ -362,6 +373,11 @@ static int acpi_smbus_cmi_add(struct acpi_device *device) | |||
362 | smbus_cmi->cap_read = 0; | 373 | smbus_cmi->cap_read = 0; |
363 | smbus_cmi->cap_write = 0; | 374 | smbus_cmi->cap_write = 0; |
364 | 375 | ||
376 | for (id = acpi_smbus_cmi_ids; id->id[0]; id++) | ||
377 | if (!strcmp(id->id, acpi_device_hid(device))) | ||
378 | smbus_cmi->methods = | ||
379 | (struct smbus_methods_t *) id->driver_data; | ||
380 | |||
365 | acpi_walk_namespace(ACPI_TYPE_METHOD, smbus_cmi->handle, 1, | 381 | acpi_walk_namespace(ACPI_TYPE_METHOD, smbus_cmi->handle, 1, |
366 | acpi_smbus_cmi_query_methods, NULL, smbus_cmi, NULL); | 382 | acpi_smbus_cmi_query_methods, NULL, smbus_cmi, NULL); |
367 | 383 | ||
diff --git a/drivers/misc/c2port/core.c b/drivers/misc/c2port/core.c index b5346b4db91a..b7a85f46a6c2 100644 --- a/drivers/misc/c2port/core.c +++ b/drivers/misc/c2port/core.c | |||
@@ -912,8 +912,8 @@ struct c2port_device *c2port_device_register(char *name, | |||
912 | 912 | ||
913 | c2dev->dev = device_create(c2port_class, NULL, 0, c2dev, | 913 | c2dev->dev = device_create(c2port_class, NULL, 0, c2dev, |
914 | "c2port%d", id); | 914 | "c2port%d", id); |
915 | if (unlikely(!c2dev->dev)) { | 915 | if (unlikely(IS_ERR(c2dev->dev))) { |
916 | ret = -ENOMEM; | 916 | ret = PTR_ERR(c2dev->dev); |
917 | goto error_device_create; | 917 | goto error_device_create; |
918 | } | 918 | } |
919 | dev_set_drvdata(c2dev->dev, c2dev); | 919 | dev_set_drvdata(c2dev->dev, c2dev); |
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 0eac6c814904..e041c003db22 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -225,7 +225,7 @@ static int mmc_read_ext_csd(struct mmc_card *card) | |||
225 | mmc_card_set_blockaddr(card); | 225 | mmc_card_set_blockaddr(card); |
226 | } | 226 | } |
227 | 227 | ||
228 | switch (ext_csd[EXT_CSD_CARD_TYPE]) { | 228 | switch (ext_csd[EXT_CSD_CARD_TYPE] & EXT_CSD_CARD_TYPE_MASK) { |
229 | case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26: | 229 | case EXT_CSD_CARD_TYPE_52 | EXT_CSD_CARD_TYPE_26: |
230 | card->ext_csd.hs_max_dtr = 52000000; | 230 | card->ext_csd.hs_max_dtr = 52000000; |
231 | break; | 231 | break; |
@@ -237,7 +237,6 @@ static int mmc_read_ext_csd(struct mmc_card *card) | |||
237 | printk(KERN_WARNING "%s: card is mmc v4 but doesn't " | 237 | printk(KERN_WARNING "%s: card is mmc v4 but doesn't " |
238 | "support any high-speed modes.\n", | 238 | "support any high-speed modes.\n", |
239 | mmc_hostname(card->host)); | 239 | mmc_hostname(card->host)); |
240 | goto out; | ||
241 | } | 240 | } |
242 | 241 | ||
243 | if (card->ext_csd.rev >= 3) { | 242 | if (card->ext_csd.rev >= 3) { |
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index c7bbe30010f7..5af16c2bb540 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1038,6 +1038,7 @@ static struct regulator *create_regulator(struct regulator_dev *rdev, | |||
1038 | goto overflow_err; | 1038 | goto overflow_err; |
1039 | 1039 | ||
1040 | regulator->dev = dev; | 1040 | regulator->dev = dev; |
1041 | sysfs_attr_init(®ulator->dev_attr.attr); | ||
1041 | regulator->dev_attr.attr.name = kstrdup(buf, GFP_KERNEL); | 1042 | regulator->dev_attr.attr.name = kstrdup(buf, GFP_KERNEL); |
1042 | if (regulator->dev_attr.attr.name == NULL) | 1043 | if (regulator->dev_attr.attr.name == NULL) |
1043 | goto attr_name_err; | 1044 | goto attr_name_err; |
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c index f5532ed79272..b20b3e1d821a 100644 --- a/drivers/regulator/lp3971.c +++ b/drivers/regulator/lp3971.c | |||
@@ -45,7 +45,7 @@ static int lp3971_set_bits(struct lp3971 *lp3971, u8 reg, u16 mask, u16 val); | |||
45 | LP3971_BUCK2 -> 4 | 45 | LP3971_BUCK2 -> 4 |
46 | LP3971_BUCK3 -> 6 | 46 | LP3971_BUCK3 -> 6 |
47 | */ | 47 | */ |
48 | #define BUCK_VOL_CHANGE_SHIFT(x) (((1 << x) & ~0x01) << 1) | 48 | #define BUCK_VOL_CHANGE_SHIFT(x) (((!!x) << 2) | (x & ~0x01)) |
49 | #define BUCK_VOL_CHANGE_FLAG_GO 0x01 | 49 | #define BUCK_VOL_CHANGE_FLAG_GO 0x01 |
50 | #define BUCK_VOL_CHANGE_FLAG_TARGET 0x02 | 50 | #define BUCK_VOL_CHANGE_FLAG_TARGET 0x02 |
51 | #define BUCK_VOL_CHANGE_FLAG_MASK 0x03 | 51 | #define BUCK_VOL_CHANGE_FLAG_MASK 0x03 |
@@ -187,7 +187,8 @@ static int lp3971_ldo_set_voltage(struct regulator_dev *dev, | |||
187 | return -EINVAL; | 187 | return -EINVAL; |
188 | 188 | ||
189 | return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo), | 189 | return lp3971_set_bits(lp3971, LP3971_LDO_VOL_CONTR_REG(ldo), |
190 | LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), val); | 190 | LDO_VOL_CONTR_MASK << LDO_VOL_CONTR_SHIFT(ldo), |
191 | val << LDO_VOL_CONTR_SHIFT(ldo)); | ||
191 | } | 192 | } |
192 | 193 | ||
193 | static struct regulator_ops lp3971_ldo_ops = { | 194 | static struct regulator_ops lp3971_ldo_ops = { |
@@ -439,6 +440,10 @@ static int __devinit setup_regulators(struct lp3971 *lp3971, | |||
439 | lp3971->num_regulators = pdata->num_regulators; | 440 | lp3971->num_regulators = pdata->num_regulators; |
440 | lp3971->rdev = kcalloc(pdata->num_regulators, | 441 | lp3971->rdev = kcalloc(pdata->num_regulators, |
441 | sizeof(struct regulator_dev *), GFP_KERNEL); | 442 | sizeof(struct regulator_dev *), GFP_KERNEL); |
443 | if (!lp3971->rdev) { | ||
444 | err = -ENOMEM; | ||
445 | goto err_nomem; | ||
446 | } | ||
442 | 447 | ||
443 | /* Instantiate the regulators */ | 448 | /* Instantiate the regulators */ |
444 | for (i = 0; i < pdata->num_regulators; i++) { | 449 | for (i = 0; i < pdata->num_regulators; i++) { |
@@ -461,6 +466,7 @@ error: | |||
461 | regulator_unregister(lp3971->rdev[i]); | 466 | regulator_unregister(lp3971->rdev[i]); |
462 | kfree(lp3971->rdev); | 467 | kfree(lp3971->rdev); |
463 | lp3971->rdev = NULL; | 468 | lp3971->rdev = NULL; |
469 | err_nomem: | ||
464 | return err; | 470 | return err; |
465 | } | 471 | } |
466 | 472 | ||
diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c index a49fc952c9a9..c0b09e15edb6 100644 --- a/drivers/regulator/max1586.c +++ b/drivers/regulator/max1586.c | |||
@@ -243,8 +243,8 @@ static int __devexit max1586_pmic_remove(struct i2c_client *client) | |||
243 | for (i = 0; i <= MAX1586_V6; i++) | 243 | for (i = 0; i <= MAX1586_V6; i++) |
244 | if (rdev[i]) | 244 | if (rdev[i]) |
245 | regulator_unregister(rdev[i]); | 245 | regulator_unregister(rdev[i]); |
246 | kfree(rdev); | ||
247 | i2c_set_clientdata(client, NULL); | 246 | i2c_set_clientdata(client, NULL); |
247 | kfree(rdev); | ||
248 | 248 | ||
249 | return 0; | 249 | return 0; |
250 | } | 250 | } |
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c index 3ebdf698c648..833aaedc7e64 100644 --- a/drivers/regulator/max8649.c +++ b/drivers/regulator/max8649.c | |||
@@ -356,6 +356,7 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client, | |||
356 | dev_info(info->dev, "Max8649 regulator device is detected.\n"); | 356 | dev_info(info->dev, "Max8649 regulator device is detected.\n"); |
357 | return 0; | 357 | return 0; |
358 | out: | 358 | out: |
359 | i2c_set_clientdata(client, NULL); | ||
359 | kfree(info); | 360 | kfree(info); |
360 | return ret; | 361 | return ret; |
361 | } | 362 | } |
@@ -367,9 +368,9 @@ static int __devexit max8649_regulator_remove(struct i2c_client *client) | |||
367 | if (info) { | 368 | if (info) { |
368 | if (info->regulator) | 369 | if (info->regulator) |
369 | regulator_unregister(info->regulator); | 370 | regulator_unregister(info->regulator); |
371 | i2c_set_clientdata(client, NULL); | ||
370 | kfree(info); | 372 | kfree(info); |
371 | } | 373 | } |
372 | i2c_set_clientdata(client, NULL); | ||
373 | 374 | ||
374 | return 0; | 375 | return 0; |
375 | } | 376 | } |
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c index f12f1bb62138..47f90b2fc290 100644 --- a/drivers/regulator/max8660.c +++ b/drivers/regulator/max8660.c | |||
@@ -470,8 +470,8 @@ static int __devexit max8660_remove(struct i2c_client *client) | |||
470 | for (i = 0; i < MAX8660_V_END; i++) | 470 | for (i = 0; i < MAX8660_V_END; i++) |
471 | if (rdev[i]) | 471 | if (rdev[i]) |
472 | regulator_unregister(rdev[i]); | 472 | regulator_unregister(rdev[i]); |
473 | kfree(rdev); | ||
474 | i2c_set_clientdata(client, NULL); | 473 | i2c_set_clientdata(client, NULL); |
474 | kfree(rdev); | ||
475 | 475 | ||
476 | return 0; | 476 | return 0; |
477 | } | 477 | } |
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c index 67873f08ed40..b6218f11c957 100644 --- a/drivers/regulator/max8925-regulator.c +++ b/drivers/regulator/max8925-regulator.c | |||
@@ -230,7 +230,7 @@ static struct max8925_regulator_info max8925_regulator_info[] = { | |||
230 | MAX8925_LDO(20, 750, 3900, 50), | 230 | MAX8925_LDO(20, 750, 3900, 50), |
231 | }; | 231 | }; |
232 | 232 | ||
233 | static inline struct max8925_regulator_info *find_regulator_info(int id) | 233 | static struct max8925_regulator_info * __devinit find_regulator_info(int id) |
234 | { | 234 | { |
235 | struct max8925_regulator_info *ri; | 235 | struct max8925_regulator_info *ri; |
236 | int i; | 236 | int i; |
@@ -247,7 +247,7 @@ static int __devinit max8925_regulator_probe(struct platform_device *pdev) | |||
247 | { | 247 | { |
248 | struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); | 248 | struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); |
249 | struct max8925_platform_data *pdata = chip->dev->platform_data; | 249 | struct max8925_platform_data *pdata = chip->dev->platform_data; |
250 | struct max8925_regulator_info *ri = NULL; | 250 | struct max8925_regulator_info *ri; |
251 | struct regulator_dev *rdev; | 251 | struct regulator_dev *rdev; |
252 | 252 | ||
253 | ri = find_regulator_info(pdev->id); | 253 | ri = find_regulator_info(pdev->id); |
@@ -274,7 +274,9 @@ static int __devexit max8925_regulator_remove(struct platform_device *pdev) | |||
274 | { | 274 | { |
275 | struct regulator_dev *rdev = platform_get_drvdata(pdev); | 275 | struct regulator_dev *rdev = platform_get_drvdata(pdev); |
276 | 276 | ||
277 | platform_set_drvdata(pdev, NULL); | ||
277 | regulator_unregister(rdev); | 278 | regulator_unregister(rdev); |
279 | |||
278 | return 0; | 280 | return 0; |
279 | } | 281 | } |
280 | 282 | ||
diff --git a/drivers/rtc/rtc-mc13783.c b/drivers/rtc/rtc-mc13783.c index d60c81b7b693..1379c7faa448 100644 --- a/drivers/rtc/rtc-mc13783.c +++ b/drivers/rtc/rtc-mc13783.c | |||
@@ -319,35 +319,38 @@ static int __devinit mc13783_rtc_probe(struct platform_device *pdev) | |||
319 | { | 319 | { |
320 | int ret; | 320 | int ret; |
321 | struct mc13783_rtc *priv; | 321 | struct mc13783_rtc *priv; |
322 | struct mc13783 *mc13783; | ||
322 | int rtcrst_pending; | 323 | int rtcrst_pending; |
323 | 324 | ||
324 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 325 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
325 | if (!priv) | 326 | if (!priv) |
326 | return -ENOMEM; | 327 | return -ENOMEM; |
327 | 328 | ||
328 | priv->mc13783 = dev_get_drvdata(pdev->dev.parent); | 329 | mc13783 = dev_get_drvdata(pdev->dev.parent); |
330 | priv->mc13783 = mc13783; | ||
331 | |||
329 | platform_set_drvdata(pdev, priv); | 332 | platform_set_drvdata(pdev, priv); |
330 | 333 | ||
331 | mc13783_lock(priv->mc13783); | 334 | mc13783_lock(mc13783); |
332 | 335 | ||
333 | ret = mc13783_irq_request(priv->mc13783, MC13783_IRQ_RTCRST, | 336 | ret = mc13783_irq_request(mc13783, MC13783_IRQ_RTCRST, |
334 | mc13783_rtc_reset_handler, DRIVER_NAME, priv); | 337 | mc13783_rtc_reset_handler, DRIVER_NAME, priv); |
335 | if (ret) | 338 | if (ret) |
336 | goto err_reset_irq_request; | 339 | goto err_reset_irq_request; |
337 | 340 | ||
338 | ret = mc13783_irq_status(priv->mc13783, MC13783_IRQ_RTCRST, | 341 | ret = mc13783_irq_status(mc13783, MC13783_IRQ_RTCRST, |
339 | NULL, &rtcrst_pending); | 342 | NULL, &rtcrst_pending); |
340 | if (ret) | 343 | if (ret) |
341 | goto err_reset_irq_status; | 344 | goto err_reset_irq_status; |
342 | 345 | ||
343 | priv->valid = !rtcrst_pending; | 346 | priv->valid = !rtcrst_pending; |
344 | 347 | ||
345 | ret = mc13783_irq_request_nounmask(priv->mc13783, MC13783_IRQ_1HZ, | 348 | ret = mc13783_irq_request_nounmask(mc13783, MC13783_IRQ_1HZ, |
346 | mc13783_rtc_update_handler, DRIVER_NAME, priv); | 349 | mc13783_rtc_update_handler, DRIVER_NAME, priv); |
347 | if (ret) | 350 | if (ret) |
348 | goto err_update_irq_request; | 351 | goto err_update_irq_request; |
349 | 352 | ||
350 | ret = mc13783_irq_request_nounmask(priv->mc13783, MC13783_IRQ_TODA, | 353 | ret = mc13783_irq_request_nounmask(mc13783, MC13783_IRQ_TODA, |
351 | mc13783_rtc_alarm_handler, DRIVER_NAME, priv); | 354 | mc13783_rtc_alarm_handler, DRIVER_NAME, priv); |
352 | if (ret) | 355 | if (ret) |
353 | goto err_alarm_irq_request; | 356 | goto err_alarm_irq_request; |
@@ -357,22 +360,22 @@ static int __devinit mc13783_rtc_probe(struct platform_device *pdev) | |||
357 | if (IS_ERR(priv->rtc)) { | 360 | if (IS_ERR(priv->rtc)) { |
358 | ret = PTR_ERR(priv->rtc); | 361 | ret = PTR_ERR(priv->rtc); |
359 | 362 | ||
360 | mc13783_irq_free(priv->mc13783, MC13783_IRQ_TODA, priv); | 363 | mc13783_irq_free(mc13783, MC13783_IRQ_TODA, priv); |
361 | err_alarm_irq_request: | 364 | err_alarm_irq_request: |
362 | 365 | ||
363 | mc13783_irq_free(priv->mc13783, MC13783_IRQ_1HZ, priv); | 366 | mc13783_irq_free(mc13783, MC13783_IRQ_1HZ, priv); |
364 | err_update_irq_request: | 367 | err_update_irq_request: |
365 | 368 | ||
366 | err_reset_irq_status: | 369 | err_reset_irq_status: |
367 | 370 | ||
368 | mc13783_irq_free(priv->mc13783, MC13783_IRQ_RTCRST, priv); | 371 | mc13783_irq_free(mc13783, MC13783_IRQ_RTCRST, priv); |
369 | err_reset_irq_request: | 372 | err_reset_irq_request: |
370 | 373 | ||
371 | platform_set_drvdata(pdev, NULL); | 374 | platform_set_drvdata(pdev, NULL); |
372 | kfree(priv); | 375 | kfree(priv); |
373 | } | 376 | } |
374 | 377 | ||
375 | mc13783_unlock(priv->mc13783); | 378 | mc13783_unlock(mc13783); |
376 | 379 | ||
377 | return ret; | 380 | return ret; |
378 | } | 381 | } |
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c index 51224f76b980..b3736b8aad39 100644 --- a/drivers/s390/block/dasd_3990_erp.c +++ b/drivers/s390/block/dasd_3990_erp.c | |||
@@ -2287,7 +2287,8 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr) | |||
2287 | 2287 | ||
2288 | if (cqr->cpmode == 1) { | 2288 | if (cqr->cpmode == 1) { |
2289 | cplength = 0; | 2289 | cplength = 0; |
2290 | datasize = sizeof(struct tcw) + sizeof(struct tsb); | 2290 | /* TCW needs to be 64 byte aligned, so leave enough room */ |
2291 | datasize = 64 + sizeof(struct tcw) + sizeof(struct tsb); | ||
2291 | } else { | 2292 | } else { |
2292 | cplength = 2; | 2293 | cplength = 2; |
2293 | datasize = 0; | 2294 | datasize = 0; |
@@ -2316,8 +2317,8 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr) | |||
2316 | if (cqr->cpmode == 1) { | 2317 | if (cqr->cpmode == 1) { |
2317 | /* make a shallow copy of the original tcw but set new tsb */ | 2318 | /* make a shallow copy of the original tcw but set new tsb */ |
2318 | erp->cpmode = 1; | 2319 | erp->cpmode = 1; |
2319 | erp->cpaddr = erp->data; | 2320 | erp->cpaddr = PTR_ALIGN(erp->data, 64); |
2320 | tcw = erp->data; | 2321 | tcw = erp->cpaddr; |
2321 | tsb = (struct tsb *) &tcw[1]; | 2322 | tsb = (struct tsb *) &tcw[1]; |
2322 | *tcw = *((struct tcw *)cqr->cpaddr); | 2323 | *tcw = *((struct tcw *)cqr->cpaddr); |
2323 | tcw->tsb = (long)tsb; | 2324 | tcw->tsb = (long)tsb; |
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 01f4e7a34aa8..0cb233116855 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c | |||
@@ -3155,11 +3155,11 @@ static void dasd_eckd_dump_sense_tcw(struct dasd_device *device, | |||
3155 | 3155 | ||
3156 | tsb = NULL; | 3156 | tsb = NULL; |
3157 | sense = NULL; | 3157 | sense = NULL; |
3158 | if (irb->scsw.tm.tcw) | 3158 | if (irb->scsw.tm.tcw && (irb->scsw.tm.fcxs == 0x01)) |
3159 | tsb = tcw_get_tsb( | 3159 | tsb = tcw_get_tsb( |
3160 | (struct tcw *)(unsigned long)irb->scsw.tm.tcw); | 3160 | (struct tcw *)(unsigned long)irb->scsw.tm.tcw); |
3161 | 3161 | ||
3162 | if (tsb && (irb->scsw.tm.fcxs == 0x01)) { | 3162 | if (tsb) { |
3163 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 3163 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER |
3164 | " tsb->length %d\n", tsb->length); | 3164 | " tsb->length %d\n", tsb->length); |
3165 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER | 3165 | len += sprintf(page + len, KERN_ERR PRINTK_HEADER |
diff --git a/drivers/s390/char/sclp_async.c b/drivers/s390/char/sclp_async.c index 740fe405c395..f449c696e503 100644 --- a/drivers/s390/char/sclp_async.c +++ b/drivers/s390/char/sclp_async.c | |||
@@ -84,6 +84,7 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write, | |||
84 | rc = copy_from_user(buf, buffer, sizeof(buf)); | 84 | rc = copy_from_user(buf, buffer, sizeof(buf)); |
85 | if (rc != 0) | 85 | if (rc != 0) |
86 | return -EFAULT; | 86 | return -EFAULT; |
87 | buf[len - 1] = '\0'; | ||
87 | if (strict_strtoul(buf, 0, &val) != 0) | 88 | if (strict_strtoul(buf, 0, &val) != 0) |
88 | return -EINVAL; | 89 | return -EINVAL; |
89 | if (val != 0 && val != 1) | 90 | if (val != 0 && val != 1) |
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index fc7ae05ce48a..4b60ede07f0e 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -308,6 +308,13 @@ struct assign_storage_sccb { | |||
308 | u16 rn; | 308 | u16 rn; |
309 | } __packed; | 309 | } __packed; |
310 | 310 | ||
311 | int arch_get_memory_phys_device(unsigned long start_pfn) | ||
312 | { | ||
313 | if (!rzm) | ||
314 | return 0; | ||
315 | return PFN_PHYS(start_pfn) >> ilog2(rzm); | ||
316 | } | ||
317 | |||
311 | static unsigned long long rn2addr(u16 rn) | 318 | static unsigned long long rn2addr(u16 rn) |
312 | { | 319 | { |
313 | return (unsigned long long) (rn - 1) * rzm; | 320 | return (unsigned long long) (rn - 1) * rzm; |
@@ -704,13 +711,6 @@ int sclp_chp_deconfigure(struct chp_id chpid) | |||
704 | return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8); | 711 | return do_chp_configure(SCLP_CMDW_DECONFIGURE_CHPATH | chpid.id << 8); |
705 | } | 712 | } |
706 | 713 | ||
707 | int arch_get_memory_phys_device(unsigned long start_pfn) | ||
708 | { | ||
709 | if (!rzm) | ||
710 | return 0; | ||
711 | return PFN_PHYS(start_pfn) / rzm; | ||
712 | } | ||
713 | |||
714 | struct chp_info_sccb { | 714 | struct chp_info_sccb { |
715 | struct sccb_header header; | 715 | struct sccb_header header; |
716 | u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; | 716 | u8 recognized[SCLP_CHP_INFO_MASK_SIZE]; |
diff --git a/drivers/s390/char/zcore.c b/drivers/s390/char/zcore.c index 3438658b66b7..3166d85914f2 100644 --- a/drivers/s390/char/zcore.c +++ b/drivers/s390/char/zcore.c | |||
@@ -141,33 +141,6 @@ static int memcpy_hsa_kernel(void *dest, unsigned long src, size_t count) | |||
141 | return memcpy_hsa(dest, src, count, TO_KERNEL); | 141 | return memcpy_hsa(dest, src, count, TO_KERNEL); |
142 | } | 142 | } |
143 | 143 | ||
144 | static int memcpy_real(void *dest, unsigned long src, size_t count) | ||
145 | { | ||
146 | unsigned long flags; | ||
147 | int rc = -EFAULT; | ||
148 | register unsigned long _dest asm("2") = (unsigned long) dest; | ||
149 | register unsigned long _len1 asm("3") = (unsigned long) count; | ||
150 | register unsigned long _src asm("4") = src; | ||
151 | register unsigned long _len2 asm("5") = (unsigned long) count; | ||
152 | |||
153 | if (count == 0) | ||
154 | return 0; | ||
155 | flags = __raw_local_irq_stnsm(0xf8UL); /* switch to real mode */ | ||
156 | asm volatile ( | ||
157 | "0: mvcle %1,%2,0x0\n" | ||
158 | "1: jo 0b\n" | ||
159 | " lhi %0,0x0\n" | ||
160 | "2:\n" | ||
161 | EX_TABLE(1b,2b) | ||
162 | : "+d" (rc), "+d" (_dest), "+d" (_src), "+d" (_len1), | ||
163 | "+d" (_len2), "=m" (*((long*)dest)) | ||
164 | : "m" (*((long*)src)) | ||
165 | : "cc", "memory"); | ||
166 | __raw_local_irq_ssm(flags); | ||
167 | |||
168 | return rc; | ||
169 | } | ||
170 | |||
171 | static int memcpy_real_user(void __user *dest, unsigned long src, size_t count) | 144 | static int memcpy_real_user(void __user *dest, unsigned long src, size_t count) |
172 | { | 145 | { |
173 | static char buf[4096]; | 146 | static char buf[4096]; |
@@ -175,7 +148,7 @@ static int memcpy_real_user(void __user *dest, unsigned long src, size_t count) | |||
175 | 148 | ||
176 | while (offs < count) { | 149 | while (offs < count) { |
177 | size = min(sizeof(buf), count - offs); | 150 | size = min(sizeof(buf), count - offs); |
178 | if (memcpy_real(buf, src + offs, size)) | 151 | if (memcpy_real(buf, (void *) src + offs, size)) |
179 | return -EFAULT; | 152 | return -EFAULT; |
180 | if (copy_to_user(dest + offs, buf, size)) | 153 | if (copy_to_user(dest + offs, buf, size)) |
181 | return -EFAULT; | 154 | return -EFAULT; |
@@ -663,7 +636,7 @@ static int __init zcore_reipl_init(void) | |||
663 | if (ipib_info.ipib < ZFCPDUMP_HSA_SIZE) | 636 | if (ipib_info.ipib < ZFCPDUMP_HSA_SIZE) |
664 | rc = memcpy_hsa_kernel(ipl_block, ipib_info.ipib, PAGE_SIZE); | 637 | rc = memcpy_hsa_kernel(ipl_block, ipib_info.ipib, PAGE_SIZE); |
665 | else | 638 | else |
666 | rc = memcpy_real(ipl_block, ipib_info.ipib, PAGE_SIZE); | 639 | rc = memcpy_real(ipl_block, (void *) ipib_info.ipib, PAGE_SIZE); |
667 | if (rc) { | 640 | if (rc) { |
668 | free_page((unsigned long) ipl_block); | 641 | free_page((unsigned long) ipl_block); |
669 | return rc; | 642 | return rc; |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 304a877d083d..291bc08e2e84 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -82,8 +82,8 @@ struct sci_port { | |||
82 | 82 | ||
83 | /* Interface clock */ | 83 | /* Interface clock */ |
84 | struct clk *iclk; | 84 | struct clk *iclk; |
85 | /* Data clock */ | 85 | /* Function clock */ |
86 | struct clk *dclk; | 86 | struct clk *fclk; |
87 | 87 | ||
88 | struct list_head node; | 88 | struct list_head node; |
89 | struct dma_chan *chan_tx; | 89 | struct dma_chan *chan_tx; |
@@ -780,10 +780,6 @@ static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) | |||
780 | if ((ssr_status & SCxSR_BRK(port)) && err_enabled) | 780 | if ((ssr_status & SCxSR_BRK(port)) && err_enabled) |
781 | ret = sci_br_interrupt(irq, ptr); | 781 | ret = sci_br_interrupt(irq, ptr); |
782 | 782 | ||
783 | WARN_ONCE(ret == IRQ_NONE, | ||
784 | "%s: %d IRQ %d, status %x, control %x\n", __func__, | ||
785 | irq, port->line, ssr_status, scr_status); | ||
786 | |||
787 | return ret; | 783 | return ret; |
788 | } | 784 | } |
789 | 785 | ||
@@ -803,7 +799,7 @@ static int sci_notifier(struct notifier_block *self, | |||
803 | (phase == CPUFREQ_RESUMECHANGE)) { | 799 | (phase == CPUFREQ_RESUMECHANGE)) { |
804 | spin_lock_irqsave(&priv->lock, flags); | 800 | spin_lock_irqsave(&priv->lock, flags); |
805 | list_for_each_entry(sci_port, &priv->ports, node) | 801 | list_for_each_entry(sci_port, &priv->ports, node) |
806 | sci_port->port.uartclk = clk_get_rate(sci_port->dclk); | 802 | sci_port->port.uartclk = clk_get_rate(sci_port->iclk); |
807 | spin_unlock_irqrestore(&priv->lock, flags); | 803 | spin_unlock_irqrestore(&priv->lock, flags); |
808 | } | 804 | } |
809 | 805 | ||
@@ -814,21 +810,17 @@ static void sci_clk_enable(struct uart_port *port) | |||
814 | { | 810 | { |
815 | struct sci_port *sci_port = to_sci_port(port); | 811 | struct sci_port *sci_port = to_sci_port(port); |
816 | 812 | ||
817 | clk_enable(sci_port->dclk); | 813 | clk_enable(sci_port->iclk); |
818 | sci_port->port.uartclk = clk_get_rate(sci_port->dclk); | 814 | sci_port->port.uartclk = clk_get_rate(sci_port->iclk); |
819 | 815 | clk_enable(sci_port->fclk); | |
820 | if (sci_port->iclk) | ||
821 | clk_enable(sci_port->iclk); | ||
822 | } | 816 | } |
823 | 817 | ||
824 | static void sci_clk_disable(struct uart_port *port) | 818 | static void sci_clk_disable(struct uart_port *port) |
825 | { | 819 | { |
826 | struct sci_port *sci_port = to_sci_port(port); | 820 | struct sci_port *sci_port = to_sci_port(port); |
827 | 821 | ||
828 | if (sci_port->iclk) | 822 | clk_disable(sci_port->fclk); |
829 | clk_disable(sci_port->iclk); | 823 | clk_disable(sci_port->iclk); |
830 | |||
831 | clk_disable(sci_port->dclk); | ||
832 | } | 824 | } |
833 | 825 | ||
834 | static int sci_request_irq(struct sci_port *port) | 826 | static int sci_request_irq(struct sci_port *port) |
@@ -1602,10 +1594,10 @@ static struct uart_ops sci_uart_ops = { | |||
1602 | #endif | 1594 | #endif |
1603 | }; | 1595 | }; |
1604 | 1596 | ||
1605 | static void __devinit sci_init_single(struct platform_device *dev, | 1597 | static int __devinit sci_init_single(struct platform_device *dev, |
1606 | struct sci_port *sci_port, | 1598 | struct sci_port *sci_port, |
1607 | unsigned int index, | 1599 | unsigned int index, |
1608 | struct plat_sci_port *p) | 1600 | struct plat_sci_port *p) |
1609 | { | 1601 | { |
1610 | struct uart_port *port = &sci_port->port; | 1602 | struct uart_port *port = &sci_port->port; |
1611 | 1603 | ||
@@ -1626,8 +1618,23 @@ static void __devinit sci_init_single(struct platform_device *dev, | |||
1626 | } | 1618 | } |
1627 | 1619 | ||
1628 | if (dev) { | 1620 | if (dev) { |
1629 | sci_port->iclk = p->clk ? clk_get(&dev->dev, p->clk) : NULL; | 1621 | sci_port->iclk = clk_get(&dev->dev, "sci_ick"); |
1630 | sci_port->dclk = clk_get(&dev->dev, "peripheral_clk"); | 1622 | if (IS_ERR(sci_port->iclk)) { |
1623 | sci_port->iclk = clk_get(&dev->dev, "peripheral_clk"); | ||
1624 | if (IS_ERR(sci_port->iclk)) { | ||
1625 | dev_err(&dev->dev, "can't get iclk\n"); | ||
1626 | return PTR_ERR(sci_port->iclk); | ||
1627 | } | ||
1628 | } | ||
1629 | |||
1630 | /* | ||
1631 | * The function clock is optional, ignore it if we can't | ||
1632 | * find it. | ||
1633 | */ | ||
1634 | sci_port->fclk = clk_get(&dev->dev, "sci_fck"); | ||
1635 | if (IS_ERR(sci_port->fclk)) | ||
1636 | sci_port->fclk = NULL; | ||
1637 | |||
1631 | sci_port->enable = sci_clk_enable; | 1638 | sci_port->enable = sci_clk_enable; |
1632 | sci_port->disable = sci_clk_disable; | 1639 | sci_port->disable = sci_clk_disable; |
1633 | port->dev = &dev->dev; | 1640 | port->dev = &dev->dev; |
@@ -1654,6 +1661,7 @@ static void __devinit sci_init_single(struct platform_device *dev, | |||
1654 | #endif | 1661 | #endif |
1655 | 1662 | ||
1656 | memcpy(&sci_port->irqs, &p->irqs, sizeof(p->irqs)); | 1663 | memcpy(&sci_port->irqs, &p->irqs, sizeof(p->irqs)); |
1664 | return 0; | ||
1657 | } | 1665 | } |
1658 | 1666 | ||
1659 | #ifdef CONFIG_SERIAL_SH_SCI_CONSOLE | 1667 | #ifdef CONFIG_SERIAL_SH_SCI_CONSOLE |
@@ -1803,8 +1811,11 @@ static int sci_remove(struct platform_device *dev) | |||
1803 | cpufreq_unregister_notifier(&priv->clk_nb, CPUFREQ_TRANSITION_NOTIFIER); | 1811 | cpufreq_unregister_notifier(&priv->clk_nb, CPUFREQ_TRANSITION_NOTIFIER); |
1804 | 1812 | ||
1805 | spin_lock_irqsave(&priv->lock, flags); | 1813 | spin_lock_irqsave(&priv->lock, flags); |
1806 | list_for_each_entry(p, &priv->ports, node) | 1814 | list_for_each_entry(p, &priv->ports, node) { |
1807 | uart_remove_one_port(&sci_uart_driver, &p->port); | 1815 | uart_remove_one_port(&sci_uart_driver, &p->port); |
1816 | clk_put(p->iclk); | ||
1817 | clk_put(p->fclk); | ||
1818 | } | ||
1808 | spin_unlock_irqrestore(&priv->lock, flags); | 1819 | spin_unlock_irqrestore(&priv->lock, flags); |
1809 | 1820 | ||
1810 | kfree(priv); | 1821 | kfree(priv); |
@@ -1830,7 +1841,9 @@ static int __devinit sci_probe_single(struct platform_device *dev, | |||
1830 | return 0; | 1841 | return 0; |
1831 | } | 1842 | } |
1832 | 1843 | ||
1833 | sci_init_single(dev, sciport, index, p); | 1844 | ret = sci_init_single(dev, sciport, index, p); |
1845 | if (ret) | ||
1846 | return ret; | ||
1834 | 1847 | ||
1835 | ret = uart_add_one_port(&sci_uart_driver, &sciport->port); | 1848 | ret = uart_add_one_port(&sci_uart_driver, &sciport->port); |
1836 | if (ret) | 1849 | if (ret) |
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h index fad67d33b0bd..f70c49f915fa 100644 --- a/drivers/serial/sh-sci.h +++ b/drivers/serial/sh-sci.h | |||
@@ -31,7 +31,9 @@ | |||
31 | # define SCSCR_INIT(port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0 | 31 | # define SCSCR_INIT(port) (port->mapbase == SCIF2) ? 0xF3 : 0xF0 |
32 | #elif defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 32 | #elif defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
33 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 33 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
34 | defined(CONFIG_ARCH_SHMOBILE) | 34 | defined(CONFIG_ARCH_SH7367) || \ |
35 | defined(CONFIG_ARCH_SH7377) || \ | ||
36 | defined(CONFIG_ARCH_SH7372) | ||
35 | # define SCSCR_INIT(port) 0x0030 /* TIE=0,RIE=0,TE=1,RE=1 */ | 37 | # define SCSCR_INIT(port) 0x0030 /* TIE=0,RIE=0,TE=1,RE=1 */ |
36 | # define PORT_PTCR 0xA405011EUL | 38 | # define PORT_PTCR 0xA405011EUL |
37 | # define PORT_PVCR 0xA4050122UL | 39 | # define PORT_PVCR 0xA4050122UL |
@@ -94,7 +96,9 @@ | |||
94 | # define SCSCR_INIT(port) 0x0038 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ | 96 | # define SCSCR_INIT(port) 0x0038 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ |
95 | #elif defined(CONFIG_CPU_SUBTYPE_SH7724) | 97 | #elif defined(CONFIG_CPU_SUBTYPE_SH7724) |
96 | # define SCIF_ORER 0x0001 /* overrun error bit */ | 98 | # define SCIF_ORER 0x0001 /* overrun error bit */ |
97 | # define SCSCR_INIT(port) 0x0038 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ | 99 | # define SCSCR_INIT(port) ((port)->type == PORT_SCIFA ? \ |
100 | 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ : \ | ||
101 | 0x38 /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ ) | ||
98 | #elif defined(CONFIG_CPU_SUBTYPE_SH4_202) | 102 | #elif defined(CONFIG_CPU_SUBTYPE_SH4_202) |
99 | # define SCSPTR2 0xffe80020 /* 16 bit SCIF */ | 103 | # define SCSPTR2 0xffe80020 /* 16 bit SCIF */ |
100 | # define SCIF_ORER 0x0001 /* overrun error bit */ | 104 | # define SCIF_ORER 0x0001 /* overrun error bit */ |
@@ -197,6 +201,8 @@ | |||
197 | defined(CONFIG_CPU_SUBTYPE_SH7786) || \ | 201 | defined(CONFIG_CPU_SUBTYPE_SH7786) || \ |
198 | defined(CONFIG_CPU_SUBTYPE_SHX3) | 202 | defined(CONFIG_CPU_SUBTYPE_SHX3) |
199 | #define SCI_CTRL_FLAGS_REIE 0x08 /* 7750 SCIF */ | 203 | #define SCI_CTRL_FLAGS_REIE 0x08 /* 7750 SCIF */ |
204 | #elif defined(CONFIG_CPU_SUBTYPE_SH7724) | ||
205 | #define SCI_CTRL_FLAGS_REIE ((port)->type == PORT_SCIFA ? 0 : 8) | ||
200 | #else | 206 | #else |
201 | #define SCI_CTRL_FLAGS_REIE 0 | 207 | #define SCI_CTRL_FLAGS_REIE 0 |
202 | #endif | 208 | #endif |
@@ -230,7 +236,9 @@ | |||
230 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 236 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
231 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 237 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
232 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 238 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
233 | defined(CONFIG_ARCH_SHMOBILE) | 239 | defined(CONFIG_ARCH_SH7367) || \ |
240 | defined(CONFIG_ARCH_SH7377) || \ | ||
241 | defined(CONFIG_ARCH_SH7372) | ||
234 | # define SCIF_ORER 0x0200 | 242 | # define SCIF_ORER 0x0200 |
235 | # define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER) | 243 | # define SCIF_ERRORS ( SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK | SCIF_ORER) |
236 | # define SCIF_RFDC_MASK 0x007f | 244 | # define SCIF_RFDC_MASK 0x007f |
@@ -264,7 +272,9 @@ | |||
264 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 272 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
265 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 273 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
266 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 274 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
267 | defined(CONFIG_ARCH_SHMOBILE) | 275 | defined(CONFIG_ARCH_SH7367) || \ |
276 | defined(CONFIG_ARCH_SH7377) || \ | ||
277 | defined(CONFIG_ARCH_SH7372) | ||
268 | # define SCxSR_RDxF_CLEAR(port) (sci_in(port, SCxSR) & 0xfffc) | 278 | # define SCxSR_RDxF_CLEAR(port) (sci_in(port, SCxSR) & 0xfffc) |
269 | # define SCxSR_ERROR_CLEAR(port) (sci_in(port, SCxSR) & 0xfd73) | 279 | # define SCxSR_ERROR_CLEAR(port) (sci_in(port, SCxSR) & 0xfd73) |
270 | # define SCxSR_TDxE_CLEAR(port) (sci_in(port, SCxSR) & 0xffdf) | 280 | # define SCxSR_TDxE_CLEAR(port) (sci_in(port, SCxSR) & 0xffdf) |
@@ -359,7 +369,10 @@ | |||
359 | SCI_OUT(sci_size, sci_offset, value); \ | 369 | SCI_OUT(sci_size, sci_offset, value); \ |
360 | } | 370 | } |
361 | 371 | ||
362 | #if defined(CONFIG_CPU_SH3) || defined(CONFIG_ARCH_SHMOBILE) | 372 | #if defined(CONFIG_CPU_SH3) || \ |
373 | defined(CONFIG_ARCH_SH7367) || \ | ||
374 | defined(CONFIG_ARCH_SH7377) || \ | ||
375 | defined(CONFIG_ARCH_SH7372) | ||
363 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712) | 376 | #if defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712) |
364 | #define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \ | 377 | #define SCIx_FNS(name, sh3_sci_offset, sh3_sci_size, sh4_sci_offset, sh4_sci_size, \ |
365 | sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \ | 378 | sh3_scif_offset, sh3_scif_size, sh4_scif_offset, sh4_scif_size, \ |
@@ -370,7 +383,9 @@ | |||
370 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 383 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
371 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 384 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
372 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 385 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
373 | defined(CONFIG_ARCH_SHMOBILE) | 386 | defined(CONFIG_ARCH_SH7367) || \ |
387 | defined(CONFIG_ARCH_SH7377) || \ | ||
388 | defined(CONFIG_ARCH_SH7372) | ||
374 | #define SCIF_FNS(name, scif_offset, scif_size) \ | 389 | #define SCIF_FNS(name, scif_offset, scif_size) \ |
375 | CPU_SCIF_FNS(name, scif_offset, scif_size) | 390 | CPU_SCIF_FNS(name, scif_offset, scif_size) |
376 | #else | 391 | #else |
@@ -406,7 +421,9 @@ | |||
406 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 421 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
407 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 422 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
408 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 423 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
409 | defined(CONFIG_ARCH_SHMOBILE) | 424 | defined(CONFIG_ARCH_SH7367) || \ |
425 | defined(CONFIG_ARCH_SH7377) || \ | ||
426 | defined(CONFIG_ARCH_SH7372) | ||
410 | 427 | ||
411 | SCIF_FNS(SCSMR, 0x00, 16) | 428 | SCIF_FNS(SCSMR, 0x00, 16) |
412 | SCIF_FNS(SCBRR, 0x04, 8) | 429 | SCIF_FNS(SCBRR, 0x04, 8) |
@@ -589,7 +606,9 @@ static inline int sci_rxd_in(struct uart_port *port) | |||
589 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ | 606 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) || \ |
590 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ | 607 | defined(CONFIG_CPU_SUBTYPE_SH7720) || \ |
591 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ | 608 | defined(CONFIG_CPU_SUBTYPE_SH7721) || \ |
592 | defined(CONFIG_ARCH_SHMOBILE) | 609 | defined(CONFIG_ARCH_SH7367) || \ |
610 | defined(CONFIG_ARCH_SH7377) || \ | ||
611 | defined(CONFIG_ARCH_SH7372) | ||
593 | #define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1) | 612 | #define SCBRR_VALUE(bps, clk) (((clk*2)+16*bps)/(32*bps)-1) |
594 | #elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\ | 613 | #elif defined(CONFIG_CPU_SUBTYPE_SH7723) ||\ |
595 | defined(CONFIG_CPU_SUBTYPE_SH7724) | 614 | defined(CONFIG_CPU_SUBTYPE_SH7724) |
diff --git a/drivers/sh/intc.c b/drivers/sh/intc.c index a3d8677af6a5..f43850527645 100644 --- a/drivers/sh/intc.c +++ b/drivers/sh/intc.c | |||
@@ -44,6 +44,12 @@ struct intc_handle_int { | |||
44 | unsigned long handle; | 44 | unsigned long handle; |
45 | }; | 45 | }; |
46 | 46 | ||
47 | struct intc_window { | ||
48 | phys_addr_t phys; | ||
49 | void __iomem *virt; | ||
50 | unsigned long size; | ||
51 | }; | ||
52 | |||
47 | struct intc_desc_int { | 53 | struct intc_desc_int { |
48 | struct list_head list; | 54 | struct list_head list; |
49 | struct sys_device sysdev; | 55 | struct sys_device sysdev; |
@@ -57,6 +63,8 @@ struct intc_desc_int { | |||
57 | unsigned int nr_prio; | 63 | unsigned int nr_prio; |
58 | struct intc_handle_int *sense; | 64 | struct intc_handle_int *sense; |
59 | unsigned int nr_sense; | 65 | unsigned int nr_sense; |
66 | struct intc_window *window; | ||
67 | unsigned int nr_windows; | ||
60 | struct irq_chip chip; | 68 | struct irq_chip chip; |
61 | }; | 69 | }; |
62 | 70 | ||
@@ -446,11 +454,39 @@ static int intc_set_sense(unsigned int irq, unsigned int type) | |||
446 | return 0; | 454 | return 0; |
447 | } | 455 | } |
448 | 456 | ||
457 | static unsigned long intc_phys_to_virt(struct intc_desc_int *d, | ||
458 | unsigned long address) | ||
459 | { | ||
460 | struct intc_window *window; | ||
461 | int k; | ||
462 | |||
463 | /* scan through physical windows and convert address */ | ||
464 | for (k = 0; k < d->nr_windows; k++) { | ||
465 | window = d->window + k; | ||
466 | |||
467 | if (address < window->phys) | ||
468 | continue; | ||
469 | |||
470 | if (address >= (window->phys + window->size)) | ||
471 | continue; | ||
472 | |||
473 | address -= window->phys; | ||
474 | address += (unsigned long)window->virt; | ||
475 | |||
476 | return address; | ||
477 | } | ||
478 | |||
479 | /* no windows defined, register must be 1:1 mapped virt:phys */ | ||
480 | return address; | ||
481 | } | ||
482 | |||
449 | static unsigned int __init intc_get_reg(struct intc_desc_int *d, | 483 | static unsigned int __init intc_get_reg(struct intc_desc_int *d, |
450 | unsigned long address) | 484 | unsigned long address) |
451 | { | 485 | { |
452 | unsigned int k; | 486 | unsigned int k; |
453 | 487 | ||
488 | address = intc_phys_to_virt(d, address); | ||
489 | |||
454 | for (k = 0; k < d->nr_reg; k++) { | 490 | for (k = 0; k < d->nr_reg; k++) { |
455 | if (d->reg[k] == address) | 491 | if (d->reg[k] == address) |
456 | return k; | 492 | return k; |
@@ -800,6 +836,8 @@ static unsigned int __init save_reg(struct intc_desc_int *d, | |||
800 | unsigned int smp) | 836 | unsigned int smp) |
801 | { | 837 | { |
802 | if (value) { | 838 | if (value) { |
839 | value = intc_phys_to_virt(d, value); | ||
840 | |||
803 | d->reg[cnt] = value; | 841 | d->reg[cnt] = value; |
804 | #ifdef CONFIG_SMP | 842 | #ifdef CONFIG_SMP |
805 | d->smp[cnt] = smp; | 843 | d->smp[cnt] = smp; |
@@ -815,25 +853,52 @@ static void intc_redirect_irq(unsigned int irq, struct irq_desc *desc) | |||
815 | generic_handle_irq((unsigned int)get_irq_data(irq)); | 853 | generic_handle_irq((unsigned int)get_irq_data(irq)); |
816 | } | 854 | } |
817 | 855 | ||
818 | void __init register_intc_controller(struct intc_desc *desc) | 856 | int __init register_intc_controller(struct intc_desc *desc) |
819 | { | 857 | { |
820 | unsigned int i, k, smp; | 858 | unsigned int i, k, smp; |
821 | struct intc_hw_desc *hw = &desc->hw; | 859 | struct intc_hw_desc *hw = &desc->hw; |
822 | struct intc_desc_int *d; | 860 | struct intc_desc_int *d; |
861 | struct resource *res; | ||
823 | 862 | ||
824 | d = kzalloc(sizeof(*d), GFP_NOWAIT); | 863 | d = kzalloc(sizeof(*d), GFP_NOWAIT); |
864 | if (!d) | ||
865 | goto err0; | ||
825 | 866 | ||
826 | INIT_LIST_HEAD(&d->list); | 867 | INIT_LIST_HEAD(&d->list); |
827 | list_add(&d->list, &intc_list); | 868 | list_add(&d->list, &intc_list); |
828 | 869 | ||
870 | if (desc->num_resources) { | ||
871 | d->nr_windows = desc->num_resources; | ||
872 | d->window = kzalloc(d->nr_windows * sizeof(*d->window), | ||
873 | GFP_NOWAIT); | ||
874 | if (!d->window) | ||
875 | goto err1; | ||
876 | |||
877 | for (k = 0; k < d->nr_windows; k++) { | ||
878 | res = desc->resource + k; | ||
879 | WARN_ON(resource_type(res) != IORESOURCE_MEM); | ||
880 | d->window[k].phys = res->start; | ||
881 | d->window[k].size = resource_size(res); | ||
882 | d->window[k].virt = ioremap_nocache(res->start, | ||
883 | resource_size(res)); | ||
884 | if (!d->window[k].virt) | ||
885 | goto err2; | ||
886 | } | ||
887 | } | ||
888 | |||
829 | d->nr_reg = hw->mask_regs ? hw->nr_mask_regs * 2 : 0; | 889 | d->nr_reg = hw->mask_regs ? hw->nr_mask_regs * 2 : 0; |
830 | d->nr_reg += hw->prio_regs ? hw->nr_prio_regs * 2 : 0; | 890 | d->nr_reg += hw->prio_regs ? hw->nr_prio_regs * 2 : 0; |
831 | d->nr_reg += hw->sense_regs ? hw->nr_sense_regs : 0; | 891 | d->nr_reg += hw->sense_regs ? hw->nr_sense_regs : 0; |
832 | d->nr_reg += hw->ack_regs ? hw->nr_ack_regs : 0; | 892 | d->nr_reg += hw->ack_regs ? hw->nr_ack_regs : 0; |
833 | 893 | ||
834 | d->reg = kzalloc(d->nr_reg * sizeof(*d->reg), GFP_NOWAIT); | 894 | d->reg = kzalloc(d->nr_reg * sizeof(*d->reg), GFP_NOWAIT); |
895 | if (!d->reg) | ||
896 | goto err2; | ||
897 | |||
835 | #ifdef CONFIG_SMP | 898 | #ifdef CONFIG_SMP |
836 | d->smp = kzalloc(d->nr_reg * sizeof(*d->smp), GFP_NOWAIT); | 899 | d->smp = kzalloc(d->nr_reg * sizeof(*d->smp), GFP_NOWAIT); |
900 | if (!d->smp) | ||
901 | goto err3; | ||
837 | #endif | 902 | #endif |
838 | k = 0; | 903 | k = 0; |
839 | 904 | ||
@@ -848,6 +913,8 @@ void __init register_intc_controller(struct intc_desc *desc) | |||
848 | if (hw->prio_regs) { | 913 | if (hw->prio_regs) { |
849 | d->prio = kzalloc(hw->nr_vectors * sizeof(*d->prio), | 914 | d->prio = kzalloc(hw->nr_vectors * sizeof(*d->prio), |
850 | GFP_NOWAIT); | 915 | GFP_NOWAIT); |
916 | if (!d->prio) | ||
917 | goto err4; | ||
851 | 918 | ||
852 | for (i = 0; i < hw->nr_prio_regs; i++) { | 919 | for (i = 0; i < hw->nr_prio_regs; i++) { |
853 | smp = IS_SMP(hw->prio_regs[i]); | 920 | smp = IS_SMP(hw->prio_regs[i]); |
@@ -859,6 +926,8 @@ void __init register_intc_controller(struct intc_desc *desc) | |||
859 | if (hw->sense_regs) { | 926 | if (hw->sense_regs) { |
860 | d->sense = kzalloc(hw->nr_vectors * sizeof(*d->sense), | 927 | d->sense = kzalloc(hw->nr_vectors * sizeof(*d->sense), |
861 | GFP_NOWAIT); | 928 | GFP_NOWAIT); |
929 | if (!d->sense) | ||
930 | goto err5; | ||
862 | 931 | ||
863 | for (i = 0; i < hw->nr_sense_regs; i++) | 932 | for (i = 0; i < hw->nr_sense_regs; i++) |
864 | k += save_reg(d, k, hw->sense_regs[i].reg, 0); | 933 | k += save_reg(d, k, hw->sense_regs[i].reg, 0); |
@@ -941,6 +1010,28 @@ void __init register_intc_controller(struct intc_desc *desc) | |||
941 | /* enable bits matching force_enable after registering irqs */ | 1010 | /* enable bits matching force_enable after registering irqs */ |
942 | if (desc->force_enable) | 1011 | if (desc->force_enable) |
943 | intc_enable_disable_enum(desc, d, desc->force_enable, 1); | 1012 | intc_enable_disable_enum(desc, d, desc->force_enable, 1); |
1013 | |||
1014 | return 0; | ||
1015 | err5: | ||
1016 | kfree(d->prio); | ||
1017 | err4: | ||
1018 | #ifdef CONFIG_SMP | ||
1019 | kfree(d->smp); | ||
1020 | err3: | ||
1021 | #endif | ||
1022 | kfree(d->reg); | ||
1023 | err2: | ||
1024 | for (k = 0; k < d->nr_windows; k++) | ||
1025 | if (d->window[k].virt) | ||
1026 | iounmap(d->window[k].virt); | ||
1027 | |||
1028 | kfree(d->window); | ||
1029 | err1: | ||
1030 | kfree(d); | ||
1031 | err0: | ||
1032 | pr_err("unable to allocate INTC memory\n"); | ||
1033 | |||
1034 | return -ENOMEM; | ||
944 | } | 1035 | } |
945 | 1036 | ||
946 | static int intc_suspend(struct sys_device *dev, pm_message_t state) | 1037 | static int intc_suspend(struct sys_device *dev, pm_message_t state) |
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index 5e13d23b5f0c..8b45145b9136 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/interrupt.h> | 24 | #include <linux/interrupt.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/err.h> | ||
27 | #include <linux/io.h> | 26 | #include <linux/io.h> |
28 | #include <linux/platform_device.h> | 27 | #include <linux/platform_device.h> |
29 | #include <linux/clk.h> | 28 | #include <linux/clk.h> |
diff --git a/drivers/video/geode/lxfb.h b/drivers/video/geode/lxfb.h index cc781c00f75d..e4c4d89b7860 100644 --- a/drivers/video/geode/lxfb.h +++ b/drivers/video/geode/lxfb.h | |||
@@ -365,6 +365,8 @@ enum fp_registers { | |||
365 | FP_CRC, /* 0x458 */ | 365 | FP_CRC, /* 0x458 */ |
366 | }; | 366 | }; |
367 | 367 | ||
368 | #define FP_PT2_HSP (1 << 22) | ||
369 | #define FP_PT2_VSP (1 << 23) | ||
368 | #define FP_PT2_SCRC (1 << 27) /* shfclk free */ | 370 | #define FP_PT2_SCRC (1 << 27) /* shfclk free */ |
369 | 371 | ||
370 | #define FP_PM_P (1 << 24) /* panel power ctl */ | 372 | #define FP_PM_P (1 << 24) /* panel power ctl */ |
diff --git a/drivers/video/geode/lxfb_ops.c b/drivers/video/geode/lxfb_ops.c index 0e5d8c7c3eba..bc35a95e59d4 100644 --- a/drivers/video/geode/lxfb_ops.c +++ b/drivers/video/geode/lxfb_ops.c | |||
@@ -274,7 +274,15 @@ static void lx_graphics_enable(struct fb_info *info) | |||
274 | u32 msrlo, msrhi; | 274 | u32 msrlo, msrhi; |
275 | 275 | ||
276 | write_fp(par, FP_PT1, 0); | 276 | write_fp(par, FP_PT1, 0); |
277 | write_fp(par, FP_PT2, FP_PT2_SCRC); | 277 | temp = FP_PT2_SCRC; |
278 | |||
279 | if (info->var.sync & FB_SYNC_HOR_HIGH_ACT) | ||
280 | temp |= FP_PT2_HSP; | ||
281 | |||
282 | if (info->var.sync & FB_SYNC_VERT_HIGH_ACT) | ||
283 | temp |= FP_PT2_VSP; | ||
284 | |||
285 | write_fp(par, FP_PT2, temp); | ||
278 | write_fp(par, FP_DFC, FP_DFC_BC); | 286 | write_fp(par, FP_DFC, FP_DFC_BC); |
279 | 287 | ||
280 | msrlo = MSR_LX_MSR_PADSEL_TFT_SEL_LOW; | 288 | msrlo = MSR_LX_MSR_PADSEL_TFT_SEL_LOW; |
diff --git a/drivers/video/omap2/displays/panel-generic.c b/drivers/video/omap2/displays/panel-generic.c index c59e4baed8b2..300eff5de1b4 100644 --- a/drivers/video/omap2/displays/panel-generic.c +++ b/drivers/video/omap2/displays/panel-generic.c | |||
@@ -116,6 +116,24 @@ static int generic_panel_resume(struct omap_dss_device *dssdev) | |||
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
119 | static void generic_panel_set_timings(struct omap_dss_device *dssdev, | ||
120 | struct omap_video_timings *timings) | ||
121 | { | ||
122 | dpi_set_timings(dssdev, timings); | ||
123 | } | ||
124 | |||
125 | static void generic_panel_get_timings(struct omap_dss_device *dssdev, | ||
126 | struct omap_video_timings *timings) | ||
127 | { | ||
128 | *timings = dssdev->panel.timings; | ||
129 | } | ||
130 | |||
131 | static int generic_panel_check_timings(struct omap_dss_device *dssdev, | ||
132 | struct omap_video_timings *timings) | ||
133 | { | ||
134 | return dpi_check_timings(dssdev, timings); | ||
135 | } | ||
136 | |||
119 | static struct omap_dss_driver generic_driver = { | 137 | static struct omap_dss_driver generic_driver = { |
120 | .probe = generic_panel_probe, | 138 | .probe = generic_panel_probe, |
121 | .remove = generic_panel_remove, | 139 | .remove = generic_panel_remove, |
@@ -125,6 +143,10 @@ static struct omap_dss_driver generic_driver = { | |||
125 | .suspend = generic_panel_suspend, | 143 | .suspend = generic_panel_suspend, |
126 | .resume = generic_panel_resume, | 144 | .resume = generic_panel_resume, |
127 | 145 | ||
146 | .set_timings = generic_panel_set_timings, | ||
147 | .get_timings = generic_panel_get_timings, | ||
148 | .check_timings = generic_panel_check_timings, | ||
149 | |||
128 | .driver = { | 150 | .driver = { |
129 | .name = "generic_panel", | 151 | .name = "generic_panel", |
130 | .owner = THIS_MODULE, | 152 | .owner = THIS_MODULE, |
diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c index 8254a4232a53..54344184dd73 100644 --- a/drivers/video/omap2/dss/dss.c +++ b/drivers/video/omap2/dss/dss.c | |||
@@ -590,6 +590,9 @@ int dss_init(bool skip_init) | |||
590 | } | 590 | } |
591 | } | 591 | } |
592 | 592 | ||
593 | dss.dsi_clk_source = DSS_SRC_DSS1_ALWON_FCLK; | ||
594 | dss.dispc_clk_source = DSS_SRC_DSS1_ALWON_FCLK; | ||
595 | |||
593 | dss_save_context(); | 596 | dss_save_context(); |
594 | 597 | ||
595 | rev = dss_read_reg(DSS_REVISION); | 598 | rev = dss_read_reg(DSS_REVISION); |
diff --git a/drivers/video/omap2/vram.c b/drivers/video/omap2/vram.c index 55a4de5e5d10..b266ffae0bde 100644 --- a/drivers/video/omap2/vram.c +++ b/drivers/video/omap2/vram.c | |||
@@ -511,13 +511,14 @@ static u32 omap_vram_sdram_size __initdata; | |||
511 | static u32 omap_vram_def_sdram_size __initdata; | 511 | static u32 omap_vram_def_sdram_size __initdata; |
512 | static u32 omap_vram_def_sdram_start __initdata; | 512 | static u32 omap_vram_def_sdram_start __initdata; |
513 | 513 | ||
514 | static void __init omap_vram_early_vram(char **p) | 514 | static int __init omap_vram_early_vram(char *p) |
515 | { | 515 | { |
516 | omap_vram_def_sdram_size = memparse(*p, p); | 516 | omap_vram_def_sdram_size = memparse(p, &p); |
517 | if (**p == ',') | 517 | if (*p == ',') |
518 | omap_vram_def_sdram_start = simple_strtoul((*p) + 1, p, 16); | 518 | omap_vram_def_sdram_start = simple_strtoul(p + 1, &p, 16); |
519 | return 0; | ||
519 | } | 520 | } |
520 | __early_param("vram=", omap_vram_early_vram); | 521 | early_param("vram", omap_vram_early_vram); |
521 | 522 | ||
522 | /* | 523 | /* |
523 | * Called from map_io. We need to call to this early enough so that we | 524 | * Called from map_io. We need to call to this early enough so that we |
diff --git a/drivers/video/pxa168fb.c b/drivers/video/pxa168fb.c index 75285d3f393c..c91a7f70f7b0 100644 --- a/drivers/video/pxa168fb.c +++ b/drivers/video/pxa168fb.c | |||
@@ -668,7 +668,7 @@ static int __init pxa168fb_probe(struct platform_device *pdev) | |||
668 | /* | 668 | /* |
669 | * Map LCD controller registers. | 669 | * Map LCD controller registers. |
670 | */ | 670 | */ |
671 | fbi->reg_base = ioremap_nocache(res->start, res->end - res->start); | 671 | fbi->reg_base = ioremap_nocache(res->start, resource_size(res)); |
672 | if (fbi->reg_base == NULL) { | 672 | if (fbi->reg_base == NULL) { |
673 | ret = -ENOMEM; | 673 | ret = -ENOMEM; |
674 | goto failed; | 674 | goto failed; |
diff --git a/fs/binfmt_aout.c b/fs/binfmt_aout.c index 15d80bb35d6f..9b6aef0f75e5 100644 --- a/fs/binfmt_aout.c +++ b/fs/binfmt_aout.c | |||
@@ -75,14 +75,16 @@ static int aout_core_dump(struct coredump_params *cprm) | |||
75 | struct file *file = cprm->file; | 75 | struct file *file = cprm->file; |
76 | mm_segment_t fs; | 76 | mm_segment_t fs; |
77 | int has_dumped = 0; | 77 | int has_dumped = 0; |
78 | unsigned long dump_start, dump_size; | 78 | void __user *dump_start; |
79 | int dump_size; | ||
79 | struct user dump; | 80 | struct user dump; |
80 | #ifdef __alpha__ | 81 | #ifdef __alpha__ |
81 | # define START_DATA(u) (u.start_data) | 82 | # define START_DATA(u) ((void __user *)u.start_data) |
82 | #else | 83 | #else |
83 | # define START_DATA(u) ((u.u_tsize << PAGE_SHIFT) + u.start_code) | 84 | # define START_DATA(u) ((void __user *)((u.u_tsize << PAGE_SHIFT) + \ |
85 | u.start_code)) | ||
84 | #endif | 86 | #endif |
85 | # define START_STACK(u) (u.start_stack) | 87 | # define START_STACK(u) ((void __user *)u.start_stack) |
86 | 88 | ||
87 | fs = get_fs(); | 89 | fs = get_fs(); |
88 | set_fs(KERNEL_DS); | 90 | set_fs(KERNEL_DS); |
@@ -104,9 +106,9 @@ static int aout_core_dump(struct coredump_params *cprm) | |||
104 | 106 | ||
105 | /* make sure we actually have a data and stack area to dump */ | 107 | /* make sure we actually have a data and stack area to dump */ |
106 | set_fs(USER_DS); | 108 | set_fs(USER_DS); |
107 | if (!access_ok(VERIFY_READ, (void __user *)START_DATA(dump), dump.u_dsize << PAGE_SHIFT)) | 109 | if (!access_ok(VERIFY_READ, START_DATA(dump), dump.u_dsize << PAGE_SHIFT)) |
108 | dump.u_dsize = 0; | 110 | dump.u_dsize = 0; |
109 | if (!access_ok(VERIFY_READ, (void __user *)START_STACK(dump), dump.u_ssize << PAGE_SHIFT)) | 111 | if (!access_ok(VERIFY_READ, START_STACK(dump), dump.u_ssize << PAGE_SHIFT)) |
110 | dump.u_ssize = 0; | 112 | dump.u_ssize = 0; |
111 | 113 | ||
112 | set_fs(KERNEL_DS); | 114 | set_fs(KERNEL_DS); |
diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c index 2c32d00a6690..7ab23e006e4c 100644 --- a/fs/binfmt_elf_fdpic.c +++ b/fs/binfmt_elf_fdpic.c | |||
@@ -1590,7 +1590,7 @@ static size_t elf_core_vma_data_size(unsigned long mm_flags) | |||
1590 | struct vm_area_struct *vma; | 1590 | struct vm_area_struct *vma; |
1591 | size_t size = 0; | 1591 | size_t size = 0; |
1592 | 1592 | ||
1593 | for (vma = current->mm->mmap; vma; vma->vm_next) | 1593 | for (vma = current->mm->mmap; vma; vma = vma->vm_next) |
1594 | if (maydump(vma, mm_flags)) | 1594 | if (maydump(vma, mm_flags)) |
1595 | size += vma->vm_end - vma->vm_start; | 1595 | size += vma->vm_end - vma->vm_start; |
1596 | return size; | 1596 | return size; |
diff --git a/fs/fscache/page.c b/fs/fscache/page.c index c598ea4c4e7d..69809024d71d 100644 --- a/fs/fscache/page.c +++ b/fs/fscache/page.c | |||
@@ -881,6 +881,7 @@ submit_failed: | |||
881 | goto nobufs; | 881 | goto nobufs; |
882 | 882 | ||
883 | nobufs_unlock_obj: | 883 | nobufs_unlock_obj: |
884 | spin_unlock(&cookie->stores_lock); | ||
884 | spin_unlock(&object->lock); | 885 | spin_unlock(&object->lock); |
885 | nobufs: | 886 | nobufs: |
886 | spin_unlock(&cookie->lock); | 887 | spin_unlock(&cookie->lock); |
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index ae8d02294e46..ae0d92736531 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c | |||
@@ -491,7 +491,8 @@ static int nfs_release_page(struct page *page, gfp_t gfp) | |||
491 | { | 491 | { |
492 | dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); | 492 | dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page); |
493 | 493 | ||
494 | if (gfp & __GFP_WAIT) | 494 | /* Only do I/O if gfp is a superset of GFP_KERNEL */ |
495 | if ((gfp & GFP_KERNEL) == GFP_KERNEL) | ||
495 | nfs_wb_page(page->mapping->host, page); | 496 | nfs_wb_page(page->mapping->host, page); |
496 | /* If PagePrivate() is set, then the page is not freeable */ | 497 | /* If PagePrivate() is set, then the page is not freeable */ |
497 | if (PagePrivate(page)) | 498 | if (PagePrivate(page)) |
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 4d338be492cb..dd17713413a5 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -5552,6 +5552,8 @@ static int nfs4_xdr_dec_delegreturn(struct rpc_rqst *rqstp, __be32 *p, struct nf | |||
5552 | if (status != 0) | 5552 | if (status != 0) |
5553 | goto out; | 5553 | goto out; |
5554 | status = decode_delegreturn(&xdr); | 5554 | status = decode_delegreturn(&xdr); |
5555 | if (status != 0) | ||
5556 | goto out; | ||
5555 | decode_getfattr(&xdr, res->fattr, res->server, | 5557 | decode_getfattr(&xdr, res->fattr, res->server, |
5556 | !RPC_IS_ASYNC(rqstp->rq_task)); | 5558 | !RPC_IS_ASYNC(rqstp->rq_task)); |
5557 | out: | 5559 | out: |
diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c index 0028d2ef0662..90be97f1f5a8 100644 --- a/fs/partitions/msdos.c +++ b/fs/partitions/msdos.c | |||
@@ -31,14 +31,17 @@ | |||
31 | */ | 31 | */ |
32 | #include <asm/unaligned.h> | 32 | #include <asm/unaligned.h> |
33 | 33 | ||
34 | #define SYS_IND(p) (get_unaligned(&p->sys_ind)) | 34 | #define SYS_IND(p) get_unaligned(&p->sys_ind) |
35 | #define NR_SECTS(p) ({ __le32 __a = get_unaligned(&p->nr_sects); \ | ||
36 | le32_to_cpu(__a); \ | ||
37 | }) | ||
38 | 35 | ||
39 | #define START_SECT(p) ({ __le32 __a = get_unaligned(&p->start_sect); \ | 36 | static inline sector_t nr_sects(struct partition *p) |
40 | le32_to_cpu(__a); \ | 37 | { |
41 | }) | 38 | return (sector_t)get_unaligned_le32(&p->nr_sects); |
39 | } | ||
40 | |||
41 | static inline sector_t start_sect(struct partition *p) | ||
42 | { | ||
43 | return (sector_t)get_unaligned_le32(&p->start_sect); | ||
44 | } | ||
42 | 45 | ||
43 | static inline int is_extended_partition(struct partition *p) | 46 | static inline int is_extended_partition(struct partition *p) |
44 | { | 47 | { |
@@ -104,13 +107,13 @@ static int aix_magic_present(unsigned char *p, struct block_device *bdev) | |||
104 | 107 | ||
105 | static void | 108 | static void |
106 | parse_extended(struct parsed_partitions *state, struct block_device *bdev, | 109 | parse_extended(struct parsed_partitions *state, struct block_device *bdev, |
107 | u32 first_sector, u32 first_size) | 110 | sector_t first_sector, sector_t first_size) |
108 | { | 111 | { |
109 | struct partition *p; | 112 | struct partition *p; |
110 | Sector sect; | 113 | Sector sect; |
111 | unsigned char *data; | 114 | unsigned char *data; |
112 | u32 this_sector, this_size; | 115 | sector_t this_sector, this_size; |
113 | int sector_size = bdev_logical_block_size(bdev) / 512; | 116 | sector_t sector_size = bdev_logical_block_size(bdev) / 512; |
114 | int loopct = 0; /* number of links followed | 117 | int loopct = 0; /* number of links followed |
115 | without finding a data partition */ | 118 | without finding a data partition */ |
116 | int i; | 119 | int i; |
@@ -145,14 +148,14 @@ parse_extended(struct parsed_partitions *state, struct block_device *bdev, | |||
145 | * First process the data partition(s) | 148 | * First process the data partition(s) |
146 | */ | 149 | */ |
147 | for (i=0; i<4; i++, p++) { | 150 | for (i=0; i<4; i++, p++) { |
148 | u32 offs, size, next; | 151 | sector_t offs, size, next; |
149 | if (!NR_SECTS(p) || is_extended_partition(p)) | 152 | if (!nr_sects(p) || is_extended_partition(p)) |
150 | continue; | 153 | continue; |
151 | 154 | ||
152 | /* Check the 3rd and 4th entries - | 155 | /* Check the 3rd and 4th entries - |
153 | these sometimes contain random garbage */ | 156 | these sometimes contain random garbage */ |
154 | offs = START_SECT(p)*sector_size; | 157 | offs = start_sect(p)*sector_size; |
155 | size = NR_SECTS(p)*sector_size; | 158 | size = nr_sects(p)*sector_size; |
156 | next = this_sector + offs; | 159 | next = this_sector + offs; |
157 | if (i >= 2) { | 160 | if (i >= 2) { |
158 | if (offs + size > this_size) | 161 | if (offs + size > this_size) |
@@ -179,13 +182,13 @@ parse_extended(struct parsed_partitions *state, struct block_device *bdev, | |||
179 | */ | 182 | */ |
180 | p -= 4; | 183 | p -= 4; |
181 | for (i=0; i<4; i++, p++) | 184 | for (i=0; i<4; i++, p++) |
182 | if (NR_SECTS(p) && is_extended_partition(p)) | 185 | if (nr_sects(p) && is_extended_partition(p)) |
183 | break; | 186 | break; |
184 | if (i == 4) | 187 | if (i == 4) |
185 | goto done; /* nothing left to do */ | 188 | goto done; /* nothing left to do */ |
186 | 189 | ||
187 | this_sector = first_sector + START_SECT(p) * sector_size; | 190 | this_sector = first_sector + start_sect(p) * sector_size; |
188 | this_size = NR_SECTS(p) * sector_size; | 191 | this_size = nr_sects(p) * sector_size; |
189 | put_dev_sector(sect); | 192 | put_dev_sector(sect); |
190 | } | 193 | } |
191 | done: | 194 | done: |
@@ -197,7 +200,7 @@ done: | |||
197 | 200 | ||
198 | static void | 201 | static void |
199 | parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev, | 202 | parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev, |
200 | u32 offset, u32 size, int origin) | 203 | sector_t offset, sector_t size, int origin) |
201 | { | 204 | { |
202 | #ifdef CONFIG_SOLARIS_X86_PARTITION | 205 | #ifdef CONFIG_SOLARIS_X86_PARTITION |
203 | Sector sect; | 206 | Sector sect; |
@@ -244,7 +247,7 @@ parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev, | |||
244 | */ | 247 | */ |
245 | static void | 248 | static void |
246 | parse_bsd(struct parsed_partitions *state, struct block_device *bdev, | 249 | parse_bsd(struct parsed_partitions *state, struct block_device *bdev, |
247 | u32 offset, u32 size, int origin, char *flavour, | 250 | sector_t offset, sector_t size, int origin, char *flavour, |
248 | int max_partitions) | 251 | int max_partitions) |
249 | { | 252 | { |
250 | Sector sect; | 253 | Sector sect; |
@@ -263,7 +266,7 @@ parse_bsd(struct parsed_partitions *state, struct block_device *bdev, | |||
263 | if (le16_to_cpu(l->d_npartitions) < max_partitions) | 266 | if (le16_to_cpu(l->d_npartitions) < max_partitions) |
264 | max_partitions = le16_to_cpu(l->d_npartitions); | 267 | max_partitions = le16_to_cpu(l->d_npartitions); |
265 | for (p = l->d_partitions; p - l->d_partitions < max_partitions; p++) { | 268 | for (p = l->d_partitions; p - l->d_partitions < max_partitions; p++) { |
266 | u32 bsd_start, bsd_size; | 269 | sector_t bsd_start, bsd_size; |
267 | 270 | ||
268 | if (state->next == state->limit) | 271 | if (state->next == state->limit) |
269 | break; | 272 | break; |
@@ -290,7 +293,7 @@ parse_bsd(struct parsed_partitions *state, struct block_device *bdev, | |||
290 | 293 | ||
291 | static void | 294 | static void |
292 | parse_freebsd(struct parsed_partitions *state, struct block_device *bdev, | 295 | parse_freebsd(struct parsed_partitions *state, struct block_device *bdev, |
293 | u32 offset, u32 size, int origin) | 296 | sector_t offset, sector_t size, int origin) |
294 | { | 297 | { |
295 | #ifdef CONFIG_BSD_DISKLABEL | 298 | #ifdef CONFIG_BSD_DISKLABEL |
296 | parse_bsd(state, bdev, offset, size, origin, | 299 | parse_bsd(state, bdev, offset, size, origin, |
@@ -300,7 +303,7 @@ parse_freebsd(struct parsed_partitions *state, struct block_device *bdev, | |||
300 | 303 | ||
301 | static void | 304 | static void |
302 | parse_netbsd(struct parsed_partitions *state, struct block_device *bdev, | 305 | parse_netbsd(struct parsed_partitions *state, struct block_device *bdev, |
303 | u32 offset, u32 size, int origin) | 306 | sector_t offset, sector_t size, int origin) |
304 | { | 307 | { |
305 | #ifdef CONFIG_BSD_DISKLABEL | 308 | #ifdef CONFIG_BSD_DISKLABEL |
306 | parse_bsd(state, bdev, offset, size, origin, | 309 | parse_bsd(state, bdev, offset, size, origin, |
@@ -310,7 +313,7 @@ parse_netbsd(struct parsed_partitions *state, struct block_device *bdev, | |||
310 | 313 | ||
311 | static void | 314 | static void |
312 | parse_openbsd(struct parsed_partitions *state, struct block_device *bdev, | 315 | parse_openbsd(struct parsed_partitions *state, struct block_device *bdev, |
313 | u32 offset, u32 size, int origin) | 316 | sector_t offset, sector_t size, int origin) |
314 | { | 317 | { |
315 | #ifdef CONFIG_BSD_DISKLABEL | 318 | #ifdef CONFIG_BSD_DISKLABEL |
316 | parse_bsd(state, bdev, offset, size, origin, | 319 | parse_bsd(state, bdev, offset, size, origin, |
@@ -324,7 +327,7 @@ parse_openbsd(struct parsed_partitions *state, struct block_device *bdev, | |||
324 | */ | 327 | */ |
325 | static void | 328 | static void |
326 | parse_unixware(struct parsed_partitions *state, struct block_device *bdev, | 329 | parse_unixware(struct parsed_partitions *state, struct block_device *bdev, |
327 | u32 offset, u32 size, int origin) | 330 | sector_t offset, sector_t size, int origin) |
328 | { | 331 | { |
329 | #ifdef CONFIG_UNIXWARE_DISKLABEL | 332 | #ifdef CONFIG_UNIXWARE_DISKLABEL |
330 | Sector sect; | 333 | Sector sect; |
@@ -348,7 +351,8 @@ parse_unixware(struct parsed_partitions *state, struct block_device *bdev, | |||
348 | 351 | ||
349 | if (p->s_label != UNIXWARE_FS_UNUSED) | 352 | if (p->s_label != UNIXWARE_FS_UNUSED) |
350 | put_partition(state, state->next++, | 353 | put_partition(state, state->next++, |
351 | START_SECT(p), NR_SECTS(p)); | 354 | le32_to_cpu(p->start_sect), |
355 | le32_to_cpu(p->nr_sects)); | ||
352 | p++; | 356 | p++; |
353 | } | 357 | } |
354 | put_dev_sector(sect); | 358 | put_dev_sector(sect); |
@@ -363,7 +367,7 @@ parse_unixware(struct parsed_partitions *state, struct block_device *bdev, | |||
363 | */ | 367 | */ |
364 | static void | 368 | static void |
365 | parse_minix(struct parsed_partitions *state, struct block_device *bdev, | 369 | parse_minix(struct parsed_partitions *state, struct block_device *bdev, |
366 | u32 offset, u32 size, int origin) | 370 | sector_t offset, sector_t size, int origin) |
367 | { | 371 | { |
368 | #ifdef CONFIG_MINIX_SUBPARTITION | 372 | #ifdef CONFIG_MINIX_SUBPARTITION |
369 | Sector sect; | 373 | Sector sect; |
@@ -390,7 +394,7 @@ parse_minix(struct parsed_partitions *state, struct block_device *bdev, | |||
390 | /* add each partition in use */ | 394 | /* add each partition in use */ |
391 | if (SYS_IND(p) == MINIX_PARTITION) | 395 | if (SYS_IND(p) == MINIX_PARTITION) |
392 | put_partition(state, state->next++, | 396 | put_partition(state, state->next++, |
393 | START_SECT(p), NR_SECTS(p)); | 397 | start_sect(p), nr_sects(p)); |
394 | } | 398 | } |
395 | printk(" >\n"); | 399 | printk(" >\n"); |
396 | } | 400 | } |
@@ -401,7 +405,7 @@ parse_minix(struct parsed_partitions *state, struct block_device *bdev, | |||
401 | static struct { | 405 | static struct { |
402 | unsigned char id; | 406 | unsigned char id; |
403 | void (*parse)(struct parsed_partitions *, struct block_device *, | 407 | void (*parse)(struct parsed_partitions *, struct block_device *, |
404 | u32, u32, int); | 408 | sector_t, sector_t, int); |
405 | } subtypes[] = { | 409 | } subtypes[] = { |
406 | {FREEBSD_PARTITION, parse_freebsd}, | 410 | {FREEBSD_PARTITION, parse_freebsd}, |
407 | {NETBSD_PARTITION, parse_netbsd}, | 411 | {NETBSD_PARTITION, parse_netbsd}, |
@@ -415,7 +419,7 @@ static struct { | |||
415 | 419 | ||
416 | int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) | 420 | int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) |
417 | { | 421 | { |
418 | int sector_size = bdev_logical_block_size(bdev) / 512; | 422 | sector_t sector_size = bdev_logical_block_size(bdev) / 512; |
419 | Sector sect; | 423 | Sector sect; |
420 | unsigned char *data; | 424 | unsigned char *data; |
421 | struct partition *p; | 425 | struct partition *p; |
@@ -483,14 +487,21 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) | |||
483 | 487 | ||
484 | state->next = 5; | 488 | state->next = 5; |
485 | for (slot = 1 ; slot <= 4 ; slot++, p++) { | 489 | for (slot = 1 ; slot <= 4 ; slot++, p++) { |
486 | u32 start = START_SECT(p)*sector_size; | 490 | sector_t start = start_sect(p)*sector_size; |
487 | u32 size = NR_SECTS(p)*sector_size; | 491 | sector_t size = nr_sects(p)*sector_size; |
488 | if (!size) | 492 | if (!size) |
489 | continue; | 493 | continue; |
490 | if (is_extended_partition(p)) { | 494 | if (is_extended_partition(p)) { |
491 | /* prevent someone doing mkfs or mkswap on an | 495 | /* |
492 | extended partition, but leave room for LILO */ | 496 | * prevent someone doing mkfs or mkswap on an |
493 | put_partition(state, slot, start, size == 1 ? 1 : 2); | 497 | * extended partition, but leave room for LILO |
498 | * FIXME: this uses one logical sector for > 512b | ||
499 | * sector, although it may not be enough/proper. | ||
500 | */ | ||
501 | sector_t n = 2; | ||
502 | n = min(size, max(sector_size, n)); | ||
503 | put_partition(state, slot, start, n); | ||
504 | |||
494 | printk(" <"); | 505 | printk(" <"); |
495 | parse_extended(state, bdev, start, size); | 506 | parse_extended(state, bdev, start, size); |
496 | printk(" >"); | 507 | printk(" >"); |
@@ -513,7 +524,7 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) | |||
513 | unsigned char id = SYS_IND(p); | 524 | unsigned char id = SYS_IND(p); |
514 | int n; | 525 | int n; |
515 | 526 | ||
516 | if (!NR_SECTS(p)) | 527 | if (!nr_sects(p)) |
517 | continue; | 528 | continue; |
518 | 529 | ||
519 | for (n = 0; subtypes[n].parse && id != subtypes[n].id; n++) | 530 | for (n = 0; subtypes[n].parse && id != subtypes[n].id; n++) |
@@ -521,8 +532,8 @@ int msdos_partition(struct parsed_partitions *state, struct block_device *bdev) | |||
521 | 532 | ||
522 | if (!subtypes[n].parse) | 533 | if (!subtypes[n].parse) |
523 | continue; | 534 | continue; |
524 | subtypes[n].parse(state, bdev, START_SECT(p)*sector_size, | 535 | subtypes[n].parse(state, bdev, start_sect(p)*sector_size, |
525 | NR_SECTS(p)*sector_size, slot); | 536 | nr_sects(p)*sector_size, slot); |
526 | } | 537 | } |
527 | put_dev_sector(sect); | 538 | put_dev_sector(sect); |
528 | return 1; | 539 | return 1; |
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index a44a7897fd4d..b442dac8f5f9 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c | |||
@@ -490,7 +490,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) | |||
490 | } | 490 | } |
491 | read_unlock(&kclist_lock); | 491 | read_unlock(&kclist_lock); |
492 | 492 | ||
493 | if (m == NULL) { | 493 | if (&m->list == &kclist_head) { |
494 | if (clear_user(buffer, tsz)) | 494 | if (clear_user(buffer, tsz)) |
495 | return -EFAULT; | 495 | return -EFAULT; |
496 | } else if (is_vmalloc_or_module_addr((void *)start)) { | 496 | } else if (is_vmalloc_or_module_addr((void *)start)) { |
diff --git a/fs/read_write.c b/fs/read_write.c index b7f4a1f94d48..113386d6fd2d 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -258,6 +258,7 @@ ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *pp | |||
258 | init_sync_kiocb(&kiocb, filp); | 258 | init_sync_kiocb(&kiocb, filp); |
259 | kiocb.ki_pos = *ppos; | 259 | kiocb.ki_pos = *ppos; |
260 | kiocb.ki_left = len; | 260 | kiocb.ki_left = len; |
261 | kiocb.ki_nbytes = len; | ||
261 | 262 | ||
262 | for (;;) { | 263 | for (;;) { |
263 | ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos); | 264 | ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos); |
@@ -313,6 +314,7 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof | |||
313 | init_sync_kiocb(&kiocb, filp); | 314 | init_sync_kiocb(&kiocb, filp); |
314 | kiocb.ki_pos = *ppos; | 315 | kiocb.ki_pos = *ppos; |
315 | kiocb.ki_left = len; | 316 | kiocb.ki_left = len; |
317 | kiocb.ki_nbytes = len; | ||
316 | 318 | ||
317 | for (;;) { | 319 | for (;;) { |
318 | ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos); | 320 | ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos); |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index ba98546fabbd..f3de5e8a2ae8 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -2217,6 +2217,15 @@ static int journal_read_transaction(struct super_block *sb, | |||
2217 | brelse(d_bh); | 2217 | brelse(d_bh); |
2218 | return 1; | 2218 | return 1; |
2219 | } | 2219 | } |
2220 | |||
2221 | if (bdev_read_only(sb->s_bdev)) { | ||
2222 | reiserfs_warning(sb, "clm-2076", | ||
2223 | "device is readonly, unable to replay log"); | ||
2224 | brelse(c_bh); | ||
2225 | brelse(d_bh); | ||
2226 | return -EROFS; | ||
2227 | } | ||
2228 | |||
2220 | trans_id = get_desc_trans_id(desc); | 2229 | trans_id = get_desc_trans_id(desc); |
2221 | /* now we know we've got a good transaction, and it was inside the valid time ranges */ | 2230 | /* now we know we've got a good transaction, and it was inside the valid time ranges */ |
2222 | log_blocks = kmalloc(get_desc_trans_len(desc) * | 2231 | log_blocks = kmalloc(get_desc_trans_len(desc) * |
@@ -2459,12 +2468,6 @@ static int journal_read(struct super_block *sb) | |||
2459 | goto start_log_replay; | 2468 | goto start_log_replay; |
2460 | } | 2469 | } |
2461 | 2470 | ||
2462 | if (continue_replay && bdev_read_only(sb->s_bdev)) { | ||
2463 | reiserfs_warning(sb, "clm-2076", | ||
2464 | "device is readonly, unable to replay log"); | ||
2465 | return -1; | ||
2466 | } | ||
2467 | |||
2468 | /* ok, there are transactions that need to be replayed. start with the first log block, find | 2471 | /* ok, there are transactions that need to be replayed. start with the first log block, find |
2469 | ** all the valid transactions, and pick out the oldest. | 2472 | ** all the valid transactions, and pick out the oldest. |
2470 | */ | 2473 | */ |
diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c index d8b5bfcbdd30..de1fcffd906b 100644 --- a/fs/reiserfs/xattr_security.c +++ b/fs/reiserfs/xattr_security.c | |||
@@ -76,7 +76,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode, | |||
76 | return error; | 76 | return error; |
77 | } | 77 | } |
78 | 78 | ||
79 | if (sec->length) { | 79 | if (sec->length && reiserfs_xattrs_initialized(inode->i_sb)) { |
80 | blocks = reiserfs_xattr_jcreate_nblocks(inode) + | 80 | blocks = reiserfs_xattr_jcreate_nblocks(inode) + |
81 | reiserfs_xattr_nblocks(inode, sec->length); | 81 | reiserfs_xattr_nblocks(inode, sec->length); |
82 | /* We don't want to count the directories twice if we have | 82 | /* We don't want to count the directories twice if we have |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 3a4767c01c5f..4f7b44866b76 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -65,6 +65,8 @@ | |||
65 | #define ACPI_VIDEO_HID "LNXVIDEO" | 65 | #define ACPI_VIDEO_HID "LNXVIDEO" |
66 | #define ACPI_BAY_HID "LNXIOBAY" | 66 | #define ACPI_BAY_HID "LNXIOBAY" |
67 | #define ACPI_DOCK_HID "LNXDOCK" | 67 | #define ACPI_DOCK_HID "LNXDOCK" |
68 | /* Quirk for broken IBM BIOSes */ | ||
69 | #define ACPI_SMBUS_IBM_HID "SMBUSIBM" | ||
68 | 70 | ||
69 | /* | 71 | /* |
70 | * For fixed hardware buttons, we fabricate acpi_devices with HID | 72 | * For fixed hardware buttons, we fabricate acpi_devices with HID |
diff --git a/include/linux/circ_buf.h b/include/linux/circ_buf.h index a2ed0591fb19..90f2471dc6f2 100644 --- a/include/linux/circ_buf.h +++ b/include/linux/circ_buf.h | |||
@@ -1,3 +1,7 @@ | |||
1 | /* | ||
2 | * See Documentation/circular-buffers.txt for more information. | ||
3 | */ | ||
4 | |||
1 | #ifndef _LINUX_CIRC_BUF_H | 5 | #ifndef _LINUX_CIRC_BUF_H |
2 | #define _LINUX_CIRC_BUF_H 1 | 6 | #define _LINUX_CIRC_BUF_H 1 |
3 | 7 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index 182192892d45..241b96bcd7ad 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -451,6 +451,10 @@ struct device { | |||
451 | 451 | ||
452 | static inline const char *dev_name(const struct device *dev) | 452 | static inline const char *dev_name(const struct device *dev) |
453 | { | 453 | { |
454 | /* Use the init name until the kobject becomes available */ | ||
455 | if (dev->init_name) | ||
456 | return dev->init_name; | ||
457 | |||
454 | return kobject_name(&dev->kobj); | 458 | return kobject_name(&dev->kobj); |
455 | } | 459 | } |
456 | 460 | ||
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h index bc0fc795bd35..ece0b1c33816 100644 --- a/include/linux/kfifo.h +++ b/include/linux/kfifo.h | |||
@@ -102,8 +102,6 @@ union { \ | |||
102 | unsigned char name##kfifo_buffer[size]; \ | 102 | unsigned char name##kfifo_buffer[size]; \ |
103 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) | 103 | struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer) |
104 | 104 | ||
105 | #undef __kfifo_initializer | ||
106 | |||
107 | extern void kfifo_init(struct kfifo *fifo, void *buffer, | 105 | extern void kfifo_init(struct kfifo *fifo, void *buffer, |
108 | unsigned int size); | 106 | unsigned int size); |
109 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, | 107 | extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size, |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index c02c8db73701..8a49cbf0376d 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -268,6 +268,7 @@ struct _mmc_csd { | |||
268 | 268 | ||
269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ | 269 | #define EXT_CSD_CARD_TYPE_26 (1<<0) /* Card can run at 26MHz */ |
270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ | 270 | #define EXT_CSD_CARD_TYPE_52 (1<<1) /* Card can run at 52MHz */ |
271 | #define EXT_CSD_CARD_TYPE_MASK 0x3 /* Mask out reserved and DDR bits */ | ||
271 | 272 | ||
272 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ | 273 | #define EXT_CSD_BUS_WIDTH_1 0 /* Card is in 1 bit mode */ |
273 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ | 274 | #define EXT_CSD_BUS_WIDTH_4 1 /* Card is in 4 bit mode */ |
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h index 99928dce37ea..7fa02b4af838 100644 --- a/include/linux/reiserfs_xattr.h +++ b/include/linux/reiserfs_xattr.h | |||
@@ -70,6 +70,11 @@ int reiserfs_security_write(struct reiserfs_transaction_handle *th, | |||
70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); | 70 | void reiserfs_security_free(struct reiserfs_security_handle *sec); |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | static inline int reiserfs_xattrs_initialized(struct super_block *sb) | ||
74 | { | ||
75 | return REISERFS_SB(sb)->priv_root != NULL; | ||
76 | } | ||
77 | |||
73 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) | 78 | #define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header)) |
74 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) | 79 | static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size) |
75 | { | 80 | { |
diff --git a/include/linux/sh_intc.h b/include/linux/sh_intc.h index 51d288d8ac88..01d8168c5a1b 100644 --- a/include/linux/sh_intc.h +++ b/include/linux/sh_intc.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __SH_INTC_H | 1 | #ifndef __SH_INTC_H |
2 | #define __SH_INTC_H | 2 | #define __SH_INTC_H |
3 | 3 | ||
4 | #include <linux/ioport.h> | ||
5 | |||
4 | typedef unsigned char intc_enum; | 6 | typedef unsigned char intc_enum; |
5 | 7 | ||
6 | struct intc_vect { | 8 | struct intc_vect { |
@@ -71,6 +73,8 @@ struct intc_hw_desc { | |||
71 | 73 | ||
72 | struct intc_desc { | 74 | struct intc_desc { |
73 | char *name; | 75 | char *name; |
76 | struct resource *resource; | ||
77 | unsigned int num_resources; | ||
74 | intc_enum force_enable; | 78 | intc_enum force_enable; |
75 | intc_enum force_disable; | 79 | intc_enum force_disable; |
76 | struct intc_hw_desc hw; | 80 | struct intc_hw_desc hw; |
@@ -92,7 +96,7 @@ struct intc_desc symbol __initdata = { \ | |||
92 | prio_regs, sense_regs, ack_regs), \ | 96 | prio_regs, sense_regs, ack_regs), \ |
93 | } | 97 | } |
94 | 98 | ||
95 | void __init register_intc_controller(struct intc_desc *desc); | 99 | int __init register_intc_controller(struct intc_desc *desc); |
96 | int intc_set_priority(unsigned int irq, unsigned int prio); | 100 | int intc_set_priority(unsigned int irq, unsigned int prio); |
97 | 101 | ||
98 | int reserve_irq_vector(unsigned int irq); | 102 | int reserve_irq_vector(unsigned int irq); |
diff --git a/include/linux/sunrpc/bc_xprt.h b/include/linux/sunrpc/bc_xprt.h index d7152b451e21..7c91260c44a9 100644 --- a/include/linux/sunrpc/bc_xprt.h +++ b/include/linux/sunrpc/bc_xprt.h | |||
@@ -36,7 +36,6 @@ struct rpc_rqst *xprt_alloc_bc_request(struct rpc_xprt *xprt); | |||
36 | void xprt_free_bc_request(struct rpc_rqst *req); | 36 | void xprt_free_bc_request(struct rpc_rqst *req); |
37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); | 37 | int xprt_setup_backchannel(struct rpc_xprt *, unsigned int min_reqs); |
38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); | 38 | void xprt_destroy_backchannel(struct rpc_xprt *, int max_reqs); |
39 | void bc_release_request(struct rpc_task *); | ||
40 | int bc_send(struct rpc_rqst *req); | 39 | int bc_send(struct rpc_rqst *req); |
41 | 40 | ||
42 | /* | 41 | /* |
@@ -59,6 +58,10 @@ static inline int svc_is_backchannel(const struct svc_rqst *rqstp) | |||
59 | { | 58 | { |
60 | return 0; | 59 | return 0; |
61 | } | 60 | } |
61 | |||
62 | static inline void xprt_free_bc_request(struct rpc_rqst *req) | ||
63 | { | ||
64 | } | ||
62 | #endif /* CONFIG_NFS_V4_1 */ | 65 | #endif /* CONFIG_NFS_V4_1 */ |
63 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ | 66 | #endif /* _LINUX_SUNRPC_BC_XPRT_H */ |
64 | 67 | ||
diff --git a/init/main.c b/init/main.c index a1ab78ceb4b6..cbead27caefc 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -858,7 +858,7 @@ static int __init kernel_init(void * unused) | |||
858 | /* | 858 | /* |
859 | * init can allocate pages on any node | 859 | * init can allocate pages on any node |
860 | */ | 860 | */ |
861 | set_mems_allowed(node_possible_map); | 861 | set_mems_allowed(node_states[N_HIGH_MEMORY]); |
862 | /* | 862 | /* |
863 | * init can run on any cpu. | 863 | * init can run on any cpu. |
864 | */ | 864 | */ |
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index ef909a329750..e2769e13980c 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -27,7 +27,6 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/cgroup.h> | 29 | #include <linux/cgroup.h> |
30 | #include <linux/module.h> | ||
31 | #include <linux/ctype.h> | 30 | #include <linux/ctype.h> |
32 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
33 | #include <linux/fs.h> | 32 | #include <linux/fs.h> |
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index ba401fab459f..d10946748ec2 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -920,9 +920,6 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs, | |||
920 | * call to guarantee_online_mems(), as we know no one is changing | 920 | * call to guarantee_online_mems(), as we know no one is changing |
921 | * our task's cpuset. | 921 | * our task's cpuset. |
922 | * | 922 | * |
923 | * Hold callback_mutex around the two modifications of our tasks | ||
924 | * mems_allowed to synchronize with cpuset_mems_allowed(). | ||
925 | * | ||
926 | * While the mm_struct we are migrating is typically from some | 923 | * While the mm_struct we are migrating is typically from some |
927 | * other task, the task_struct mems_allowed that we are hacking | 924 | * other task, the task_struct mems_allowed that we are hacking |
928 | * is for our current task, which must allocate new pages for that | 925 | * is for our current task, which must allocate new pages for that |
@@ -973,15 +970,20 @@ static void cpuset_change_nodemask(struct task_struct *p, | |||
973 | struct cpuset *cs; | 970 | struct cpuset *cs; |
974 | int migrate; | 971 | int migrate; |
975 | const nodemask_t *oldmem = scan->data; | 972 | const nodemask_t *oldmem = scan->data; |
976 | nodemask_t newmems; | 973 | NODEMASK_ALLOC(nodemask_t, newmems, GFP_KERNEL); |
974 | |||
975 | if (!newmems) | ||
976 | return; | ||
977 | 977 | ||
978 | cs = cgroup_cs(scan->cg); | 978 | cs = cgroup_cs(scan->cg); |
979 | guarantee_online_mems(cs, &newmems); | 979 | guarantee_online_mems(cs, newmems); |
980 | 980 | ||
981 | task_lock(p); | 981 | task_lock(p); |
982 | cpuset_change_task_nodemask(p, &newmems); | 982 | cpuset_change_task_nodemask(p, newmems); |
983 | task_unlock(p); | 983 | task_unlock(p); |
984 | 984 | ||
985 | NODEMASK_FREE(newmems); | ||
986 | |||
985 | mm = get_task_mm(p); | 987 | mm = get_task_mm(p); |
986 | if (!mm) | 988 | if (!mm) |
987 | return; | 989 | return; |
@@ -1051,16 +1053,21 @@ static void update_tasks_nodemask(struct cpuset *cs, const nodemask_t *oldmem, | |||
1051 | static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, | 1053 | static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, |
1052 | const char *buf) | 1054 | const char *buf) |
1053 | { | 1055 | { |
1054 | nodemask_t oldmem; | 1056 | NODEMASK_ALLOC(nodemask_t, oldmem, GFP_KERNEL); |
1055 | int retval; | 1057 | int retval; |
1056 | struct ptr_heap heap; | 1058 | struct ptr_heap heap; |
1057 | 1059 | ||
1060 | if (!oldmem) | ||
1061 | return -ENOMEM; | ||
1062 | |||
1058 | /* | 1063 | /* |
1059 | * top_cpuset.mems_allowed tracks node_stats[N_HIGH_MEMORY]; | 1064 | * top_cpuset.mems_allowed tracks node_stats[N_HIGH_MEMORY]; |
1060 | * it's read-only | 1065 | * it's read-only |
1061 | */ | 1066 | */ |
1062 | if (cs == &top_cpuset) | 1067 | if (cs == &top_cpuset) { |
1063 | return -EACCES; | 1068 | retval = -EACCES; |
1069 | goto done; | ||
1070 | } | ||
1064 | 1071 | ||
1065 | /* | 1072 | /* |
1066 | * An empty mems_allowed is ok iff there are no tasks in the cpuset. | 1073 | * An empty mems_allowed is ok iff there are no tasks in the cpuset. |
@@ -1076,11 +1083,13 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, | |||
1076 | goto done; | 1083 | goto done; |
1077 | 1084 | ||
1078 | if (!nodes_subset(trialcs->mems_allowed, | 1085 | if (!nodes_subset(trialcs->mems_allowed, |
1079 | node_states[N_HIGH_MEMORY])) | 1086 | node_states[N_HIGH_MEMORY])) { |
1080 | return -EINVAL; | 1087 | retval = -EINVAL; |
1088 | goto done; | ||
1089 | } | ||
1081 | } | 1090 | } |
1082 | oldmem = cs->mems_allowed; | 1091 | *oldmem = cs->mems_allowed; |
1083 | if (nodes_equal(oldmem, trialcs->mems_allowed)) { | 1092 | if (nodes_equal(*oldmem, trialcs->mems_allowed)) { |
1084 | retval = 0; /* Too easy - nothing to do */ | 1093 | retval = 0; /* Too easy - nothing to do */ |
1085 | goto done; | 1094 | goto done; |
1086 | } | 1095 | } |
@@ -1096,10 +1105,11 @@ static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs, | |||
1096 | cs->mems_allowed = trialcs->mems_allowed; | 1105 | cs->mems_allowed = trialcs->mems_allowed; |
1097 | mutex_unlock(&callback_mutex); | 1106 | mutex_unlock(&callback_mutex); |
1098 | 1107 | ||
1099 | update_tasks_nodemask(cs, &oldmem, &heap); | 1108 | update_tasks_nodemask(cs, oldmem, &heap); |
1100 | 1109 | ||
1101 | heap_free(&heap); | 1110 | heap_free(&heap); |
1102 | done: | 1111 | done: |
1112 | NODEMASK_FREE(oldmem); | ||
1103 | return retval; | 1113 | return retval; |
1104 | } | 1114 | } |
1105 | 1115 | ||
@@ -1384,40 +1394,47 @@ static void cpuset_attach(struct cgroup_subsys *ss, struct cgroup *cont, | |||
1384 | struct cgroup *oldcont, struct task_struct *tsk, | 1394 | struct cgroup *oldcont, struct task_struct *tsk, |
1385 | bool threadgroup) | 1395 | bool threadgroup) |
1386 | { | 1396 | { |
1387 | nodemask_t from, to; | ||
1388 | struct mm_struct *mm; | 1397 | struct mm_struct *mm; |
1389 | struct cpuset *cs = cgroup_cs(cont); | 1398 | struct cpuset *cs = cgroup_cs(cont); |
1390 | struct cpuset *oldcs = cgroup_cs(oldcont); | 1399 | struct cpuset *oldcs = cgroup_cs(oldcont); |
1400 | NODEMASK_ALLOC(nodemask_t, from, GFP_KERNEL); | ||
1401 | NODEMASK_ALLOC(nodemask_t, to, GFP_KERNEL); | ||
1402 | |||
1403 | if (from == NULL || to == NULL) | ||
1404 | goto alloc_fail; | ||
1391 | 1405 | ||
1392 | if (cs == &top_cpuset) { | 1406 | if (cs == &top_cpuset) { |
1393 | cpumask_copy(cpus_attach, cpu_possible_mask); | 1407 | cpumask_copy(cpus_attach, cpu_possible_mask); |
1394 | to = node_possible_map; | ||
1395 | } else { | 1408 | } else { |
1396 | guarantee_online_cpus(cs, cpus_attach); | 1409 | guarantee_online_cpus(cs, cpus_attach); |
1397 | guarantee_online_mems(cs, &to); | ||
1398 | } | 1410 | } |
1411 | guarantee_online_mems(cs, to); | ||
1399 | 1412 | ||
1400 | /* do per-task migration stuff possibly for each in the threadgroup */ | 1413 | /* do per-task migration stuff possibly for each in the threadgroup */ |
1401 | cpuset_attach_task(tsk, &to, cs); | 1414 | cpuset_attach_task(tsk, to, cs); |
1402 | if (threadgroup) { | 1415 | if (threadgroup) { |
1403 | struct task_struct *c; | 1416 | struct task_struct *c; |
1404 | rcu_read_lock(); | 1417 | rcu_read_lock(); |
1405 | list_for_each_entry_rcu(c, &tsk->thread_group, thread_group) { | 1418 | list_for_each_entry_rcu(c, &tsk->thread_group, thread_group) { |
1406 | cpuset_attach_task(c, &to, cs); | 1419 | cpuset_attach_task(c, to, cs); |
1407 | } | 1420 | } |
1408 | rcu_read_unlock(); | 1421 | rcu_read_unlock(); |
1409 | } | 1422 | } |
1410 | 1423 | ||
1411 | /* change mm; only needs to be done once even if threadgroup */ | 1424 | /* change mm; only needs to be done once even if threadgroup */ |
1412 | from = oldcs->mems_allowed; | 1425 | *from = oldcs->mems_allowed; |
1413 | to = cs->mems_allowed; | 1426 | *to = cs->mems_allowed; |
1414 | mm = get_task_mm(tsk); | 1427 | mm = get_task_mm(tsk); |
1415 | if (mm) { | 1428 | if (mm) { |
1416 | mpol_rebind_mm(mm, &to); | 1429 | mpol_rebind_mm(mm, to); |
1417 | if (is_memory_migrate(cs)) | 1430 | if (is_memory_migrate(cs)) |
1418 | cpuset_migrate_mm(mm, &from, &to); | 1431 | cpuset_migrate_mm(mm, from, to); |
1419 | mmput(mm); | 1432 | mmput(mm); |
1420 | } | 1433 | } |
1434 | |||
1435 | alloc_fail: | ||
1436 | NODEMASK_FREE(from); | ||
1437 | NODEMASK_FREE(to); | ||
1421 | } | 1438 | } |
1422 | 1439 | ||
1423 | /* The various types of files and directories in a cpuset file system */ | 1440 | /* The various types of files and directories in a cpuset file system */ |
@@ -1562,13 +1579,21 @@ static int cpuset_sprintf_cpulist(char *page, struct cpuset *cs) | |||
1562 | 1579 | ||
1563 | static int cpuset_sprintf_memlist(char *page, struct cpuset *cs) | 1580 | static int cpuset_sprintf_memlist(char *page, struct cpuset *cs) |
1564 | { | 1581 | { |
1565 | nodemask_t mask; | 1582 | NODEMASK_ALLOC(nodemask_t, mask, GFP_KERNEL); |
1583 | int retval; | ||
1584 | |||
1585 | if (mask == NULL) | ||
1586 | return -ENOMEM; | ||
1566 | 1587 | ||
1567 | mutex_lock(&callback_mutex); | 1588 | mutex_lock(&callback_mutex); |
1568 | mask = cs->mems_allowed; | 1589 | *mask = cs->mems_allowed; |
1569 | mutex_unlock(&callback_mutex); | 1590 | mutex_unlock(&callback_mutex); |
1570 | 1591 | ||
1571 | return nodelist_scnprintf(page, PAGE_SIZE, mask); | 1592 | retval = nodelist_scnprintf(page, PAGE_SIZE, *mask); |
1593 | |||
1594 | NODEMASK_FREE(mask); | ||
1595 | |||
1596 | return retval; | ||
1572 | } | 1597 | } |
1573 | 1598 | ||
1574 | static ssize_t cpuset_common_file_read(struct cgroup *cont, | 1599 | static ssize_t cpuset_common_file_read(struct cgroup *cont, |
@@ -1997,7 +2022,10 @@ static void scan_for_empty_cpusets(struct cpuset *root) | |||
1997 | struct cpuset *cp; /* scans cpusets being updated */ | 2022 | struct cpuset *cp; /* scans cpusets being updated */ |
1998 | struct cpuset *child; /* scans child cpusets of cp */ | 2023 | struct cpuset *child; /* scans child cpusets of cp */ |
1999 | struct cgroup *cont; | 2024 | struct cgroup *cont; |
2000 | nodemask_t oldmems; | 2025 | NODEMASK_ALLOC(nodemask_t, oldmems, GFP_KERNEL); |
2026 | |||
2027 | if (oldmems == NULL) | ||
2028 | return; | ||
2001 | 2029 | ||
2002 | list_add_tail((struct list_head *)&root->stack_list, &queue); | 2030 | list_add_tail((struct list_head *)&root->stack_list, &queue); |
2003 | 2031 | ||
@@ -2014,7 +2042,7 @@ static void scan_for_empty_cpusets(struct cpuset *root) | |||
2014 | nodes_subset(cp->mems_allowed, node_states[N_HIGH_MEMORY])) | 2042 | nodes_subset(cp->mems_allowed, node_states[N_HIGH_MEMORY])) |
2015 | continue; | 2043 | continue; |
2016 | 2044 | ||
2017 | oldmems = cp->mems_allowed; | 2045 | *oldmems = cp->mems_allowed; |
2018 | 2046 | ||
2019 | /* Remove offline cpus and mems from this cpuset. */ | 2047 | /* Remove offline cpus and mems from this cpuset. */ |
2020 | mutex_lock(&callback_mutex); | 2048 | mutex_lock(&callback_mutex); |
@@ -2030,9 +2058,10 @@ static void scan_for_empty_cpusets(struct cpuset *root) | |||
2030 | remove_tasks_in_empty_cpuset(cp); | 2058 | remove_tasks_in_empty_cpuset(cp); |
2031 | else { | 2059 | else { |
2032 | update_tasks_cpumask(cp, NULL); | 2060 | update_tasks_cpumask(cp, NULL); |
2033 | update_tasks_nodemask(cp, &oldmems, NULL); | 2061 | update_tasks_nodemask(cp, oldmems, NULL); |
2034 | } | 2062 | } |
2035 | } | 2063 | } |
2064 | NODEMASK_FREE(oldmems); | ||
2036 | } | 2065 | } |
2037 | 2066 | ||
2038 | /* | 2067 | /* |
@@ -2090,20 +2119,33 @@ static int cpuset_track_online_cpus(struct notifier_block *unused_nb, | |||
2090 | static int cpuset_track_online_nodes(struct notifier_block *self, | 2119 | static int cpuset_track_online_nodes(struct notifier_block *self, |
2091 | unsigned long action, void *arg) | 2120 | unsigned long action, void *arg) |
2092 | { | 2121 | { |
2122 | NODEMASK_ALLOC(nodemask_t, oldmems, GFP_KERNEL); | ||
2123 | |||
2124 | if (oldmems == NULL) | ||
2125 | return NOTIFY_DONE; | ||
2126 | |||
2093 | cgroup_lock(); | 2127 | cgroup_lock(); |
2094 | switch (action) { | 2128 | switch (action) { |
2095 | case MEM_ONLINE: | 2129 | case MEM_ONLINE: |
2096 | case MEM_OFFLINE: | 2130 | *oldmems = top_cpuset.mems_allowed; |
2097 | mutex_lock(&callback_mutex); | 2131 | mutex_lock(&callback_mutex); |
2098 | top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY]; | 2132 | top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY]; |
2099 | mutex_unlock(&callback_mutex); | 2133 | mutex_unlock(&callback_mutex); |
2100 | if (action == MEM_OFFLINE) | 2134 | update_tasks_nodemask(&top_cpuset, oldmems, NULL); |
2101 | scan_for_empty_cpusets(&top_cpuset); | 2135 | break; |
2136 | case MEM_OFFLINE: | ||
2137 | /* | ||
2138 | * needn't update top_cpuset.mems_allowed explicitly because | ||
2139 | * scan_for_empty_cpusets() will update it. | ||
2140 | */ | ||
2141 | scan_for_empty_cpusets(&top_cpuset); | ||
2102 | break; | 2142 | break; |
2103 | default: | 2143 | default: |
2104 | break; | 2144 | break; |
2105 | } | 2145 | } |
2106 | cgroup_unlock(); | 2146 | cgroup_unlock(); |
2147 | |||
2148 | NODEMASK_FREE(oldmems); | ||
2107 | return NOTIFY_OK; | 2149 | return NOTIFY_OK; |
2108 | } | 2150 | } |
2109 | #endif | 2151 | #endif |
diff --git a/kernel/kthread.c b/kernel/kthread.c index 82ed0ea15194..83911c780175 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c | |||
@@ -219,7 +219,7 @@ int kthreadd(void *unused) | |||
219 | set_task_comm(tsk, "kthreadd"); | 219 | set_task_comm(tsk, "kthreadd"); |
220 | ignore_signals(tsk); | 220 | ignore_signals(tsk); |
221 | set_cpus_allowed_ptr(tsk, cpu_all_mask); | 221 | set_cpus_allowed_ptr(tsk, cpu_all_mask); |
222 | set_mems_allowed(node_possible_map); | 222 | set_mems_allowed(node_states[N_HIGH_MEMORY]); |
223 | 223 | ||
224 | current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG; | 224 | current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG; |
225 | 225 | ||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 8e5ec5e1ab91..1fafb4b99c9b 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -103,7 +103,8 @@ config HEADERS_CHECK | |||
103 | 103 | ||
104 | config DEBUG_SECTION_MISMATCH | 104 | config DEBUG_SECTION_MISMATCH |
105 | bool "Enable full Section mismatch analysis" | 105 | bool "Enable full Section mismatch analysis" |
106 | depends on UNDEFINED | 106 | depends on UNDEFINED || (BLACKFIN) |
107 | default y | ||
107 | # This option is on purpose disabled for now. | 108 | # This option is on purpose disabled for now. |
108 | # It will be enabled when we are down to a reasonable number | 109 | # It will be enabled when we are down to a reasonable number |
109 | # of section mismatch warnings (< 10 for an allyesconfig build) | 110 | # of section mismatch warnings (< 10 for an allyesconfig build) |
@@ -751,7 +751,7 @@ static int write_protect_page(struct vm_area_struct *vma, struct page *page, | |||
751 | * page | 751 | * page |
752 | */ | 752 | */ |
753 | if (page_mapcount(page) + 1 + swapped != page_count(page)) { | 753 | if (page_mapcount(page) + 1 + swapped != page_count(page)) { |
754 | set_pte_at_notify(mm, addr, ptep, entry); | 754 | set_pte_at(mm, addr, ptep, entry); |
755 | goto out_unlock; | 755 | goto out_unlock; |
756 | } | 756 | } |
757 | entry = pte_wrprotect(entry); | 757 | entry = pte_wrprotect(entry); |
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 7973b5221fb8..9ed760dc7448 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -3691,8 +3691,10 @@ static struct mem_cgroup *mem_cgroup_alloc(void) | |||
3691 | else | 3691 | else |
3692 | mem = vmalloc(size); | 3692 | mem = vmalloc(size); |
3693 | 3693 | ||
3694 | if (mem) | 3694 | if (!mem) |
3695 | memset(mem, 0, size); | 3695 | return NULL; |
3696 | |||
3697 | memset(mem, 0, size); | ||
3696 | mem->stat = alloc_percpu(struct mem_cgroup_stat_cpu); | 3698 | mem->stat = alloc_percpu(struct mem_cgroup_stat_cpu); |
3697 | if (!mem->stat) { | 3699 | if (!mem->stat) { |
3698 | if (size < PAGE_SIZE) | 3700 | if (size < PAGE_SIZE) |
@@ -3946,28 +3948,6 @@ one_by_one: | |||
3946 | } | 3948 | } |
3947 | return ret; | 3949 | return ret; |
3948 | } | 3950 | } |
3949 | #else /* !CONFIG_MMU */ | ||
3950 | static int mem_cgroup_can_attach(struct cgroup_subsys *ss, | ||
3951 | struct cgroup *cgroup, | ||
3952 | struct task_struct *p, | ||
3953 | bool threadgroup) | ||
3954 | { | ||
3955 | return 0; | ||
3956 | } | ||
3957 | static void mem_cgroup_cancel_attach(struct cgroup_subsys *ss, | ||
3958 | struct cgroup *cgroup, | ||
3959 | struct task_struct *p, | ||
3960 | bool threadgroup) | ||
3961 | { | ||
3962 | } | ||
3963 | static void mem_cgroup_move_task(struct cgroup_subsys *ss, | ||
3964 | struct cgroup *cont, | ||
3965 | struct cgroup *old_cont, | ||
3966 | struct task_struct *p, | ||
3967 | bool threadgroup) | ||
3968 | { | ||
3969 | } | ||
3970 | #endif | ||
3971 | 3951 | ||
3972 | /** | 3952 | /** |
3973 | * is_target_pte_for_mc - check a pte whether it is valid for move charge | 3953 | * is_target_pte_for_mc - check a pte whether it is valid for move charge |
@@ -4330,6 +4310,28 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss, | |||
4330 | } | 4310 | } |
4331 | mem_cgroup_clear_mc(); | 4311 | mem_cgroup_clear_mc(); |
4332 | } | 4312 | } |
4313 | #else /* !CONFIG_MMU */ | ||
4314 | static int mem_cgroup_can_attach(struct cgroup_subsys *ss, | ||
4315 | struct cgroup *cgroup, | ||
4316 | struct task_struct *p, | ||
4317 | bool threadgroup) | ||
4318 | { | ||
4319 | return 0; | ||
4320 | } | ||
4321 | static void mem_cgroup_cancel_attach(struct cgroup_subsys *ss, | ||
4322 | struct cgroup *cgroup, | ||
4323 | struct task_struct *p, | ||
4324 | bool threadgroup) | ||
4325 | { | ||
4326 | } | ||
4327 | static void mem_cgroup_move_task(struct cgroup_subsys *ss, | ||
4328 | struct cgroup *cont, | ||
4329 | struct cgroup *old_cont, | ||
4330 | struct task_struct *p, | ||
4331 | bool threadgroup) | ||
4332 | { | ||
4333 | } | ||
4334 | #endif | ||
4333 | 4335 | ||
4334 | struct cgroup_subsys mem_cgroup_subsys = { | 4336 | struct cgroup_subsys mem_cgroup_subsys = { |
4335 | .name = "memory", | 4337 | .name = "memory", |
diff --git a/mm/memory.c b/mm/memory.c index 5b7f2002e54b..bc9ba5a1f5b9 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -130,6 +130,7 @@ void __sync_task_rss_stat(struct task_struct *task, struct mm_struct *mm) | |||
130 | 130 | ||
131 | for (i = 0; i < NR_MM_COUNTERS; i++) { | 131 | for (i = 0; i < NR_MM_COUNTERS; i++) { |
132 | if (task->rss_stat.count[i]) { | 132 | if (task->rss_stat.count[i]) { |
133 | BUG_ON(!mm); | ||
133 | add_mm_counter(mm, i, task->rss_stat.count[i]); | 134 | add_mm_counter(mm, i, task->rss_stat.count[i]); |
134 | task->rss_stat.count[i] = 0; | 135 | task->rss_stat.count[i] = 0; |
135 | } | 136 | } |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 643f66e10187..8034abd3a135 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -806,9 +806,13 @@ static long do_get_mempolicy(int *policy, nodemask_t *nmask, | |||
806 | 806 | ||
807 | err = 0; | 807 | err = 0; |
808 | if (nmask) { | 808 | if (nmask) { |
809 | task_lock(current); | 809 | if (mpol_store_user_nodemask(pol)) { |
810 | get_policy_nodemask(pol, nmask); | 810 | *nmask = pol->w.user_nodemask; |
811 | task_unlock(current); | 811 | } else { |
812 | task_lock(current); | ||
813 | get_policy_nodemask(pol, nmask); | ||
814 | task_unlock(current); | ||
815 | } | ||
812 | } | 816 | } |
813 | 817 | ||
814 | out: | 818 | out: |
@@ -2195,8 +2199,8 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2195 | char *rest = nodelist; | 2199 | char *rest = nodelist; |
2196 | while (isdigit(*rest)) | 2200 | while (isdigit(*rest)) |
2197 | rest++; | 2201 | rest++; |
2198 | if (!*rest) | 2202 | if (*rest) |
2199 | err = 0; | 2203 | goto out; |
2200 | } | 2204 | } |
2201 | break; | 2205 | break; |
2202 | case MPOL_INTERLEAVE: | 2206 | case MPOL_INTERLEAVE: |
@@ -2205,7 +2209,6 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2205 | */ | 2209 | */ |
2206 | if (!nodelist) | 2210 | if (!nodelist) |
2207 | nodes = node_states[N_HIGH_MEMORY]; | 2211 | nodes = node_states[N_HIGH_MEMORY]; |
2208 | err = 0; | ||
2209 | break; | 2212 | break; |
2210 | case MPOL_LOCAL: | 2213 | case MPOL_LOCAL: |
2211 | /* | 2214 | /* |
@@ -2215,11 +2218,19 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2215 | goto out; | 2218 | goto out; |
2216 | mode = MPOL_PREFERRED; | 2219 | mode = MPOL_PREFERRED; |
2217 | break; | 2220 | break; |
2218 | 2221 | case MPOL_DEFAULT: | |
2219 | /* | 2222 | /* |
2220 | * case MPOL_BIND: mpol_new() enforces non-empty nodemask. | 2223 | * Insist on a empty nodelist |
2221 | * case MPOL_DEFAULT: mpol_new() enforces empty nodemask, ignores flags. | 2224 | */ |
2222 | */ | 2225 | if (!nodelist) |
2226 | err = 0; | ||
2227 | goto out; | ||
2228 | case MPOL_BIND: | ||
2229 | /* | ||
2230 | * Insist on a nodelist | ||
2231 | */ | ||
2232 | if (!nodelist) | ||
2233 | goto out; | ||
2223 | } | 2234 | } |
2224 | 2235 | ||
2225 | mode_flags = 0; | 2236 | mode_flags = 0; |
@@ -2233,13 +2244,14 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2233 | else if (!strcmp(flags, "relative")) | 2244 | else if (!strcmp(flags, "relative")) |
2234 | mode_flags |= MPOL_F_RELATIVE_NODES; | 2245 | mode_flags |= MPOL_F_RELATIVE_NODES; |
2235 | else | 2246 | else |
2236 | err = 1; | 2247 | goto out; |
2237 | } | 2248 | } |
2238 | 2249 | ||
2239 | new = mpol_new(mode, mode_flags, &nodes); | 2250 | new = mpol_new(mode, mode_flags, &nodes); |
2240 | if (IS_ERR(new)) | 2251 | if (IS_ERR(new)) |
2241 | err = 1; | 2252 | goto out; |
2242 | else { | 2253 | |
2254 | { | ||
2243 | int ret; | 2255 | int ret; |
2244 | NODEMASK_SCRATCH(scratch); | 2256 | NODEMASK_SCRATCH(scratch); |
2245 | if (scratch) { | 2257 | if (scratch) { |
@@ -2250,13 +2262,15 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context) | |||
2250 | ret = -ENOMEM; | 2262 | ret = -ENOMEM; |
2251 | NODEMASK_SCRATCH_FREE(scratch); | 2263 | NODEMASK_SCRATCH_FREE(scratch); |
2252 | if (ret) { | 2264 | if (ret) { |
2253 | err = 1; | ||
2254 | mpol_put(new); | 2265 | mpol_put(new); |
2255 | } else if (no_context) { | 2266 | goto out; |
2256 | /* save for contextualization */ | ||
2257 | new->w.user_nodemask = nodes; | ||
2258 | } | 2267 | } |
2259 | } | 2268 | } |
2269 | err = 0; | ||
2270 | if (no_context) { | ||
2271 | /* save for contextualization */ | ||
2272 | new->w.user_nodemask = nodes; | ||
2273 | } | ||
2260 | 2274 | ||
2261 | out: | 2275 | out: |
2262 | /* Restore string for error message */ | 2276 | /* Restore string for error message */ |
diff --git a/mm/mmu_context.c b/mm/mmu_context.c index 0777654147c9..9e82e937000e 100644 --- a/mm/mmu_context.c +++ b/mm/mmu_context.c | |||
@@ -53,6 +53,7 @@ void unuse_mm(struct mm_struct *mm) | |||
53 | struct task_struct *tsk = current; | 53 | struct task_struct *tsk = current; |
54 | 54 | ||
55 | task_lock(tsk); | 55 | task_lock(tsk); |
56 | sync_mm_rss(tsk, mm); | ||
56 | tsk->mm = NULL; | 57 | tsk->mm = NULL; |
57 | /* active_mm is still 'mm' */ | 58 | /* active_mm is still 'mm' */ |
58 | enter_lazy_tlb(mm, tsk); | 59 | enter_lazy_tlb(mm, tsk); |
diff --git a/mm/nommu.c b/mm/nommu.c index 605ace8982a8..e4b8f4d28a3f 100644 --- a/mm/nommu.c +++ b/mm/nommu.c | |||
@@ -1040,10 +1040,9 @@ static int do_mmap_shared_file(struct vm_area_struct *vma) | |||
1040 | if (ret != -ENOSYS) | 1040 | if (ret != -ENOSYS) |
1041 | return ret; | 1041 | return ret; |
1042 | 1042 | ||
1043 | /* getting an ENOSYS error indicates that direct mmap isn't | 1043 | /* getting -ENOSYS indicates that direct mmap isn't possible (as |
1044 | * possible (as opposed to tried but failed) so we'll fall | 1044 | * opposed to tried but failed) so we can only give a suitable error as |
1045 | * through to making a private copy of the data and mapping | 1045 | * it's not possible to make a private copy if MAP_SHARED was given */ |
1046 | * that if we can */ | ||
1047 | return -ENODEV; | 1046 | return -ENODEV; |
1048 | } | 1047 | } |
1049 | 1048 | ||
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index 0cfccc2a0297..c389ccf6437d 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -1280,9 +1280,8 @@ alloc_enc_pages(struct rpc_rqst *rqstp) | |||
1280 | rqstp->rq_release_snd_buf = priv_release_snd_buf; | 1280 | rqstp->rq_release_snd_buf = priv_release_snd_buf; |
1281 | return 0; | 1281 | return 0; |
1282 | out_free: | 1282 | out_free: |
1283 | for (i--; i >= 0; i--) { | 1283 | rqstp->rq_enc_pages_num = i; |
1284 | __free_page(rqstp->rq_enc_pages[i]); | 1284 | priv_release_snd_buf(rqstp); |
1285 | } | ||
1286 | out: | 1285 | out: |
1287 | return -EAGAIN; | 1286 | return -EAGAIN; |
1288 | } | 1287 | } |
diff --git a/net/sunrpc/bc_svc.c b/net/sunrpc/bc_svc.c index 13f214f53120..f0c05d3311c1 100644 --- a/net/sunrpc/bc_svc.c +++ b/net/sunrpc/bc_svc.c | |||
@@ -37,21 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
37 | 37 | ||
38 | #define RPCDBG_FACILITY RPCDBG_SVCDSP | 38 | #define RPCDBG_FACILITY RPCDBG_SVCDSP |
39 | 39 | ||
40 | void bc_release_request(struct rpc_task *task) | ||
41 | { | ||
42 | struct rpc_rqst *req = task->tk_rqstp; | ||
43 | |||
44 | dprintk("RPC: bc_release_request: task= %p\n", task); | ||
45 | |||
46 | /* | ||
47 | * Release this request only if it's a backchannel | ||
48 | * preallocated request | ||
49 | */ | ||
50 | if (!bc_prealloc(req)) | ||
51 | return; | ||
52 | xprt_free_bc_request(req); | ||
53 | } | ||
54 | |||
55 | /* Empty callback ops */ | 40 | /* Empty callback ops */ |
56 | static const struct rpc_call_ops nfs41_callback_ops = { | 41 | static const struct rpc_call_ops nfs41_callback_ops = { |
57 | }; | 42 | }; |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 154034b675bd..19c9983d5360 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -659,6 +659,7 @@ struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req, | |||
659 | task = rpc_new_task(&task_setup_data); | 659 | task = rpc_new_task(&task_setup_data); |
660 | if (!task) { | 660 | if (!task) { |
661 | xprt_free_bc_request(req); | 661 | xprt_free_bc_request(req); |
662 | task = ERR_PTR(-ENOMEM); | ||
662 | goto out; | 663 | goto out; |
663 | } | 664 | } |
664 | task->tk_rqstp = req; | 665 | task->tk_rqstp = req; |
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 8d63f8fd29b7..20e30c6f8355 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -587,6 +587,8 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent, | |||
587 | struct dentry *dentry; | 587 | struct dentry *dentry; |
588 | 588 | ||
589 | dentry = __rpc_lookup_create(parent, name); | 589 | dentry = __rpc_lookup_create(parent, name); |
590 | if (IS_ERR(dentry)) | ||
591 | return dentry; | ||
590 | if (dentry->d_inode == NULL) | 592 | if (dentry->d_inode == NULL) |
591 | return dentry; | 593 | return dentry; |
592 | dput(dentry); | 594 | dput(dentry); |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 469de292c23c..42f09ade0044 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -46,6 +46,7 @@ | |||
46 | 46 | ||
47 | #include <linux/sunrpc/clnt.h> | 47 | #include <linux/sunrpc/clnt.h> |
48 | #include <linux/sunrpc/metrics.h> | 48 | #include <linux/sunrpc/metrics.h> |
49 | #include <linux/sunrpc/bc_xprt.h> | ||
49 | 50 | ||
50 | #include "sunrpc.h" | 51 | #include "sunrpc.h" |
51 | 52 | ||
@@ -1032,21 +1033,16 @@ void xprt_release(struct rpc_task *task) | |||
1032 | if (req->rq_release_snd_buf) | 1033 | if (req->rq_release_snd_buf) |
1033 | req->rq_release_snd_buf(req); | 1034 | req->rq_release_snd_buf(req); |
1034 | 1035 | ||
1035 | /* | ||
1036 | * Early exit if this is a backchannel preallocated request. | ||
1037 | * There is no need to have it added to the RPC slot list. | ||
1038 | */ | ||
1039 | if (is_bc_request) | ||
1040 | return; | ||
1041 | |||
1042 | memset(req, 0, sizeof(*req)); /* mark unused */ | ||
1043 | |||
1044 | dprintk("RPC: %5u release request %p\n", task->tk_pid, req); | 1036 | dprintk("RPC: %5u release request %p\n", task->tk_pid, req); |
1037 | if (likely(!is_bc_request)) { | ||
1038 | memset(req, 0, sizeof(*req)); /* mark unused */ | ||
1045 | 1039 | ||
1046 | spin_lock(&xprt->reserve_lock); | 1040 | spin_lock(&xprt->reserve_lock); |
1047 | list_add(&req->rq_list, &xprt->free); | 1041 | list_add(&req->rq_list, &xprt->free); |
1048 | rpc_wake_up_next(&xprt->backlog); | 1042 | rpc_wake_up_next(&xprt->backlog); |
1049 | spin_unlock(&xprt->reserve_lock); | 1043 | spin_unlock(&xprt->reserve_lock); |
1044 | } else | ||
1045 | xprt_free_bc_request(req); | ||
1050 | } | 1046 | } |
1051 | 1047 | ||
1052 | /** | 1048 | /** |
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index e4839c07c913..9847c30b5001 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -2251,9 +2251,6 @@ static struct rpc_xprt_ops xs_tcp_ops = { | |||
2251 | .buf_free = rpc_free, | 2251 | .buf_free = rpc_free, |
2252 | .send_request = xs_tcp_send_request, | 2252 | .send_request = xs_tcp_send_request, |
2253 | .set_retrans_timeout = xprt_set_retrans_timeout_def, | 2253 | .set_retrans_timeout = xprt_set_retrans_timeout_def, |
2254 | #if defined(CONFIG_NFS_V4_1) | ||
2255 | .release_request = bc_release_request, | ||
2256 | #endif /* CONFIG_NFS_V4_1 */ | ||
2257 | .close = xs_tcp_close, | 2254 | .close = xs_tcp_close, |
2258 | .destroy = xs_destroy, | 2255 | .destroy = xs_destroy, |
2259 | .print_stats = xs_tcp_print_stats, | 2256 | .print_stats = xs_tcp_print_stats, |
diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl index f76f3d13276d..6f97a13bcee4 100755 --- a/scripts/get_maintainer.pl +++ b/scripts/get_maintainer.pl | |||
@@ -284,7 +284,7 @@ foreach my $file (@ARGV) { | |||
284 | my $file_cnt = @files; | 284 | my $file_cnt = @files; |
285 | my $lastfile; | 285 | my $lastfile; |
286 | 286 | ||
287 | open(my $patch, '<', $file) | 287 | open(my $patch, "< $file") |
288 | or die "$P: Can't open $file: $!\n"; | 288 | or die "$P: Can't open $file: $!\n"; |
289 | while (<$patch>) { | 289 | while (<$patch>) { |
290 | my $patch_line = $_; | 290 | my $patch_line = $_; |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index c7865c362d28..fcdfb245a575 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -1424,6 +1424,8 @@ sub dump_struct($$) { | |||
1424 | $nested =~ s/\/\*.*?\*\///gos; | 1424 | $nested =~ s/\/\*.*?\*\///gos; |
1425 | # strip kmemcheck_bitfield_{begin,end}.*; | 1425 | # strip kmemcheck_bitfield_{begin,end}.*; |
1426 | $members =~ s/kmemcheck_bitfield_.*?;//gos; | 1426 | $members =~ s/kmemcheck_bitfield_.*?;//gos; |
1427 | # strip attributes | ||
1428 | $members =~ s/__aligned\s*\(\d+\)//gos; | ||
1427 | 1429 | ||
1428 | create_parameterlist($members, ';', $file); | 1430 | create_parameterlist($members, ';', $file); |
1429 | check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested); | 1431 | check_sections($file, $declaration_name, "struct", $sectcheck, $struct_actual, $nested); |
@@ -1728,6 +1730,7 @@ sub dump_function($$) { | |||
1728 | $prototype =~ s/^noinline +//; | 1730 | $prototype =~ s/^noinline +//; |
1729 | $prototype =~ s/__devinit +//; | 1731 | $prototype =~ s/__devinit +//; |
1730 | $prototype =~ s/__init +//; | 1732 | $prototype =~ s/__init +//; |
1733 | $prototype =~ s/__init_or_module +//; | ||
1731 | $prototype =~ s/^#\s*define\s+//; #ak added | 1734 | $prototype =~ s/^#\s*define\s+//; #ak added |
1732 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; | 1735 | $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//; |
1733 | 1736 | ||
diff --git a/sound/arm/pxa2xx-pcm-lib.c b/sound/arm/pxa2xx-pcm-lib.c index 743ac6a29065..fd51fa8b06a1 100644 --- a/sound/arm/pxa2xx-pcm-lib.c +++ b/sound/arm/pxa2xx-pcm-lib.c | |||
@@ -205,6 +205,7 @@ int __pxa2xx_pcm_open(struct snd_pcm_substream *substream) | |||
205 | if (!rtd->dma_desc_array) | 205 | if (!rtd->dma_desc_array) |
206 | goto err1; | 206 | goto err1; |
207 | 207 | ||
208 | rtd->dma_ch = -1; | ||
208 | runtime->private_data = rtd; | 209 | runtime->private_data = rtd; |
209 | return 0; | 210 | return 0; |
210 | 211 | ||
diff --git a/sound/oss/vidc.c b/sound/oss/vidc.c index 725fef0f59a3..a4127bab9231 100644 --- a/sound/oss/vidc.c +++ b/sound/oss/vidc.c | |||
@@ -363,13 +363,13 @@ static void vidc_audio_trigger(int dev, int enable_bits) | |||
363 | struct audio_operations *adev = audio_devs[dev]; | 363 | struct audio_operations *adev = audio_devs[dev]; |
364 | 364 | ||
365 | if (enable_bits & PCM_ENABLE_OUTPUT) { | 365 | if (enable_bits & PCM_ENABLE_OUTPUT) { |
366 | if (!(adev->flags & DMA_ACTIVE)) { | 366 | if (!(adev->dmap_out->flags & DMA_ACTIVE)) { |
367 | unsigned long flags; | 367 | unsigned long flags; |
368 | 368 | ||
369 | local_irq_save(flags); | 369 | local_irq_save(flags); |
370 | 370 | ||
371 | /* prevent recusion */ | 371 | /* prevent recusion */ |
372 | adev->flags |= DMA_ACTIVE; | 372 | adev->dmap_out->flags |= DMA_ACTIVE; |
373 | 373 | ||
374 | dma_interrupt = vidc_audio_dma_interrupt; | 374 | dma_interrupt = vidc_audio_dma_interrupt; |
375 | vidc_sound_dma_irq(0, NULL); | 375 | vidc_sound_dma_irq(0, NULL); |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 1ded64e05643..329968edca9b 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -941,13 +941,21 @@ static snd_pcm_uframes_t snd_cmipci_pcm_pointer(struct cmipci *cm, struct cmipci | |||
941 | struct snd_pcm_substream *substream) | 941 | struct snd_pcm_substream *substream) |
942 | { | 942 | { |
943 | size_t ptr; | 943 | size_t ptr; |
944 | unsigned int reg; | 944 | unsigned int reg, rem, tries; |
945 | |||
945 | if (!rec->running) | 946 | if (!rec->running) |
946 | return 0; | 947 | return 0; |
947 | #if 1 // this seems better.. | 948 | #if 1 // this seems better.. |
948 | reg = rec->ch ? CM_REG_CH1_FRAME2 : CM_REG_CH0_FRAME2; | 949 | reg = rec->ch ? CM_REG_CH1_FRAME2 : CM_REG_CH0_FRAME2; |
949 | ptr = rec->dma_size - (snd_cmipci_read_w(cm, reg) + 1); | 950 | for (tries = 0; tries < 3; tries++) { |
950 | ptr >>= rec->shift; | 951 | rem = snd_cmipci_read_w(cm, reg); |
952 | if (rem < rec->dma_size) | ||
953 | goto ok; | ||
954 | } | ||
955 | printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem); | ||
956 | return SNDRV_PCM_POS_XRUN; | ||
957 | ok: | ||
958 | ptr = (rec->dma_size - (rem + 1)) >> rec->shift; | ||
951 | #else | 959 | #else |
952 | reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1; | 960 | reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1; |
953 | ptr = snd_cmipci_read(cm, reg) - rec->offset; | 961 | ptr = snd_cmipci_read(cm, reg) - rec->offset; |
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 194a28c54992..61682e1d09da 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c | |||
@@ -1591,6 +1591,21 @@ static int patch_cxt5047(struct hda_codec *codec) | |||
1591 | #endif | 1591 | #endif |
1592 | } | 1592 | } |
1593 | spec->vmaster_nid = 0x13; | 1593 | spec->vmaster_nid = 0x13; |
1594 | |||
1595 | switch (codec->subsystem_id >> 16) { | ||
1596 | case 0x103c: | ||
1597 | /* HP laptops have really bad sound over 0 dB on NID 0x10. | ||
1598 | * Fix max PCM level to 0 dB (originally it has 0x1e steps | ||
1599 | * with 0 dB offset 0x17) | ||
1600 | */ | ||
1601 | snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT, | ||
1602 | (0x17 << AC_AMPCAP_OFFSET_SHIFT) | | ||
1603 | (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) | | ||
1604 | (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) | | ||
1605 | (1 << AC_AMPCAP_MUTE_SHIFT)); | ||
1606 | break; | ||
1607 | } | ||
1608 | |||
1594 | return 0; | 1609 | return 0; |
1595 | } | 1610 | } |
1596 | 1611 | ||
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index 70669a246902..3c10c0b149f4 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -538,8 +538,6 @@ static int patch_nvhdmi_2ch(struct hda_codec *codec) | |||
538 | * patch entries | 538 | * patch entries |
539 | */ | 539 | */ |
540 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | 540 | static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { |
541 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | ||
542 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, | ||
543 | { .id = 0x10de0002, .name = "MCP77/78 HDMI", | 541 | { .id = 0x10de0002, .name = "MCP77/78 HDMI", |
544 | .patch = patch_nvhdmi_8ch_7x }, | 542 | .patch = patch_nvhdmi_8ch_7x }, |
545 | { .id = 0x10de0003, .name = "MCP77/78 HDMI", | 543 | { .id = 0x10de0003, .name = "MCP77/78 HDMI", |
@@ -550,12 +548,16 @@ static struct hda_codec_preset snd_hda_preset_nvhdmi[] = { | |||
550 | .patch = patch_nvhdmi_8ch_7x }, | 548 | .patch = patch_nvhdmi_8ch_7x }, |
551 | { .id = 0x10de0007, .name = "MCP79/7A HDMI", | 549 | { .id = 0x10de0007, .name = "MCP79/7A HDMI", |
552 | .patch = patch_nvhdmi_8ch_7x }, | 550 | .patch = patch_nvhdmi_8ch_7x }, |
553 | { .id = 0x10de000c, .name = "MCP89 HDMI", | 551 | { .id = 0x10de000a, .name = "GT220 HDMI", |
554 | .patch = patch_nvhdmi_8ch_89 }, | 552 | .patch = patch_nvhdmi_8ch_89 }, |
555 | { .id = 0x10de000b, .name = "GT21x HDMI", | 553 | { .id = 0x10de000b, .name = "GT21x HDMI", |
556 | .patch = patch_nvhdmi_8ch_89 }, | 554 | .patch = patch_nvhdmi_8ch_89 }, |
555 | { .id = 0x10de000c, .name = "MCP89 HDMI", | ||
556 | .patch = patch_nvhdmi_8ch_89 }, | ||
557 | { .id = 0x10de000d, .name = "GT240 HDMI", | 557 | { .id = 0x10de000d, .name = "GT240 HDMI", |
558 | .patch = patch_nvhdmi_8ch_89 }, | 558 | .patch = patch_nvhdmi_8ch_89 }, |
559 | { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi_2ch }, | ||
560 | { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi_2ch }, | ||
559 | {} /* terminator */ | 561 | {} /* terminator */ |
560 | }; | 562 | }; |
561 | 563 | ||
@@ -564,11 +566,12 @@ MODULE_ALIAS("snd-hda-codec-id:10de0003"); | |||
564 | MODULE_ALIAS("snd-hda-codec-id:10de0005"); | 566 | MODULE_ALIAS("snd-hda-codec-id:10de0005"); |
565 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); | 567 | MODULE_ALIAS("snd-hda-codec-id:10de0006"); |
566 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); | 568 | MODULE_ALIAS("snd-hda-codec-id:10de0007"); |
567 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | 569 | MODULE_ALIAS("snd-hda-codec-id:10de000a"); |
568 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | ||
569 | MODULE_ALIAS("snd-hda-codec-id:10de000c"); | ||
570 | MODULE_ALIAS("snd-hda-codec-id:10de000b"); | 570 | MODULE_ALIAS("snd-hda-codec-id:10de000b"); |
571 | MODULE_ALIAS("snd-hda-codec-id:10de000c"); | ||
571 | MODULE_ALIAS("snd-hda-codec-id:10de000d"); | 572 | MODULE_ALIAS("snd-hda-codec-id:10de000d"); |
573 | MODULE_ALIAS("snd-hda-codec-id:10de0067"); | ||
574 | MODULE_ALIAS("snd-hda-codec-id:10de8001"); | ||
572 | 575 | ||
573 | MODULE_LICENSE("GPL"); | 576 | MODULE_LICENSE("GPL"); |
574 | MODULE_DESCRIPTION("NVIDIA HDMI HD-audio codec"); | 577 | MODULE_DESCRIPTION("NVIDIA HDMI HD-audio codec"); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 4ec57633af88..053d53d8c8b2 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -2532,8 +2532,6 @@ static int alc_build_controls(struct hda_codec *codec) | |||
2532 | return err; | 2532 | return err; |
2533 | } | 2533 | } |
2534 | 2534 | ||
2535 | alc_free_kctls(codec); /* no longer needed */ | ||
2536 | |||
2537 | /* assign Capture Source enums to NID */ | 2535 | /* assign Capture Source enums to NID */ |
2538 | kctl = snd_hda_find_mixer_ctl(codec, "Capture Source"); | 2536 | kctl = snd_hda_find_mixer_ctl(codec, "Capture Source"); |
2539 | if (!kctl) | 2537 | if (!kctl) |
@@ -2602,6 +2600,9 @@ static int alc_build_controls(struct hda_codec *codec) | |||
2602 | } | 2600 | } |
2603 | } | 2601 | } |
2604 | } | 2602 | } |
2603 | |||
2604 | alc_free_kctls(codec); /* no longer needed */ | ||
2605 | |||
2605 | return 0; | 2606 | return 0; |
2606 | } | 2607 | } |
2607 | 2608 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 8c416bb18a57..c4be3fab94e5 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -1730,6 +1730,8 @@ static struct snd_pci_quirk stac92hd71bxx_cfg_tbl[] = { | |||
1730 | "HP HDX", STAC_HP_HDX), /* HDX16 */ | 1730 | "HP HDX", STAC_HP_HDX), /* HDX16 */ |
1731 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620, | 1731 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x3620, |
1732 | "HP dv6", STAC_HP_DV5), | 1732 | "HP dv6", STAC_HP_DV5), |
1733 | SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x3061, | ||
1734 | "HP dv6", STAC_HP_DV5), /* HP dv6-1110ax */ | ||
1733 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, | 1735 | SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_HP, 0xfff0, 0x7010, |
1734 | "HP", STAC_HP_DV5), | 1736 | "HP", STAC_HP_DV5), |
1735 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, | 1737 | SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0233, |
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c index f9f367d29a90..d50f1699ccb2 100644 --- a/sound/soc/codecs/tlv320dac33.c +++ b/sound/soc/codecs/tlv320dac33.c | |||
@@ -778,7 +778,7 @@ static int dac33_prepare_chip(struct snd_pcm_substream *substream) | |||
778 | if (dac33->fifo_mode) { | 778 | if (dac33->fifo_mode) { |
779 | /* Generic for all FIFO modes */ | 779 | /* Generic for all FIFO modes */ |
780 | /* 50-51 : ASRC Control registers */ | 780 | /* 50-51 : ASRC Control registers */ |
781 | dac33_write(codec, DAC33_ASRC_CTRL_A, (1 << 4)); /* div=2 */ | 781 | dac33_write(codec, DAC33_ASRC_CTRL_A, DAC33_SRCLKDIV(1)); |
782 | dac33_write(codec, DAC33_ASRC_CTRL_B, 1); /* ??? */ | 782 | dac33_write(codec, DAC33_ASRC_CTRL_B, 1); /* ??? */ |
783 | 783 | ||
784 | /* Write registers 0x34 and 0x35 (MSB, LSB) */ | 784 | /* Write registers 0x34 and 0x35 (MSB, LSB) */ |
@@ -1038,11 +1038,7 @@ static int dac33_set_dai_fmt(struct snd_soc_dai *codec_dai, | |||
1038 | case SND_SOC_DAIFMT_DSP_A: | 1038 | case SND_SOC_DAIFMT_DSP_A: |
1039 | aictrl_a |= DAC33_AFMT_DSP; | 1039 | aictrl_a |= DAC33_AFMT_DSP; |
1040 | aictrl_b &= ~DAC33_DATA_DELAY_MASK; | 1040 | aictrl_b &= ~DAC33_DATA_DELAY_MASK; |
1041 | aictrl_b |= DAC33_DATA_DELAY(1); /* 1 bit delay */ | 1041 | aictrl_b |= DAC33_DATA_DELAY(0); |
1042 | break; | ||
1043 | case SND_SOC_DAIFMT_DSP_B: | ||
1044 | aictrl_a |= DAC33_AFMT_DSP; | ||
1045 | aictrl_b &= ~DAC33_DATA_DELAY_MASK; /* No delay */ | ||
1046 | break; | 1042 | break; |
1047 | case SND_SOC_DAIFMT_RIGHT_J: | 1043 | case SND_SOC_DAIFMT_RIGHT_J: |
1048 | aictrl_a |= DAC33_AFMT_RIGHT_J; | 1044 | aictrl_a |= DAC33_AFMT_RIGHT_J; |
@@ -1066,7 +1062,7 @@ static void dac33_init_chip(struct snd_soc_codec *codec) | |||
1066 | { | 1062 | { |
1067 | /* 44-46: DAC Control Registers */ | 1063 | /* 44-46: DAC Control Registers */ |
1068 | /* A : DAC sample rate Fsref/1.5 */ | 1064 | /* A : DAC sample rate Fsref/1.5 */ |
1069 | dac33_write(codec, DAC33_DAC_CTRL_A, DAC33_DACRATE(1)); | 1065 | dac33_write(codec, DAC33_DAC_CTRL_A, DAC33_DACRATE(0)); |
1070 | /* B : DAC src=normal, not muted */ | 1066 | /* B : DAC src=normal, not muted */ |
1071 | dac33_write(codec, DAC33_DAC_CTRL_B, DAC33_DACSRCR_RIGHT | | 1067 | dac33_write(codec, DAC33_DAC_CTRL_B, DAC33_DACSRCR_RIGHT | |
1072 | DAC33_DACSRCL_LEFT); | 1068 | DAC33_DACSRCL_LEFT); |
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c index 0ad9f5d536c6..486bdd21a98a 100644 --- a/sound/soc/codecs/wm_hubs.c +++ b/sound/soc/codecs/wm_hubs.c | |||
@@ -74,7 +74,7 @@ static void wait_for_dc_servo(struct snd_soc_codec *codec) | |||
74 | msleep(1); | 74 | msleep(1); |
75 | reg = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_0); | 75 | reg = snd_soc_read(codec, WM8993_DC_SERVO_READBACK_0); |
76 | dev_dbg(codec->dev, "DC servo: %x\n", reg); | 76 | dev_dbg(codec->dev, "DC servo: %x\n", reg); |
77 | } while (reg & WM8993_DCS_DATAPATH_BUSY); | 77 | } while (reg & WM8993_DCS_DATAPATH_BUSY && count < 400); |
78 | 78 | ||
79 | if (reg & WM8993_DCS_DATAPATH_BUSY) | 79 | if (reg & WM8993_DCS_DATAPATH_BUSY) |
80 | dev_err(codec->dev, "Timed out waiting for DC Servo\n"); | 80 | dev_err(codec->dev, "Timed out waiting for DC Servo\n"); |
diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig index c7d0fd9b7de8..7174b4c710de 100644 --- a/sound/soc/imx/Kconfig +++ b/sound/soc/imx/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config SND_IMX_SOC | 1 | config SND_IMX_SOC |
2 | tristate "SoC Audio for Freescale i.MX CPUs" | 2 | tristate "SoC Audio for Freescale i.MX CPUs" |
3 | depends on ARCH_MXC && BROKEN | 3 | depends on ARCH_MXC |
4 | select SND_PCM | 4 | select SND_PCM |
5 | select FIQ | 5 | select FIQ |
6 | select SND_SOC_AC97_BUS | 6 | select SND_SOC_AC97_BUS |
diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig index 106674979b53..f07f6d8b93e1 100644 --- a/sound/soc/sh/Kconfig +++ b/sound/soc/sh/Kconfig | |||
@@ -32,6 +32,7 @@ config SND_SOC_SH4_SIU | |||
32 | select DMA_ENGINE | 32 | select DMA_ENGINE |
33 | select DMADEVICES | 33 | select DMADEVICES |
34 | select SH_DMAE | 34 | select SH_DMAE |
35 | select FW_LOADER | ||
35 | 36 | ||
36 | ## | 37 | ## |
37 | ## Boards | 38 | ## Boards |