aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-05-09 05:28:08 -0400
committerOlof Johansson <olof@lixom.net>2012-05-09 05:28:46 -0400
commitcba3309e38cf0407fbdbea788758ad65624c2319 (patch)
treef93dfd4451c1d67f2b05626e7f6c98e519abf35a /arch
parent976eb445e2051735346779dbdaeb681c7641fec4 (diff)
parent09f45b83109cb8e23a06d5efb1096a08a9545974 (diff)
Merge tag 'omap-cleanup-sparse-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/cleanup
Sparse and cppcheck warning fixes By Paul Walmsley via Paul Walmsley (1) and Tony Lindgren (1) * tag 'omap-cleanup-sparse-for-v3.5' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: clean up some cppcheck warnings ARM: OMAP1: board files: deduplicate and clean some NAND-related code ARM: OMAP: USB: remove unnecessary sideways include ARM: OMAP: DMA: use constant array maximum, drop some LCD DMA code ARM: OMAP: OCM RAM: use memset_io() when clearing SRAM ARM: OMAP: fix 'using plain integer as NULL pointer' sparse warnings ARM: OMAP2+: GPMC: resolve type-conversion warning from sparse ARM: OMAP1: OHCI: use platform_data fn ptr to enable OCPI bus ARM: OMAP1: OCPI: move to mach-omap1/ ARM: OMAP: add includes for missing prototypes ARM: OMAP2+: declare file-local functions as static Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap1/Makefile13
-rw-r--r--arch/arm/mach-omap1/ams-delta-fiq.c2
-rw-r--r--arch/arm/mach-omap1/board-fsample.c16
-rw-r--r--arch/arm/mach-omap1/board-h2.c17
-rw-r--r--arch/arm/mach-omap1/board-h3.c16
-rw-r--r--arch/arm/mach-omap1/board-nand.c37
-rw-r--r--arch/arm/mach-omap1/board-palmz71.c4
-rw-r--r--arch/arm/mach-omap1/board-perseus2.c16
-rw-r--r--arch/arm/mach-omap1/clock.c3
-rw-r--r--arch/arm/mach-omap1/common.h11
-rw-r--r--arch/arm/mach-omap1/fpga.c2
-rw-r--r--arch/arm/mach-omap1/id.c2
-rw-r--r--arch/arm/mach-omap1/io.c3
-rw-r--r--arch/arm/mach-omap1/irq.c2
-rw-r--r--arch/arm/mach-omap1/lcd_dma.c7
-rw-r--r--arch/arm/mach-omap1/ocpi.c (renamed from arch/arm/plat-omap/ocpi.c)7
-rw-r--r--arch/arm/mach-omap1/pm.c9
-rw-r--r--arch/arm/mach-omap1/reset.c2
-rw-r--r--arch/arm/mach-omap1/timer.c3
-rw-r--r--arch/arm/mach-omap1/usb.c3
-rw-r--r--arch/arm/mach-omap2/am35xx-emac.c37
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c8
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c8
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c4
-rw-r--r--arch/arm/mach-omap2/board-zoom-display.c1
-rw-r--r--arch/arm/mach-omap2/common.h2
-rw-r--r--arch/arm/mach-omap2/devices.c7
-rw-r--r--arch/arm/mach-omap2/gpio.c2
-rw-r--r--arch/arm/mach-omap2/gpmc-onenand.c3
-rw-r--r--arch/arm/mach-omap2/gpmc.c3
-rw-r--r--arch/arm/mach-omap2/hwspinlock.c2
-rw-r--r--arch/arm/mach-omap2/io.c1
-rw-r--r--arch/arm/mach-omap2/irq.c3
-rw-r--r--arch/arm/mach-omap2/mux.c2
-rw-r--r--arch/arm/mach-omap2/omap-secure.c1
-rw-r--r--arch/arm/mach-omap2/omap-wakeupgen.c2
-rw-r--r--arch/arm/mach-omap2/pm24xx.c3
-rw-r--r--arch/arm/mach-omap2/pm34xx.c10
-rw-r--r--arch/arm/mach-omap2/prm_common.c4
-rw-r--r--arch/arm/mach-omap2/serial.c2
-rw-r--r--arch/arm/mach-omap2/usb-tusb6010.c2
-rw-r--r--arch/arm/plat-omap/Makefile3
-rw-r--r--arch/arm/plat-omap/common.c1
-rw-r--r--arch/arm/plat-omap/dma.c13
-rw-r--r--arch/arm/plat-omap/dmtimer.c3
-rw-r--r--arch/arm/plat-omap/include/plat/board.h2
-rw-r--r--arch/arm/plat-omap/include/plat/common.h2
-rw-r--r--arch/arm/plat-omap/include/plat/dma.h1
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h4
-rw-r--r--arch/arm/plat-omap/omap_device.c2
-rw-r--r--arch/arm/plat-omap/sram.c4
-rw-r--r--arch/arm/plat-omap/usb.c4
52 files changed, 158 insertions, 163 deletions
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 9923f92b545..398e9e53e18 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -12,6 +12,9 @@ endif
12 12
13obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o 13obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o
14 14
15# OCPI interconnect support for 1710, 1610 and 5912
16obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
17
15# Power Management 18# Power Management
16obj-$(CONFIG_PM) += pm.o sleep.o 19obj-$(CONFIG_PM) += pm.o sleep.o
17 20
@@ -28,13 +31,15 @@ usb-fs-$(CONFIG_USB) := usb.o
28obj-y += $(usb-fs-m) $(usb-fs-y) 31obj-y += $(usb-fs-m) $(usb-fs-y)
29 32
30# Specific board support 33# Specific board support
31obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o 34obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o board-h2-mmc.o \
35 board-nand.o
32obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o 36obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
33obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o 37obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
34obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o 38obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o board-nand.o
35obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o 39obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o board-nand.o
36obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o 40obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
37obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o 41obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o board-h3-mmc.o \
42 board-nand.o
38obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o 43obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
39obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o 44obj-$(CONFIG_MACH_OMAP_PALMTE) += board-palmte.o
40obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o 45obj-$(CONFIG_MACH_OMAP_PALMZ71) += board-palmz71.o
diff --git a/arch/arm/mach-omap1/ams-delta-fiq.c b/arch/arm/mach-omap1/ams-delta-fiq.c
index fcce7ff3763..31197bd2ded 100644
--- a/arch/arm/mach-omap1/ams-delta-fiq.c
+++ b/arch/arm/mach-omap1/ams-delta-fiq.c
@@ -102,7 +102,7 @@ void __init ams_delta_init_fiq(void)
102 } 102 }
103 103
104 retval = request_irq(INT_DEFERRED_FIQ, deferred_fiq, 104 retval = request_irq(INT_DEFERRED_FIQ, deferred_fiq,
105 IRQ_TYPE_EDGE_RISING, "deferred_fiq", 0); 105 IRQ_TYPE_EDGE_RISING, "deferred_fiq", NULL);
106 if (retval < 0) { 106 if (retval < 0) {
107 pr_err("Failed to get deferred_fiq IRQ, ret=%d\n", retval); 107 pr_err("Failed to get deferred_fiq IRQ, ret=%d\n", retval);
108 release_fiq(&fh); 108 release_fiq(&fh);
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
index 80bd43c7f4e..4a4afb37102 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -185,20 +185,6 @@ static struct platform_device nor_device = {
185 .resource = &nor_resource, 185 .resource = &nor_resource,
186}; 186};
187 187
188static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
189{
190 struct nand_chip *this = mtd->priv;
191 unsigned long mask;
192
193 if (cmd == NAND_CMD_NONE)
194 return;
195
196 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
197 if (ctrl & NAND_ALE)
198 mask |= 0x04;
199 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
200}
201
202#define FSAMPLE_NAND_RB_GPIO_PIN 62 188#define FSAMPLE_NAND_RB_GPIO_PIN 62
203 189
204static int nand_dev_ready(struct mtd_info *mtd) 190static int nand_dev_ready(struct mtd_info *mtd)
@@ -216,7 +202,7 @@ static struct platform_nand_data nand_data = {
216 .part_probe_types = part_probes, 202 .part_probe_types = part_probes,
217 }, 203 },
218 .ctrl = { 204 .ctrl = {
219 .cmd_ctrl = nand_cmd_ctl, 205 .cmd_ctrl = omap1_nand_cmd_ctl,
220 .dev_ready = nand_dev_ready, 206 .dev_ready = nand_dev_ready,
221 }, 207 },
222}; 208};
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index 553a2e53576..057ec13f064 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -179,20 +179,6 @@ static struct mtd_partition h2_nand_partitions[] = {
179 }, 179 },
180}; 180};
181 181
182static void h2_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
183{
184 struct nand_chip *this = mtd->priv;
185 unsigned long mask;
186
187 if (cmd == NAND_CMD_NONE)
188 return;
189
190 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
191 if (ctrl & NAND_ALE)
192 mask |= 0x04;
193 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
194}
195
196#define H2_NAND_RB_GPIO_PIN 62 182#define H2_NAND_RB_GPIO_PIN 62
197 183
198static int h2_nand_dev_ready(struct mtd_info *mtd) 184static int h2_nand_dev_ready(struct mtd_info *mtd)
@@ -212,9 +198,8 @@ static struct platform_nand_data h2_nand_platdata = {
212 .part_probe_types = h2_part_probes, 198 .part_probe_types = h2_part_probes,
213 }, 199 },
214 .ctrl = { 200 .ctrl = {
215 .cmd_ctrl = h2_nand_cmd_ctl, 201 .cmd_ctrl = omap1_nand_cmd_ctl,
216 .dev_ready = h2_nand_dev_ready, 202 .dev_ready = h2_nand_dev_ready,
217
218 }, 203 },
219}; 204};
220 205
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 4c19f4c0685..f6ddf875965 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -181,20 +181,6 @@ static struct mtd_partition nand_partitions[] = {
181 }, 181 },
182}; 182};
183 183
184static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
185{
186 struct nand_chip *this = mtd->priv;
187 unsigned long mask;
188
189 if (cmd == NAND_CMD_NONE)
190 return;
191
192 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
193 if (ctrl & NAND_ALE)
194 mask |= 0x04;
195 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
196}
197
198#define H3_NAND_RB_GPIO_PIN 10 184#define H3_NAND_RB_GPIO_PIN 10
199 185
200static int nand_dev_ready(struct mtd_info *mtd) 186static int nand_dev_ready(struct mtd_info *mtd)
@@ -214,7 +200,7 @@ static struct platform_nand_data nand_platdata = {
214 .part_probe_types = part_probes, 200 .part_probe_types = part_probes,
215 }, 201 },
216 .ctrl = { 202 .ctrl = {
217 .cmd_ctrl = nand_cmd_ctl, 203 .cmd_ctrl = omap1_nand_cmd_ctl,
218 .dev_ready = nand_dev_ready, 204 .dev_ready = nand_dev_ready,
219 205
220 }, 206 },
diff --git a/arch/arm/mach-omap1/board-nand.c b/arch/arm/mach-omap1/board-nand.c
new file mode 100644
index 00000000000..4d0835327d2
--- /dev/null
+++ b/arch/arm/mach-omap1/board-nand.c
@@ -0,0 +1,37 @@
1/*
2 * linux/arch/arm/mach-omap1/board-nand.c
3 *
4 * Common OMAP1 board NAND code
5 *
6 * Copyright (C) 2004, 2012 Texas Instruments, Inc.
7 * Copyright (C) 2002 MontaVista Software, Inc.
8 * Copyright (C) 2001 RidgeRun, Inc.
9 * Author: RidgeRun, Inc.
10 * Greg Lonnon (glonnon@ridgerun.com) or info@ridgerun.com
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16#include <linux/kernel.h>
17#include <linux/io.h>
18#include <linux/mtd/mtd.h>
19#include <linux/mtd/nand.h>
20
21#include "common.h"
22
23void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
24{
25 struct nand_chip *this = mtd->priv;
26 unsigned long mask;
27
28 if (cmd == NAND_CMD_NONE)
29 return;
30
31 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
32 if (ctrl & NAND_ALE)
33 mask |= 0x04;
34
35 writeb(cmd, this->IO_ADDR_W + mask);
36}
37
diff --git a/arch/arm/mach-omap1/board-palmz71.c b/arch/arm/mach-omap1/board-palmz71.c
index a2c5abcd7c8..61ed4f0247c 100644
--- a/arch/arm/mach-omap1/board-palmz71.c
+++ b/arch/arm/mach-omap1/board-palmz71.c
@@ -289,10 +289,10 @@ palmz71_gpio_setup(int early)
289 gpio_direction_input(PALMZ71_USBDETECT_GPIO); 289 gpio_direction_input(PALMZ71_USBDETECT_GPIO);
290 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 290 if (request_irq(gpio_to_irq(PALMZ71_USBDETECT_GPIO),
291 palmz71_powercable, IRQF_SAMPLE_RANDOM, 291 palmz71_powercable, IRQF_SAMPLE_RANDOM,
292 "palmz71-cable", 0)) 292 "palmz71-cable", NULL))
293 printk(KERN_ERR 293 printk(KERN_ERR
294 "IRQ request for power cable failed!\n"); 294 "IRQ request for power cable failed!\n");
295 palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), 0); 295 palmz71_powercable(gpio_to_irq(PALMZ71_USBDETECT_GPIO), NULL);
296 } 296 }
297} 297}
298 298
diff --git a/arch/arm/mach-omap1/board-perseus2.c b/arch/arm/mach-omap1/board-perseus2.c
index 76d4ee05a81..a2c88890e76 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -143,20 +143,6 @@ static struct platform_device nor_device = {
143 .resource = &nor_resource, 143 .resource = &nor_resource,
144}; 144};
145 145
146static void nand_cmd_ctl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
147{
148 struct nand_chip *this = mtd->priv;
149 unsigned long mask;
150
151 if (cmd == NAND_CMD_NONE)
152 return;
153
154 mask = (ctrl & NAND_CLE) ? 0x02 : 0;
155 if (ctrl & NAND_ALE)
156 mask |= 0x04;
157 writeb(cmd, (unsigned long)this->IO_ADDR_W | mask);
158}
159
160#define P2_NAND_RB_GPIO_PIN 62 146#define P2_NAND_RB_GPIO_PIN 62
161 147
162static int nand_dev_ready(struct mtd_info *mtd) 148static int nand_dev_ready(struct mtd_info *mtd)
@@ -174,7 +160,7 @@ static struct platform_nand_data nand_data = {
174 .part_probe_types = part_probes, 160 .part_probe_types = part_probes,
175 }, 161 },
176 .ctrl = { 162 .ctrl = {
177 .cmd_ctrl = nand_cmd_ctl, 163 .cmd_ctrl = omap1_nand_cmd_ctl,
178 .dev_ready = nand_dev_ready, 164 .dev_ready = nand_dev_ready,
179 }, 165 },
180}; 166};
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 67382ddd8c8..a9ee06b6cb4 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -194,9 +194,8 @@ int omap1_select_table_rate(struct clk *clk, unsigned long rate)
194{ 194{
195 /* Find the highest supported frequency <= rate and switch to it */ 195 /* Find the highest supported frequency <= rate and switch to it */
196 struct mpu_rate * ptr; 196 struct mpu_rate * ptr;
197 unsigned long dpll1_rate, ref_rate; 197 unsigned long ref_rate;
198 198
199 dpll1_rate = ck_dpll1_p->rate;
200 ref_rate = ck_ref_p->rate; 199 ref_rate = ck_ref_p->rate;
201 200
202 for (ptr = omap1_rate_table; ptr->rate; ptr++) { 201 for (ptr = omap1_rate_table; ptr->rate; ptr++) {
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h
index af658ad338e..8cc616e6f54 100644
--- a/arch/arm/mach-omap1/common.h
+++ b/arch/arm/mach-omap1/common.h
@@ -27,6 +27,7 @@
27#define __ARCH_ARM_MACH_OMAP1_COMMON_H 27#define __ARCH_ARM_MACH_OMAP1_COMMON_H
28 28
29#include <plat/common.h> 29#include <plat/common.h>
30#include <linux/mtd/mtd.h>
30 31
31#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 32#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
32void omap7xx_map_io(void); 33void omap7xx_map_io(void);
@@ -56,8 +57,16 @@ void omap1_init_early(void);
56void omap1_init_irq(void); 57void omap1_init_irq(void);
57void omap1_restart(char, const char *); 58void omap1_restart(char, const char *);
58 59
60extern void __init omap_check_revision(void);
61
62extern void omap1_nand_cmd_ctl(struct mtd_info *mtd, int cmd,
63 unsigned int ctrl);
64
59extern struct sys_timer omap1_timer; 65extern struct sys_timer omap1_timer;
60extern bool omap_32k_timer_init(void); 66extern bool omap_32k_timer_init(void);
61extern void __init omap_init_consistent_dma_size(void); 67
68extern u32 omap_irq_flags;
69
70extern int ocpi_enable(void);
62 71
63#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */ 72#endif /* __ARCH_ARM_MACH_OMAP1_COMMON_H */
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
index 76c67b3f9f6..29ec50fc688 100644
--- a/arch/arm/mach-omap1/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
@@ -87,7 +87,7 @@ static void fpga_mask_ack_irq(struct irq_data *d)
87 fpga_ack_irq(d); 87 fpga_ack_irq(d);
88} 88}
89 89
90void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc) 90static void innovator_fpga_IRQ_demux(unsigned int irq, struct irq_desc *desc)
91{ 91{
92 u32 stat; 92 u32 stat;
93 int fpga_irq; 93 int fpga_irq;
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 2b28e1da14b..a1b846aacda 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -21,6 +21,8 @@
21 21
22#include <mach/hardware.h> 22#include <mach/hardware.h>
23 23
24#include "common.h"
25
24#define OMAP_DIE_ID_0 0xfffe1800 26#define OMAP_DIE_ID_0 0xfffe1800
25#define OMAP_DIE_ID_1 0xfffe1804 27#define OMAP_DIE_ID_1 0xfffe1804
26#define OMAP_PRODUCTION_ID_0 0xfffe2000 28#define OMAP_PRODUCTION_ID_0 0xfffe2000
diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index d969a7203d1..71ce017bf5d 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -18,13 +18,12 @@
18 18
19#include <plat/mux.h> 19#include <plat/mux.h>
20#include <plat/tc.h> 20#include <plat/tc.h>
21#include <plat/dma.h>
21 22
22#include "iomap.h" 23#include "iomap.h"
23#include "common.h" 24#include "common.h"
24#include "clock.h" 25#include "clock.h"
25 26
26extern void omap_check_revision(void);
27
28/* 27/*
29 * The machine specific code may provide the extra mapping besides the 28 * The machine specific code may provide the extra mapping besides the
30 * default mapping provided here. 29 * default mapping provided here.
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c
index 4448114fab7..6995fb6a334 100644
--- a/arch/arm/mach-omap1/irq.c
+++ b/arch/arm/mach-omap1/irq.c
@@ -49,6 +49,8 @@
49 49
50#include <mach/hardware.h> 50#include <mach/hardware.h>
51 51
52#include "common.h"
53
52#define IRQ_BANK(irq) ((irq) >> 5) 54#define IRQ_BANK(irq) ((irq) >> 5)
53#define IRQ_BIT(irq) ((irq) & 0x1f) 55#define IRQ_BIT(irq) ((irq) & 0x1f)
54 56
diff --git a/arch/arm/mach-omap1/lcd_dma.c b/arch/arm/mach-omap1/lcd_dma.c
index 86ace9aaa66..5769c71815b 100644
--- a/arch/arm/mach-omap1/lcd_dma.c
+++ b/arch/arm/mach-omap1/lcd_dma.c
@@ -57,7 +57,7 @@ static struct lcd_dma_info {
57 void *cb_data; 57 void *cb_data;
58 58
59 int active; 59 int active;
60 unsigned long addr, size; 60 unsigned long addr;
61 int rotate, data_type, xres, yres; 61 int rotate, data_type, xres, yres;
62 int vxres; 62 int vxres;
63 int mirror; 63 int mirror;
@@ -77,11 +77,6 @@ void omap_set_lcd_dma_b1(unsigned long addr, u16 fb_xres, u16 fb_yres,
77} 77}
78EXPORT_SYMBOL(omap_set_lcd_dma_b1); 78EXPORT_SYMBOL(omap_set_lcd_dma_b1);
79 79
80void omap_set_lcd_dma_src_port(int port)
81{
82 lcd_dma.src_port = port;
83}
84
85void omap_set_lcd_dma_ext_controller(int external) 80void omap_set_lcd_dma_ext_controller(int external)
86{ 81{
87 lcd_dma.ext_ctrl = external; 82 lcd_dma.ext_ctrl = external;
diff --git a/arch/arm/plat-omap/ocpi.c b/arch/arm/mach-omap1/ocpi.c
index ebe0c73c890..238170cab5b 100644
--- a/arch/arm/plat-omap/ocpi.c
+++ b/arch/arm/mach-omap1/ocpi.c
@@ -4,6 +4,7 @@
4 * Minimal OCP bus support for omap16xx 4 * Minimal OCP bus support for omap16xx
5 * 5 *
6 * Copyright (C) 2003 - 2005 Nokia Corporation 6 * Copyright (C) 2003 - 2005 Nokia Corporation
7 * Copyright (C) 2012 Texas Instruments, Inc.
7 * Written by Tony Lindgren <tony@atomide.com> 8 * Written by Tony Lindgren <tony@atomide.com>
8 * 9 *
9 * Modified for clock framework by Paul Mundt <paul.mundt@nokia.com>. 10 * Modified for clock framework by Paul Mundt <paul.mundt@nokia.com>.
@@ -35,6 +36,8 @@
35 36
36#include <mach/hardware.h> 37#include <mach/hardware.h>
37 38
39#include "common.h"
40
38#define OCPI_BASE 0xfffec320 41#define OCPI_BASE 0xfffec320
39#define OCPI_FAULT (OCPI_BASE + 0x00) 42#define OCPI_FAULT (OCPI_BASE + 0x00)
40#define OCPI_CMD_FAULT (OCPI_BASE + 0x04) 43#define OCPI_CMD_FAULT (OCPI_BASE + 0x04)
@@ -64,7 +67,7 @@ int ocpi_enable(void)
64 /* Enable access for OHCI in OCPI */ 67 /* Enable access for OHCI in OCPI */
65 val = omap_readl(OCPI_PROT); 68 val = omap_readl(OCPI_PROT);
66 val &= ~0xff; 69 val &= ~0xff;
67 //val &= (1 << 0); /* Allow access only to EMIFS */ 70 /* val &= (1 << 0); Allow access only to EMIFS */
68 omap_writel(val, OCPI_PROT); 71 omap_writel(val, OCPI_PROT);
69 72
70 val = omap_readl(OCPI_SEC); 73 val = omap_readl(OCPI_SEC);
@@ -86,7 +89,7 @@ static int __init omap_ocpi_init(void)
86 89
87 clk_enable(ocpi_ck); 90 clk_enable(ocpi_ck);
88 ocpi_enable(); 91 ocpi_enable();
89 printk("OMAP OCPI interconnect driver loaded\n"); 92 pr_info("OMAP OCPI interconnect driver loaded\n");
90 93
91 return 0; 94 return 0;
92} 95}
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index f66c32912b2..b2560d32b3a 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -569,11 +569,10 @@ static int omap_pm_read_proc(
569 569
570static void omap_pm_init_proc(void) 570static void omap_pm_init_proc(void)
571{ 571{
572 struct proc_dir_entry *entry; 572 /* XXX Appears to leak memory */
573 573 create_proc_read_entry("driver/omap_pm",
574 entry = create_proc_read_entry("driver/omap_pm", 574 S_IWUSR | S_IRUGO, NULL,
575 S_IWUSR | S_IRUGO, NULL, 575 omap_pm_read_proc, NULL);
576 omap_pm_read_proc, NULL);
577} 576}
578 577
579#endif /* DEBUG && CONFIG_PROC_FS */ 578#endif /* DEBUG && CONFIG_PROC_FS */
diff --git a/arch/arm/mach-omap1/reset.c b/arch/arm/mach-omap1/reset.c
index f255b153b86..b1770910386 100644
--- a/arch/arm/mach-omap1/reset.c
+++ b/arch/arm/mach-omap1/reset.c
@@ -8,6 +8,8 @@
8 8
9#include <mach/hardware.h> 9#include <mach/hardware.h>
10 10
11#include "common.h"
12
11void omap1_restart(char mode, const char *cmd) 13void omap1_restart(char mode, const char *cmd)
12{ 14{
13 /* 15 /*
diff --git a/arch/arm/mach-omap1/timer.c b/arch/arm/mach-omap1/timer.c
index fb202af01d0..64c65bcb2d6 100644
--- a/arch/arm/mach-omap1/timer.c
+++ b/arch/arm/mach-omap1/timer.c
@@ -54,8 +54,7 @@ static int omap1_dm_timer_set_src(struct platform_device *pdev,
54 return 0; 54 return 0;
55} 55}
56 56
57 57static int __init omap1_dm_timer_init(void)
58int __init omap1_dm_timer_init(void)
59{ 58{
60 int i; 59 int i;
61 int ret; 60 int ret;
diff --git a/arch/arm/mach-omap1/usb.c b/arch/arm/mach-omap1/usb.c
index 19de03b074e..e61afd92276 100644
--- a/arch/arm/mach-omap1/usb.c
+++ b/arch/arm/mach-omap1/usb.c
@@ -29,6 +29,8 @@
29#include <plat/mux.h> 29#include <plat/mux.h>
30#include <plat/usb.h> 30#include <plat/usb.h>
31 31
32#include "common.h"
33
32/* These routines should handle the standard chip-specific modes 34/* These routines should handle the standard chip-specific modes
33 * for usb0/1/2 ports, covering basic mux and transceiver setup. 35 * for usb0/1/2 ports, covering basic mux and transceiver setup.
34 * 36 *
@@ -138,6 +140,7 @@ static inline void ohci_device_init(struct omap_usb_config *pdata)
138 if (cpu_is_omap7xx()) 140 if (cpu_is_omap7xx())
139 ohci_resources[1].start = INT_7XX_USB_HHC_1; 141 ohci_resources[1].start = INT_7XX_USB_HHC_1;
140 pdata->ohci_device = &ohci_device; 142 pdata->ohci_device = &ohci_device;
143 pdata->ocpi_enable = &ocpi_enable;
141} 144}
142 145
143#else 146#else
diff --git a/arch/arm/mach-omap2/am35xx-emac.c b/arch/arm/mach-omap2/am35xx-emac.c
index 1f97e747520..447682c4e11 100644
--- a/arch/arm/mach-omap2/am35xx-emac.c
+++ b/arch/arm/mach-omap2/am35xx-emac.c
@@ -39,26 +39,23 @@ static struct platform_device am35xx_emac_mdio_device = {
39 39
40static void am35xx_enable_emac_int(void) 40static void am35xx_enable_emac_int(void)
41{ 41{
42 u32 regval; 42 u32 v;
43 43
44 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); 44 v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
45 regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR | 45 v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR |
46 AM35XX_CPGMAC_C0_TX_PULSE_CLR | 46 AM35XX_CPGMAC_C0_MISC_PULSE_CLR | AM35XX_CPGMAC_C0_RX_THRESH_CLR);
47 AM35XX_CPGMAC_C0_MISC_PULSE_CLR | 47 omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
48 AM35XX_CPGMAC_C0_RX_THRESH_CLR); 48 omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
49 omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR);
50 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
51} 49}
52 50
53static void am35xx_disable_emac_int(void) 51static void am35xx_disable_emac_int(void)
54{ 52{
55 u32 regval; 53 u32 v;
56 54
57 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); 55 v = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
58 regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR | 56 v |= (AM35XX_CPGMAC_C0_RX_PULSE_CLR | AM35XX_CPGMAC_C0_TX_PULSE_CLR);
59 AM35XX_CPGMAC_C0_TX_PULSE_CLR); 57 omap_ctrl_writel(v, AM35XX_CONTROL_LVL_INTR_CLEAR);
60 omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); 58 omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); /* OCP barrier */
61 regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR);
62} 59}
63 60
64static struct emac_platform_data am35xx_emac_pdata = { 61static struct emac_platform_data am35xx_emac_pdata = {
@@ -92,7 +89,7 @@ static struct platform_device am35xx_emac_device = {
92 89
93void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) 90void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en)
94{ 91{
95 unsigned int regval; 92 u32 v;
96 int err; 93 int err;
97 94
98 am35xx_emac_pdata.rmii_en = rmii_en; 95 am35xx_emac_pdata.rmii_en = rmii_en;
@@ -110,8 +107,8 @@ void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en)
110 return; 107 return;
111 } 108 }
112 109
113 regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); 110 v = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET);
114 regval = regval & (~(AM35XX_CPGMACSS_SW_RST)); 111 v &= ~AM35XX_CPGMACSS_SW_RST;
115 omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); 112 omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET);
116 regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); 113 omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */
117} 114}
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 49df12735b4..fd1b481c762 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -630,13 +630,13 @@ static struct regulator_consumer_supply dummy_supplies[] = {
630 630
631static void __init omap3_evm_init(void) 631static void __init omap3_evm_init(void)
632{ 632{
633 struct omap_board_mux *obm;
634
633 omap3_evm_get_revision(); 635 omap3_evm_get_revision();
634 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); 636 regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
635 637
636 if (cpu_is_omap3630()) 638 obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux;
637 omap3_mux_init(omap36x_board_mux, OMAP_PACKAGE_CBB); 639 omap3_mux_init(obm, OMAP_PACKAGE_CBB);
638 else
639 omap3_mux_init(omap35x_board_mux, OMAP_PACKAGE_CBB);
640 640
641 omap_board_config = omap3_evm_config; 641 omap_board_config = omap3_evm_config;
642 omap_board_config_size = ARRAY_SIZE(omap3_evm_config); 642 omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 1b782ba5343..8216e5f64a6 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -231,7 +231,7 @@ static struct platform_device omap_vwlan_device = {
231 }, 231 },
232}; 232};
233 233
234struct wl12xx_platform_data omap_panda_wlan_data __initdata = { 234static struct wl12xx_platform_data omap_panda_wlan_data __initdata = {
235 /* PANDA ref clock is 38.4 MHz */ 235 /* PANDA ref clock is 38.4 MHz */
236 .board_ref_clock = 2, 236 .board_ref_clock = 2,
237}; 237};
@@ -438,7 +438,7 @@ static struct panel_dvi_platform_data omap4_dvi_panel = {
438 .i2c_bus_num = 3, 438 .i2c_bus_num = 3,
439}; 439};
440 440
441struct omap_dss_device omap4_panda_dvi_device = { 441static struct omap_dss_device omap4_panda_dvi_device = {
442 .type = OMAP_DISPLAY_TYPE_DPI, 442 .type = OMAP_DISPLAY_TYPE_DPI,
443 .name = "dvi", 443 .name = "dvi",
444 .driver_name = "dvi", 444 .driver_name = "dvi",
@@ -448,7 +448,7 @@ struct omap_dss_device omap4_panda_dvi_device = {
448 .channel = OMAP_DSS_CHANNEL_LCD2, 448 .channel = OMAP_DSS_CHANNEL_LCD2,
449}; 449};
450 450
451int __init omap4_panda_dvi_init(void) 451static int __init omap4_panda_dvi_init(void)
452{ 452{
453 int r; 453 int r;
454 454
@@ -509,7 +509,7 @@ static struct omap_dss_board_info omap4_panda_dss_data = {
509 .default_device = &omap4_panda_dvi_device, 509 .default_device = &omap4_panda_dvi_device,
510}; 510};
511 511
512void __init omap4_panda_display_init(void) 512static void __init omap4_panda_display_init(void)
513{ 513{
514 int r; 514 int r;
515 515
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index d87ee061209..ae957c92081 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -872,11 +872,11 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = {
872 .resource_config = twl4030_rconfig, 872 .resource_config = twl4030_rconfig,
873}; 873};
874 874
875struct twl4030_vibra_data rx51_vibra_data __initdata = { 875static struct twl4030_vibra_data rx51_vibra_data __initdata = {
876 .coexist = 0, 876 .coexist = 0,
877}; 877};
878 878
879struct twl4030_audio_data rx51_audio_data __initdata = { 879static struct twl4030_audio_data rx51_audio_data __initdata = {
880 .audio_mclk = 26000000, 880 .audio_mclk = 26000000,
881 .vibra = &rx51_vibra_data, 881 .vibra = &rx51_vibra_data,
882}; 882};
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c
index a43a765dd09..28187f134ff 100644
--- a/arch/arm/mach-omap2/board-zoom-display.c
+++ b/arch/arm/mach-omap2/board-zoom-display.c
@@ -16,6 +16,7 @@
16#include <linux/spi/spi.h> 16#include <linux/spi/spi.h>
17#include <plat/mcspi.h> 17#include <plat/mcspi.h>
18#include <video/omapdss.h> 18#include <video/omapdss.h>
19#include <mach/board-zoom.h>
19 20
20#define LCD_PANEL_RESET_GPIO_PROD 96 21#define LCD_PANEL_RESET_GPIO_PROD 96
21#define LCD_PANEL_RESET_GPIO_PILOT 55 22#define LCD_PANEL_RESET_GPIO_PILOT 55
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 57da7f406e2..0e95efccd2d 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -134,8 +134,6 @@ void omap4_map_io(void);
134void ti81xx_map_io(void); 134void ti81xx_map_io(void);
135void omap_barriers_init(void); 135void omap_barriers_init(void);
136 136
137extern void __init omap_init_consistent_dma_size(void);
138
139/** 137/**
140 * omap_test_timeout - busy-loop, testing a condition 138 * omap_test_timeout - busy-loop, testing a condition
141 * @cond: condition to test until it evaluates to true 139 * @cond: condition to test until it evaluates to true
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index e4336035c0e..f3953a49928 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -42,7 +42,6 @@
42 42
43static int __init omap3_l3_init(void) 43static int __init omap3_l3_init(void)
44{ 44{
45 int l;
46 struct omap_hwmod *oh; 45 struct omap_hwmod *oh;
47 struct platform_device *pdev; 46 struct platform_device *pdev;
48 char oh_name[L3_MODULES_MAX_LEN]; 47 char oh_name[L3_MODULES_MAX_LEN];
@@ -54,7 +53,7 @@ static int __init omap3_l3_init(void)
54 if (!(cpu_is_omap34xx())) 53 if (!(cpu_is_omap34xx()))
55 return -ENODEV; 54 return -ENODEV;
56 55
57 l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main"); 56 snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main");
58 57
59 oh = omap_hwmod_lookup(oh_name); 58 oh = omap_hwmod_lookup(oh_name);
60 59
@@ -72,7 +71,7 @@ postcore_initcall(omap3_l3_init);
72 71
73static int __init omap4_l3_init(void) 72static int __init omap4_l3_init(void)
74{ 73{
75 int l, i; 74 int i;
76 struct omap_hwmod *oh[3]; 75 struct omap_hwmod *oh[3];
77 struct platform_device *pdev; 76 struct platform_device *pdev;
78 char oh_name[L3_MODULES_MAX_LEN]; 77 char oh_name[L3_MODULES_MAX_LEN];
@@ -89,7 +88,7 @@ static int __init omap4_l3_init(void)
89 return -ENODEV; 88 return -ENODEV;
90 89
91 for (i = 0; i < L3_MODULES; i++) { 90 for (i = 0; i < L3_MODULES; i++) {
92 l = snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1); 91 snprintf(oh_name, L3_MODULES_MAX_LEN, "l3_main_%d", i+1);
93 92
94 oh[i] = omap_hwmod_lookup(oh_name); 93 oh[i] = omap_hwmod_lookup(oh_name);
95 if (!(oh[i])) 94 if (!(oh[i]))
diff --git a/arch/arm/mach-omap2/gpio.c b/arch/arm/mach-omap2/gpio.c
index 2f994e5194e..064cab03d2b 100644
--- a/arch/arm/mach-omap2/gpio.c
+++ b/arch/arm/mach-omap2/gpio.c
@@ -58,7 +58,7 @@ static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
58 pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1); 58 pdata->virtual_irq_start = IH_GPIO_BASE + 32 * (id - 1);
59 pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count; 59 pdata->get_context_loss_count = omap_pm_get_dev_context_loss_count;
60 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL); 60 pdata->regs = kzalloc(sizeof(struct omap_gpio_reg_offs), GFP_KERNEL);
61 if (!pdata) { 61 if (!pdata->regs) {
62 pr_err("gpio%d: Memory allocation failed\n", id); 62 pr_err("gpio%d: Memory allocation failed\n", id);
63 return -ENOMEM; 63 return -ENOMEM;
64 } 64 }
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c
index 385b3e02c4a..a0fa9bb2bda 100644
--- a/arch/arm/mach-omap2/gpmc-onenand.c
+++ b/arch/arm/mach-omap2/gpmc-onenand.c
@@ -176,7 +176,7 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg,
176 const int t_wpl = 40; 176 const int t_wpl = 40;
177 const int t_wph = 30; 177 const int t_wph = 30;
178 int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo; 178 int min_gpmc_clk_period, t_ces, t_avds, t_avdh, t_ach, t_aavdh, t_rdyo;
179 int tick_ns, div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency; 179 int div, fclk_offset_ns, fclk_offset, gpmc_clk_ns, latency;
180 int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0; 180 int first_time = 0, hf = 0, vhf = 0, sync_read = 0, sync_write = 0;
181 int err, ticks_cez; 181 int err, ticks_cez;
182 int cs = cfg->cs, freq = *freq_ptr; 182 int cs = cfg->cs, freq = *freq_ptr;
@@ -240,7 +240,6 @@ static int omap2_onenand_set_sync_mode(struct omap_onenand_platform_data *cfg,
240 break; 240 break;
241 } 241 }
242 242
243 tick_ns = gpmc_ticks_to_ns(1);
244 div = gpmc_cs_calc_divider(cs, min_gpmc_clk_period); 243 div = gpmc_cs_calc_divider(cs, min_gpmc_clk_period);
245 gpmc_clk_ns = gpmc_ticks_to_ns(div); 244 gpmc_clk_ns = gpmc_ticks_to_ns(div);
246 if (gpmc_clk_ns < 15) /* >66Mhz */ 245 if (gpmc_clk_ns < 15) /* >66Mhz */
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 00d510858e2..580e684e882 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -755,8 +755,7 @@ static int __init gpmc_init(void)
755 irq++; 755 irq++;
756 } 756 }
757 757
758 ret = request_irq(gpmc_irq, 758 ret = request_irq(gpmc_irq, gpmc_handle_irq, IRQF_SHARED, "gpmc", NULL);
759 gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base);
760 if (ret) 759 if (ret)
761 pr_err("gpmc: irq-%d could not claim: err %d\n", 760 pr_err("gpmc: irq-%d could not claim: err %d\n",
762 gpmc_irq, ret); 761 gpmc_irq, ret);
diff --git a/arch/arm/mach-omap2/hwspinlock.c b/arch/arm/mach-omap2/hwspinlock.c
index 454dfce125c..8763c8520dc 100644
--- a/arch/arm/mach-omap2/hwspinlock.c
+++ b/arch/arm/mach-omap2/hwspinlock.c
@@ -28,7 +28,7 @@ static struct hwspinlock_pdata omap_hwspinlock_pdata __initdata = {
28 .base_id = 0, 28 .base_id = 0,
29}; 29};
30 30
31int __init hwspinlocks_init(void) 31static int __init hwspinlocks_init(void)
32{ 32{
33 int retval = 0; 33 int retval = 0;
34 struct omap_hwmod *oh; 34 struct omap_hwmod *oh;
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 065bd768987..2d5a57669a7 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -31,6 +31,7 @@
31#include <plat/omap-pm.h> 31#include <plat/omap-pm.h>
32#include <plat/omap_hwmod.h> 32#include <plat/omap_hwmod.h>
33#include <plat/multi.h> 33#include <plat/multi.h>
34#include <plat/dma.h>
34 35
35#include "iomap.h" 36#include "iomap.h"
36#include "voltage.h" 37#include "voltage.h"
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 65f0d2571c9..80f3ced0bd1 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -25,6 +25,7 @@
25#include <mach/hardware.h> 25#include <mach/hardware.h>
26 26
27#include "iomap.h" 27#include "iomap.h"
28#include "common.h"
28 29
29/* selected INTC register offsets */ 30/* selected INTC register offsets */
30 31
@@ -334,7 +335,7 @@ void omap_intc_restore_context(void)
334void omap3_intc_suspend(void) 335void omap3_intc_suspend(void)
335{ 336{
336 /* A pending interrupt would prevent OMAP from entering suspend */ 337 /* A pending interrupt would prevent OMAP from entering suspend */
337 omap_ack_irq(0); 338 omap_ack_irq(NULL);
338} 339}
339 340
340void omap3_intc_prepare_idle(void) 341void omap3_intc_prepare_idle(void)
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 65c33911341..3268ee24ead 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -247,7 +247,7 @@ int __init omap_mux_init_signal(const char *muxname, int val)
247 int mux_mode; 247 int mux_mode;
248 248
249 mux_mode = omap_mux_get_by_name(muxname, &partition, &mux); 249 mux_mode = omap_mux_get_by_name(muxname, &partition, &mux);
250 if (mux_mode < 0) 250 if (mux_mode < 0 || !mux)
251 return mux_mode; 251 return mux_mode;
252 252
253 old_mode = omap_mux_read(partition, mux->reg_offset); 253 old_mode = omap_mux_read(partition, mux->reg_offset);
diff --git a/arch/arm/mach-omap2/omap-secure.c b/arch/arm/mach-omap2/omap-secure.c
index d8f8ef40290..d9ae4a53d81 100644
--- a/arch/arm/mach-omap2/omap-secure.c
+++ b/arch/arm/mach-omap2/omap-secure.c
@@ -18,6 +18,7 @@
18#include <asm/cacheflush.h> 18#include <asm/cacheflush.h>
19#include <asm/memblock.h> 19#include <asm/memblock.h>
20 20
21#include <plat/omap-secure.h>
21#include <mach/omap-secure.h> 22#include <mach/omap-secure.h>
22 23
23static phys_addr_t omap_secure_memblock_base; 24static phys_addr_t omap_secure_memblock_base;
diff --git a/arch/arm/mach-omap2/omap-wakeupgen.c b/arch/arm/mach-omap2/omap-wakeupgen.c
index 42cd7fb5241..d811c779035 100644
--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -259,7 +259,7 @@ static void irq_save_context(void)
259/* 259/*
260 * Clear WakeupGen SAR backup status. 260 * Clear WakeupGen SAR backup status.
261 */ 261 */
262void irq_sar_clear(void) 262static void irq_sar_clear(void)
263{ 263{
264 u32 val; 264 u32 val;
265 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET); 265 val = __raw_readl(sar_base + SAR_BACKUP_STATUS_OFFSET);
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 95442b69ae2..facfffca9ea 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -171,8 +171,6 @@ static int omap2_allow_mpu_retention(void)
171 171
172static void omap2_enter_mpu_retention(void) 172static void omap2_enter_mpu_retention(void)
173{ 173{
174 int only_idle = 0;
175
176 /* Putting MPU into the WFI state while a transfer is active 174 /* Putting MPU into the WFI state while a transfer is active
177 * seems to cause the I2C block to timeout. Why? Good question. */ 175 * seems to cause the I2C block to timeout. Why? Good question. */
178 if (omap2_i2c_active()) 176 if (omap2_i2c_active())
@@ -195,7 +193,6 @@ static void omap2_enter_mpu_retention(void)
195 193
196 omap2_prm_write_mod_reg(OMAP_LOGICRETSTATE_MASK, MPU_MOD, 194 omap2_prm_write_mod_reg(OMAP_LOGICRETSTATE_MASK, MPU_MOD,
197 OMAP2_PM_PWSTCTRL); 195 OMAP2_PM_PWSTCTRL);
198 only_idle = 1;
199 } 196 }
200 197
201 omap2_sram_idle(); 198 omap2_sram_idle();
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 703bd109925..8b43aefba0e 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -273,7 +273,7 @@ void omap_sram_idle(void)
273 int per_next_state = PWRDM_POWER_ON; 273 int per_next_state = PWRDM_POWER_ON;
274 int core_next_state = PWRDM_POWER_ON; 274 int core_next_state = PWRDM_POWER_ON;
275 int per_going_off; 275 int per_going_off;
276 int core_prev_state, per_prev_state; 276 int core_prev_state;
277 u32 sdrc_pwr = 0; 277 u32 sdrc_pwr = 0;
278 278
279 mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm); 279 mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
@@ -375,10 +375,8 @@ void omap_sram_idle(void)
375 pwrdm_post_transition(); 375 pwrdm_post_transition();
376 376
377 /* PER */ 377 /* PER */
378 if (per_next_state < PWRDM_POWER_ON) { 378 if (per_next_state < PWRDM_POWER_ON)
379 per_prev_state = pwrdm_read_prev_pwrst(per_pwrdm);
380 omap2_gpio_resume_after_idle(); 379 omap2_gpio_resume_after_idle();
381 }
382 380
383 /* Disable IO-PAD and IO-CHAIN wakeup */ 381 /* Disable IO-PAD and IO-CHAIN wakeup */
384 if (omap3_has_io_wakeup() && 382 if (omap3_has_io_wakeup() &&
@@ -702,7 +700,7 @@ static void __init pm_errata_configure(void)
702static int __init omap3_pm_init(void) 700static int __init omap3_pm_init(void)
703{ 701{
704 struct power_state *pwrst, *tmp; 702 struct power_state *pwrst, *tmp;
705 struct clockdomain *neon_clkdm, *per_clkdm, *mpu_clkdm, *core_clkdm; 703 struct clockdomain *neon_clkdm, *mpu_clkdm;
706 int ret; 704 int ret;
707 705
708 if (!cpu_is_omap34xx()) 706 if (!cpu_is_omap34xx())
@@ -757,8 +755,6 @@ static int __init omap3_pm_init(void)
757 755
758 neon_clkdm = clkdm_lookup("neon_clkdm"); 756 neon_clkdm = clkdm_lookup("neon_clkdm");
759 mpu_clkdm = clkdm_lookup("mpu_clkdm"); 757 mpu_clkdm = clkdm_lookup("mpu_clkdm");
760 per_clkdm = clkdm_lookup("per_clkdm");
761 core_clkdm = clkdm_lookup("core_clkdm");
762 758
763#ifdef CONFIG_SUSPEND 759#ifdef CONFIG_SUSPEND
764 omap_pm_suspend = omap3_pm_suspend; 760 omap_pm_suspend = omap3_pm_suspend;
diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c
index d28f848897d..dfe00ddb5c6 100644
--- a/arch/arm/mach-omap2/prm_common.c
+++ b/arch/arm/mach-omap2/prm_common.c
@@ -237,7 +237,7 @@ void omap_prcm_irq_complete(void)
237 */ 237 */
238int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup) 238int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
239{ 239{
240 int nr_regs = irq_setup->nr_regs; 240 int nr_regs;
241 u32 mask[OMAP_PRCM_MAX_NR_PENDING_REG]; 241 u32 mask[OMAP_PRCM_MAX_NR_PENDING_REG];
242 int offset, i; 242 int offset, i;
243 struct irq_chip_generic *gc; 243 struct irq_chip_generic *gc;
@@ -246,6 +246,8 @@ int omap_prcm_register_chain_handler(struct omap_prcm_irq_setup *irq_setup)
246 if (!irq_setup) 246 if (!irq_setup)
247 return -EINVAL; 247 return -EINVAL;
248 248
249 nr_regs = irq_setup->nr_regs;
250
249 if (prcm_irq_setup) { 251 if (prcm_irq_setup) {
250 pr_err("PRCM: already initialized; won't reinitialize\n"); 252 pr_err("PRCM: already initialized; won't reinitialize\n");
251 return -EINVAL; 253 return -EINVAL;
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 9fc2f44188c..678dd1d612e 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -133,7 +133,7 @@ static void omap_serial_fill_default_pads(struct omap_board_data *bdata)
133static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {} 133static void omap_serial_fill_default_pads(struct omap_board_data *bdata) {}
134#endif 134#endif
135 135
136char *cmdline_find_option(char *str) 136static char *cmdline_find_option(char *str)
137{ 137{
138 extern char *saved_command_line; 138 extern char *saved_command_line;
139 139
diff --git a/arch/arm/mach-omap2/usb-tusb6010.c b/arch/arm/mach-omap2/usb-tusb6010.c
index 994d8f591a1..db84a46ce7f 100644
--- a/arch/arm/mach-omap2/usb-tusb6010.c
+++ b/arch/arm/mach-omap2/usb-tusb6010.c
@@ -126,7 +126,7 @@ static int tusb_set_sync_mode(unsigned sysclk_ps, unsigned fclk_ps)
126 tmp = (t.sync_clk + fclk_ps - 1) / fclk_ps; 126 tmp = (t.sync_clk + fclk_ps - 1) / fclk_ps;
127 if (tmp > 4) 127 if (tmp > 4)
128 return -ERANGE; 128 return -ERANGE;
129 if (tmp <= 0) 129 if (tmp == 0)
130 tmp = 1; 130 tmp = 1;
131 t.page_burst_access = (fclk_ps * tmp) / 1000; 131 t.page_burst_access = (fclk_ps * tmp) / 1000;
132 132
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index c0fe2757b69..ed8605f0115 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -9,9 +9,6 @@ obj-m :=
9obj-n := 9obj-n :=
10obj- := 10obj- :=
11 11
12# OCPI interconnect support for 1710, 1610 and 5912
13obj-$(CONFIG_ARCH_OMAP16XX) += ocpi.o
14
15# omap_device support (OMAP2+ only at the moment) 12# omap_device support (OMAP2+ only at the moment)
16obj-$(CONFIG_ARCH_OMAP2) += omap_device.o 13obj-$(CONFIG_ARCH_OMAP2) += omap_device.o
17obj-$(CONFIG_ARCH_OMAP3) += omap_device.o 14obj-$(CONFIG_ARCH_OMAP3) += omap_device.o
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index f1e46ea6b81..0a9b9a97011 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -20,6 +20,7 @@
20#include <plat/board.h> 20#include <plat/board.h>
21#include <plat/vram.h> 21#include <plat/vram.h>
22#include <plat/dsp.h> 22#include <plat/dsp.h>
23#include <plat/dma.h>
23 24
24#include <plat/omap-secure.h> 25#include <plat/omap-secure.h>
25 26
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index ecdb3da0dea..612227efe34 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -41,6 +41,15 @@
41 41
42#include <plat/tc.h> 42#include <plat/tc.h>
43 43
44/*
45 * MAX_LOGICAL_DMA_CH_COUNT: the maximum number of logical DMA
46 * channels that an instance of the SDMA IP block can support. Used
47 * to size arrays. (The actual maximum on a particular SoC may be less
48 * than this -- for example, OMAP1 SDMA instances only support 17 logical
49 * DMA channels.)
50 */
51#define MAX_LOGICAL_DMA_CH_COUNT 32
52
44#undef DEBUG 53#undef DEBUG
45 54
46#ifndef CONFIG_ARCH_OMAP1 55#ifndef CONFIG_ARCH_OMAP1
@@ -883,7 +892,7 @@ void omap_start_dma(int lch)
883 892
884 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { 893 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
885 int next_lch, cur_lch; 894 int next_lch, cur_lch;
886 char dma_chan_link_map[dma_lch_count]; 895 char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT];
887 896
888 dma_chan_link_map[lch] = 1; 897 dma_chan_link_map[lch] = 1;
889 /* Set the link register of the first channel */ 898 /* Set the link register of the first channel */
@@ -967,7 +976,7 @@ void omap_stop_dma(int lch)
967 976
968 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) { 977 if (!omap_dma_in_1510_mode() && dma_chan[lch].next_lch != -1) {
969 int next_lch, cur_lch = lch; 978 int next_lch, cur_lch = lch;
970 char dma_chan_link_map[dma_lch_count]; 979 char dma_chan_link_map[MAX_LOGICAL_DMA_CH_COUNT];
971 980
972 memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map)); 981 memset(dma_chan_link_map, 0, sizeof(dma_chan_link_map));
973 do { 982 do {
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 652139c0339..c4ed35e89fb 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -349,11 +349,12 @@ EXPORT_SYMBOL_GPL(omap_dm_timer_start);
349int omap_dm_timer_stop(struct omap_dm_timer *timer) 349int omap_dm_timer_stop(struct omap_dm_timer *timer)
350{ 350{
351 unsigned long rate = 0; 351 unsigned long rate = 0;
352 struct dmtimer_platform_data *pdata = timer->pdev->dev.platform_data; 352 struct dmtimer_platform_data *pdata;
353 353
354 if (unlikely(!timer)) 354 if (unlikely(!timer))
355 return -EINVAL; 355 return -EINVAL;
356 356
357 pdata = timer->pdev->dev.platform_data;
357 if (!pdata->needs_manual_reset) 358 if (!pdata->needs_manual_reset)
358 rate = clk_get_rate(timer->fclk); 359 rate = clk_get_rate(timer->fclk);
359 360
diff --git a/arch/arm/plat-omap/include/plat/board.h b/arch/arm/plat-omap/include/plat/board.h
index d5eb4c87db9..4814c5b6530 100644
--- a/arch/arm/plat-omap/include/plat/board.h
+++ b/arch/arm/plat-omap/include/plat/board.h
@@ -91,6 +91,8 @@ struct omap_usb_config {
91 u32 (*usb0_init)(unsigned nwires, unsigned is_device); 91 u32 (*usb0_init)(unsigned nwires, unsigned is_device);
92 u32 (*usb1_init)(unsigned nwires); 92 u32 (*usb1_init)(unsigned nwires);
93 u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup); 93 u32 (*usb2_init)(unsigned nwires, unsigned alt_pingroup);
94
95 int (*ocpi_enable)(void);
94}; 96};
95 97
96struct omap_lcd_config { 98struct omap_lcd_config {
diff --git a/arch/arm/plat-omap/include/plat/common.h b/arch/arm/plat-omap/include/plat/common.h
index b4d7ec3fbfb..a557b8484e6 100644
--- a/arch/arm/plat-omap/include/plat/common.h
+++ b/arch/arm/plat-omap/include/plat/common.h
@@ -32,6 +32,8 @@
32 32
33extern int __init omap_init_clocksource_32k(void); 33extern int __init omap_init_clocksource_32k(void);
34 34
35extern void __init omap_check_revision(void);
36
35extern void omap_reserve(void); 37extern void omap_reserve(void);
36extern int omap_dss_reset(struct omap_hwmod *); 38extern int omap_dss_reset(struct omap_hwmod *);
37 39
diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h
index dc562a5c0a8..42afb4c4551 100644
--- a/arch/arm/plat-omap/include/plat/dma.h
+++ b/arch/arm/plat-omap/include/plat/dma.h
@@ -442,6 +442,7 @@ struct omap_system_dma_plat_info {
442 u32 (*dma_read)(int reg, int lch); 442 u32 (*dma_read)(int reg, int lch);
443}; 443};
444 444
445extern void __init omap_init_consistent_dma_size(void);
445extern void omap_set_dma_priority(int lch, int dst_port, int priority); 446extern void omap_set_dma_priority(int lch, int dst_port, int priority);
446extern int omap_request_dma(int dev_id, const char *dev_name, 447extern int omap_request_dma(int dev_id, const char *dev_name,
447 void (*callback)(int lch, u16 ch_status, void *data), 448 void (*callback)(int lch, u16 ch_status, void *data),
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 9418f00b6c3..230ff91be49 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -316,12 +316,12 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer)
316 OMAP_TIMER_V1_SYS_STAT_OFFSET; 316 OMAP_TIMER_V1_SYS_STAT_OFFSET;
317 timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET; 317 timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET;
318 timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET; 318 timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET;
319 timer->irq_dis = 0; 319 timer->irq_dis = NULL;
320 timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET; 320 timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET;
321 timer->func_base = timer->io_base; 321 timer->func_base = timer->io_base;
322 } else { 322 } else {
323 timer->revision = 2; 323 timer->revision = 2;
324 timer->sys_stat = 0; 324 timer->sys_stat = NULL;
325 timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS; 325 timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS;
326 timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET; 326 timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET;
327 timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR; 327 timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR;
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index d50cbc6385b..c490240bb82 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -475,13 +475,11 @@ static int omap_device_count_resources(struct omap_device *od)
475static int omap_device_fill_resources(struct omap_device *od, 475static int omap_device_fill_resources(struct omap_device *od,
476 struct resource *res) 476 struct resource *res)
477{ 477{
478 int c = 0;
479 int i, r; 478 int i, r;
480 479
481 for (i = 0; i < od->hwmods_cnt; i++) { 480 for (i = 0; i < od->hwmods_cnt; i++) {
482 r = omap_hwmod_fill_resources(od->hwmods[i], res); 481 r = omap_hwmod_fill_resources(od->hwmods[i], res);
483 res += r; 482 res += r;
484 c += r;
485 } 483 }
486 484
487 return 0; 485 return 0;
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index f9a8c5341ee..477363c163e 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -196,8 +196,8 @@ static void __init omap_map_sram(void)
196 * Looks like we need to preserve some bootloader code at the 196 * Looks like we need to preserve some bootloader code at the
197 * beginning of SRAM for jumping to flash for reboot to work... 197 * beginning of SRAM for jumping to flash for reboot to work...
198 */ 198 */
199 memset((void *)omap_sram_base + SRAM_BOOTLOADER_SZ, 0, 199 memset_io(omap_sram_base + SRAM_BOOTLOADER_SZ, 0,
200 omap_sram_size - SRAM_BOOTLOADER_SZ); 200 omap_sram_size - SRAM_BOOTLOADER_SZ);
201} 201}
202 202
203/* 203/*
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c
index d2bbfd1cb0b..5db75619f21 100644
--- a/arch/arm/plat-omap/usb.c
+++ b/arch/arm/plat-omap/usb.c
@@ -31,8 +31,6 @@
31 31
32#include <mach/hardware.h> 32#include <mach/hardware.h>
33 33
34#include "../mach-omap2/common.h"
35
36#ifdef CONFIG_ARCH_OMAP_OTG 34#ifdef CONFIG_ARCH_OMAP_OTG
37 35
38void __init 36void __init
@@ -138,8 +136,6 @@ omap_otg_init(struct omap_usb_config *config)
138#endif 136#endif
139 pr_debug("OTG_SYSCON_1 = %08x\n", omap_readl(OTG_SYSCON_1)); 137 pr_debug("OTG_SYSCON_1 = %08x\n", omap_readl(OTG_SYSCON_1));
140 omap_writel(syscon, OTG_SYSCON_1); 138 omap_writel(syscon, OTG_SYSCON_1);
141
142 status = 0;
143} 139}
144 140
145#else 141#else