diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/common/gic.c | 4 | ||||
-rw-r--r-- | arch/arm/include/asm/atomic.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/bitsperlong.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/cache.h | 16 | ||||
-rw-r--r-- | arch/arm/include/asm/mman.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/page.h | 9 | ||||
-rw-r--r-- | arch/arm/include/asm/signal.h | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/suspend.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-mx2/clock_imx21.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx2/clock_imx27.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/clock-imx35.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx3/clock.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/devices.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-pxa/imote2.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/proc-v7.S | 36 | ||||
-rw-r--r-- | arch/arm/plat-mxc/include/mach/imx-uart.h | 5 | ||||
-rw-r--r-- | arch/arm/plat-omap/mailbox.c | 63 |
17 files changed, 103 insertions, 56 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 3e1714c6523f..664c7b8b1ba8 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c | |||
@@ -109,7 +109,7 @@ static void gic_unmask_irq(unsigned int irq) | |||
109 | } | 109 | } |
110 | 110 | ||
111 | #ifdef CONFIG_SMP | 111 | #ifdef CONFIG_SMP |
112 | static void gic_set_cpu(unsigned int irq, const struct cpumask *mask_val) | 112 | static int gic_set_cpu(unsigned int irq, const struct cpumask *mask_val) |
113 | { | 113 | { |
114 | void __iomem *reg = gic_dist_base(irq) + GIC_DIST_TARGET + (gic_irq(irq) & ~3); | 114 | void __iomem *reg = gic_dist_base(irq) + GIC_DIST_TARGET + (gic_irq(irq) & ~3); |
115 | unsigned int shift = (irq % 4) * 8; | 115 | unsigned int shift = (irq % 4) * 8; |
@@ -122,6 +122,8 @@ static void gic_set_cpu(unsigned int irq, const struct cpumask *mask_val) | |||
122 | val |= 1 << (cpu + shift); | 122 | val |= 1 << (cpu + shift); |
123 | writel(val, reg); | 123 | writel(val, reg); |
124 | spin_unlock(&irq_controller_lock); | 124 | spin_unlock(&irq_controller_lock); |
125 | |||
126 | return 0; | ||
125 | } | 127 | } |
126 | #endif | 128 | #endif |
127 | 129 | ||
diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h index 16b52f397983..9e07fe507029 100644 --- a/arch/arm/include/asm/atomic.h +++ b/arch/arm/include/asm/atomic.h | |||
@@ -249,6 +249,6 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) | |||
249 | #define smp_mb__before_atomic_inc() smp_mb() | 249 | #define smp_mb__before_atomic_inc() smp_mb() |
250 | #define smp_mb__after_atomic_inc() smp_mb() | 250 | #define smp_mb__after_atomic_inc() smp_mb() |
251 | 251 | ||
252 | #include <asm-generic/atomic.h> | 252 | #include <asm-generic/atomic-long.h> |
253 | #endif | 253 | #endif |
254 | #endif | 254 | #endif |
diff --git a/arch/arm/include/asm/bitsperlong.h b/arch/arm/include/asm/bitsperlong.h new file mode 100644 index 000000000000..6dc0bb0c13b2 --- /dev/null +++ b/arch/arm/include/asm/bitsperlong.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-generic/bitsperlong.h> | |||
diff --git a/arch/arm/include/asm/cache.h b/arch/arm/include/asm/cache.h index cb7a9e97fd7e..feaa75f0013e 100644 --- a/arch/arm/include/asm/cache.h +++ b/arch/arm/include/asm/cache.h | |||
@@ -7,4 +7,20 @@ | |||
7 | #define L1_CACHE_SHIFT 5 | 7 | #define L1_CACHE_SHIFT 5 |
8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
9 | 9 | ||
10 | /* | ||
11 | * Memory returned by kmalloc() may be used for DMA, so we must make | ||
12 | * sure that all such allocations are cache aligned. Otherwise, | ||
13 | * unrelated code may cause parts of the buffer to be read into the | ||
14 | * cache before the transfer is done, causing old data to be seen by | ||
15 | * the CPU. | ||
16 | */ | ||
17 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | ||
18 | |||
19 | /* | ||
20 | * With EABI on ARMv5 and above we must have 64-bit aligned slab pointers. | ||
21 | */ | ||
22 | #if defined(CONFIG_AEABI) && (__LINUX_ARM_ARCH__ >= 5) | ||
23 | #define ARCH_SLAB_MINALIGN 8 | ||
24 | #endif | ||
25 | |||
10 | #endif | 26 | #endif |
diff --git a/arch/arm/include/asm/mman.h b/arch/arm/include/asm/mman.h index 54570d2e95b7..fc26976d8e3a 100644 --- a/arch/arm/include/asm/mman.h +++ b/arch/arm/include/asm/mman.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ARM_MMAN_H__ | 1 | #ifndef __ARM_MMAN_H__ |
2 | #define __ARM_MMAN_H__ | 2 | #define __ARM_MMAN_H__ |
3 | 3 | ||
4 | #include <asm-generic/mman.h> | 4 | #include <asm-generic/mman-common.h> |
5 | 5 | ||
6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ | 6 | #define MAP_GROWSDOWN 0x0100 /* stack-like segment */ |
7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ | 7 | #define MAP_DENYWRITE 0x0800 /* ETXTBSY */ |
diff --git a/arch/arm/include/asm/page.h b/arch/arm/include/asm/page.h index e6eb8a67b807..be962c1349c4 100644 --- a/arch/arm/include/asm/page.h +++ b/arch/arm/include/asm/page.h | |||
@@ -202,13 +202,6 @@ typedef struct page *pgtable_t; | |||
202 | (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \ | 202 | (((current->personality & READ_IMPLIES_EXEC) ? VM_EXEC : 0) | \ |
203 | VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 203 | VM_READ | VM_WRITE | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
204 | 204 | ||
205 | /* | 205 | #include <asm-generic/getorder.h> |
206 | * With EABI on ARMv5 and above we must have 64-bit aligned slab pointers. | ||
207 | */ | ||
208 | #if defined(CONFIG_AEABI) && (__LINUX_ARM_ARCH__ >= 5) | ||
209 | #define ARCH_SLAB_MINALIGN 8 | ||
210 | #endif | ||
211 | |||
212 | #include <asm-generic/page.h> | ||
213 | 206 | ||
214 | #endif | 207 | #endif |
diff --git a/arch/arm/include/asm/signal.h b/arch/arm/include/asm/signal.h index d0fb487aba4f..43ba0fb1c8ad 100644 --- a/arch/arm/include/asm/signal.h +++ b/arch/arm/include/asm/signal.h | |||
@@ -111,7 +111,7 @@ typedef unsigned long sigset_t; | |||
111 | #define MINSIGSTKSZ 2048 | 111 | #define MINSIGSTKSZ 2048 |
112 | #define SIGSTKSZ 8192 | 112 | #define SIGSTKSZ 8192 |
113 | 113 | ||
114 | #include <asm-generic/signal.h> | 114 | #include <asm-generic/signal-defs.h> |
115 | 115 | ||
116 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
117 | struct old_sigaction { | 117 | struct old_sigaction { |
diff --git a/arch/arm/include/asm/suspend.h b/arch/arm/include/asm/suspend.h deleted file mode 100644 index cf0d0bdee74d..000000000000 --- a/arch/arm/include/asm/suspend.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #ifndef _ASMARM_SUSPEND_H | ||
2 | #define _ASMARM_SUSPEND_H | ||
3 | |||
4 | #endif | ||
diff --git a/arch/arm/mach-mx2/clock_imx21.c b/arch/arm/mach-mx2/clock_imx21.c index 999d013e06e3..e4b08ca804ea 100644 --- a/arch/arm/mach-mx2/clock_imx21.c +++ b/arch/arm/mach-mx2/clock_imx21.c | |||
@@ -890,7 +890,7 @@ static struct clk clko_clk = { | |||
890 | .con_id = n, \ | 890 | .con_id = n, \ |
891 | .clk = &c, \ | 891 | .clk = &c, \ |
892 | }, | 892 | }, |
893 | static struct clk_lookup lookups[] __initdata = { | 893 | static struct clk_lookup lookups[] = { |
894 | /* It's unlikely that any driver wants one of them directly: | 894 | /* It's unlikely that any driver wants one of them directly: |
895 | _REGISTER_CLOCK(NULL, "ckih", ckih_clk) | 895 | _REGISTER_CLOCK(NULL, "ckih", ckih_clk) |
896 | _REGISTER_CLOCK(NULL, "ckil", ckil_clk) | 896 | _REGISTER_CLOCK(NULL, "ckil", ckil_clk) |
diff --git a/arch/arm/mach-mx2/clock_imx27.c b/arch/arm/mach-mx2/clock_imx27.c index 3f7280c490f0..2c971442f3f2 100644 --- a/arch/arm/mach-mx2/clock_imx27.c +++ b/arch/arm/mach-mx2/clock_imx27.c | |||
@@ -621,7 +621,7 @@ DEFINE_CLOCK1(csi_clk, 0, 0, 0, parent, &csi_clk1, &per4_clk); | |||
621 | .clk = &c, \ | 621 | .clk = &c, \ |
622 | }, | 622 | }, |
623 | 623 | ||
624 | static struct clk_lookup lookups[] __initdata = { | 624 | static struct clk_lookup lookups[] = { |
625 | _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) | 625 | _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) |
626 | _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) | 626 | _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) |
627 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) | 627 | _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) |
diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c index 53a112d4e04a..3c1e06f56dd6 100644 --- a/arch/arm/mach-mx3/clock-imx35.c +++ b/arch/arm/mach-mx3/clock-imx35.c | |||
@@ -404,7 +404,7 @@ DEFINE_CLOCK(gpu2d_clk, 0, CCM_CGR3, 4, NULL, NULL); | |||
404 | .clk = &c, \ | 404 | .clk = &c, \ |
405 | }, | 405 | }, |
406 | 406 | ||
407 | static struct clk_lookup lookups[] __initdata = { | 407 | static struct clk_lookup lookups[] = { |
408 | _REGISTER_CLOCK(NULL, "asrc", asrc_clk) | 408 | _REGISTER_CLOCK(NULL, "asrc", asrc_clk) |
409 | _REGISTER_CLOCK(NULL, "ata", ata_clk) | 409 | _REGISTER_CLOCK(NULL, "ata", ata_clk) |
410 | _REGISTER_CLOCK(NULL, "audmux", audmux_clk) | 410 | _REGISTER_CLOCK(NULL, "audmux", audmux_clk) |
diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c index 9957a11533a4..a68fcf981edf 100644 --- a/arch/arm/mach-mx3/clock.c +++ b/arch/arm/mach-mx3/clock.c | |||
@@ -516,7 +516,7 @@ DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk); | |||
516 | .clk = &c, \ | 516 | .clk = &c, \ |
517 | }, | 517 | }, |
518 | 518 | ||
519 | static struct clk_lookup lookups[] __initdata = { | 519 | static struct clk_lookup lookups[] = { |
520 | _REGISTER_CLOCK(NULL, "emi", emi_clk) | 520 | _REGISTER_CLOCK(NULL, "emi", emi_clk) |
521 | _REGISTER_CLOCK(NULL, "cspi", cspi1_clk) | 521 | _REGISTER_CLOCK(NULL, "cspi", cspi1_clk) |
522 | _REGISTER_CLOCK(NULL, "cspi", cspi2_clk) | 522 | _REGISTER_CLOCK(NULL, "cspi", cspi2_clk) |
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c index d245e59c51b1..29970f703f3c 100644 --- a/arch/arm/mach-pxa/devices.c +++ b/arch/arm/mach-pxa/devices.c | |||
@@ -72,7 +72,10 @@ void __init pxa_set_mci_info(struct pxamci_platform_data *info) | |||
72 | } | 72 | } |
73 | 73 | ||
74 | 74 | ||
75 | static struct pxa2xx_udc_mach_info pxa_udc_info; | 75 | static struct pxa2xx_udc_mach_info pxa_udc_info = { |
76 | .gpio_pullup = -1, | ||
77 | .gpio_vbus = -1, | ||
78 | }; | ||
76 | 79 | ||
77 | void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info) | 80 | void __init pxa_set_udc_info(struct pxa2xx_udc_mach_info *info) |
78 | { | 81 | { |
diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c index 2121309b2474..2b27336c29f1 100644 --- a/arch/arm/mach-pxa/imote2.c +++ b/arch/arm/mach-pxa/imote2.c | |||
@@ -412,7 +412,7 @@ static struct platform_device imote2_flash_device = { | |||
412 | */ | 412 | */ |
413 | static struct i2c_board_info __initdata imote2_i2c_board_info[] = { | 413 | static struct i2c_board_info __initdata imote2_i2c_board_info[] = { |
414 | { /* UCAM sensor board */ | 414 | { /* UCAM sensor board */ |
415 | .type = "max1238", | 415 | .type = "max1239", |
416 | .addr = 0x35, | 416 | .addr = 0x35, |
417 | }, { /* ITS400 Sensor board only */ | 417 | }, { /* ITS400 Sensor board only */ |
418 | .type = "max1363", | 418 | .type = "max1363", |
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 3397f1e64d76..a08d9d2380d3 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S | |||
@@ -184,23 +184,37 @@ __v7_setup: | |||
184 | stmia r12, {r0-r5, r7, r9, r11, lr} | 184 | stmia r12, {r0-r5, r7, r9, r11, lr} |
185 | bl v7_flush_dcache_all | 185 | bl v7_flush_dcache_all |
186 | ldmia r12, {r0-r5, r7, r9, r11, lr} | 186 | ldmia r12, {r0-r5, r7, r9, r11, lr} |
187 | |||
188 | mrc p15, 0, r0, c0, c0, 0 @ read main ID register | ||
189 | and r10, r0, #0xff000000 @ ARM? | ||
190 | teq r10, #0x41000000 | ||
191 | bne 2f | ||
192 | and r5, r0, #0x00f00000 @ variant | ||
193 | and r6, r0, #0x0000000f @ revision | ||
194 | orr r0, r6, r5, lsr #20-4 @ combine variant and revision | ||
195 | |||
187 | #ifdef CONFIG_ARM_ERRATA_430973 | 196 | #ifdef CONFIG_ARM_ERRATA_430973 |
188 | mrc p15, 0, r10, c1, c0, 1 @ read aux control register | 197 | teq r5, #0x00100000 @ only present in r1p* |
189 | orr r10, r10, #(1 << 6) @ set IBE to 1 | 198 | mrceq p15, 0, r10, c1, c0, 1 @ read aux control register |
190 | mcr p15, 0, r10, c1, c0, 1 @ write aux control register | 199 | orreq r10, r10, #(1 << 6) @ set IBE to 1 |
200 | mcreq p15, 0, r10, c1, c0, 1 @ write aux control register | ||
191 | #endif | 201 | #endif |
192 | #ifdef CONFIG_ARM_ERRATA_458693 | 202 | #ifdef CONFIG_ARM_ERRATA_458693 |
193 | mrc p15, 0, r10, c1, c0, 1 @ read aux control register | 203 | teq r0, #0x20 @ only present in r2p0 |
194 | orr r10, r10, #(1 << 5) @ set L1NEON to 1 | 204 | mrceq p15, 0, r10, c1, c0, 1 @ read aux control register |
195 | orr r10, r10, #(1 << 9) @ set PLDNOP to 1 | 205 | orreq r10, r10, #(1 << 5) @ set L1NEON to 1 |
196 | mcr p15, 0, r10, c1, c0, 1 @ write aux control register | 206 | orreq r10, r10, #(1 << 9) @ set PLDNOP to 1 |
207 | mcreq p15, 0, r10, c1, c0, 1 @ write aux control register | ||
197 | #endif | 208 | #endif |
198 | #ifdef CONFIG_ARM_ERRATA_460075 | 209 | #ifdef CONFIG_ARM_ERRATA_460075 |
199 | mrc p15, 1, r10, c9, c0, 2 @ read L2 cache aux ctrl register | 210 | teq r0, #0x20 @ only present in r2p0 |
200 | orr r10, r10, #(1 << 22) @ set the Write Allocate disable bit | 211 | mrceq p15, 1, r10, c9, c0, 2 @ read L2 cache aux ctrl register |
201 | mcr p15, 1, r10, c9, c0, 2 @ write the L2 cache aux ctrl register | 212 | tsteq r10, #1 << 22 |
213 | orreq r10, r10, #(1 << 22) @ set the Write Allocate disable bit | ||
214 | mcreq p15, 1, r10, c9, c0, 2 @ write the L2 cache aux ctrl register | ||
202 | #endif | 215 | #endif |
203 | mov r10, #0 | 216 | |
217 | 2: mov r10, #0 | ||
204 | #ifdef HARVARD_CACHE | 218 | #ifdef HARVARD_CACHE |
205 | mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate | 219 | mcr p15, 0, r10, c7, c5, 0 @ I+BTB cache invalidate |
206 | #endif | 220 | #endif |
diff --git a/arch/arm/plat-mxc/include/mach/imx-uart.h b/arch/arm/plat-mxc/include/mach/imx-uart.h index 599217b2e13f..f9bd17dd8dd7 100644 --- a/arch/arm/plat-mxc/include/mach/imx-uart.h +++ b/arch/arm/plat-mxc/include/mach/imx-uart.h | |||
@@ -20,11 +20,16 @@ | |||
20 | #define ASMARM_ARCH_UART_H | 20 | #define ASMARM_ARCH_UART_H |
21 | 21 | ||
22 | #define IMXUART_HAVE_RTSCTS (1<<0) | 22 | #define IMXUART_HAVE_RTSCTS (1<<0) |
23 | #define IMXUART_IRDA (1<<1) | ||
23 | 24 | ||
24 | struct imxuart_platform_data { | 25 | struct imxuart_platform_data { |
25 | int (*init)(struct platform_device *pdev); | 26 | int (*init)(struct platform_device *pdev); |
26 | int (*exit)(struct platform_device *pdev); | 27 | int (*exit)(struct platform_device *pdev); |
27 | unsigned int flags; | 28 | unsigned int flags; |
29 | void (*irda_enable)(int enable); | ||
30 | unsigned int irda_inv_rx:1; | ||
31 | unsigned int irda_inv_tx:1; | ||
32 | unsigned short transceiver_delay; | ||
28 | }; | 33 | }; |
29 | 34 | ||
30 | #endif | 35 | #endif |
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 0abfbaa59871..40424edae939 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c | |||
@@ -147,24 +147,40 @@ static int __mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg, void *arg) | |||
147 | return ret; | 147 | return ret; |
148 | } | 148 | } |
149 | 149 | ||
150 | struct omap_msg_tx_data { | ||
151 | mbox_msg_t msg; | ||
152 | void *arg; | ||
153 | }; | ||
154 | |||
155 | static void omap_msg_tx_end_io(struct request *rq, int error) | ||
156 | { | ||
157 | kfree(rq->special); | ||
158 | __blk_put_request(rq->q, rq); | ||
159 | } | ||
160 | |||
150 | int omap_mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg, void* arg) | 161 | int omap_mbox_msg_send(struct omap_mbox *mbox, mbox_msg_t msg, void* arg) |
151 | { | 162 | { |
163 | struct omap_msg_tx_data *tx_data; | ||
152 | struct request *rq; | 164 | struct request *rq; |
153 | struct request_queue *q = mbox->txq->queue; | 165 | struct request_queue *q = mbox->txq->queue; |
154 | int ret = 0; | 166 | |
167 | tx_data = kmalloc(sizeof(*tx_data), GFP_ATOMIC); | ||
168 | if (unlikely(!tx_data)) | ||
169 | return -ENOMEM; | ||
155 | 170 | ||
156 | rq = blk_get_request(q, WRITE, GFP_ATOMIC); | 171 | rq = blk_get_request(q, WRITE, GFP_ATOMIC); |
157 | if (unlikely(!rq)) { | 172 | if (unlikely(!rq)) { |
158 | ret = -ENOMEM; | 173 | kfree(tx_data); |
159 | goto fail; | 174 | return -ENOMEM; |
160 | } | 175 | } |
161 | 176 | ||
162 | rq->data = (void *)msg; | 177 | tx_data->msg = msg; |
163 | blk_insert_request(q, rq, 0, arg); | 178 | tx_data->arg = arg; |
179 | rq->end_io = omap_msg_tx_end_io; | ||
180 | blk_insert_request(q, rq, 0, tx_data); | ||
164 | 181 | ||
165 | schedule_work(&mbox->txq->work); | 182 | schedule_work(&mbox->txq->work); |
166 | fail: | 183 | return 0; |
167 | return ret; | ||
168 | } | 184 | } |
169 | EXPORT_SYMBOL(omap_mbox_msg_send); | 185 | EXPORT_SYMBOL(omap_mbox_msg_send); |
170 | 186 | ||
@@ -178,22 +194,28 @@ static void mbox_tx_work(struct work_struct *work) | |||
178 | struct request_queue *q = mbox->txq->queue; | 194 | struct request_queue *q = mbox->txq->queue; |
179 | 195 | ||
180 | while (1) { | 196 | while (1) { |
197 | struct omap_msg_tx_data *tx_data; | ||
198 | |||
181 | spin_lock(q->queue_lock); | 199 | spin_lock(q->queue_lock); |
182 | rq = elv_next_request(q); | 200 | rq = blk_fetch_request(q); |
183 | spin_unlock(q->queue_lock); | 201 | spin_unlock(q->queue_lock); |
184 | 202 | ||
185 | if (!rq) | 203 | if (!rq) |
186 | break; | 204 | break; |
187 | 205 | ||
188 | ret = __mbox_msg_send(mbox, (mbox_msg_t) rq->data, rq->special); | 206 | tx_data = rq->special; |
207 | |||
208 | ret = __mbox_msg_send(mbox, tx_data->msg, tx_data->arg); | ||
189 | if (ret) { | 209 | if (ret) { |
190 | enable_mbox_irq(mbox, IRQ_TX); | 210 | enable_mbox_irq(mbox, IRQ_TX); |
211 | spin_lock(q->queue_lock); | ||
212 | blk_requeue_request(q, rq); | ||
213 | spin_unlock(q->queue_lock); | ||
191 | return; | 214 | return; |
192 | } | 215 | } |
193 | 216 | ||
194 | spin_lock(q->queue_lock); | 217 | spin_lock(q->queue_lock); |
195 | if (__blk_end_request(rq, 0, 0)) | 218 | __blk_end_request_all(rq, 0); |
196 | BUG(); | ||
197 | spin_unlock(q->queue_lock); | 219 | spin_unlock(q->queue_lock); |
198 | } | 220 | } |
199 | } | 221 | } |
@@ -218,16 +240,13 @@ static void mbox_rx_work(struct work_struct *work) | |||
218 | 240 | ||
219 | while (1) { | 241 | while (1) { |
220 | spin_lock_irqsave(q->queue_lock, flags); | 242 | spin_lock_irqsave(q->queue_lock, flags); |
221 | rq = elv_next_request(q); | 243 | rq = blk_fetch_request(q); |
222 | spin_unlock_irqrestore(q->queue_lock, flags); | 244 | spin_unlock_irqrestore(q->queue_lock, flags); |
223 | if (!rq) | 245 | if (!rq) |
224 | break; | 246 | break; |
225 | 247 | ||
226 | msg = (mbox_msg_t) rq->data; | 248 | msg = (mbox_msg_t)rq->special; |
227 | 249 | blk_end_request_all(rq, 0); | |
228 | if (blk_end_request(rq, 0, 0)) | ||
229 | BUG(); | ||
230 | |||
231 | mbox->rxq->callback((void *)msg); | 250 | mbox->rxq->callback((void *)msg); |
232 | } | 251 | } |
233 | } | 252 | } |
@@ -264,7 +283,6 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox) | |||
264 | goto nomem; | 283 | goto nomem; |
265 | 284 | ||
266 | msg = mbox_fifo_read(mbox); | 285 | msg = mbox_fifo_read(mbox); |
267 | rq->data = (void *)msg; | ||
268 | 286 | ||
269 | if (unlikely(mbox_seq_test(mbox, msg))) { | 287 | if (unlikely(mbox_seq_test(mbox, msg))) { |
270 | pr_info("mbox: Illegal seq bit!(%08x)\n", msg); | 288 | pr_info("mbox: Illegal seq bit!(%08x)\n", msg); |
@@ -272,7 +290,7 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox) | |||
272 | mbox->err_notify(); | 290 | mbox->err_notify(); |
273 | } | 291 | } |
274 | 292 | ||
275 | blk_insert_request(q, rq, 0, NULL); | 293 | blk_insert_request(q, rq, 0, (void *)msg); |
276 | if (mbox->ops->type == OMAP_MBOX_TYPE1) | 294 | if (mbox->ops->type == OMAP_MBOX_TYPE1) |
277 | break; | 295 | break; |
278 | } | 296 | } |
@@ -329,16 +347,15 @@ omap_mbox_read(struct device *dev, struct device_attribute *attr, char *buf) | |||
329 | 347 | ||
330 | while (1) { | 348 | while (1) { |
331 | spin_lock_irqsave(q->queue_lock, flags); | 349 | spin_lock_irqsave(q->queue_lock, flags); |
332 | rq = elv_next_request(q); | 350 | rq = blk_fetch_request(q); |
333 | spin_unlock_irqrestore(q->queue_lock, flags); | 351 | spin_unlock_irqrestore(q->queue_lock, flags); |
334 | 352 | ||
335 | if (!rq) | 353 | if (!rq) |
336 | break; | 354 | break; |
337 | 355 | ||
338 | *p = (mbox_msg_t) rq->data; | 356 | *p = (mbox_msg_t)rq->special; |
339 | 357 | ||
340 | if (blk_end_request(rq, 0, 0)) | 358 | blk_end_request_all(rq, 0); |
341 | BUG(); | ||
342 | 359 | ||
343 | if (unlikely(mbox_seq_test(mbox, *p))) { | 360 | if (unlikely(mbox_seq_test(mbox, *p))) { |
344 | pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p); | 361 | pr_info("mbox: Illegal seq bit!(%08x) ignored\n", *p); |