diff options
author | Olof Johansson <olof@lixom.net> | 2012-03-10 12:15:30 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-03-10 12:15:30 -0500 |
commit | c454f813501b94cd687bf3c5c0783f815a854905 (patch) | |
tree | 8b6e1719ba4470e478d719ca0cf935501370e237 /arch/arm | |
parent | 1ad4fb2f7cbc21db9cdbb53e25ce348d93bbd6e7 (diff) | |
parent | 63fc5f3bb3d0ca9ab4767a801b518aa6335f87ad (diff) |
Merge branch 'board' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/boards
* 'board' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP: add minimal support for Nokia RM-696
ARM: OMAP: enable Bluetooth on the PandaBoard
ARM: OMAP: pandora: add support for backlight and poweroff
ARM: OMAP4: board-4430sdp: don't initialize value that is never used
ARM: OMAP3: cm-t3517: add EMAC support
ARM: OMAP: move generic EMAC init to separate file
ARM: OMAP3: RX-51: add explicit mux configuration of tsc2005 control gpios
ARM: OMAP: Add omap_reserve functionality
(includes sync-up to 3.3-rc6)
Diffstat (limited to 'arch/arm')
40 files changed, 372 insertions, 170 deletions
diff --git a/arch/arm/mach-lpc32xx/include/mach/irqs.h b/arch/arm/mach-lpc32xx/include/mach/irqs.h index 2667f52e3b04..9e3b90df32e1 100644 --- a/arch/arm/mach-lpc32xx/include/mach/irqs.h +++ b/arch/arm/mach-lpc32xx/include/mach/irqs.h | |||
@@ -61,7 +61,7 @@ | |||
61 | */ | 61 | */ |
62 | #define IRQ_LPC32XX_JTAG_COMM_TX LPC32XX_SIC1_IRQ(1) | 62 | #define IRQ_LPC32XX_JTAG_COMM_TX LPC32XX_SIC1_IRQ(1) |
63 | #define IRQ_LPC32XX_JTAG_COMM_RX LPC32XX_SIC1_IRQ(2) | 63 | #define IRQ_LPC32XX_JTAG_COMM_RX LPC32XX_SIC1_IRQ(2) |
64 | #define IRQ_LPC32XX_GPI_11 LPC32XX_SIC1_IRQ(4) | 64 | #define IRQ_LPC32XX_GPI_28 LPC32XX_SIC1_IRQ(4) |
65 | #define IRQ_LPC32XX_TS_P LPC32XX_SIC1_IRQ(6) | 65 | #define IRQ_LPC32XX_TS_P LPC32XX_SIC1_IRQ(6) |
66 | #define IRQ_LPC32XX_TS_IRQ LPC32XX_SIC1_IRQ(7) | 66 | #define IRQ_LPC32XX_TS_IRQ LPC32XX_SIC1_IRQ(7) |
67 | #define IRQ_LPC32XX_TS_AUX LPC32XX_SIC1_IRQ(8) | 67 | #define IRQ_LPC32XX_TS_AUX LPC32XX_SIC1_IRQ(8) |
diff --git a/arch/arm/mach-lpc32xx/irq.c b/arch/arm/mach-lpc32xx/irq.c index 4eae566dfdc7..c74de01ab5b6 100644 --- a/arch/arm/mach-lpc32xx/irq.c +++ b/arch/arm/mach-lpc32xx/irq.c | |||
@@ -118,6 +118,10 @@ static const struct lpc32xx_event_info lpc32xx_events[NR_IRQS] = { | |||
118 | .event_group = &lpc32xx_event_pin_regs, | 118 | .event_group = &lpc32xx_event_pin_regs, |
119 | .mask = LPC32XX_CLKPWR_EXTSRC_GPI_06_BIT, | 119 | .mask = LPC32XX_CLKPWR_EXTSRC_GPI_06_BIT, |
120 | }, | 120 | }, |
121 | [IRQ_LPC32XX_GPI_28] = { | ||
122 | .event_group = &lpc32xx_event_pin_regs, | ||
123 | .mask = LPC32XX_CLKPWR_EXTSRC_GPI_28_BIT, | ||
124 | }, | ||
121 | [IRQ_LPC32XX_GPIO_00] = { | 125 | [IRQ_LPC32XX_GPIO_00] = { |
122 | .event_group = &lpc32xx_event_int_regs, | 126 | .event_group = &lpc32xx_event_int_regs, |
123 | .mask = LPC32XX_CLKPWR_INTSRC_GPIO_00_BIT, | 127 | .mask = LPC32XX_CLKPWR_INTSRC_GPIO_00_BIT, |
@@ -305,9 +309,18 @@ static int lpc32xx_irq_wake(struct irq_data *d, unsigned int state) | |||
305 | 309 | ||
306 | if (state) | 310 | if (state) |
307 | eventreg |= lpc32xx_events[d->irq].mask; | 311 | eventreg |= lpc32xx_events[d->irq].mask; |
308 | else | 312 | else { |
309 | eventreg &= ~lpc32xx_events[d->irq].mask; | 313 | eventreg &= ~lpc32xx_events[d->irq].mask; |
310 | 314 | ||
315 | /* | ||
316 | * When disabling the wakeup, clear the latched | ||
317 | * event | ||
318 | */ | ||
319 | __raw_writel(lpc32xx_events[d->irq].mask, | ||
320 | lpc32xx_events[d->irq]. | ||
321 | event_group->rawstat_reg); | ||
322 | } | ||
323 | |||
311 | __raw_writel(eventreg, | 324 | __raw_writel(eventreg, |
312 | lpc32xx_events[d->irq].event_group->enab_reg); | 325 | lpc32xx_events[d->irq].event_group->enab_reg); |
313 | 326 | ||
@@ -380,13 +393,15 @@ void __init lpc32xx_init_irq(void) | |||
380 | 393 | ||
381 | /* Setup SIC1 */ | 394 | /* Setup SIC1 */ |
382 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC1_BASE)); | 395 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC1_BASE)); |
383 | __raw_writel(MIC_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC1_BASE)); | 396 | __raw_writel(SIC1_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC1_BASE)); |
384 | __raw_writel(MIC_ATR_DEFAULT, LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC1_BASE)); | 397 | __raw_writel(SIC1_ATR_DEFAULT, |
398 | LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC1_BASE)); | ||
385 | 399 | ||
386 | /* Setup SIC2 */ | 400 | /* Setup SIC2 */ |
387 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC2_BASE)); | 401 | __raw_writel(0, LPC32XX_INTC_MASK(LPC32XX_SIC2_BASE)); |
388 | __raw_writel(MIC_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC2_BASE)); | 402 | __raw_writel(SIC2_APR_DEFAULT, LPC32XX_INTC_POLAR(LPC32XX_SIC2_BASE)); |
389 | __raw_writel(MIC_ATR_DEFAULT, LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC2_BASE)); | 403 | __raw_writel(SIC2_ATR_DEFAULT, |
404 | LPC32XX_INTC_ACT_TYPE(LPC32XX_SIC2_BASE)); | ||
390 | 405 | ||
391 | /* Configure supported IRQ's */ | 406 | /* Configure supported IRQ's */ |
392 | for (i = 0; i < NR_IRQS; i++) { | 407 | for (i = 0; i < NR_IRQS; i++) { |
diff --git a/arch/arm/mach-lpc32xx/serial.c b/arch/arm/mach-lpc32xx/serial.c index 429cfdbb2b3d..f2735281616a 100644 --- a/arch/arm/mach-lpc32xx/serial.c +++ b/arch/arm/mach-lpc32xx/serial.c | |||
@@ -88,6 +88,7 @@ struct uartinit { | |||
88 | char *uart_ck_name; | 88 | char *uart_ck_name; |
89 | u32 ck_mode_mask; | 89 | u32 ck_mode_mask; |
90 | void __iomem *pdiv_clk_reg; | 90 | void __iomem *pdiv_clk_reg; |
91 | resource_size_t mapbase; | ||
91 | }; | 92 | }; |
92 | 93 | ||
93 | static struct uartinit uartinit_data[] __initdata = { | 94 | static struct uartinit uartinit_data[] __initdata = { |
@@ -97,6 +98,7 @@ static struct uartinit uartinit_data[] __initdata = { | |||
97 | .ck_mode_mask = | 98 | .ck_mode_mask = |
98 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 5), | 99 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 5), |
99 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART5_CLK_CTRL, | 100 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART5_CLK_CTRL, |
101 | .mapbase = LPC32XX_UART5_BASE, | ||
100 | }, | 102 | }, |
101 | #endif | 103 | #endif |
102 | #ifdef CONFIG_ARCH_LPC32XX_UART3_SELECT | 104 | #ifdef CONFIG_ARCH_LPC32XX_UART3_SELECT |
@@ -105,6 +107,7 @@ static struct uartinit uartinit_data[] __initdata = { | |||
105 | .ck_mode_mask = | 107 | .ck_mode_mask = |
106 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 3), | 108 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 3), |
107 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART3_CLK_CTRL, | 109 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART3_CLK_CTRL, |
110 | .mapbase = LPC32XX_UART3_BASE, | ||
108 | }, | 111 | }, |
109 | #endif | 112 | #endif |
110 | #ifdef CONFIG_ARCH_LPC32XX_UART4_SELECT | 113 | #ifdef CONFIG_ARCH_LPC32XX_UART4_SELECT |
@@ -113,6 +116,7 @@ static struct uartinit uartinit_data[] __initdata = { | |||
113 | .ck_mode_mask = | 116 | .ck_mode_mask = |
114 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 4), | 117 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 4), |
115 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART4_CLK_CTRL, | 118 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART4_CLK_CTRL, |
119 | .mapbase = LPC32XX_UART4_BASE, | ||
116 | }, | 120 | }, |
117 | #endif | 121 | #endif |
118 | #ifdef CONFIG_ARCH_LPC32XX_UART6_SELECT | 122 | #ifdef CONFIG_ARCH_LPC32XX_UART6_SELECT |
@@ -121,6 +125,7 @@ static struct uartinit uartinit_data[] __initdata = { | |||
121 | .ck_mode_mask = | 125 | .ck_mode_mask = |
122 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 6), | 126 | LPC32XX_UART_CLKMODE_LOAD(LPC32XX_UART_CLKMODE_ON, 6), |
123 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART6_CLK_CTRL, | 127 | .pdiv_clk_reg = LPC32XX_CLKPWR_UART6_CLK_CTRL, |
128 | .mapbase = LPC32XX_UART6_BASE, | ||
124 | }, | 129 | }, |
125 | #endif | 130 | #endif |
126 | }; | 131 | }; |
@@ -165,11 +170,24 @@ void __init lpc32xx_serial_init(void) | |||
165 | 170 | ||
166 | /* pre-UART clock divider set to 1 */ | 171 | /* pre-UART clock divider set to 1 */ |
167 | __raw_writel(0x0101, uartinit_data[i].pdiv_clk_reg); | 172 | __raw_writel(0x0101, uartinit_data[i].pdiv_clk_reg); |
173 | |||
174 | /* | ||
175 | * Force a flush of the RX FIFOs to work around a | ||
176 | * HW bug | ||
177 | */ | ||
178 | puart = uartinit_data[i].mapbase; | ||
179 | __raw_writel(0xC1, LPC32XX_UART_IIR_FCR(puart)); | ||
180 | __raw_writel(0x00, LPC32XX_UART_DLL_FIFO(puart)); | ||
181 | j = LPC32XX_SUART_FIFO_SIZE; | ||
182 | while (j--) | ||
183 | tmp = __raw_readl( | ||
184 | LPC32XX_UART_DLL_FIFO(puart)); | ||
185 | __raw_writel(0, LPC32XX_UART_IIR_FCR(puart)); | ||
168 | } | 186 | } |
169 | 187 | ||
170 | /* This needs to be done after all UART clocks are setup */ | 188 | /* This needs to be done after all UART clocks are setup */ |
171 | __raw_writel(clkmodes, LPC32XX_UARTCTL_CLKMODE); | 189 | __raw_writel(clkmodes, LPC32XX_UARTCTL_CLKMODE); |
172 | for (i = 0; i < ARRAY_SIZE(uartinit_data) - 1; i++) { | 190 | for (i = 0; i < ARRAY_SIZE(uartinit_data); i++) { |
173 | /* Force a flush of the RX FIFOs to work around a HW bug */ | 191 | /* Force a flush of the RX FIFOs to work around a HW bug */ |
174 | puart = serial_std_platform_data[i].mapbase; | 192 | puart = serial_std_platform_data[i].mapbase; |
175 | __raw_writel(0xC1, LPC32XX_UART_IIR_FCR(puart)); | 193 | __raw_writel(0xC1, LPC32XX_UART_IIR_FCR(puart)); |
diff --git a/arch/arm/mach-mmp/aspenite.c b/arch/arm/mach-mmp/aspenite.c index 17cb76060125..3588a5584153 100644 --- a/arch/arm/mach-mmp/aspenite.c +++ b/arch/arm/mach-mmp/aspenite.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/mtd/partitions.h> | 17 | #include <linux/mtd/partitions.h> |
18 | #include <linux/mtd/nand.h> | 18 | #include <linux/mtd/nand.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/gpio.h> | ||
21 | 20 | ||
22 | #include <asm/mach-types.h> | 21 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 22 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-mmp/pxa168.c b/arch/arm/mach-mmp/pxa168.c index 9f612565b140..f10f87d8b667 100644 --- a/arch/arm/mach-mmp/pxa168.c +++ b/arch/arm/mach-mmp/pxa168.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <mach/dma.h> | 24 | #include <mach/dma.h> |
25 | #include <mach/devices.h> | 25 | #include <mach/devices.h> |
26 | #include <mach/mfp.h> | 26 | #include <mach/mfp.h> |
27 | #include <linux/platform_device.h> | ||
28 | #include <linux/dma-mapping.h> | 27 | #include <linux/dma-mapping.h> |
29 | #include <mach/pxa168.h> | 28 | #include <mach/pxa168.h> |
30 | 29 | ||
diff --git a/arch/arm/mach-mmp/tavorevb.c b/arch/arm/mach-mmp/tavorevb.c index 8e3b5af04a57..bc97170125bf 100644 --- a/arch/arm/mach-mmp/tavorevb.c +++ b/arch/arm/mach-mmp/tavorevb.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
13 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
14 | #include <linux/smc91x.h> | 14 | #include <linux/smc91x.h> |
15 | #include <linux/gpio.h> | ||
16 | 15 | ||
17 | #include <asm/mach-types.h> | 16 | #include <asm/mach-types.h> |
18 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index 309369ea6978..be2002f42dea 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c | |||
@@ -416,13 +416,13 @@ static void __init innovator_init(void) | |||
416 | #ifdef CONFIG_ARCH_OMAP15XX | 416 | #ifdef CONFIG_ARCH_OMAP15XX |
417 | if (cpu_is_omap1510()) { | 417 | if (cpu_is_omap1510()) { |
418 | omap1_usb_init(&innovator1510_usb_config); | 418 | omap1_usb_init(&innovator1510_usb_config); |
419 | innovator_config[1].data = &innovator1510_lcd_config; | 419 | innovator_config[0].data = &innovator1510_lcd_config; |
420 | } | 420 | } |
421 | #endif | 421 | #endif |
422 | #ifdef CONFIG_ARCH_OMAP16XX | 422 | #ifdef CONFIG_ARCH_OMAP16XX |
423 | if (cpu_is_omap1610()) { | 423 | if (cpu_is_omap1610()) { |
424 | omap1_usb_init(&h2_usb_config); | 424 | omap1_usb_init(&h2_usb_config); |
425 | innovator_config[1].data = &innovator1610_lcd_config; | 425 | innovator_config[0].data = &innovator1610_lcd_config; |
426 | } | 426 | } |
427 | #endif | 427 | #endif |
428 | omap_board_config = innovator_config; | 428 | omap_board_config = innovator_config; |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index d965da45160e..b740c2e88e5a 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -245,10 +245,11 @@ config MACH_NOKIA_N8X0 | |||
245 | select MACH_NOKIA_N810_WIMAX | 245 | select MACH_NOKIA_N810_WIMAX |
246 | 246 | ||
247 | config MACH_NOKIA_RM680 | 247 | config MACH_NOKIA_RM680 |
248 | bool "Nokia RM-680 board" | 248 | bool "Nokia RM-680/696 board" |
249 | depends on ARCH_OMAP3 | 249 | depends on ARCH_OMAP3 |
250 | default y | 250 | default y |
251 | select OMAP_PACKAGE_CBB | 251 | select OMAP_PACKAGE_CBB |
252 | select MACH_NOKIA_RM696 | ||
252 | 253 | ||
253 | config MACH_NOKIA_RX51 | 254 | config MACH_NOKIA_RX51 |
254 | bool "Nokia RX-51 board" | 255 | bool "Nokia RX-51 board" |
@@ -364,8 +365,8 @@ config OMAP3_SDRC_AC_TIMING | |||
364 | going on could result in system crashes; | 365 | going on could result in system crashes; |
365 | 366 | ||
366 | config OMAP4_ERRATA_I688 | 367 | config OMAP4_ERRATA_I688 |
367 | bool "OMAP4 errata: Async Bridge Corruption (BROKEN)" | 368 | bool "OMAP4 errata: Async Bridge Corruption" |
368 | depends on ARCH_OMAP4 && BROKEN | 369 | depends on ARCH_OMAP4 |
369 | select ARCH_HAS_BARRIERS | 370 | select ARCH_HAS_BARRIERS |
370 | help | 371 | help |
371 | If a data is stalled inside asynchronous bridge because of back | 372 | If a data is stalled inside asynchronous bridge because of back |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index bd76394ccaf8..8d6bcca653b5 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -270,4 +270,7 @@ smsc911x-$(CONFIG_SMSC911X) := gpmc-smsc911x.o | |||
270 | obj-y += $(smsc911x-m) $(smsc911x-y) | 270 | obj-y += $(smsc911x-m) $(smsc911x-y) |
271 | obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o | 271 | obj-$(CONFIG_ARCH_OMAP4) += hwspinlock.o |
272 | 272 | ||
273 | emac-$(CONFIG_TI_DAVINCI_EMAC) := am35xx-emac.o | ||
274 | obj-y += $(emac-m) $(emac-y) | ||
275 | |||
273 | obj-y += common-board-devices.o twl-common.o | 276 | obj-y += common-board-devices.o twl-common.o |
diff --git a/arch/arm/mach-omap2/am35xx-emac.c b/arch/arm/mach-omap2/am35xx-emac.c new file mode 100644 index 000000000000..1f97e7475206 --- /dev/null +++ b/arch/arm/mach-omap2/am35xx-emac.c | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Ilya Yanok, Emcraft Systems | ||
3 | * | ||
4 | * Based on mach-omap2/board-am3517evm.c | ||
5 | * Copyright (C) 2009 Texas Instruments Incorporated | ||
6 | * Author: Ranjith Lohithakshan <ranjithl@ti.com> | ||
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 | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed "as is" WITHOUT ANY WARRANTY of any kind, | ||
13 | * whether express or implied; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #include <linux/clk.h> | ||
19 | #include <linux/davinci_emac.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <plat/irqs.h> | ||
22 | #include <mach/am35xx.h> | ||
23 | |||
24 | #include "control.h" | ||
25 | |||
26 | static struct mdio_platform_data am35xx_emac_mdio_pdata; | ||
27 | |||
28 | static struct resource am35xx_emac_mdio_resources[] = { | ||
29 | DEFINE_RES_MEM(AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET, SZ_4K), | ||
30 | }; | ||
31 | |||
32 | static struct platform_device am35xx_emac_mdio_device = { | ||
33 | .name = "davinci_mdio", | ||
34 | .id = 0, | ||
35 | .num_resources = ARRAY_SIZE(am35xx_emac_mdio_resources), | ||
36 | .resource = am35xx_emac_mdio_resources, | ||
37 | .dev.platform_data = &am35xx_emac_mdio_pdata, | ||
38 | }; | ||
39 | |||
40 | static void am35xx_enable_emac_int(void) | ||
41 | { | ||
42 | u32 regval; | ||
43 | |||
44 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
45 | regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR | | ||
46 | AM35XX_CPGMAC_C0_TX_PULSE_CLR | | ||
47 | AM35XX_CPGMAC_C0_MISC_PULSE_CLR | | ||
48 | AM35XX_CPGMAC_C0_RX_THRESH_CLR); | ||
49 | omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
50 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
51 | } | ||
52 | |||
53 | static void am35xx_disable_emac_int(void) | ||
54 | { | ||
55 | u32 regval; | ||
56 | |||
57 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
58 | regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR | | ||
59 | AM35XX_CPGMAC_C0_TX_PULSE_CLR); | ||
60 | omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
61 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
62 | } | ||
63 | |||
64 | static struct emac_platform_data am35xx_emac_pdata = { | ||
65 | .ctrl_reg_offset = AM35XX_EMAC_CNTRL_OFFSET, | ||
66 | .ctrl_mod_reg_offset = AM35XX_EMAC_CNTRL_MOD_OFFSET, | ||
67 | .ctrl_ram_offset = AM35XX_EMAC_CNTRL_RAM_OFFSET, | ||
68 | .ctrl_ram_size = AM35XX_EMAC_CNTRL_RAM_SIZE, | ||
69 | .hw_ram_addr = AM35XX_EMAC_HW_RAM_ADDR, | ||
70 | .version = EMAC_VERSION_2, | ||
71 | .interrupt_enable = am35xx_enable_emac_int, | ||
72 | .interrupt_disable = am35xx_disable_emac_int, | ||
73 | }; | ||
74 | |||
75 | static struct resource am35xx_emac_resources[] = { | ||
76 | DEFINE_RES_MEM(AM35XX_IPSS_EMAC_BASE, 0x30000), | ||
77 | DEFINE_RES_IRQ(INT_35XX_EMAC_C0_RXTHRESH_IRQ), | ||
78 | DEFINE_RES_IRQ(INT_35XX_EMAC_C0_RX_PULSE_IRQ), | ||
79 | DEFINE_RES_IRQ(INT_35XX_EMAC_C0_TX_PULSE_IRQ), | ||
80 | DEFINE_RES_IRQ(INT_35XX_EMAC_C0_MISC_PULSE_IRQ), | ||
81 | }; | ||
82 | |||
83 | static struct platform_device am35xx_emac_device = { | ||
84 | .name = "davinci_emac", | ||
85 | .id = -1, | ||
86 | .num_resources = ARRAY_SIZE(am35xx_emac_resources), | ||
87 | .resource = am35xx_emac_resources, | ||
88 | .dev = { | ||
89 | .platform_data = &am35xx_emac_pdata, | ||
90 | }, | ||
91 | }; | ||
92 | |||
93 | void __init am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) | ||
94 | { | ||
95 | unsigned int regval; | ||
96 | int err; | ||
97 | |||
98 | am35xx_emac_pdata.rmii_en = rmii_en; | ||
99 | am35xx_emac_mdio_pdata.bus_freq = mdio_bus_freq; | ||
100 | err = platform_device_register(&am35xx_emac_device); | ||
101 | if (err) { | ||
102 | pr_err("AM35x: failed registering EMAC device: %d\n", err); | ||
103 | return; | ||
104 | } | ||
105 | |||
106 | err = platform_device_register(&am35xx_emac_mdio_device); | ||
107 | if (err) { | ||
108 | pr_err("AM35x: failed registering EMAC MDIO device: %d\n", err); | ||
109 | platform_device_unregister(&am35xx_emac_device); | ||
110 | return; | ||
111 | } | ||
112 | |||
113 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
114 | regval = regval & (~(AM35XX_CPGMACSS_SW_RST)); | ||
115 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | ||
116 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
117 | } | ||
diff --git a/arch/arm/mach-omap2/am35xx-emac.h b/arch/arm/mach-omap2/am35xx-emac.h new file mode 100644 index 000000000000..15c6f9ce59a2 --- /dev/null +++ b/arch/arm/mach-omap2/am35xx-emac.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Ilya Yanok, Emcraft Systems | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #define AM35XX_DEFAULT_MDIO_FREQUENCY 1000000 | ||
10 | |||
11 | #if defined(CONFIG_TI_DAVINCI_EMAC) || defined(CONFIG_TI_DAVINCI_EMAC_MODULE) | ||
12 | void am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en); | ||
13 | #else | ||
14 | static inline void am35xx_emac_init(unsigned long mdio_bus_freq, u8 rmii_en) {} | ||
15 | #endif | ||
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 4e9071589bfb..766f7e47771c 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c | |||
@@ -322,7 +322,10 @@ static struct spi_board_info sdp4430_spi_board_info[] __initdata = { | |||
322 | .bus_num = 1, | 322 | .bus_num = 1, |
323 | .chip_select = 0, | 323 | .chip_select = 0, |
324 | .max_speed_hz = 24000000, | 324 | .max_speed_hz = 24000000, |
325 | .irq = ETH_KS8851_IRQ, | 325 | /* |
326 | * .irq is set to gpio_to_irq(ETH_KS8851_IRQ) | ||
327 | * in omap_4430sdp_init | ||
328 | */ | ||
326 | }, | 329 | }, |
327 | }; | 330 | }; |
328 | 331 | ||
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 4b1cfe32e6ba..005905b6ef2b 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -39,124 +39,11 @@ | |||
39 | #include <video/omap-panel-generic-dpi.h> | 39 | #include <video/omap-panel-generic-dpi.h> |
40 | #include <video/omap-panel-dvi.h> | 40 | #include <video/omap-panel-dvi.h> |
41 | 41 | ||
42 | #include "am35xx-emac.h" | ||
42 | #include "mux.h" | 43 | #include "mux.h" |
43 | #include "control.h" | 44 | #include "control.h" |
44 | #include "hsmmc.h" | 45 | #include "hsmmc.h" |
45 | 46 | ||
46 | #define AM35XX_EVM_MDIO_FREQUENCY (1000000) | ||
47 | |||
48 | static struct mdio_platform_data am3517_evm_mdio_pdata = { | ||
49 | .bus_freq = AM35XX_EVM_MDIO_FREQUENCY, | ||
50 | }; | ||
51 | |||
52 | static struct resource am3517_mdio_resources[] = { | ||
53 | { | ||
54 | .start = AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET, | ||
55 | .end = AM35XX_IPSS_EMAC_BASE + AM35XX_EMAC_MDIO_OFFSET + | ||
56 | SZ_4K - 1, | ||
57 | .flags = IORESOURCE_MEM, | ||
58 | }, | ||
59 | }; | ||
60 | |||
61 | static struct platform_device am3517_mdio_device = { | ||
62 | .name = "davinci_mdio", | ||
63 | .id = 0, | ||
64 | .num_resources = ARRAY_SIZE(am3517_mdio_resources), | ||
65 | .resource = am3517_mdio_resources, | ||
66 | .dev.platform_data = &am3517_evm_mdio_pdata, | ||
67 | }; | ||
68 | |||
69 | static struct emac_platform_data am3517_evm_emac_pdata = { | ||
70 | .rmii_en = 1, | ||
71 | }; | ||
72 | |||
73 | static struct resource am3517_emac_resources[] = { | ||
74 | { | ||
75 | .start = AM35XX_IPSS_EMAC_BASE, | ||
76 | .end = AM35XX_IPSS_EMAC_BASE + 0x2FFFF, | ||
77 | .flags = IORESOURCE_MEM, | ||
78 | }, | ||
79 | { | ||
80 | .start = INT_35XX_EMAC_C0_RXTHRESH_IRQ, | ||
81 | .end = INT_35XX_EMAC_C0_RXTHRESH_IRQ, | ||
82 | .flags = IORESOURCE_IRQ, | ||
83 | }, | ||
84 | { | ||
85 | .start = INT_35XX_EMAC_C0_RX_PULSE_IRQ, | ||
86 | .end = INT_35XX_EMAC_C0_RX_PULSE_IRQ, | ||
87 | .flags = IORESOURCE_IRQ, | ||
88 | }, | ||
89 | { | ||
90 | .start = INT_35XX_EMAC_C0_TX_PULSE_IRQ, | ||
91 | .end = INT_35XX_EMAC_C0_TX_PULSE_IRQ, | ||
92 | .flags = IORESOURCE_IRQ, | ||
93 | }, | ||
94 | { | ||
95 | .start = INT_35XX_EMAC_C0_MISC_PULSE_IRQ, | ||
96 | .end = INT_35XX_EMAC_C0_MISC_PULSE_IRQ, | ||
97 | .flags = IORESOURCE_IRQ, | ||
98 | }, | ||
99 | }; | ||
100 | |||
101 | static struct platform_device am3517_emac_device = { | ||
102 | .name = "davinci_emac", | ||
103 | .id = -1, | ||
104 | .num_resources = ARRAY_SIZE(am3517_emac_resources), | ||
105 | .resource = am3517_emac_resources, | ||
106 | }; | ||
107 | |||
108 | static void am3517_enable_ethernet_int(void) | ||
109 | { | ||
110 | u32 regval; | ||
111 | |||
112 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
113 | regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR | | ||
114 | AM35XX_CPGMAC_C0_TX_PULSE_CLR | | ||
115 | AM35XX_CPGMAC_C0_MISC_PULSE_CLR | | ||
116 | AM35XX_CPGMAC_C0_RX_THRESH_CLR); | ||
117 | omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
118 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
119 | } | ||
120 | |||
121 | static void am3517_disable_ethernet_int(void) | ||
122 | { | ||
123 | u32 regval; | ||
124 | |||
125 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
126 | regval = (regval | AM35XX_CPGMAC_C0_RX_PULSE_CLR | | ||
127 | AM35XX_CPGMAC_C0_TX_PULSE_CLR); | ||
128 | omap_ctrl_writel(regval, AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
129 | regval = omap_ctrl_readl(AM35XX_CONTROL_LVL_INTR_CLEAR); | ||
130 | } | ||
131 | |||
132 | static void am3517_evm_ethernet_init(struct emac_platform_data *pdata) | ||
133 | { | ||
134 | unsigned int regval; | ||
135 | |||
136 | pdata->ctrl_reg_offset = AM35XX_EMAC_CNTRL_OFFSET; | ||
137 | pdata->ctrl_mod_reg_offset = AM35XX_EMAC_CNTRL_MOD_OFFSET; | ||
138 | pdata->ctrl_ram_offset = AM35XX_EMAC_CNTRL_RAM_OFFSET; | ||
139 | pdata->ctrl_ram_size = AM35XX_EMAC_CNTRL_RAM_SIZE; | ||
140 | pdata->version = EMAC_VERSION_2; | ||
141 | pdata->hw_ram_addr = AM35XX_EMAC_HW_RAM_ADDR; | ||
142 | pdata->interrupt_enable = am3517_enable_ethernet_int; | ||
143 | pdata->interrupt_disable = am3517_disable_ethernet_int; | ||
144 | am3517_emac_device.dev.platform_data = pdata; | ||
145 | platform_device_register(&am3517_emac_device); | ||
146 | platform_device_register(&am3517_mdio_device); | ||
147 | clk_add_alias(NULL, dev_name(&am3517_mdio_device.dev), | ||
148 | NULL, &am3517_emac_device.dev); | ||
149 | |||
150 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
151 | regval = regval & (~(AM35XX_CPGMACSS_SW_RST)); | ||
152 | omap_ctrl_writel(regval, AM35XX_CONTROL_IP_SW_RESET); | ||
153 | regval = omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); | ||
154 | |||
155 | return ; | ||
156 | } | ||
157 | |||
158 | |||
159 | |||
160 | #define LCD_PANEL_PWR 176 | 47 | #define LCD_PANEL_PWR 176 |
161 | #define LCD_PANEL_BKLIGHT_PWR 182 | 48 | #define LCD_PANEL_BKLIGHT_PWR 182 |
162 | #define LCD_PANEL_PWM 181 | 49 | #define LCD_PANEL_PWM 181 |
@@ -498,7 +385,7 @@ static void __init am3517_evm_init(void) | |||
498 | i2c_register_board_info(1, am3517evm_i2c1_boardinfo, | 385 | i2c_register_board_info(1, am3517evm_i2c1_boardinfo, |
499 | ARRAY_SIZE(am3517evm_i2c1_boardinfo)); | 386 | ARRAY_SIZE(am3517evm_i2c1_boardinfo)); |
500 | /*Ethernet*/ | 387 | /*Ethernet*/ |
501 | am3517_evm_ethernet_init(&am3517_evm_emac_pdata); | 388 | am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1); |
502 | 389 | ||
503 | /* MUSB */ | 390 | /* MUSB */ |
504 | am3517_evm_musb_init(); | 391 | am3517_evm_musb_init(); |
diff --git a/arch/arm/mach-omap2/board-cm-t3517.c b/arch/arm/mach-omap2/board-cm-t3517.c index f36d694d2159..9e66e167e4f3 100644 --- a/arch/arm/mach-omap2/board-cm-t3517.c +++ b/arch/arm/mach-omap2/board-cm-t3517.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include "mux.h" | 49 | #include "mux.h" |
50 | #include "control.h" | 50 | #include "control.h" |
51 | #include "common-board-devices.h" | 51 | #include "common-board-devices.h" |
52 | #include "am35xx-emac.h" | ||
52 | 53 | ||
53 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | 54 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) |
54 | static struct gpio_led cm_t3517_leds[] = { | 55 | static struct gpio_led cm_t3517_leds[] = { |
@@ -291,6 +292,7 @@ static void __init cm_t3517_init(void) | |||
291 | cm_t3517_init_rtc(); | 292 | cm_t3517_init_rtc(); |
292 | cm_t3517_init_usbh(); | 293 | cm_t3517_init_usbh(); |
293 | cm_t3517_init_hecc(); | 294 | cm_t3517_init_hecc(); |
295 | am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1); | ||
294 | } | 296 | } |
295 | 297 | ||
296 | MACHINE_START(CM_T3517, "Compulab CM-T3517") | 298 | MACHINE_START(CM_T3517, "Compulab CM-T3517") |
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c index 42a4d11fad23..672262717601 100644 --- a/arch/arm/mach-omap2/board-n8x0.c +++ b/arch/arm/mach-omap2/board-n8x0.c | |||
@@ -371,7 +371,11 @@ static void n8x0_mmc_callback(void *data, u8 card_mask) | |||
371 | else | 371 | else |
372 | *openp = 0; | 372 | *openp = 0; |
373 | 373 | ||
374 | #ifdef CONFIG_MMC_OMAP | ||
374 | omap_mmc_notify_cover_event(mmc_device, index, *openp); | 375 | omap_mmc_notify_cover_event(mmc_device, index, *openp); |
376 | #else | ||
377 | pr_warn("MMC: notify cover event not available\n"); | ||
378 | #endif | ||
375 | } | 379 | } |
376 | 380 | ||
377 | static int n8x0_mmc_late_init(struct device *dev) | 381 | static int n8x0_mmc_late_init(struct device *dev) |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index c775bead1497..c877236a8442 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -381,7 +381,7 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
381 | gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI"); | 381 | gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI"); |
382 | 382 | ||
383 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ | 383 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ |
384 | gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; | 384 | gpio_leds[0].gpio = gpio + TWL4030_GPIO_MAX + 1; |
385 | 385 | ||
386 | platform_device_register(&leds_gpio); | 386 | platform_device_register(&leds_gpio); |
387 | 387 | ||
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c index 4198dd017d8f..221214fa1ce7 100644 --- a/arch/arm/mach-omap2/board-omap3logic.c +++ b/arch/arm/mach-omap2/board-omap3logic.c | |||
@@ -205,6 +205,7 @@ static void __init omap3logic_init(void) | |||
205 | 205 | ||
206 | MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") | 206 | MACHINE_START(OMAP3_TORPEDO, "Logic OMAP3 Torpedo board") |
207 | .atag_offset = 0x100, | 207 | .atag_offset = 0x100, |
208 | .reserve = omap_reserve, | ||
208 | .map_io = omap3_map_io, | 209 | .map_io = omap3_map_io, |
209 | .init_early = omap35xx_init_early, | 210 | .init_early = omap35xx_init_early, |
210 | .init_irq = omap3_init_irq, | 211 | .init_irq = omap3_init_irq, |
@@ -216,6 +217,7 @@ MACHINE_END | |||
216 | 217 | ||
217 | MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") | 218 | MACHINE_START(OMAP3530_LV_SOM, "OMAP Logic 3530 LV SOM board") |
218 | .atag_offset = 0x100, | 219 | .atag_offset = 0x100, |
220 | .reserve = omap_reserve, | ||
219 | .map_io = omap3_map_io, | 221 | .map_io = omap3_map_io, |
220 | .init_early = omap35xx_init_early, | 222 | .init_early = omap35xx_init_early, |
221 | .init_irq = omap3_init_irq, | 223 | .init_irq = omap3_init_irq, |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 1644b73017fc..94dbf081207f 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -121,6 +121,11 @@ static struct platform_device pandora_leds_gpio = { | |||
121 | }, | 121 | }, |
122 | }; | 122 | }; |
123 | 123 | ||
124 | static struct platform_device pandora_backlight = { | ||
125 | .name = "pandora-backlight", | ||
126 | .id = -1, | ||
127 | }; | ||
128 | |||
124 | #define GPIO_BUTTON(gpio_num, ev_type, ev_code, act_low, descr) \ | 129 | #define GPIO_BUTTON(gpio_num, ev_type, ev_code, act_low, descr) \ |
125 | { \ | 130 | { \ |
126 | .gpio = gpio_num, \ | 131 | .gpio = gpio_num, \ |
@@ -476,6 +481,10 @@ static struct platform_device pandora_vwlan_device = { | |||
476 | 481 | ||
477 | static struct twl4030_bci_platform_data pandora_bci_data; | 482 | static struct twl4030_bci_platform_data pandora_bci_data; |
478 | 483 | ||
484 | static struct twl4030_power_data pandora_power_data = { | ||
485 | .use_poweroff = true, | ||
486 | }; | ||
487 | |||
479 | static struct twl4030_platform_data omap3pandora_twldata = { | 488 | static struct twl4030_platform_data omap3pandora_twldata = { |
480 | .gpio = &omap3pandora_gpio_data, | 489 | .gpio = &omap3pandora_gpio_data, |
481 | .vmmc1 = &pandora_vmmc1, | 490 | .vmmc1 = &pandora_vmmc1, |
@@ -486,6 +495,7 @@ static struct twl4030_platform_data omap3pandora_twldata = { | |||
486 | .vsim = &pandora_vsim, | 495 | .vsim = &pandora_vsim, |
487 | .keypad = &pandora_kp_data, | 496 | .keypad = &pandora_kp_data, |
488 | .bci = &pandora_bci_data, | 497 | .bci = &pandora_bci_data, |
498 | .power = &pandora_power_data, | ||
489 | }; | 499 | }; |
490 | 500 | ||
491 | static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = { | 501 | static struct i2c_board_info __initdata omap3pandora_i2c3_boardinfo[] = { |
@@ -557,6 +567,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { | |||
557 | &pandora_leds_gpio, | 567 | &pandora_leds_gpio, |
558 | &pandora_keys_gpio, | 568 | &pandora_keys_gpio, |
559 | &pandora_vwlan_device, | 569 | &pandora_vwlan_device, |
570 | &pandora_backlight, | ||
560 | }; | 571 | }; |
561 | 572 | ||
562 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 573 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 28fc271f7031..b1d74d6b02e6 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -91,9 +91,15 @@ static struct platform_device leds_gpio = { | |||
91 | }, | 91 | }, |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static struct platform_device btwilink_device = { | ||
95 | .name = "btwilink", | ||
96 | .id = -1, | ||
97 | }; | ||
98 | |||
94 | static struct platform_device *panda_devices[] __initdata = { | 99 | static struct platform_device *panda_devices[] __initdata = { |
95 | &leds_gpio, | 100 | &leds_gpio, |
96 | &wl1271_device, | 101 | &wl1271_device, |
102 | &btwilink_device, | ||
97 | }; | 103 | }; |
98 | 104 | ||
99 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { | 105 | static const struct usbhs_omap_board_data usbhs_bdata __initconst = { |
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c index 8678b386c6a2..094473e2a81f 100644 --- a/arch/arm/mach-omap2/board-rm680.c +++ b/arch/arm/mach-omap2/board-rm680.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Board support file for Nokia RM-680. | 2 | * Board support file for Nokia RM-680/696. |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Nokia | 4 | * Copyright (C) 2010 Nokia |
5 | * | 5 | * |
@@ -154,3 +154,15 @@ MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") | |||
154 | .timer = &omap3_timer, | 154 | .timer = &omap3_timer, |
155 | .restart = omap_prcm_restart, | 155 | .restart = omap_prcm_restart, |
156 | MACHINE_END | 156 | MACHINE_END |
157 | |||
158 | MACHINE_START(NOKIA_RM696, "Nokia RM-696 board") | ||
159 | .atag_offset = 0x100, | ||
160 | .reserve = omap_reserve, | ||
161 | .map_io = omap3_map_io, | ||
162 | .init_early = omap3630_init_early, | ||
163 | .init_irq = omap3_init_irq, | ||
164 | .handle_irq = omap3_intc_handle_irq, | ||
165 | .init_machine = rm680_init, | ||
166 | .timer = &omap3_timer, | ||
167 | .restart = omap_prcm_restart, | ||
168 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index acb4e77b39ef..33c1f8c50353 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -1105,6 +1105,11 @@ static struct tsc2005_platform_data tsc2005_pdata = { | |||
1105 | .esd_timeout_ms = 8000, | 1105 | .esd_timeout_ms = 8000, |
1106 | }; | 1106 | }; |
1107 | 1107 | ||
1108 | static struct gpio rx51_tsc2005_gpios[] __initdata = { | ||
1109 | { RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ" }, | ||
1110 | { RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "tsc2005 reset" }, | ||
1111 | }; | ||
1112 | |||
1108 | static void rx51_tsc2005_set_reset(bool enable) | 1113 | static void rx51_tsc2005_set_reset(bool enable) |
1109 | { | 1114 | { |
1110 | gpio_set_value(RX51_TSC2005_RESET_GPIO, enable); | 1115 | gpio_set_value(RX51_TSC2005_RESET_GPIO, enable); |
@@ -1114,20 +1119,18 @@ static void __init rx51_init_tsc2005(void) | |||
1114 | { | 1119 | { |
1115 | int r; | 1120 | int r; |
1116 | 1121 | ||
1117 | r = gpio_request_one(RX51_TSC2005_IRQ_GPIO, GPIOF_IN, "tsc2005 IRQ"); | 1122 | omap_mux_init_gpio(RX51_TSC2005_RESET_GPIO, OMAP_PIN_OUTPUT); |
1118 | if (r < 0) { | 1123 | omap_mux_init_gpio(RX51_TSC2005_IRQ_GPIO, OMAP_PIN_INPUT_PULLUP); |
1119 | printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 IRQ"); | ||
1120 | rx51_peripherals_spi_board_info[RX51_SPI_TSC2005].irq = 0; | ||
1121 | } | ||
1122 | 1124 | ||
1123 | r = gpio_request_one(RX51_TSC2005_RESET_GPIO, GPIOF_OUT_INIT_HIGH, | 1125 | r = gpio_request_array(rx51_tsc2005_gpios, |
1124 | "tsc2005 reset"); | 1126 | ARRAY_SIZE(rx51_tsc2005_gpios)); |
1125 | if (r >= 0) { | 1127 | if (r < 0) { |
1126 | tsc2005_pdata.set_reset = rx51_tsc2005_set_reset; | 1128 | printk(KERN_ERR "tsc2005 board initialization failed\n"); |
1127 | } else { | ||
1128 | printk(KERN_ERR "unable to get %s GPIO\n", "tsc2005 reset"); | ||
1129 | tsc2005_pdata.esd_timeout_ms = 0; | 1129 | tsc2005_pdata.esd_timeout_ms = 0; |
1130 | return; | ||
1130 | } | 1131 | } |
1132 | |||
1133 | tsc2005_pdata.set_reset = rx51_tsc2005_set_reset; | ||
1131 | } | 1134 | } |
1132 | 1135 | ||
1133 | void __init rx51_peripherals_init(void) | 1136 | void __init rx51_peripherals_init(void) |
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index febffde2ff10..7e9338e8d684 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -132,6 +132,7 @@ void omap3_map_io(void); | |||
132 | void am33xx_map_io(void); | 132 | void am33xx_map_io(void); |
133 | void omap4_map_io(void); | 133 | void omap4_map_io(void); |
134 | void ti81xx_map_io(void); | 134 | void ti81xx_map_io(void); |
135 | void omap_barriers_init(void); | ||
135 | 136 | ||
136 | /** | 137 | /** |
137 | * omap_test_timeout - busy-loop, testing a condition | 138 | * omap_test_timeout - busy-loop, testing a condition |
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index cfdbb86bc84e..72e018b9b260 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c | |||
@@ -65,7 +65,6 @@ static int omap4_enter_idle(struct cpuidle_device *dev, | |||
65 | struct timespec ts_preidle, ts_postidle, ts_idle; | 65 | struct timespec ts_preidle, ts_postidle, ts_idle; |
66 | u32 cpu1_state; | 66 | u32 cpu1_state; |
67 | int idle_time; | 67 | int idle_time; |
68 | int new_state_idx; | ||
69 | int cpu_id = smp_processor_id(); | 68 | int cpu_id = smp_processor_id(); |
70 | 69 | ||
71 | /* Used to keep track of the total time in idle */ | 70 | /* Used to keep track of the total time in idle */ |
@@ -84,8 +83,8 @@ static int omap4_enter_idle(struct cpuidle_device *dev, | |||
84 | */ | 83 | */ |
85 | cpu1_state = pwrdm_read_pwrst(cpu1_pd); | 84 | cpu1_state = pwrdm_read_pwrst(cpu1_pd); |
86 | if (cpu1_state != PWRDM_POWER_OFF) { | 85 | if (cpu1_state != PWRDM_POWER_OFF) { |
87 | new_state_idx = drv->safe_state_index; | 86 | index = drv->safe_state_index; |
88 | cx = cpuidle_get_statedata(&dev->states_usage[new_state_idx]); | 87 | cx = cpuidle_get_statedata(&dev->states_usage[index]); |
89 | } | 88 | } |
90 | 89 | ||
91 | if (index > 0) | 90 | if (index > 0) |
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c index 997033129d26..bbb870c04a5e 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c | |||
@@ -19,6 +19,8 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/smsc911x.h> | 21 | #include <linux/smsc911x.h> |
22 | #include <linux/regulator/fixed.h> | ||
23 | #include <linux/regulator/machine.h> | ||
22 | 24 | ||
23 | #include <plat/board.h> | 25 | #include <plat/board.h> |
24 | #include <plat/gpmc.h> | 26 | #include <plat/gpmc.h> |
@@ -42,6 +44,50 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = { | |||
42 | .flags = SMSC911X_USE_16BIT, | 44 | .flags = SMSC911X_USE_16BIT, |
43 | }; | 45 | }; |
44 | 46 | ||
47 | static struct regulator_consumer_supply gpmc_smsc911x_supply[] = { | ||
48 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
49 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
50 | }; | ||
51 | |||
52 | /* Generic regulator definition to satisfy smsc911x */ | ||
53 | static struct regulator_init_data gpmc_smsc911x_reg_init_data = { | ||
54 | .constraints = { | ||
55 | .min_uV = 3300000, | ||
56 | .max_uV = 3300000, | ||
57 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
58 | | REGULATOR_MODE_STANDBY, | ||
59 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
60 | | REGULATOR_CHANGE_STATUS, | ||
61 | }, | ||
62 | .num_consumer_supplies = ARRAY_SIZE(gpmc_smsc911x_supply), | ||
63 | .consumer_supplies = gpmc_smsc911x_supply, | ||
64 | }; | ||
65 | |||
66 | static struct fixed_voltage_config gpmc_smsc911x_fixed_reg_data = { | ||
67 | .supply_name = "gpmc_smsc911x", | ||
68 | .microvolts = 3300000, | ||
69 | .gpio = -EINVAL, | ||
70 | .startup_delay = 0, | ||
71 | .enable_high = 0, | ||
72 | .enabled_at_boot = 1, | ||
73 | .init_data = &gpmc_smsc911x_reg_init_data, | ||
74 | }; | ||
75 | |||
76 | /* | ||
77 | * Platform device id of 42 is a temporary fix to avoid conflicts | ||
78 | * with other reg-fixed-voltage devices. The real fix should | ||
79 | * involve the driver core providing a way of dynamically | ||
80 | * assigning a unique id on registration for platform devices | ||
81 | * in the same name space. | ||
82 | */ | ||
83 | static struct platform_device gpmc_smsc911x_regulator = { | ||
84 | .name = "reg-fixed-voltage", | ||
85 | .id = 42, | ||
86 | .dev = { | ||
87 | .platform_data = &gpmc_smsc911x_fixed_reg_data, | ||
88 | }, | ||
89 | }; | ||
90 | |||
45 | /* | 91 | /* |
46 | * Initialize smsc911x device connected to the GPMC. Note that we | 92 | * Initialize smsc911x device connected to the GPMC. Note that we |
47 | * assume that pin multiplexing is done in the board-*.c file, | 93 | * assume that pin multiplexing is done in the board-*.c file, |
@@ -55,6 +101,12 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data) | |||
55 | 101 | ||
56 | gpmc_cfg = board_data; | 102 | gpmc_cfg = board_data; |
57 | 103 | ||
104 | ret = platform_device_register(&gpmc_smsc911x_regulator); | ||
105 | if (ret < 0) { | ||
106 | pr_err("Unable to register smsc911x regulators: %d\n", ret); | ||
107 | return; | ||
108 | } | ||
109 | |||
58 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { | 110 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { |
59 | pr_err("Failed to request GPMC mem region\n"); | 111 | pr_err("Failed to request GPMC mem region\n"); |
60 | return; | 112 | return; |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index b40c28895298..19dd1657245c 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -428,6 +428,7 @@ static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | |||
428 | return 0; | 428 | return 0; |
429 | } | 429 | } |
430 | 430 | ||
431 | static int omap_hsmmc_done; | ||
431 | #define MAX_OMAP_MMC_HWMOD_NAME_LEN 16 | 432 | #define MAX_OMAP_MMC_HWMOD_NAME_LEN 16 |
432 | 433 | ||
433 | void omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) | 434 | void omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) |
@@ -491,6 +492,11 @@ void omap2_hsmmc_init(struct omap2_hsmmc_info *controllers) | |||
491 | { | 492 | { |
492 | u32 reg; | 493 | u32 reg; |
493 | 494 | ||
495 | if (omap_hsmmc_done) | ||
496 | return; | ||
497 | |||
498 | omap_hsmmc_done = 1; | ||
499 | |||
494 | if (!cpu_is_omap44xx()) { | 500 | if (!cpu_is_omap44xx()) { |
495 | if (cpu_is_omap2430()) { | 501 | if (cpu_is_omap2430()) { |
496 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; | 502 | control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE; |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index eb50c29fb644..fb11b44fbdec 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -307,6 +307,7 @@ void __init omapam33xx_map_common_io(void) | |||
307 | void __init omap44xx_map_common_io(void) | 307 | void __init omap44xx_map_common_io(void) |
308 | { | 308 | { |
309 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); | 309 | iotable_init(omap44xx_io_desc, ARRAY_SIZE(omap44xx_io_desc)); |
310 | omap_barriers_init(); | ||
310 | } | 311 | } |
311 | #endif | 312 | #endif |
312 | 313 | ||
diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c index 609ea2ded7e3..2cc1aa004b94 100644 --- a/arch/arm/mach-omap2/mailbox.c +++ b/arch/arm/mach-omap2/mailbox.c | |||
@@ -281,8 +281,16 @@ static struct omap_mbox mbox_iva_info = { | |||
281 | .ops = &omap2_mbox_ops, | 281 | .ops = &omap2_mbox_ops, |
282 | .priv = &omap2_mbox_iva_priv, | 282 | .priv = &omap2_mbox_iva_priv, |
283 | }; | 283 | }; |
284 | #endif | ||
284 | 285 | ||
285 | struct omap_mbox *omap2_mboxes[] = { &mbox_dsp_info, &mbox_iva_info, NULL }; | 286 | #ifdef CONFIG_ARCH_OMAP2 |
287 | struct omap_mbox *omap2_mboxes[] = { | ||
288 | &mbox_dsp_info, | ||
289 | #ifdef CONFIG_SOC_OMAP2420 | ||
290 | &mbox_iva_info, | ||
291 | #endif | ||
292 | NULL | ||
293 | }; | ||
286 | #endif | 294 | #endif |
287 | 295 | ||
288 | #if defined(CONFIG_ARCH_OMAP4) | 296 | #if defined(CONFIG_ARCH_OMAP4) |
@@ -412,7 +420,8 @@ static void __exit omap2_mbox_exit(void) | |||
412 | platform_driver_unregister(&omap2_mbox_driver); | 420 | platform_driver_unregister(&omap2_mbox_driver); |
413 | } | 421 | } |
414 | 422 | ||
415 | module_init(omap2_mbox_init); | 423 | /* must be ready before omap3isp is probed */ |
424 | subsys_initcall(omap2_mbox_init); | ||
416 | module_exit(omap2_mbox_exit); | 425 | module_exit(omap2_mbox_exit); |
417 | 426 | ||
418 | MODULE_LICENSE("GPL v2"); | 427 | MODULE_LICENSE("GPL v2"); |
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index fb8bc9fa43b1..611a0e3d54ca 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -218,7 +218,7 @@ static int _omap_mux_get_by_name(struct omap_mux_partition *partition, | |||
218 | return -ENODEV; | 218 | return -ENODEV; |
219 | } | 219 | } |
220 | 220 | ||
221 | static int __init | 221 | static int |
222 | omap_mux_get_by_name(const char *muxname, | 222 | omap_mux_get_by_name(const char *muxname, |
223 | struct omap_mux_partition **found_partition, | 223 | struct omap_mux_partition **found_partition, |
224 | struct omap_mux **found_mux) | 224 | struct omap_mux **found_mux) |
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c index 40a8fbc07e4b..ebc595091312 100644 --- a/arch/arm/mach-omap2/omap4-common.c +++ b/arch/arm/mach-omap2/omap4-common.c | |||
@@ -24,6 +24,7 @@ | |||
24 | 24 | ||
25 | #include <plat/irqs.h> | 25 | #include <plat/irqs.h> |
26 | #include <plat/sram.h> | 26 | #include <plat/sram.h> |
27 | #include <plat/omap-secure.h> | ||
27 | 28 | ||
28 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
29 | #include <mach/omap-wakeupgen.h> | 30 | #include <mach/omap-wakeupgen.h> |
@@ -43,6 +44,9 @@ static void __iomem *sar_ram_base; | |||
43 | 44 | ||
44 | void __iomem *dram_sync, *sram_sync; | 45 | void __iomem *dram_sync, *sram_sync; |
45 | 46 | ||
47 | static phys_addr_t paddr; | ||
48 | static u32 size; | ||
49 | |||
46 | void omap_bus_sync(void) | 50 | void omap_bus_sync(void) |
47 | { | 51 | { |
48 | if (dram_sync && sram_sync) { | 52 | if (dram_sync && sram_sync) { |
@@ -52,18 +56,20 @@ void omap_bus_sync(void) | |||
52 | } | 56 | } |
53 | } | 57 | } |
54 | 58 | ||
55 | static int __init omap_barriers_init(void) | 59 | /* Steal one page physical memory for barrier implementation */ |
60 | int __init omap_barrier_reserve_memblock(void) | ||
56 | { | 61 | { |
57 | struct map_desc dram_io_desc[1]; | ||
58 | phys_addr_t paddr; | ||
59 | u32 size; | ||
60 | |||
61 | if (!cpu_is_omap44xx()) | ||
62 | return -ENODEV; | ||
63 | 62 | ||
64 | size = ALIGN(PAGE_SIZE, SZ_1M); | 63 | size = ALIGN(PAGE_SIZE, SZ_1M); |
65 | paddr = arm_memblock_steal(size, SZ_1M); | 64 | paddr = arm_memblock_steal(size, SZ_1M); |
66 | 65 | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | void __init omap_barriers_init(void) | ||
70 | { | ||
71 | struct map_desc dram_io_desc[1]; | ||
72 | |||
67 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; | 73 | dram_io_desc[0].virtual = OMAP4_DRAM_BARRIER_VA; |
68 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); | 74 | dram_io_desc[0].pfn = __phys_to_pfn(paddr); |
69 | dram_io_desc[0].length = size; | 75 | dram_io_desc[0].length = size; |
@@ -75,9 +81,10 @@ static int __init omap_barriers_init(void) | |||
75 | pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", | 81 | pr_info("OMAP4: Map 0x%08llx to 0x%08lx for dram barrier\n", |
76 | (long long) paddr, dram_io_desc[0].virtual); | 82 | (long long) paddr, dram_io_desc[0].virtual); |
77 | 83 | ||
78 | return 0; | ||
79 | } | 84 | } |
80 | core_initcall(omap_barriers_init); | 85 | #else |
86 | void __init omap_barriers_init(void) | ||
87 | {} | ||
81 | #endif | 88 | #endif |
82 | 89 | ||
83 | void __init gic_init_irq(void) | 90 | void __init gic_init_irq(void) |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index 1881fe915149..5a65dd04aa38 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -174,14 +174,17 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, | |||
174 | freq = clk->rate; | 174 | freq = clk->rate; |
175 | clk_put(clk); | 175 | clk_put(clk); |
176 | 176 | ||
177 | rcu_read_lock(); | ||
177 | opp = opp_find_freq_ceil(dev, &freq); | 178 | opp = opp_find_freq_ceil(dev, &freq); |
178 | if (IS_ERR(opp)) { | 179 | if (IS_ERR(opp)) { |
180 | rcu_read_unlock(); | ||
179 | pr_err("%s: unable to find boot up OPP for vdd_%s\n", | 181 | pr_err("%s: unable to find boot up OPP for vdd_%s\n", |
180 | __func__, vdd_name); | 182 | __func__, vdd_name); |
181 | goto exit; | 183 | goto exit; |
182 | } | 184 | } |
183 | 185 | ||
184 | bootup_volt = opp_get_voltage(opp); | 186 | bootup_volt = opp_get_voltage(opp); |
187 | rcu_read_unlock(); | ||
185 | if (!bootup_volt) { | 188 | if (!bootup_volt) { |
186 | pr_err("%s: unable to find voltage corresponding " | 189 | pr_err("%s: unable to find voltage corresponding " |
187 | "to the bootup OPP for vdd_%s\n", __func__, vdd_name); | 190 | "to the bootup OPP for vdd_%s\n", __func__, vdd_name); |
diff --git a/arch/arm/mach-omap2/usb-host.c b/arch/arm/mach-omap2/usb-host.c index 771dc781b746..f51348dafafd 100644 --- a/arch/arm/mach-omap2/usb-host.c +++ b/arch/arm/mach-omap2/usb-host.c | |||
@@ -486,7 +486,7 @@ static void setup_4430ohci_io_mux(const enum usbhs_omap_port_mode *port_mode) | |||
486 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | 486 | void __init usbhs_init(const struct usbhs_omap_board_data *pdata) |
487 | { | 487 | { |
488 | struct omap_hwmod *oh[2]; | 488 | struct omap_hwmod *oh[2]; |
489 | struct omap_device *od; | 489 | struct platform_device *pdev; |
490 | int bus_id = -1; | 490 | int bus_id = -1; |
491 | int i; | 491 | int i; |
492 | 492 | ||
@@ -522,11 +522,11 @@ void __init usbhs_init(const struct usbhs_omap_board_data *pdata) | |||
522 | return; | 522 | return; |
523 | } | 523 | } |
524 | 524 | ||
525 | od = omap_device_build_ss(OMAP_USBHS_DEVICE, bus_id, oh, 2, | 525 | pdev = omap_device_build_ss(OMAP_USBHS_DEVICE, bus_id, oh, 2, |
526 | (void *)&usbhs_data, sizeof(usbhs_data), | 526 | (void *)&usbhs_data, sizeof(usbhs_data), |
527 | omap_uhhtll_latency, | 527 | omap_uhhtll_latency, |
528 | ARRAY_SIZE(omap_uhhtll_latency), false); | 528 | ARRAY_SIZE(omap_uhhtll_latency), false); |
529 | if (IS_ERR(od)) { | 529 | if (IS_ERR(pdev)) { |
530 | pr_err("Could not build hwmod devices %s,%s\n", | 530 | pr_err("Could not build hwmod devices %s,%s\n", |
531 | USBHS_UHH_HWMODNAME, USBHS_TLL_HWMODNAME); | 531 | USBHS_UHH_HWMODNAME, USBHS_TLL_HWMODNAME); |
532 | return; | 532 | return; |
diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c index f038da1e4196..f2c23ea3692d 100644 --- a/arch/arm/mach-pxa/hx4700.c +++ b/arch/arm/mach-pxa/hx4700.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <mach/hx4700.h> | 45 | #include <mach/hx4700.h> |
46 | #include <mach/irda.h> | 46 | #include <mach/irda.h> |
47 | 47 | ||
48 | #include <sound/ak4641.h> | ||
48 | #include <video/platform_lcd.h> | 49 | #include <video/platform_lcd.h> |
49 | #include <video/w100fb.h> | 50 | #include <video/w100fb.h> |
50 | 51 | ||
@@ -780,6 +781,28 @@ static struct i2c_board_info __initdata pi2c_board_info[] = { | |||
780 | }; | 781 | }; |
781 | 782 | ||
782 | /* | 783 | /* |
784 | * Asahi Kasei AK4641 on I2C | ||
785 | */ | ||
786 | |||
787 | static struct ak4641_platform_data ak4641_info = { | ||
788 | .gpio_power = GPIO27_HX4700_CODEC_ON, | ||
789 | .gpio_npdn = GPIO109_HX4700_CODEC_nPDN, | ||
790 | }; | ||
791 | |||
792 | static struct i2c_board_info i2c_board_info[] __initdata = { | ||
793 | { | ||
794 | I2C_BOARD_INFO("ak4641", 0x12), | ||
795 | .platform_data = &ak4641_info, | ||
796 | }, | ||
797 | }; | ||
798 | |||
799 | static struct platform_device audio = { | ||
800 | .name = "hx4700-audio", | ||
801 | .id = -1, | ||
802 | }; | ||
803 | |||
804 | |||
805 | /* | ||
783 | * PCMCIA | 806 | * PCMCIA |
784 | */ | 807 | */ |
785 | 808 | ||
@@ -805,6 +828,7 @@ static struct platform_device *devices[] __initdata = { | |||
805 | &gpio_vbus, | 828 | &gpio_vbus, |
806 | &power_supply, | 829 | &power_supply, |
807 | &strataflash, | 830 | &strataflash, |
831 | &audio, | ||
808 | &pcmcia, | 832 | &pcmcia, |
809 | }; | 833 | }; |
810 | 834 | ||
@@ -842,6 +866,7 @@ static void __init hx4700_init(void) | |||
842 | pxa_set_ficp_info(&ficp_info); | 866 | pxa_set_ficp_info(&ficp_info); |
843 | pxa27x_set_i2c_power_info(NULL); | 867 | pxa27x_set_i2c_power_info(NULL); |
844 | pxa_set_i2c_info(NULL); | 868 | pxa_set_i2c_info(NULL); |
869 | i2c_register_board_info(0, ARRAY_AND_SIZE(i2c_board_info)); | ||
845 | i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info)); | 870 | i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info)); |
846 | pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); | 871 | pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); |
847 | spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); | 872 | spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index 8a775f631c55..d8de3e50a78a 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/suspend.h> | 25 | #include <linux/suspend.h> |
26 | #include <linux/syscore_ops.h> | 26 | #include <linux/syscore_ops.h> |
27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
28 | #include <linux/gpio.h> | ||
29 | 28 | ||
30 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
31 | #include <asm/suspend.h> | 30 | #include <asm/suspend.h> |
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 6c49e66057e3..a3fabc9dfa26 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/io.h> | 22 | #include <linux/io.h> |
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/i2c/pxa-i2c.h> | 24 | #include <linux/i2c/pxa-i2c.h> |
25 | #include <linux/gpio.h> | ||
26 | 25 | ||
27 | #include <asm/mach/map.h> | 26 | #include <asm/mach/map.h> |
28 | #include <mach/hardware.h> | 27 | #include <mach/hardware.h> |
diff --git a/arch/arm/mach-pxa/saarb.c b/arch/arm/mach-pxa/saarb.c index febc809ed5a6..5aded5e6148f 100644 --- a/arch/arm/mach-pxa/saarb.c +++ b/arch/arm/mach-pxa/saarb.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/i2c.h> | 15 | #include <linux/i2c.h> |
16 | #include <linux/i2c/pxa-i2c.h> | 16 | #include <linux/i2c/pxa-i2c.h> |
17 | #include <linux/mfd/88pm860x.h> | 17 | #include <linux/mfd/88pm860x.h> |
18 | #include <linux/gpio.h> | ||
19 | 18 | ||
20 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
21 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c index 8d5168d253a9..30989baf7f2a 100644 --- a/arch/arm/mach-pxa/sharpsl_pm.c +++ b/arch/arm/mach-pxa/sharpsl_pm.c | |||
@@ -168,6 +168,7 @@ struct battery_thresh sharpsl_battery_levels_noac[] = { | |||
168 | #define MAXCTRL_SEL_SH 4 | 168 | #define MAXCTRL_SEL_SH 4 |
169 | #define MAXCTRL_STR (1u << 7) | 169 | #define MAXCTRL_STR (1u << 7) |
170 | 170 | ||
171 | extern int max1111_read_channel(int); | ||
171 | /* | 172 | /* |
172 | * Read MAX1111 ADC | 173 | * Read MAX1111 ADC |
173 | */ | 174 | */ |
@@ -177,8 +178,6 @@ int sharpsl_pm_pxa_read_max1111(int channel) | |||
177 | if (machine_is_tosa()) | 178 | if (machine_is_tosa()) |
178 | return 0; | 179 | return 0; |
179 | 180 | ||
180 | extern int max1111_read_channel(int); | ||
181 | |||
182 | /* max1111 accepts channels from 0-3, however, | 181 | /* max1111 accepts channels from 0-3, however, |
183 | * it is encoded from 0-7 here in the code. | 182 | * it is encoded from 0-7 here in the code. |
184 | */ | 183 | */ |
diff --git a/arch/arm/mach-pxa/spitz_pm.c b/arch/arm/mach-pxa/spitz_pm.c index 34cbdac51525..438f02fe122a 100644 --- a/arch/arm/mach-pxa/spitz_pm.c +++ b/arch/arm/mach-pxa/spitz_pm.c | |||
@@ -172,10 +172,9 @@ static int spitz_should_wakeup(unsigned int resume_on_alarm) | |||
172 | static unsigned long spitz_charger_wakeup(void) | 172 | static unsigned long spitz_charger_wakeup(void) |
173 | { | 173 | { |
174 | unsigned long ret; | 174 | unsigned long ret; |
175 | ret = (!gpio_get_value(SPITZ_GPIO_KEY_INT) | 175 | ret = ((!gpio_get_value(SPITZ_GPIO_KEY_INT) |
176 | << GPIO_bit(SPITZ_GPIO_KEY_INT)) | 176 | << GPIO_bit(SPITZ_GPIO_KEY_INT)) |
177 | | (!gpio_get_value(SPITZ_GPIO_SYNC) | 177 | | gpio_get_value(SPITZ_GPIO_SYNC)); |
178 | << GPIO_bit(SPITZ_GPIO_SYNC)); | ||
179 | return ret; | 178 | return ret; |
180 | } | 179 | } |
181 | 180 | ||
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index 06383b51e655..4de7d1e79e73 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -69,6 +69,7 @@ void __init omap_reserve(void) | |||
69 | omap_vram_reserve_sdram_memblock(); | 69 | omap_vram_reserve_sdram_memblock(); |
70 | omap_dsp_reserve_sdram_memblock(); | 70 | omap_dsp_reserve_sdram_memblock(); |
71 | omap_secure_ram_reserve_memblock(); | 71 | omap_secure_ram_reserve_memblock(); |
72 | omap_barrier_reserve_memblock(); | ||
72 | } | 73 | } |
73 | 74 | ||
74 | void __init omap_init_consistent_dma_size(void) | 75 | void __init omap_init_consistent_dma_size(void) |
diff --git a/arch/arm/plat-omap/include/plat/omap-secure.h b/arch/arm/plat-omap/include/plat/omap-secure.h index 3047ff923a63..8c7994ce9869 100644 --- a/arch/arm/plat-omap/include/plat/omap-secure.h +++ b/arch/arm/plat-omap/include/plat/omap-secure.h | |||
@@ -10,4 +10,10 @@ static inline void omap_secure_ram_reserve_memblock(void) | |||
10 | { } | 10 | { } |
11 | #endif | 11 | #endif |
12 | 12 | ||
13 | #ifdef CONFIG_OMAP4_ERRATA_I688 | ||
14 | extern int omap_barrier_reserve_memblock(void); | ||
15 | #else | ||
16 | static inline void omap_barrier_reserve_memblock(void) | ||
17 | { } | ||
18 | #endif | ||
13 | #endif /* __OMAP_SECURE_H__ */ | 19 | #endif /* __OMAP_SECURE_H__ */ |
diff --git a/arch/arm/plat-omap/include/plat/uncompress.h b/arch/arm/plat-omap/include/plat/uncompress.h index 6ee90495ca4c..cc3f11ba7a99 100644 --- a/arch/arm/plat-omap/include/plat/uncompress.h +++ b/arch/arm/plat-omap/include/plat/uncompress.h | |||
@@ -160,6 +160,7 @@ static inline void __arch_decomp_setup(unsigned long arch_id) | |||
160 | DEBUG_LL_OMAP3(3, igep0020); | 160 | DEBUG_LL_OMAP3(3, igep0020); |
161 | DEBUG_LL_OMAP3(3, igep0030); | 161 | DEBUG_LL_OMAP3(3, igep0030); |
162 | DEBUG_LL_OMAP3(3, nokia_rm680); | 162 | DEBUG_LL_OMAP3(3, nokia_rm680); |
163 | DEBUG_LL_OMAP3(3, nokia_rm696); | ||
163 | DEBUG_LL_OMAP3(3, nokia_rx51); | 164 | DEBUG_LL_OMAP3(3, nokia_rx51); |
164 | DEBUG_LL_OMAP3(3, omap3517evm); | 165 | DEBUG_LL_OMAP3(3, omap3517evm); |
165 | DEBUG_LL_OMAP3(3, omap3_beagle); | 166 | DEBUG_LL_OMAP3(3, omap3_beagle); |