diff options
56 files changed, 412 insertions, 157 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 7bc17eaa12eb..ada1213982b4 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..e20c8ab80b0e 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -364,8 +364,8 @@ config OMAP3_SDRC_AC_TIMING | |||
364 | going on could result in system crashes; | 364 | going on could result in system crashes; |
365 | 365 | ||
366 | config OMAP4_ERRATA_I688 | 366 | config OMAP4_ERRATA_I688 |
367 | bool "OMAP4 errata: Async Bridge Corruption (BROKEN)" | 367 | bool "OMAP4 errata: Async Bridge Corruption" |
368 | depends on ARCH_OMAP4 && BROKEN | 368 | depends on ARCH_OMAP4 |
369 | select ARCH_HAS_BARRIERS | 369 | select ARCH_HAS_BARRIERS |
370 | help | 370 | help |
371 | If a data is stalled inside asynchronous bridge because of back | 371 | If a data is stalled inside asynchronous bridge because of back |
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/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 fb9b62dcf4ca..208eef1c0485 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 | ||
@@ -765,6 +766,28 @@ static struct i2c_board_info __initdata pi2c_board_info[] = { | |||
765 | }; | 766 | }; |
766 | 767 | ||
767 | /* | 768 | /* |
769 | * Asahi Kasei AK4641 on I2C | ||
770 | */ | ||
771 | |||
772 | static struct ak4641_platform_data ak4641_info = { | ||
773 | .gpio_power = GPIO27_HX4700_CODEC_ON, | ||
774 | .gpio_npdn = GPIO109_HX4700_CODEC_nPDN, | ||
775 | }; | ||
776 | |||
777 | static struct i2c_board_info i2c_board_info[] __initdata = { | ||
778 | { | ||
779 | I2C_BOARD_INFO("ak4641", 0x12), | ||
780 | .platform_data = &ak4641_info, | ||
781 | }, | ||
782 | }; | ||
783 | |||
784 | static struct platform_device audio = { | ||
785 | .name = "hx4700-audio", | ||
786 | .id = -1, | ||
787 | }; | ||
788 | |||
789 | |||
790 | /* | ||
768 | * PCMCIA | 791 | * PCMCIA |
769 | */ | 792 | */ |
770 | 793 | ||
@@ -790,6 +813,7 @@ static struct platform_device *devices[] __initdata = { | |||
790 | &gpio_vbus, | 813 | &gpio_vbus, |
791 | &power_supply, | 814 | &power_supply, |
792 | &strataflash, | 815 | &strataflash, |
816 | &audio, | ||
793 | &pcmcia, | 817 | &pcmcia, |
794 | }; | 818 | }; |
795 | 819 | ||
@@ -827,6 +851,7 @@ static void __init hx4700_init(void) | |||
827 | pxa_set_ficp_info(&ficp_info); | 851 | pxa_set_ficp_info(&ficp_info); |
828 | pxa27x_set_i2c_power_info(NULL); | 852 | pxa27x_set_i2c_power_info(NULL); |
829 | pxa_set_i2c_info(NULL); | 853 | pxa_set_i2c_info(NULL); |
854 | i2c_register_board_info(0, ARRAY_AND_SIZE(i2c_board_info)); | ||
830 | i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info)); | 855 | i2c_register_board_info(1, ARRAY_AND_SIZE(pi2c_board_info)); |
831 | pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); | 856 | pxa2xx_set_spi_info(2, &pxa_ssp2_master_info); |
832 | spi_register_board_info(ARRAY_AND_SIZE(tsc2046_board_info)); | 857 | 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 91e4f6c03766..00d6eacab8e4 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 aed6cbcf3866..c1673b3441d4 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/openrisc/include/asm/ptrace.h b/arch/openrisc/include/asm/ptrace.h index 054537c5f9c9..e612ce4512c7 100644 --- a/arch/openrisc/include/asm/ptrace.h +++ b/arch/openrisc/include/asm/ptrace.h | |||
@@ -77,7 +77,6 @@ struct pt_regs { | |||
77 | long syscallno; /* Syscall number (used by strace) */ | 77 | long syscallno; /* Syscall number (used by strace) */ |
78 | long dummy; /* Cheap alignment fix */ | 78 | long dummy; /* Cheap alignment fix */ |
79 | }; | 79 | }; |
80 | #endif /* __ASSEMBLY__ */ | ||
81 | 80 | ||
82 | /* TODO: Rename this to REDZONE because that's what it is */ | 81 | /* TODO: Rename this to REDZONE because that's what it is */ |
83 | #define STACK_FRAME_OVERHEAD 128 /* size of minimum stack frame */ | 82 | #define STACK_FRAME_OVERHEAD 128 /* size of minimum stack frame */ |
@@ -87,6 +86,13 @@ struct pt_regs { | |||
87 | #define user_stack_pointer(regs) ((unsigned long)(regs)->sp) | 86 | #define user_stack_pointer(regs) ((unsigned long)(regs)->sp) |
88 | #define profile_pc(regs) instruction_pointer(regs) | 87 | #define profile_pc(regs) instruction_pointer(regs) |
89 | 88 | ||
89 | static inline long regs_return_value(struct pt_regs *regs) | ||
90 | { | ||
91 | return regs->gpr[11]; | ||
92 | } | ||
93 | |||
94 | #endif /* __ASSEMBLY__ */ | ||
95 | |||
90 | /* | 96 | /* |
91 | * Offsets used by 'ptrace' system call interface. | 97 | * Offsets used by 'ptrace' system call interface. |
92 | */ | 98 | */ |
diff --git a/arch/openrisc/kernel/init_task.c b/arch/openrisc/kernel/init_task.c index 45744a384927..ca534082d5f3 100644 --- a/arch/openrisc/kernel/init_task.c +++ b/arch/openrisc/kernel/init_task.c | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <linux/init_task.h> | 18 | #include <linux/init_task.h> |
19 | #include <linux/mqueue.h> | 19 | #include <linux/mqueue.h> |
20 | #include <linux/export.h> | ||
20 | 21 | ||
21 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); | 22 | static struct signal_struct init_signals = INIT_SIGNALS(init_signals); |
22 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); | 23 | static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand); |
diff --git a/arch/openrisc/kernel/irq.c b/arch/openrisc/kernel/irq.c index 59b302338331..4bfead220956 100644 --- a/arch/openrisc/kernel/irq.c +++ b/arch/openrisc/kernel/irq.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/irq.h> | 23 | #include <linux/irq.h> |
24 | #include <linux/seq_file.h> | 24 | #include <linux/seq_file.h> |
25 | #include <linux/kernel_stat.h> | 25 | #include <linux/kernel_stat.h> |
26 | #include <linux/export.h> | ||
26 | 27 | ||
27 | #include <linux/irqflags.h> | 28 | #include <linux/irqflags.h> |
28 | 29 | ||
diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c index 656b94beab89..7259047d5f9d 100644 --- a/arch/openrisc/kernel/ptrace.c +++ b/arch/openrisc/kernel/ptrace.c | |||
@@ -188,11 +188,9 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
188 | */ | 188 | */ |
189 | ret = -1L; | 189 | ret = -1L; |
190 | 190 | ||
191 | /* Are these regs right??? */ | 191 | audit_syscall_entry(audit_arch(), regs->syscallno, |
192 | if (unlikely(current->audit_context)) | 192 | regs->gpr[3], regs->gpr[4], |
193 | audit_syscall_entry(audit_arch(), regs->syscallno, | 193 | regs->gpr[5], regs->gpr[6]); |
194 | regs->gpr[3], regs->gpr[4], | ||
195 | regs->gpr[5], regs->gpr[6]); | ||
196 | 194 | ||
197 | return ret ? : regs->syscallno; | 195 | return ret ? : regs->syscallno; |
198 | } | 196 | } |
@@ -201,9 +199,7 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) | |||
201 | { | 199 | { |
202 | int step; | 200 | int step; |
203 | 201 | ||
204 | if (unlikely(current->audit_context)) | 202 | audit_syscall_exit(regs); |
205 | audit_syscall_exit(AUDITSC_RESULT(regs->gpr[11]), | ||
206 | regs->gpr[11]); | ||
207 | 203 | ||
208 | step = test_thread_flag(TIF_SINGLESTEP); | 204 | step = test_thread_flag(TIF_SINGLESTEP); |
209 | if (step || test_thread_flag(TIF_SYSCALL_TRACE)) | 205 | if (step || test_thread_flag(TIF_SYSCALL_TRACE)) |
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index d1727584230a..6d99a5fcc090 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -227,6 +227,9 @@ config COMPAT | |||
227 | config SYSVIPC_COMPAT | 227 | config SYSVIPC_COMPAT |
228 | def_bool y if COMPAT && SYSVIPC | 228 | def_bool y if COMPAT && SYSVIPC |
229 | 229 | ||
230 | config KEYS_COMPAT | ||
231 | def_bool y if COMPAT && KEYS | ||
232 | |||
230 | config AUDIT_ARCH | 233 | config AUDIT_ARCH |
231 | def_bool y | 234 | def_bool y |
232 | 235 | ||
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c index 39f8fd4438fc..c383ce440d99 100644 --- a/arch/s390/kernel/crash_dump.c +++ b/arch/s390/kernel/crash_dump.c | |||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/gfp.h> | 12 | #include <linux/gfp.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/crash_dump.h> | ||
15 | #include <linux/bootmem.h> | 14 | #include <linux/bootmem.h> |
16 | #include <linux/elf.h> | 15 | #include <linux/elf.h> |
17 | #include <asm/ipl.h> | 16 | #include <asm/ipl.h> |
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c index 5d633019d8f3..50236610de83 100644 --- a/arch/s390/mm/init.c +++ b/arch/s390/mm/init.c | |||
@@ -223,16 +223,38 @@ void free_initrd_mem(unsigned long start, unsigned long end) | |||
223 | #ifdef CONFIG_MEMORY_HOTPLUG | 223 | #ifdef CONFIG_MEMORY_HOTPLUG |
224 | int arch_add_memory(int nid, u64 start, u64 size) | 224 | int arch_add_memory(int nid, u64 start, u64 size) |
225 | { | 225 | { |
226 | struct pglist_data *pgdat; | 226 | unsigned long zone_start_pfn, zone_end_pfn, nr_pages; |
227 | unsigned long start_pfn = PFN_DOWN(start); | ||
228 | unsigned long size_pages = PFN_DOWN(size); | ||
227 | struct zone *zone; | 229 | struct zone *zone; |
228 | int rc; | 230 | int rc; |
229 | 231 | ||
230 | pgdat = NODE_DATA(nid); | ||
231 | zone = pgdat->node_zones + ZONE_MOVABLE; | ||
232 | rc = vmem_add_mapping(start, size); | 232 | rc = vmem_add_mapping(start, size); |
233 | if (rc) | 233 | if (rc) |
234 | return rc; | 234 | return rc; |
235 | rc = __add_pages(nid, zone, PFN_DOWN(start), PFN_DOWN(size)); | 235 | for_each_zone(zone) { |
236 | if (zone_idx(zone) != ZONE_MOVABLE) { | ||
237 | /* Add range within existing zone limits */ | ||
238 | zone_start_pfn = zone->zone_start_pfn; | ||
239 | zone_end_pfn = zone->zone_start_pfn + | ||
240 | zone->spanned_pages; | ||
241 | } else { | ||
242 | /* Add remaining range to ZONE_MOVABLE */ | ||
243 | zone_start_pfn = start_pfn; | ||
244 | zone_end_pfn = start_pfn + size_pages; | ||
245 | } | ||
246 | if (start_pfn < zone_start_pfn || start_pfn >= zone_end_pfn) | ||
247 | continue; | ||
248 | nr_pages = (start_pfn + size_pages > zone_end_pfn) ? | ||
249 | zone_end_pfn - start_pfn : size_pages; | ||
250 | rc = __add_pages(nid, zone, start_pfn, nr_pages); | ||
251 | if (rc) | ||
252 | break; | ||
253 | start_pfn += nr_pages; | ||
254 | size_pages -= nr_pages; | ||
255 | if (!size_pages) | ||
256 | break; | ||
257 | } | ||
236 | if (rc) | 258 | if (rc) |
237 | vmem_remove_mapping(start, size); | 259 | vmem_remove_mapping(start, size); |
238 | return rc; | 260 | return rc; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_connector.c b/drivers/gpu/drm/exynos/exynos_drm_connector.c index d620b0784257..618bd4d87d28 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_connector.c +++ b/drivers/gpu/drm/exynos/exynos_drm_connector.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include "drmP.h" | 28 | #include "drmP.h" |
29 | #include "drm_crtc_helper.h" | 29 | #include "drm_crtc_helper.h" |
30 | 30 | ||
31 | #include <drm/exynos_drm.h> | ||
31 | #include "exynos_drm_drv.h" | 32 | #include "exynos_drm_drv.h" |
32 | #include "exynos_drm_encoder.h" | 33 | #include "exynos_drm_encoder.h" |
33 | 34 | ||
@@ -44,8 +45,9 @@ struct exynos_drm_connector { | |||
44 | /* convert exynos_video_timings to drm_display_mode */ | 45 | /* convert exynos_video_timings to drm_display_mode */ |
45 | static inline void | 46 | static inline void |
46 | convert_to_display_mode(struct drm_display_mode *mode, | 47 | convert_to_display_mode(struct drm_display_mode *mode, |
47 | struct fb_videomode *timing) | 48 | struct exynos_drm_panel_info *panel) |
48 | { | 49 | { |
50 | struct fb_videomode *timing = &panel->timing; | ||
49 | DRM_DEBUG_KMS("%s\n", __FILE__); | 51 | DRM_DEBUG_KMS("%s\n", __FILE__); |
50 | 52 | ||
51 | mode->clock = timing->pixclock / 1000; | 53 | mode->clock = timing->pixclock / 1000; |
@@ -60,6 +62,8 @@ convert_to_display_mode(struct drm_display_mode *mode, | |||
60 | mode->vsync_start = mode->vdisplay + timing->upper_margin; | 62 | mode->vsync_start = mode->vdisplay + timing->upper_margin; |
61 | mode->vsync_end = mode->vsync_start + timing->vsync_len; | 63 | mode->vsync_end = mode->vsync_start + timing->vsync_len; |
62 | mode->vtotal = mode->vsync_end + timing->lower_margin; | 64 | mode->vtotal = mode->vsync_end + timing->lower_margin; |
65 | mode->width_mm = panel->width_mm; | ||
66 | mode->height_mm = panel->height_mm; | ||
63 | 67 | ||
64 | if (timing->vmode & FB_VMODE_INTERLACED) | 68 | if (timing->vmode & FB_VMODE_INTERLACED) |
65 | mode->flags |= DRM_MODE_FLAG_INTERLACE; | 69 | mode->flags |= DRM_MODE_FLAG_INTERLACE; |
@@ -148,16 +152,18 @@ static int exynos_drm_connector_get_modes(struct drm_connector *connector) | |||
148 | connector->display_info.raw_edid = edid; | 152 | connector->display_info.raw_edid = edid; |
149 | } else { | 153 | } else { |
150 | struct drm_display_mode *mode = drm_mode_create(connector->dev); | 154 | struct drm_display_mode *mode = drm_mode_create(connector->dev); |
151 | struct fb_videomode *timing; | 155 | struct exynos_drm_panel_info *panel; |
152 | 156 | ||
153 | if (display_ops->get_timing) | 157 | if (display_ops->get_panel) |
154 | timing = display_ops->get_timing(manager->dev); | 158 | panel = display_ops->get_panel(manager->dev); |
155 | else { | 159 | else { |
156 | drm_mode_destroy(connector->dev, mode); | 160 | drm_mode_destroy(connector->dev, mode); |
157 | return 0; | 161 | return 0; |
158 | } | 162 | } |
159 | 163 | ||
160 | convert_to_display_mode(mode, timing); | 164 | convert_to_display_mode(mode, panel); |
165 | connector->display_info.width_mm = mode->width_mm; | ||
166 | connector->display_info.height_mm = mode->height_mm; | ||
161 | 167 | ||
162 | mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; | 168 | mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; |
163 | drm_mode_set_name(mode); | 169 | drm_mode_set_name(mode); |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index e685e1e33055..13540de90bfc 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h | |||
@@ -136,7 +136,7 @@ struct exynos_drm_overlay { | |||
136 | * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI. | 136 | * @type: one of EXYNOS_DISPLAY_TYPE_LCD and HDMI. |
137 | * @is_connected: check for that display is connected or not. | 137 | * @is_connected: check for that display is connected or not. |
138 | * @get_edid: get edid modes from display driver. | 138 | * @get_edid: get edid modes from display driver. |
139 | * @get_timing: get timing object from display driver. | 139 | * @get_panel: get panel object from display driver. |
140 | * @check_timing: check if timing is valid or not. | 140 | * @check_timing: check if timing is valid or not. |
141 | * @power_on: display device on or off. | 141 | * @power_on: display device on or off. |
142 | */ | 142 | */ |
@@ -145,7 +145,7 @@ struct exynos_drm_display_ops { | |||
145 | bool (*is_connected)(struct device *dev); | 145 | bool (*is_connected)(struct device *dev); |
146 | int (*get_edid)(struct device *dev, struct drm_connector *connector, | 146 | int (*get_edid)(struct device *dev, struct drm_connector *connector, |
147 | u8 *edid, int len); | 147 | u8 *edid, int len); |
148 | void *(*get_timing)(struct device *dev); | 148 | void *(*get_panel)(struct device *dev); |
149 | int (*check_timing)(struct device *dev, void *timing); | 149 | int (*check_timing)(struct device *dev, void *timing); |
150 | int (*power_on)(struct device *dev, int mode); | 150 | int (*power_on)(struct device *dev, int mode); |
151 | }; | 151 | }; |
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c index 0dbb32bb18a3..360adf2bba04 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c | |||
@@ -89,7 +89,7 @@ struct fimd_context { | |||
89 | bool suspended; | 89 | bool suspended; |
90 | struct mutex lock; | 90 | struct mutex lock; |
91 | 91 | ||
92 | struct fb_videomode *timing; | 92 | struct exynos_drm_panel_info *panel; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static bool fimd_display_is_connected(struct device *dev) | 95 | static bool fimd_display_is_connected(struct device *dev) |
@@ -101,13 +101,13 @@ static bool fimd_display_is_connected(struct device *dev) | |||
101 | return true; | 101 | return true; |
102 | } | 102 | } |
103 | 103 | ||
104 | static void *fimd_get_timing(struct device *dev) | 104 | static void *fimd_get_panel(struct device *dev) |
105 | { | 105 | { |
106 | struct fimd_context *ctx = get_fimd_context(dev); | 106 | struct fimd_context *ctx = get_fimd_context(dev); |
107 | 107 | ||
108 | DRM_DEBUG_KMS("%s\n", __FILE__); | 108 | DRM_DEBUG_KMS("%s\n", __FILE__); |
109 | 109 | ||
110 | return ctx->timing; | 110 | return ctx->panel; |
111 | } | 111 | } |
112 | 112 | ||
113 | static int fimd_check_timing(struct device *dev, void *timing) | 113 | static int fimd_check_timing(struct device *dev, void *timing) |
@@ -131,7 +131,7 @@ static int fimd_display_power_on(struct device *dev, int mode) | |||
131 | static struct exynos_drm_display_ops fimd_display_ops = { | 131 | static struct exynos_drm_display_ops fimd_display_ops = { |
132 | .type = EXYNOS_DISPLAY_TYPE_LCD, | 132 | .type = EXYNOS_DISPLAY_TYPE_LCD, |
133 | .is_connected = fimd_display_is_connected, | 133 | .is_connected = fimd_display_is_connected, |
134 | .get_timing = fimd_get_timing, | 134 | .get_panel = fimd_get_panel, |
135 | .check_timing = fimd_check_timing, | 135 | .check_timing = fimd_check_timing, |
136 | .power_on = fimd_display_power_on, | 136 | .power_on = fimd_display_power_on, |
137 | }; | 137 | }; |
@@ -193,7 +193,8 @@ static void fimd_apply(struct device *subdrv_dev) | |||
193 | static void fimd_commit(struct device *dev) | 193 | static void fimd_commit(struct device *dev) |
194 | { | 194 | { |
195 | struct fimd_context *ctx = get_fimd_context(dev); | 195 | struct fimd_context *ctx = get_fimd_context(dev); |
196 | struct fb_videomode *timing = ctx->timing; | 196 | struct exynos_drm_panel_info *panel = ctx->panel; |
197 | struct fb_videomode *timing = &panel->timing; | ||
197 | u32 val; | 198 | u32 val; |
198 | 199 | ||
199 | if (ctx->suspended) | 200 | if (ctx->suspended) |
@@ -786,7 +787,7 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
786 | struct fimd_context *ctx; | 787 | struct fimd_context *ctx; |
787 | struct exynos_drm_subdrv *subdrv; | 788 | struct exynos_drm_subdrv *subdrv; |
788 | struct exynos_drm_fimd_pdata *pdata; | 789 | struct exynos_drm_fimd_pdata *pdata; |
789 | struct fb_videomode *timing; | 790 | struct exynos_drm_panel_info *panel; |
790 | struct resource *res; | 791 | struct resource *res; |
791 | int win; | 792 | int win; |
792 | int ret = -EINVAL; | 793 | int ret = -EINVAL; |
@@ -799,9 +800,9 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
799 | return -EINVAL; | 800 | return -EINVAL; |
800 | } | 801 | } |
801 | 802 | ||
802 | timing = &pdata->timing; | 803 | panel = &pdata->panel; |
803 | if (!timing) { | 804 | if (!panel) { |
804 | dev_err(dev, "timing is null.\n"); | 805 | dev_err(dev, "panel is null.\n"); |
805 | return -EINVAL; | 806 | return -EINVAL; |
806 | } | 807 | } |
807 | 808 | ||
@@ -863,16 +864,16 @@ static int __devinit fimd_probe(struct platform_device *pdev) | |||
863 | goto err_req_irq; | 864 | goto err_req_irq; |
864 | } | 865 | } |
865 | 866 | ||
866 | ctx->clkdiv = fimd_calc_clkdiv(ctx, timing); | 867 | ctx->clkdiv = fimd_calc_clkdiv(ctx, &panel->timing); |
867 | ctx->vidcon0 = pdata->vidcon0; | 868 | ctx->vidcon0 = pdata->vidcon0; |
868 | ctx->vidcon1 = pdata->vidcon1; | 869 | ctx->vidcon1 = pdata->vidcon1; |
869 | ctx->default_win = pdata->default_win; | 870 | ctx->default_win = pdata->default_win; |
870 | ctx->timing = timing; | 871 | ctx->panel = panel; |
871 | 872 | ||
872 | timing->pixclock = clk_get_rate(ctx->lcd_clk) / ctx->clkdiv; | 873 | panel->timing.pixclock = clk_get_rate(ctx->lcd_clk) / ctx->clkdiv; |
873 | 874 | ||
874 | DRM_DEBUG_KMS("pixel clock = %d, clkdiv = %d\n", | 875 | DRM_DEBUG_KMS("pixel clock = %d, clkdiv = %d\n", |
875 | timing->pixclock, ctx->clkdiv); | 876 | panel->timing.pixclock, ctx->clkdiv); |
876 | 877 | ||
877 | subdrv = &ctx->subdrv; | 878 | subdrv = &ctx->subdrv; |
878 | 879 | ||
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f425b23e3803..f851db7be2cc 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4680,8 +4680,17 @@ sandybridge_compute_sprite_srwm(struct drm_device *dev, int plane, | |||
4680 | 4680 | ||
4681 | crtc = intel_get_crtc_for_plane(dev, plane); | 4681 | crtc = intel_get_crtc_for_plane(dev, plane); |
4682 | clock = crtc->mode.clock; | 4682 | clock = crtc->mode.clock; |
4683 | if (!clock) { | ||
4684 | *sprite_wm = 0; | ||
4685 | return false; | ||
4686 | } | ||
4683 | 4687 | ||
4684 | line_time_us = (sprite_width * 1000) / clock; | 4688 | line_time_us = (sprite_width * 1000) / clock; |
4689 | if (!line_time_us) { | ||
4690 | *sprite_wm = 0; | ||
4691 | return false; | ||
4692 | } | ||
4693 | |||
4685 | line_count = (latency_ns / line_time_us + 1000) / 1000; | 4694 | line_count = (latency_ns / line_time_us + 1000) / 1000; |
4686 | line_size = sprite_width * pixel_size; | 4695 | line_size = sprite_width * pixel_size; |
4687 | 4696 | ||
@@ -6175,7 +6184,7 @@ void intel_crtc_load_lut(struct drm_crtc *crtc) | |||
6175 | int i; | 6184 | int i; |
6176 | 6185 | ||
6177 | /* The clocks have to be on to load the palette. */ | 6186 | /* The clocks have to be on to load the palette. */ |
6178 | if (!crtc->enabled) | 6187 | if (!crtc->enabled || !intel_crtc->active) |
6179 | return; | 6188 | return; |
6180 | 6189 | ||
6181 | /* use legacy palette for Ironlake */ | 6190 | /* use legacy palette for Ironlake */ |
@@ -6561,7 +6570,7 @@ intel_framebuffer_create_for_mode(struct drm_device *dev, | |||
6561 | mode_cmd.height = mode->vdisplay; | 6570 | mode_cmd.height = mode->vdisplay; |
6562 | mode_cmd.pitches[0] = intel_framebuffer_pitch_for_width(mode_cmd.width, | 6571 | mode_cmd.pitches[0] = intel_framebuffer_pitch_for_width(mode_cmd.width, |
6563 | bpp); | 6572 | bpp); |
6564 | mode_cmd.pixel_format = 0; | 6573 | mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth); |
6565 | 6574 | ||
6566 | return intel_framebuffer_create(dev, &mode_cmd, obj); | 6575 | return intel_framebuffer_create(dev, &mode_cmd, obj); |
6567 | } | 6576 | } |
@@ -8185,7 +8194,7 @@ void gen6_enable_rps(struct drm_i915_private *dev_priv) | |||
8185 | 8194 | ||
8186 | if (intel_enable_rc6(dev_priv->dev)) | 8195 | if (intel_enable_rc6(dev_priv->dev)) |
8187 | rc6_mask = GEN6_RC_CTL_RC6_ENABLE | | 8196 | rc6_mask = GEN6_RC_CTL_RC6_ENABLE | |
8188 | (IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0; | 8197 | ((IS_GEN7(dev_priv->dev)) ? GEN6_RC_CTL_RC6p_ENABLE : 0); |
8189 | 8198 | ||
8190 | I915_WRITE(GEN6_RC_CONTROL, | 8199 | I915_WRITE(GEN6_RC_CONTROL, |
8191 | rc6_mask | | 8200 | rc6_mask | |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 1ab842c6032e..536191540b03 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -301,7 +301,7 @@ static int init_ring_common(struct intel_ring_buffer *ring) | |||
301 | 301 | ||
302 | I915_WRITE_CTL(ring, | 302 | I915_WRITE_CTL(ring, |
303 | ((ring->size - PAGE_SIZE) & RING_NR_PAGES) | 303 | ((ring->size - PAGE_SIZE) & RING_NR_PAGES) |
304 | | RING_REPORT_64K | RING_VALID); | 304 | | RING_VALID); |
305 | 305 | ||
306 | /* If the head is still not zero, the ring is dead */ | 306 | /* If the head is still not zero, the ring is dead */ |
307 | if ((I915_READ_CTL(ring) & RING_VALID) == 0 || | 307 | if ((I915_READ_CTL(ring) & RING_VALID) == 0 || |
@@ -1132,18 +1132,6 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n) | |||
1132 | struct drm_device *dev = ring->dev; | 1132 | struct drm_device *dev = ring->dev; |
1133 | struct drm_i915_private *dev_priv = dev->dev_private; | 1133 | struct drm_i915_private *dev_priv = dev->dev_private; |
1134 | unsigned long end; | 1134 | unsigned long end; |
1135 | u32 head; | ||
1136 | |||
1137 | /* If the reported head position has wrapped or hasn't advanced, | ||
1138 | * fallback to the slow and accurate path. | ||
1139 | */ | ||
1140 | head = intel_read_status_page(ring, 4); | ||
1141 | if (head > ring->head) { | ||
1142 | ring->head = head; | ||
1143 | ring->space = ring_space(ring); | ||
1144 | if (ring->space >= n) | ||
1145 | return 0; | ||
1146 | } | ||
1147 | 1135 | ||
1148 | trace_i915_ring_wait_begin(ring); | 1136 | trace_i915_ring_wait_begin(ring); |
1149 | if (drm_core_check_feature(dev, DRIVER_GEM)) | 1137 | if (drm_core_check_feature(dev, DRIVER_GEM)) |
diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c index 38ce5d0427e3..387fcc9f03ef 100644 --- a/drivers/gpu/drm/radeon/r600_cs.c +++ b/drivers/gpu/drm/radeon/r600_cs.c | |||
@@ -1304,6 +1304,7 @@ static int r600_check_texture_resource(struct radeon_cs_parser *p, u32 idx, | |||
1304 | h0 = G_038004_TEX_HEIGHT(word1) + 1; | 1304 | h0 = G_038004_TEX_HEIGHT(word1) + 1; |
1305 | d0 = G_038004_TEX_DEPTH(word1); | 1305 | d0 = G_038004_TEX_DEPTH(word1); |
1306 | nfaces = 1; | 1306 | nfaces = 1; |
1307 | array = 0; | ||
1307 | switch (G_038000_DIM(word0)) { | 1308 | switch (G_038000_DIM(word0)) { |
1308 | case V_038000_SQ_TEX_DIM_1D: | 1309 | case V_038000_SQ_TEX_DIM_1D: |
1309 | case V_038000_SQ_TEX_DIM_2D: | 1310 | case V_038000_SQ_TEX_DIM_2D: |
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index e7cb3ab09243..8b3d8ed52ff6 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -1117,13 +1117,23 @@ static int radeon_dp_get_modes(struct drm_connector *connector) | |||
1117 | (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { | 1117 | (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)) { |
1118 | struct drm_display_mode *mode; | 1118 | struct drm_display_mode *mode; |
1119 | 1119 | ||
1120 | if (!radeon_dig_connector->edp_on) | 1120 | if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { |
1121 | atombios_set_edp_panel_power(connector, | 1121 | if (!radeon_dig_connector->edp_on) |
1122 | ATOM_TRANSMITTER_ACTION_POWER_ON); | 1122 | atombios_set_edp_panel_power(connector, |
1123 | ret = radeon_ddc_get_modes(radeon_connector); | 1123 | ATOM_TRANSMITTER_ACTION_POWER_ON); |
1124 | if (!radeon_dig_connector->edp_on) | 1124 | ret = radeon_ddc_get_modes(radeon_connector); |
1125 | atombios_set_edp_panel_power(connector, | 1125 | if (!radeon_dig_connector->edp_on) |
1126 | ATOM_TRANSMITTER_ACTION_POWER_OFF); | 1126 | atombios_set_edp_panel_power(connector, |
1127 | ATOM_TRANSMITTER_ACTION_POWER_OFF); | ||
1128 | } else { | ||
1129 | /* need to setup ddc on the bridge */ | ||
1130 | if (radeon_connector_encoder_get_dp_bridge_encoder_id(connector) != | ||
1131 | ENCODER_OBJECT_ID_NONE) { | ||
1132 | if (encoder) | ||
1133 | radeon_atom_ext_encoder_setup_ddc(encoder); | ||
1134 | } | ||
1135 | ret = radeon_ddc_get_modes(radeon_connector); | ||
1136 | } | ||
1127 | 1137 | ||
1128 | if (ret > 0) { | 1138 | if (ret > 0) { |
1129 | if (encoder) { | 1139 | if (encoder) { |
@@ -1134,7 +1144,6 @@ static int radeon_dp_get_modes(struct drm_connector *connector) | |||
1134 | return ret; | 1144 | return ret; |
1135 | } | 1145 | } |
1136 | 1146 | ||
1137 | encoder = radeon_best_single_encoder(connector); | ||
1138 | if (!encoder) | 1147 | if (!encoder) |
1139 | return 0; | 1148 | return 0; |
1140 | 1149 | ||
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 010dad8b66ae..c58a036233fb 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c | |||
@@ -597,13 +597,13 @@ int radeon_vm_bo_rmv(struct radeon_device *rdev, | |||
597 | if (bo_va == NULL) | 597 | if (bo_va == NULL) |
598 | return 0; | 598 | return 0; |
599 | 599 | ||
600 | list_del(&bo_va->bo_list); | ||
601 | mutex_lock(&vm->mutex); | 600 | mutex_lock(&vm->mutex); |
602 | radeon_mutex_lock(&rdev->cs_mutex); | 601 | radeon_mutex_lock(&rdev->cs_mutex); |
603 | radeon_vm_bo_update_pte(rdev, vm, bo, NULL); | 602 | radeon_vm_bo_update_pte(rdev, vm, bo, NULL); |
604 | radeon_mutex_unlock(&rdev->cs_mutex); | 603 | radeon_mutex_unlock(&rdev->cs_mutex); |
605 | list_del(&bo_va->vm_list); | 604 | list_del(&bo_va->vm_list); |
606 | mutex_unlock(&vm->mutex); | 605 | mutex_unlock(&vm->mutex); |
606 | list_del(&bo_va->bo_list); | ||
607 | 607 | ||
608 | kfree(bo_va); | 608 | kfree(bo_va); |
609 | return 0; | 609 | return 0; |
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index 7e78f7c87857..3d471d56bf15 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c | |||
@@ -72,6 +72,7 @@ | |||
72 | 72 | ||
73 | #define MXS_I2C_QUEUESTAT (0x70) | 73 | #define MXS_I2C_QUEUESTAT (0x70) |
74 | #define MXS_I2C_QUEUESTAT_RD_QUEUE_EMPTY 0x00002000 | 74 | #define MXS_I2C_QUEUESTAT_RD_QUEUE_EMPTY 0x00002000 |
75 | #define MXS_I2C_QUEUESTAT_WRITE_QUEUE_CNT_MASK 0x0000001F | ||
75 | 76 | ||
76 | #define MXS_I2C_QUEUECMD (0x80) | 77 | #define MXS_I2C_QUEUECMD (0x80) |
77 | 78 | ||
@@ -219,14 +220,14 @@ static int mxs_i2c_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, | |||
219 | int ret; | 220 | int ret; |
220 | int flags; | 221 | int flags; |
221 | 222 | ||
222 | init_completion(&i2c->cmd_complete); | ||
223 | |||
224 | dev_dbg(i2c->dev, "addr: 0x%04x, len: %d, flags: 0x%x, stop: %d\n", | 223 | dev_dbg(i2c->dev, "addr: 0x%04x, len: %d, flags: 0x%x, stop: %d\n", |
225 | msg->addr, msg->len, msg->flags, stop); | 224 | msg->addr, msg->len, msg->flags, stop); |
226 | 225 | ||
227 | if (msg->len == 0) | 226 | if (msg->len == 0) |
228 | return -EINVAL; | 227 | return -EINVAL; |
229 | 228 | ||
229 | init_completion(&i2c->cmd_complete); | ||
230 | |||
230 | flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0; | 231 | flags = stop ? MXS_I2C_CTRL0_POST_SEND_STOP : 0; |
231 | 232 | ||
232 | if (msg->flags & I2C_M_RD) | 233 | if (msg->flags & I2C_M_RD) |
@@ -286,6 +287,7 @@ static irqreturn_t mxs_i2c_isr(int this_irq, void *dev_id) | |||
286 | { | 287 | { |
287 | struct mxs_i2c_dev *i2c = dev_id; | 288 | struct mxs_i2c_dev *i2c = dev_id; |
288 | u32 stat = readl(i2c->regs + MXS_I2C_CTRL1) & MXS_I2C_IRQ_MASK; | 289 | u32 stat = readl(i2c->regs + MXS_I2C_CTRL1) & MXS_I2C_IRQ_MASK; |
290 | bool is_last_cmd; | ||
289 | 291 | ||
290 | if (!stat) | 292 | if (!stat) |
291 | return IRQ_NONE; | 293 | return IRQ_NONE; |
@@ -300,9 +302,14 @@ static irqreturn_t mxs_i2c_isr(int this_irq, void *dev_id) | |||
300 | else | 302 | else |
301 | i2c->cmd_err = 0; | 303 | i2c->cmd_err = 0; |
302 | 304 | ||
303 | complete(&i2c->cmd_complete); | 305 | is_last_cmd = (readl(i2c->regs + MXS_I2C_QUEUESTAT) & |
306 | MXS_I2C_QUEUESTAT_WRITE_QUEUE_CNT_MASK) == 0; | ||
307 | |||
308 | if (is_last_cmd || i2c->cmd_err) | ||
309 | complete(&i2c->cmd_complete); | ||
304 | 310 | ||
305 | writel(stat, i2c->regs + MXS_I2C_CTRL1_CLR); | 311 | writel(stat, i2c->regs + MXS_I2C_CTRL1_CLR); |
312 | |||
306 | return IRQ_HANDLED; | 313 | return IRQ_HANDLED; |
307 | } | 314 | } |
308 | 315 | ||
diff --git a/drivers/iommu/omap-iommu-debug.c b/drivers/iommu/omap-iommu-debug.c index 288da5c1499d..103dbd92e256 100644 --- a/drivers/iommu/omap-iommu-debug.c +++ b/drivers/iommu/omap-iommu-debug.c | |||
@@ -44,7 +44,8 @@ static ssize_t debug_read_ver(struct file *file, char __user *userbuf, | |||
44 | static ssize_t debug_read_regs(struct file *file, char __user *userbuf, | 44 | static ssize_t debug_read_regs(struct file *file, char __user *userbuf, |
45 | size_t count, loff_t *ppos) | 45 | size_t count, loff_t *ppos) |
46 | { | 46 | { |
47 | struct omap_iommu *obj = file->private_data; | 47 | struct device *dev = file->private_data; |
48 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
48 | char *p, *buf; | 49 | char *p, *buf; |
49 | ssize_t bytes; | 50 | ssize_t bytes; |
50 | 51 | ||
@@ -67,7 +68,8 @@ static ssize_t debug_read_regs(struct file *file, char __user *userbuf, | |||
67 | static ssize_t debug_read_tlb(struct file *file, char __user *userbuf, | 68 | static ssize_t debug_read_tlb(struct file *file, char __user *userbuf, |
68 | size_t count, loff_t *ppos) | 69 | size_t count, loff_t *ppos) |
69 | { | 70 | { |
70 | struct omap_iommu *obj = file->private_data; | 71 | struct device *dev = file->private_data; |
72 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
71 | char *p, *buf; | 73 | char *p, *buf; |
72 | ssize_t bytes, rest; | 74 | ssize_t bytes, rest; |
73 | 75 | ||
@@ -97,7 +99,8 @@ static ssize_t debug_write_pagetable(struct file *file, | |||
97 | struct iotlb_entry e; | 99 | struct iotlb_entry e; |
98 | struct cr_regs cr; | 100 | struct cr_regs cr; |
99 | int err; | 101 | int err; |
100 | struct omap_iommu *obj = file->private_data; | 102 | struct device *dev = file->private_data; |
103 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
101 | char buf[MAXCOLUMN], *p = buf; | 104 | char buf[MAXCOLUMN], *p = buf; |
102 | 105 | ||
103 | count = min(count, sizeof(buf)); | 106 | count = min(count, sizeof(buf)); |
@@ -184,7 +187,8 @@ out: | |||
184 | static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, | 187 | static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, |
185 | size_t count, loff_t *ppos) | 188 | size_t count, loff_t *ppos) |
186 | { | 189 | { |
187 | struct omap_iommu *obj = file->private_data; | 190 | struct device *dev = file->private_data; |
191 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
188 | char *p, *buf; | 192 | char *p, *buf; |
189 | size_t bytes; | 193 | size_t bytes; |
190 | 194 | ||
@@ -212,7 +216,8 @@ static ssize_t debug_read_pagetable(struct file *file, char __user *userbuf, | |||
212 | static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, | 216 | static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, |
213 | size_t count, loff_t *ppos) | 217 | size_t count, loff_t *ppos) |
214 | { | 218 | { |
215 | struct omap_iommu *obj = file->private_data; | 219 | struct device *dev = file->private_data; |
220 | struct omap_iommu *obj = dev_to_omap_iommu(dev); | ||
216 | char *p, *buf; | 221 | char *p, *buf; |
217 | struct iovm_struct *tmp; | 222 | struct iovm_struct *tmp; |
218 | int uninitialized_var(i); | 223 | int uninitialized_var(i); |
@@ -254,7 +259,7 @@ static ssize_t debug_read_mmap(struct file *file, char __user *userbuf, | |||
254 | static ssize_t debug_read_mem(struct file *file, char __user *userbuf, | 259 | static ssize_t debug_read_mem(struct file *file, char __user *userbuf, |
255 | size_t count, loff_t *ppos) | 260 | size_t count, loff_t *ppos) |
256 | { | 261 | { |
257 | struct omap_iommu *obj = file->private_data; | 262 | struct device *dev = file->private_data; |
258 | char *p, *buf; | 263 | char *p, *buf; |
259 | struct iovm_struct *area; | 264 | struct iovm_struct *area; |
260 | ssize_t bytes; | 265 | ssize_t bytes; |
@@ -268,8 +273,8 @@ static ssize_t debug_read_mem(struct file *file, char __user *userbuf, | |||
268 | 273 | ||
269 | mutex_lock(&iommu_debug_lock); | 274 | mutex_lock(&iommu_debug_lock); |
270 | 275 | ||
271 | area = omap_find_iovm_area(obj, (u32)ppos); | 276 | area = omap_find_iovm_area(dev, (u32)ppos); |
272 | if (IS_ERR(area)) { | 277 | if (!area) { |
273 | bytes = -EINVAL; | 278 | bytes = -EINVAL; |
274 | goto err_out; | 279 | goto err_out; |
275 | } | 280 | } |
@@ -287,7 +292,7 @@ err_out: | |||
287 | static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, | 292 | static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, |
288 | size_t count, loff_t *ppos) | 293 | size_t count, loff_t *ppos) |
289 | { | 294 | { |
290 | struct omap_iommu *obj = file->private_data; | 295 | struct device *dev = file->private_data; |
291 | struct iovm_struct *area; | 296 | struct iovm_struct *area; |
292 | char *p, *buf; | 297 | char *p, *buf; |
293 | 298 | ||
@@ -305,8 +310,8 @@ static ssize_t debug_write_mem(struct file *file, const char __user *userbuf, | |||
305 | goto err_out; | 310 | goto err_out; |
306 | } | 311 | } |
307 | 312 | ||
308 | area = omap_find_iovm_area(obj, (u32)ppos); | 313 | area = omap_find_iovm_area(dev, (u32)ppos); |
309 | if (IS_ERR(area)) { | 314 | if (!area) { |
310 | count = -EINVAL; | 315 | count = -EINVAL; |
311 | goto err_out; | 316 | goto err_out; |
312 | } | 317 | } |
@@ -350,7 +355,7 @@ DEBUG_FOPS(mem); | |||
350 | { \ | 355 | { \ |
351 | struct dentry *dent; \ | 356 | struct dentry *dent; \ |
352 | dent = debugfs_create_file(#attr, mode, parent, \ | 357 | dent = debugfs_create_file(#attr, mode, parent, \ |
353 | obj, &debug_##attr##_fops); \ | 358 | dev, &debug_##attr##_fops); \ |
354 | if (!dent) \ | 359 | if (!dent) \ |
355 | return -ENOMEM; \ | 360 | return -ENOMEM; \ |
356 | } | 361 | } |
@@ -362,20 +367,29 @@ static int iommu_debug_register(struct device *dev, void *data) | |||
362 | { | 367 | { |
363 | struct platform_device *pdev = to_platform_device(dev); | 368 | struct platform_device *pdev = to_platform_device(dev); |
364 | struct omap_iommu *obj = platform_get_drvdata(pdev); | 369 | struct omap_iommu *obj = platform_get_drvdata(pdev); |
370 | struct omap_iommu_arch_data *arch_data; | ||
365 | struct dentry *d, *parent; | 371 | struct dentry *d, *parent; |
366 | 372 | ||
367 | if (!obj || !obj->dev) | 373 | if (!obj || !obj->dev) |
368 | return -EINVAL; | 374 | return -EINVAL; |
369 | 375 | ||
376 | arch_data = kzalloc(sizeof(*arch_data), GFP_KERNEL); | ||
377 | if (!arch_data) | ||
378 | return -ENOMEM; | ||
379 | |||
380 | arch_data->iommu_dev = obj; | ||
381 | |||
382 | dev->archdata.iommu = arch_data; | ||
383 | |||
370 | d = debugfs_create_dir(obj->name, iommu_debug_root); | 384 | d = debugfs_create_dir(obj->name, iommu_debug_root); |
371 | if (!d) | 385 | if (!d) |
372 | return -ENOMEM; | 386 | goto nomem; |
373 | parent = d; | 387 | parent = d; |
374 | 388 | ||
375 | d = debugfs_create_u8("nr_tlb_entries", 400, parent, | 389 | d = debugfs_create_u8("nr_tlb_entries", 400, parent, |
376 | (u8 *)&obj->nr_tlb_entries); | 390 | (u8 *)&obj->nr_tlb_entries); |
377 | if (!d) | 391 | if (!d) |
378 | return -ENOMEM; | 392 | goto nomem; |
379 | 393 | ||
380 | DEBUG_ADD_FILE_RO(ver); | 394 | DEBUG_ADD_FILE_RO(ver); |
381 | DEBUG_ADD_FILE_RO(regs); | 395 | DEBUG_ADD_FILE_RO(regs); |
@@ -385,6 +399,22 @@ static int iommu_debug_register(struct device *dev, void *data) | |||
385 | DEBUG_ADD_FILE(mem); | 399 | DEBUG_ADD_FILE(mem); |
386 | 400 | ||
387 | return 0; | 401 | return 0; |
402 | |||
403 | nomem: | ||
404 | kfree(arch_data); | ||
405 | return -ENOMEM; | ||
406 | } | ||
407 | |||
408 | static int iommu_debug_unregister(struct device *dev, void *data) | ||
409 | { | ||
410 | if (!dev->archdata.iommu) | ||
411 | return 0; | ||
412 | |||
413 | kfree(dev->archdata.iommu); | ||
414 | |||
415 | dev->archdata.iommu = NULL; | ||
416 | |||
417 | return 0; | ||
388 | } | 418 | } |
389 | 419 | ||
390 | static int __init iommu_debug_init(void) | 420 | static int __init iommu_debug_init(void) |
@@ -411,6 +441,7 @@ module_init(iommu_debug_init) | |||
411 | static void __exit iommu_debugfs_exit(void) | 441 | static void __exit iommu_debugfs_exit(void) |
412 | { | 442 | { |
413 | debugfs_remove_recursive(iommu_debug_root); | 443 | debugfs_remove_recursive(iommu_debug_root); |
444 | omap_foreach_iommu_device(NULL, iommu_debug_unregister); | ||
414 | } | 445 | } |
415 | module_exit(iommu_debugfs_exit) | 446 | module_exit(iommu_debugfs_exit) |
416 | 447 | ||
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index d8edd979d01b..6899dcd02dfa 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c | |||
@@ -1223,7 +1223,8 @@ static int __init omap_iommu_init(void) | |||
1223 | 1223 | ||
1224 | return platform_driver_register(&omap_iommu_driver); | 1224 | return platform_driver_register(&omap_iommu_driver); |
1225 | } | 1225 | } |
1226 | module_init(omap_iommu_init); | 1226 | /* must be ready before omap3isp is probed */ |
1227 | subsys_initcall(omap_iommu_init); | ||
1227 | 1228 | ||
1228 | static void __exit omap_iommu_exit(void) | 1229 | static void __exit omap_iommu_exit(void) |
1229 | { | 1230 | { |
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index a87e2728b2c3..64d433ec4fc6 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
@@ -328,21 +328,15 @@ static int pxa2xx_drv_pcmcia_probe(struct platform_device *dev) | |||
328 | goto err1; | 328 | goto err1; |
329 | } | 329 | } |
330 | 330 | ||
331 | if (ret) { | 331 | pxa2xx_configure_sockets(&dev->dev); |
332 | while (--i >= 0) | 332 | dev_set_drvdata(&dev->dev, sinfo); |
333 | soc_pcmcia_remove_one(&sinfo->skt[i]); | ||
334 | kfree(sinfo); | ||
335 | clk_put(clk); | ||
336 | } else { | ||
337 | pxa2xx_configure_sockets(&dev->dev); | ||
338 | dev_set_drvdata(&dev->dev, sinfo); | ||
339 | } | ||
340 | 333 | ||
341 | return 0; | 334 | return 0; |
342 | 335 | ||
343 | err1: | 336 | err1: |
344 | while (--i >= 0) | 337 | while (--i >= 0) |
345 | soc_pcmcia_remove_one(&sinfo->skt[i]); | 338 | soc_pcmcia_remove_one(&sinfo->skt[i]); |
339 | clk_put(clk); | ||
346 | kfree(sinfo); | 340 | kfree(sinfo); |
347 | err0: | 341 | err0: |
348 | return ret; | 342 | return ret; |
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c index df33530cec4a..28b81ae4cf7f 100644 --- a/drivers/regulator/88pm8607.c +++ b/drivers/regulator/88pm8607.c | |||
@@ -196,7 +196,7 @@ static const unsigned int LDO12_suspend_table[] = { | |||
196 | }; | 196 | }; |
197 | 197 | ||
198 | static const unsigned int LDO13_table[] = { | 198 | static const unsigned int LDO13_table[] = { |
199 | 1300000, 1800000, 2000000, 2500000, 2800000, 3000000, 0, 0, | 199 | 1200000, 1300000, 1800000, 2000000, 2500000, 2800000, 3000000, 0, |
200 | }; | 200 | }; |
201 | 201 | ||
202 | static const unsigned int LDO13_suspend_table[] = { | 202 | static const unsigned int LDO13_suspend_table[] = { |
@@ -389,10 +389,10 @@ static struct pm8607_regulator_info pm8607_regulator_info[] = { | |||
389 | PM8607_LDO( 7, LDO7, 0, 3, SUPPLIES_EN12, 1), | 389 | PM8607_LDO( 7, LDO7, 0, 3, SUPPLIES_EN12, 1), |
390 | PM8607_LDO( 8, LDO8, 0, 3, SUPPLIES_EN12, 2), | 390 | PM8607_LDO( 8, LDO8, 0, 3, SUPPLIES_EN12, 2), |
391 | PM8607_LDO( 9, LDO9, 0, 3, SUPPLIES_EN12, 3), | 391 | PM8607_LDO( 9, LDO9, 0, 3, SUPPLIES_EN12, 3), |
392 | PM8607_LDO(10, LDO10, 0, 3, SUPPLIES_EN12, 4), | 392 | PM8607_LDO(10, LDO10, 0, 4, SUPPLIES_EN12, 4), |
393 | PM8607_LDO(12, LDO12, 0, 4, SUPPLIES_EN12, 5), | 393 | PM8607_LDO(12, LDO12, 0, 4, SUPPLIES_EN12, 5), |
394 | PM8607_LDO(13, VIBRATOR_SET, 1, 3, VIBRATOR_SET, 0), | 394 | PM8607_LDO(13, VIBRATOR_SET, 1, 3, VIBRATOR_SET, 0), |
395 | PM8607_LDO(14, LDO14, 0, 4, SUPPLIES_EN12, 6), | 395 | PM8607_LDO(14, LDO14, 0, 3, SUPPLIES_EN12, 6), |
396 | }; | 396 | }; |
397 | 397 | ||
398 | static int __devinit pm8607_regulator_probe(struct platform_device *pdev) | 398 | static int __devinit pm8607_regulator_probe(struct platform_device *pdev) |
diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 95aeedf198f8..958e5129c601 100644 --- a/drivers/virtio/virtio_balloon.c +++ b/drivers/virtio/virtio_balloon.c | |||
@@ -367,29 +367,45 @@ static void __devexit virtballoon_remove(struct virtio_device *vdev) | |||
367 | #ifdef CONFIG_PM | 367 | #ifdef CONFIG_PM |
368 | static int virtballoon_freeze(struct virtio_device *vdev) | 368 | static int virtballoon_freeze(struct virtio_device *vdev) |
369 | { | 369 | { |
370 | struct virtio_balloon *vb = vdev->priv; | ||
371 | |||
370 | /* | 372 | /* |
371 | * The kthread is already frozen by the PM core before this | 373 | * The kthread is already frozen by the PM core before this |
372 | * function is called. | 374 | * function is called. |
373 | */ | 375 | */ |
374 | 376 | ||
377 | while (vb->num_pages) | ||
378 | leak_balloon(vb, vb->num_pages); | ||
379 | update_balloon_size(vb); | ||
380 | |||
375 | /* Ensure we don't get any more requests from the host */ | 381 | /* Ensure we don't get any more requests from the host */ |
376 | vdev->config->reset(vdev); | 382 | vdev->config->reset(vdev); |
377 | vdev->config->del_vqs(vdev); | 383 | vdev->config->del_vqs(vdev); |
378 | return 0; | 384 | return 0; |
379 | } | 385 | } |
380 | 386 | ||
387 | static int restore_common(struct virtio_device *vdev) | ||
388 | { | ||
389 | struct virtio_balloon *vb = vdev->priv; | ||
390 | int ret; | ||
391 | |||
392 | ret = init_vqs(vdev->priv); | ||
393 | if (ret) | ||
394 | return ret; | ||
395 | |||
396 | fill_balloon(vb, towards_target(vb)); | ||
397 | update_balloon_size(vb); | ||
398 | return 0; | ||
399 | } | ||
400 | |||
381 | static int virtballoon_thaw(struct virtio_device *vdev) | 401 | static int virtballoon_thaw(struct virtio_device *vdev) |
382 | { | 402 | { |
383 | return init_vqs(vdev->priv); | 403 | return restore_common(vdev); |
384 | } | 404 | } |
385 | 405 | ||
386 | static int virtballoon_restore(struct virtio_device *vdev) | 406 | static int virtballoon_restore(struct virtio_device *vdev) |
387 | { | 407 | { |
388 | struct virtio_balloon *vb = vdev->priv; | 408 | struct virtio_balloon *vb = vdev->priv; |
389 | struct page *page, *page2; | ||
390 | |||
391 | /* We're starting from a clean slate */ | ||
392 | vb->num_pages = 0; | ||
393 | 409 | ||
394 | /* | 410 | /* |
395 | * If a request wasn't complete at the time of freezing, this | 411 | * If a request wasn't complete at the time of freezing, this |
@@ -397,12 +413,7 @@ static int virtballoon_restore(struct virtio_device *vdev) | |||
397 | */ | 413 | */ |
398 | vb->need_stats_update = 0; | 414 | vb->need_stats_update = 0; |
399 | 415 | ||
400 | /* We don't have these pages in the balloon anymore! */ | 416 | return restore_common(vdev); |
401 | list_for_each_entry_safe(page, page2, &vb->pages, lru) { | ||
402 | list_del(&page->lru); | ||
403 | totalram_pages++; | ||
404 | } | ||
405 | return init_vqs(vdev->priv); | ||
406 | } | 417 | } |
407 | #endif | 418 | #endif |
408 | 419 | ||
diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c index 349209dc6a91..3a06f4043df4 100644 --- a/fs/ecryptfs/miscdev.c +++ b/fs/ecryptfs/miscdev.c | |||
@@ -429,7 +429,7 @@ ecryptfs_miscdev_write(struct file *file, const char __user *buf, | |||
429 | goto memdup; | 429 | goto memdup; |
430 | } else if (count < MIN_MSG_PKT_SIZE || count > MAX_MSG_PKT_SIZE) { | 430 | } else if (count < MIN_MSG_PKT_SIZE || count > MAX_MSG_PKT_SIZE) { |
431 | printk(KERN_WARNING "%s: Acceptable packet size range is " | 431 | printk(KERN_WARNING "%s: Acceptable packet size range is " |
432 | "[%d-%lu], but amount of data written is [%zu].", | 432 | "[%d-%zu], but amount of data written is [%zu].", |
433 | __func__, MIN_MSG_PKT_SIZE, MAX_MSG_PKT_SIZE, count); | 433 | __func__, MIN_MSG_PKT_SIZE, MAX_MSG_PKT_SIZE, count); |
434 | return -EINVAL; | 434 | return -EINVAL; |
435 | } | 435 | } |
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 376816fcd040..351a3e797789 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -167,14 +167,19 @@ void gfs2_glock_add_to_lru(struct gfs2_glock *gl) | |||
167 | spin_unlock(&lru_lock); | 167 | spin_unlock(&lru_lock); |
168 | } | 168 | } |
169 | 169 | ||
170 | static void gfs2_glock_remove_from_lru(struct gfs2_glock *gl) | 170 | static void __gfs2_glock_remove_from_lru(struct gfs2_glock *gl) |
171 | { | 171 | { |
172 | spin_lock(&lru_lock); | ||
173 | if (!list_empty(&gl->gl_lru)) { | 172 | if (!list_empty(&gl->gl_lru)) { |
174 | list_del_init(&gl->gl_lru); | 173 | list_del_init(&gl->gl_lru); |
175 | atomic_dec(&lru_count); | 174 | atomic_dec(&lru_count); |
176 | clear_bit(GLF_LRU, &gl->gl_flags); | 175 | clear_bit(GLF_LRU, &gl->gl_flags); |
177 | } | 176 | } |
177 | } | ||
178 | |||
179 | static void gfs2_glock_remove_from_lru(struct gfs2_glock *gl) | ||
180 | { | ||
181 | spin_lock(&lru_lock); | ||
182 | __gfs2_glock_remove_from_lru(gl); | ||
178 | spin_unlock(&lru_lock); | 183 | spin_unlock(&lru_lock); |
179 | } | 184 | } |
180 | 185 | ||
@@ -217,11 +222,12 @@ void gfs2_glock_put(struct gfs2_glock *gl) | |||
217 | struct gfs2_sbd *sdp = gl->gl_sbd; | 222 | struct gfs2_sbd *sdp = gl->gl_sbd; |
218 | struct address_space *mapping = gfs2_glock2aspace(gl); | 223 | struct address_space *mapping = gfs2_glock2aspace(gl); |
219 | 224 | ||
220 | if (atomic_dec_and_test(&gl->gl_ref)) { | 225 | if (atomic_dec_and_lock(&gl->gl_ref, &lru_lock)) { |
226 | __gfs2_glock_remove_from_lru(gl); | ||
227 | spin_unlock(&lru_lock); | ||
221 | spin_lock_bucket(gl->gl_hash); | 228 | spin_lock_bucket(gl->gl_hash); |
222 | hlist_bl_del_rcu(&gl->gl_list); | 229 | hlist_bl_del_rcu(&gl->gl_list); |
223 | spin_unlock_bucket(gl->gl_hash); | 230 | spin_unlock_bucket(gl->gl_hash); |
224 | gfs2_glock_remove_from_lru(gl); | ||
225 | GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders)); | 231 | GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders)); |
226 | GLOCK_BUG_ON(gl, mapping && mapping->nrpages); | 232 | GLOCK_BUG_ON(gl, mapping && mapping->nrpages); |
227 | trace_gfs2_glock_put(gl); | 233 | trace_gfs2_glock_put(gl); |
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index a7d611b93f0f..56987460cdae 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -391,10 +391,6 @@ static int alloc_dinode(struct gfs2_inode *dip, u64 *no_addr, u64 *generation) | |||
391 | int error; | 391 | int error; |
392 | int dblocks = 1; | 392 | int dblocks = 1; |
393 | 393 | ||
394 | error = gfs2_rindex_update(sdp); | ||
395 | if (error) | ||
396 | fs_warn(sdp, "rindex update returns %d\n", error); | ||
397 | |||
398 | error = gfs2_inplace_reserve(dip, RES_DINODE); | 394 | error = gfs2_inplace_reserve(dip, RES_DINODE); |
399 | if (error) | 395 | if (error) |
400 | goto out; | 396 | goto out; |
@@ -1043,6 +1039,7 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry) | |||
1043 | rgd = gfs2_blk2rgrpd(sdp, ip->i_no_addr); | 1039 | rgd = gfs2_blk2rgrpd(sdp, ip->i_no_addr); |
1044 | if (!rgd) | 1040 | if (!rgd) |
1045 | goto out_inodes; | 1041 | goto out_inodes; |
1042 | |||
1046 | gfs2_holder_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, ghs + 2); | 1043 | gfs2_holder_init(rgd->rd_gl, LM_ST_EXCLUSIVE, 0, ghs + 2); |
1047 | 1044 | ||
1048 | 1045 | ||
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 6aacf3f230a2..24f609c9ef91 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -800,6 +800,11 @@ static int init_inodes(struct gfs2_sbd *sdp, int undo) | |||
800 | fs_err(sdp, "can't get quota file inode: %d\n", error); | 800 | fs_err(sdp, "can't get quota file inode: %d\n", error); |
801 | goto fail_rindex; | 801 | goto fail_rindex; |
802 | } | 802 | } |
803 | |||
804 | error = gfs2_rindex_update(sdp); | ||
805 | if (error) | ||
806 | goto fail_qinode; | ||
807 | |||
803 | return 0; | 808 | return 0; |
804 | 809 | ||
805 | fail_qinode: | 810 | fail_qinode: |
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 981bfa32121a..49ada95209d0 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -683,16 +683,21 @@ int gfs2_rindex_update(struct gfs2_sbd *sdp) | |||
683 | struct gfs2_glock *gl = ip->i_gl; | 683 | struct gfs2_glock *gl = ip->i_gl; |
684 | struct gfs2_holder ri_gh; | 684 | struct gfs2_holder ri_gh; |
685 | int error = 0; | 685 | int error = 0; |
686 | int unlock_required = 0; | ||
686 | 687 | ||
687 | /* Read new copy from disk if we don't have the latest */ | 688 | /* Read new copy from disk if we don't have the latest */ |
688 | if (!sdp->sd_rindex_uptodate) { | 689 | if (!sdp->sd_rindex_uptodate) { |
689 | mutex_lock(&sdp->sd_rindex_mutex); | 690 | mutex_lock(&sdp->sd_rindex_mutex); |
690 | error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh); | 691 | if (!gfs2_glock_is_locked_by_me(gl)) { |
691 | if (error) | 692 | error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh); |
692 | return error; | 693 | if (error) |
694 | return error; | ||
695 | unlock_required = 1; | ||
696 | } | ||
693 | if (!sdp->sd_rindex_uptodate) | 697 | if (!sdp->sd_rindex_uptodate) |
694 | error = gfs2_ri_update(ip); | 698 | error = gfs2_ri_update(ip); |
695 | gfs2_glock_dq_uninit(&ri_gh); | 699 | if (unlock_required) |
700 | gfs2_glock_dq_uninit(&ri_gh); | ||
696 | mutex_unlock(&sdp->sd_rindex_mutex); | 701 | mutex_unlock(&sdp->sd_rindex_mutex); |
697 | } | 702 | } |
698 | 703 | ||
diff --git a/include/drm/Kbuild b/include/drm/Kbuild index a5c0e10fd47d..1e38a19d68f6 100644 --- a/include/drm/Kbuild +++ b/include/drm/Kbuild | |||
@@ -2,6 +2,7 @@ header-y += drm.h | |||
2 | header-y += drm_fourcc.h | 2 | header-y += drm_fourcc.h |
3 | header-y += drm_mode.h | 3 | header-y += drm_mode.h |
4 | header-y += drm_sarea.h | 4 | header-y += drm_sarea.h |
5 | header-y += exynos_drm.h | ||
5 | header-y += i810_drm.h | 6 | header-y += i810_drm.h |
6 | header-y += i915_drm.h | 7 | header-y += i915_drm.h |
7 | header-y += mga_drm.h | 8 | header-y += mga_drm.h |
diff --git a/include/drm/exynos_drm.h b/include/drm/exynos_drm.h index 5e120f1c5cd9..1ed3aae893a5 100644 --- a/include/drm/exynos_drm.h +++ b/include/drm/exynos_drm.h | |||
@@ -97,15 +97,30 @@ struct drm_exynos_plane_set_zpos { | |||
97 | #define DRM_IOCTL_EXYNOS_PLANE_SET_ZPOS DRM_IOWR(DRM_COMMAND_BASE + \ | 97 | #define DRM_IOCTL_EXYNOS_PLANE_SET_ZPOS DRM_IOWR(DRM_COMMAND_BASE + \ |
98 | DRM_EXYNOS_PLANE_SET_ZPOS, struct drm_exynos_plane_set_zpos) | 98 | DRM_EXYNOS_PLANE_SET_ZPOS, struct drm_exynos_plane_set_zpos) |
99 | 99 | ||
100 | #ifdef __KERNEL__ | ||
101 | |||
100 | /** | 102 | /** |
101 | * Platform Specific Structure for DRM based FIMD. | 103 | * A structure for lcd panel information. |
102 | * | 104 | * |
103 | * @timing: default video mode for initializing | 105 | * @timing: default video mode for initializing |
106 | * @width_mm: physical size of lcd width. | ||
107 | * @height_mm: physical size of lcd height. | ||
108 | */ | ||
109 | struct exynos_drm_panel_info { | ||
110 | struct fb_videomode timing; | ||
111 | u32 width_mm; | ||
112 | u32 height_mm; | ||
113 | }; | ||
114 | |||
115 | /** | ||
116 | * Platform Specific Structure for DRM based FIMD. | ||
117 | * | ||
118 | * @panel: default panel info for initializing | ||
104 | * @default_win: default window layer number to be used for UI. | 119 | * @default_win: default window layer number to be used for UI. |
105 | * @bpp: default bit per pixel. | 120 | * @bpp: default bit per pixel. |
106 | */ | 121 | */ |
107 | struct exynos_drm_fimd_pdata { | 122 | struct exynos_drm_fimd_pdata { |
108 | struct fb_videomode timing; | 123 | struct exynos_drm_panel_info panel; |
109 | u32 vidcon0; | 124 | u32 vidcon0; |
110 | u32 vidcon1; | 125 | u32 vidcon1; |
111 | unsigned int default_win; | 126 | unsigned int default_win; |
@@ -139,4 +154,5 @@ struct exynos_drm_hdmi_pdata { | |||
139 | unsigned int bpp; | 154 | unsigned int bpp; |
140 | }; | 155 | }; |
141 | 156 | ||
142 | #endif | 157 | #endif /* __KERNEL__ */ |
158 | #endif /* _EXYNOS_DRM_H_ */ | ||