diff options
author | Kevin Hilman <khilman@linaro.org> | 2013-10-18 14:30:16 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2013-10-18 14:30:37 -0400 |
commit | ee4383e0c1e3285b3a8b47c801b2941166f035c3 (patch) | |
tree | a197edf4fadbc468ba7001e74cfd340c327f6a22 | |
parent | af43ef6770560103dc10daa9caa31688e4ed7e4c (diff) | |
parent | 06ff74fd197aa8205443cf64b94383802602e320 (diff) |
Merge tag 'omap-for-v3.13/board-removal-signed-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt
From Tony Lindgren:
Changes needed to drop legacy booting support for some
omap3 boards.
Note that that these are based on a merge of the
following for the dependencies:
- v3.12-rc5 for fixes to pinctrl mask
- omap-for-v3.13/dt-signed to avoid pointless merge conflicts
- omap-for-v3.13/quirk-signed for legacy pdata handling
* tag 'omap-for-v3.13/board-removal-signed-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (125 commits)
ARM: OMAP2+: remove legacy support for IGEP boards
ARM: OMAP2+: Remove legacy support for zoom platforms
ARM: OMAP2+: Remove legacy booting support for omap3 EVM
ARM: OMAP2: delete board-rm680
ARM: dts: add minimal DT support for Nokia N950 & N9 phones
ARM: dts: Add basic support for zoom3
ARM: dts: Add basic support for TMDSEVM3730 (Mistral AM/DM37x EVM)
ARM: dts: Add common support for omap3-evm
ARM: dts: Shared file for omap GPMC connected smsc911x
+Linux 3.12-rc5
Signed-off-by: Kevin Hilman <khilman@linaro.org>
172 files changed, 1535 insertions, 3156 deletions
diff --git a/Documentation/sound/alsa/HD-Audio-Models.txt b/Documentation/sound/alsa/HD-Audio-Models.txt index f911e3656209..85c362d8ea34 100644 --- a/Documentation/sound/alsa/HD-Audio-Models.txt +++ b/Documentation/sound/alsa/HD-Audio-Models.txt | |||
@@ -28,6 +28,7 @@ ALC269/270/275/276/28x/29x | |||
28 | alc269-dmic Enable ALC269(VA) digital mic workaround | 28 | alc269-dmic Enable ALC269(VA) digital mic workaround |
29 | alc271-dmic Enable ALC271X digital mic workaround | 29 | alc271-dmic Enable ALC271X digital mic workaround |
30 | inv-dmic Inverted internal mic workaround | 30 | inv-dmic Inverted internal mic workaround |
31 | headset-mic Indicates a combined headset (headphone+mic) jack | ||
31 | lenovo-dock Enables docking station I/O for some Lenovos | 32 | lenovo-dock Enables docking station I/O for some Lenovos |
32 | dell-headset-multi Headset jack, which can also be used as mic-in | 33 | dell-headset-multi Headset jack, which can also be used as mic-in |
33 | dell-headset-dock Headset jack (without mic-in), and also dock I/O | 34 | dell-headset-dock Headset jack (without mic-in), and also dock I/O |
diff --git a/MAINTAINERS b/MAINTAINERS index 8a0cbf3cf2c8..1f006f15668c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -929,7 +929,7 @@ M: Javier Martinez Canillas <javier@dowhile0.org> | |||
929 | L: linux-omap@vger.kernel.org | 929 | L: linux-omap@vger.kernel.org |
930 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) | 930 | L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) |
931 | S: Maintained | 931 | S: Maintained |
932 | F: arch/arm/mach-omap2/board-igep0020.c | 932 | F: arch/arm/boot/dts/omap3-igep* |
933 | 933 | ||
934 | ARM/INCOME PXA270 SUPPORT | 934 | ARM/INCOME PXA270 SUPPORT |
935 | M: Marek Vasut <marek.vasut@gmail.com> | 935 | M: Marek Vasut <marek.vasut@gmail.com> |
@@ -1,7 +1,7 @@ | |||
1 | VERSION = 3 | 1 | VERSION = 3 |
2 | PATCHLEVEL = 12 | 2 | PATCHLEVEL = 12 |
3 | SUBLEVEL = 0 | 3 | SUBLEVEL = 0 |
4 | EXTRAVERSION = -rc4 | 4 | EXTRAVERSION = -rc5 |
5 | NAME = One Giant Leap for Frogkind | 5 | NAME = One Giant Leap for Frogkind |
6 | 6 | ||
7 | # *DOCUMENTATION* | 7 | # *DOCUMENTATION* |
diff --git a/arch/arc/kernel/ptrace.c b/arch/arc/kernel/ptrace.c index 333238564b67..5d76706139dd 100644 --- a/arch/arc/kernel/ptrace.c +++ b/arch/arc/kernel/ptrace.c | |||
@@ -102,7 +102,7 @@ static int genregs_set(struct task_struct *target, | |||
102 | REG_IGNORE_ONE(pad2); | 102 | REG_IGNORE_ONE(pad2); |
103 | REG_IN_CHUNK(callee, efa, cregs); /* callee_regs[r25..r13] */ | 103 | REG_IN_CHUNK(callee, efa, cregs); /* callee_regs[r25..r13] */ |
104 | REG_IGNORE_ONE(efa); /* efa update invalid */ | 104 | REG_IGNORE_ONE(efa); /* efa update invalid */ |
105 | REG_IN_ONE(stop_pc, &ptregs->ret); /* stop_pc: PC update */ | 105 | REG_IGNORE_ONE(stop_pc); /* PC updated via @ret */ |
106 | 106 | ||
107 | return ret; | 107 | return ret; |
108 | } | 108 | } |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index a37a50f575a2..db50b626be98 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -296,10 +296,15 @@ archprepare: | |||
296 | # Convert bzImage to zImage | 296 | # Convert bzImage to zImage |
297 | bzImage: zImage | 297 | bzImage: zImage |
298 | 298 | ||
299 | zImage Image xipImage bootpImage uImage: vmlinux | 299 | BOOT_TARGETS = zImage Image xipImage bootpImage uImage |
300 | INSTALL_TARGETS = zinstall uinstall install | ||
301 | |||
302 | PHONY += bzImage $(BOOT_TARGETS) $(INSTALL_TARGETS) | ||
303 | |||
304 | $(BOOT_TARGETS): vmlinux | ||
300 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ | 305 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$@ |
301 | 306 | ||
302 | zinstall uinstall install: vmlinux | 307 | $(INSTALL_TARGETS): |
303 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ | 308 | $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@ |
304 | 309 | ||
305 | %.dtb: | scripts | 310 | %.dtb: | scripts |
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index 84aa2caf07ed..ec2f8065f955 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -95,24 +95,24 @@ initrd: | |||
95 | @test "$(INITRD)" != "" || \ | 95 | @test "$(INITRD)" != "" || \ |
96 | (echo You must specify INITRD; exit -1) | 96 | (echo You must specify INITRD; exit -1) |
97 | 97 | ||
98 | install: $(obj)/Image | 98 | install: |
99 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | 99 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ |
100 | $(obj)/Image System.map "$(INSTALL_PATH)" | 100 | $(obj)/Image System.map "$(INSTALL_PATH)" |
101 | 101 | ||
102 | zinstall: $(obj)/zImage | 102 | zinstall: |
103 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | 103 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ |
104 | $(obj)/zImage System.map "$(INSTALL_PATH)" | 104 | $(obj)/zImage System.map "$(INSTALL_PATH)" |
105 | 105 | ||
106 | uinstall: $(obj)/uImage | 106 | uinstall: |
107 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | 107 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ |
108 | $(obj)/uImage System.map "$(INSTALL_PATH)" | 108 | $(obj)/uImage System.map "$(INSTALL_PATH)" |
109 | 109 | ||
110 | zi: | 110 | zi: |
111 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | 111 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ |
112 | $(obj)/zImage System.map "$(INSTALL_PATH)" | 112 | $(obj)/zImage System.map "$(INSTALL_PATH)" |
113 | 113 | ||
114 | i: | 114 | i: |
115 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ | 115 | $(CONFIG_SHELL) $(srctree)/$(src)/install.sh "$(KERNELRELEASE)" \ |
116 | $(obj)/Image System.map "$(INSTALL_PATH)" | 116 | $(obj)/Image System.map "$(INSTALL_PATH)" |
117 | 117 | ||
118 | subdir- := bootp compressed dts | 118 | subdir- := bootp compressed dts |
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index e1f8d9840a48..8265f98b4c55 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile | |||
@@ -174,11 +174,15 @@ dtb-$(CONFIG_ARCH_OMAP2PLUS) += omap2420-h4.dtb \ | |||
174 | omap3-devkit8000.dtb \ | 174 | omap3-devkit8000.dtb \ |
175 | omap3-beagle-xm.dtb \ | 175 | omap3-beagle-xm.dtb \ |
176 | omap3-evm.dtb \ | 176 | omap3-evm.dtb \ |
177 | omap3-evm-37xx.dtb \ | ||
177 | omap3-n900.dtb \ | 178 | omap3-n900.dtb \ |
179 | omap3-n9.dtb \ | ||
180 | omap3-n950.dtb \ | ||
178 | omap3-tobi.dtb \ | 181 | omap3-tobi.dtb \ |
179 | omap3-gta04.dtb \ | 182 | omap3-gta04.dtb \ |
180 | omap3-igep0020.dtb \ | 183 | omap3-igep0020.dtb \ |
181 | omap3-igep0030.dtb \ | 184 | omap3-igep0030.dtb \ |
185 | omap3-zoom3.dtb \ | ||
182 | omap4-panda.dtb \ | 186 | omap4-panda.dtb \ |
183 | omap4-panda-a4.dtb \ | 187 | omap4-panda-a4.dtb \ |
184 | omap4-panda-es.dtb \ | 188 | omap4-panda-es.dtb \ |
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 7d7cc777ff7b..bbac42a78ce5 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi | |||
@@ -96,6 +96,11 @@ | |||
96 | <1 14 0xf08>, | 96 | <1 14 0xf08>, |
97 | <1 11 0xf08>, | 97 | <1 11 0xf08>, |
98 | <1 10 0xf08>; | 98 | <1 10 0xf08>; |
99 | /* Unfortunately we need this since some versions of U-Boot | ||
100 | * on Exynos don't set the CNTFRQ register, so we need the | ||
101 | * value from DT. | ||
102 | */ | ||
103 | clock-frequency = <24000000>; | ||
99 | }; | 104 | }; |
100 | 105 | ||
101 | mct@101C0000 { | 106 | mct@101C0000 { |
diff --git a/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi b/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi new file mode 100644 index 000000000000..9c18adf788f7 --- /dev/null +++ b/arch/arm/boot/dts/omap-gpmc-smsc911x.dtsi | |||
@@ -0,0 +1,52 @@ | |||
1 | /* | ||
2 | * Common file for GPMC connected smsc911x on omaps | ||
3 | * | ||
4 | * Note that the board specifc DTS file needs to specify | ||
5 | * ranges, pinctrl, reg, interrupt parent and interrupts. | ||
6 | */ | ||
7 | |||
8 | / { | ||
9 | vddvario: regulator-vddvario { | ||
10 | compatible = "regulator-fixed"; | ||
11 | regulator-name = "vddvario"; | ||
12 | regulator-always-on; | ||
13 | }; | ||
14 | |||
15 | vdd33a: regulator-vdd33a { | ||
16 | compatible = "regulator-fixed"; | ||
17 | regulator-name = "vdd33a"; | ||
18 | regulator-always-on; | ||
19 | }; | ||
20 | }; | ||
21 | |||
22 | &gpmc { | ||
23 | ethernet@gpmc { | ||
24 | compatible = "smsc,lan9221", "smsc,lan9115"; | ||
25 | bank-width = <2>; | ||
26 | gpmc,mux-add-data; | ||
27 | gpmc,cs-on-ns = <0>; | ||
28 | gpmc,cs-rd-off-ns = <186>; | ||
29 | gpmc,cs-wr-off-ns = <186>; | ||
30 | gpmc,adv-on-ns = <12>; | ||
31 | gpmc,adv-rd-off-ns = <48>; | ||
32 | gpmc,adv-wr-off-ns = <48>; | ||
33 | gpmc,oe-on-ns = <54>; | ||
34 | gpmc,oe-off-ns = <168>; | ||
35 | gpmc,we-on-ns = <54>; | ||
36 | gpmc,we-off-ns = <168>; | ||
37 | gpmc,rd-cycle-ns = <186>; | ||
38 | gpmc,wr-cycle-ns = <186>; | ||
39 | gpmc,access-ns = <114>; | ||
40 | gpmc,page-burst-access-ns = <6>; | ||
41 | gpmc,bus-turnaround-ns = <12>; | ||
42 | gpmc,cycle2cycle-delay-ns = <18>; | ||
43 | gpmc,wr-data-mux-bus-ns = <90>; | ||
44 | gpmc,wr-access-ns = <186>; | ||
45 | gpmc,cycle2cycle-samecsen; | ||
46 | gpmc,cycle2cycle-diffcsen; | ||
47 | vmmc-supply = <&vddvario>; | ||
48 | vmmc_aux-supply = <&vdd33a>; | ||
49 | reg-io-width = <4>; | ||
50 | smsc,save-mac-address; | ||
51 | }; | ||
52 | }; | ||
diff --git a/arch/arm/boot/dts/omap-zoom-common.dtsi b/arch/arm/boot/dts/omap-zoom-common.dtsi new file mode 100644 index 000000000000..b0ee342598f0 --- /dev/null +++ b/arch/arm/boot/dts/omap-zoom-common.dtsi | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * Common features on the Zoom debug board | ||
3 | */ | ||
4 | |||
5 | #include "omap-gpmc-smsc911x.dtsi" | ||
6 | |||
7 | &gpmc { | ||
8 | ranges = <3 0 0x10000000 0x00000400>, | ||
9 | <7 0 0x2c000000 0x01000000>; | ||
10 | |||
11 | /* | ||
12 | * Four port TL16CP754C serial port on GPMC, | ||
13 | * they probably share the same GPIO IRQ | ||
14 | * REVISIT: Add timing support from slls644g.pdf | ||
15 | */ | ||
16 | 8250@3,0 { | ||
17 | compatible = "ns16550a"; | ||
18 | reg = <3 0 0x100>; | ||
19 | bank-width = <2>; | ||
20 | reg-shift = <1>; | ||
21 | reg-io-width = <1>; | ||
22 | interrupt-parent = <&gpio4>; | ||
23 | interrupts = <6 IRQ_TYPE_EDGE_RISING>; /* gpio102 */ | ||
24 | clock-frequency = <1843200>; | ||
25 | current-speed = <115200>; | ||
26 | }; | ||
27 | |||
28 | ethernet@gpmc { | ||
29 | reg = <7 0 0xff>; | ||
30 | interrupt-parent = <&gpio5>; | ||
31 | interrupts = <30 IRQ_TYPE_LEVEL_LOW>; /* gpio158 */ | ||
32 | }; | ||
33 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts index 0f7cfc503bf9..2e88095ea67b 100644 --- a/arch/arm/boot/dts/omap3-beagle-xm.dts +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts | |||
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | / { | 12 | / { |
13 | model = "TI OMAP3 BeagleBoard xM"; | 13 | model = "TI OMAP3 BeagleBoard xM"; |
14 | compatible = "ti,omap3-beagle-xm", "ti,omap3-beagle", "ti,omap3"; | 14 | compatible = "ti,omap3-beagle-xm", "ti,omap36xx", "ti,omap3"; |
15 | 15 | ||
16 | cpus { | 16 | cpus { |
17 | cpu@0 { | 17 | cpu@0 { |
diff --git a/arch/arm/boot/dts/omap3-evm-37xx.dts b/arch/arm/boot/dts/omap3-evm-37xx.dts new file mode 100644 index 000000000000..4df68ad3736a --- /dev/null +++ b/arch/arm/boot/dts/omap3-evm-37xx.dts | |||
@@ -0,0 +1,151 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ | ||
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 | /dts-v1/; | ||
9 | |||
10 | #include "omap36xx.dtsi" | ||
11 | #include "omap3-evm-common.dtsi" | ||
12 | |||
13 | |||
14 | / { | ||
15 | model = "TI OMAP37XX EVM (TMDSEVM3730)"; | ||
16 | compatible = "ti,omap3-evm-37xx", "ti,omap36xx"; | ||
17 | |||
18 | memory { | ||
19 | device_type = "memory"; | ||
20 | reg = <0x80000000 0x10000000>; /* 256 MB */ | ||
21 | }; | ||
22 | |||
23 | wl12xx_vmmc: wl12xx_vmmc { | ||
24 | pinctrl-names = "default"; | ||
25 | pinctrl-0 = <&wl12xx_gpio>; | ||
26 | }; | ||
27 | }; | ||
28 | |||
29 | &omap3_pmx_core { | ||
30 | mmc1_pins: pinmux_mmc1_pins { | ||
31 | pinctrl-single,pins = < | ||
32 | 0x114 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */ | ||
33 | 0x116 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_cmd.sdmmc1_cmd */ | ||
34 | 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat0.sdmmc1_dat0 */ | ||
35 | 0x11a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */ | ||
36 | 0x11c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */ | ||
37 | 0x11e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */ | ||
38 | 0x120 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat4.sdmmc1_dat4 */ | ||
39 | 0x122 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat5.sdmmc1_dat5 */ | ||
40 | 0x124 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat6.sdmmc1_dat6 */ | ||
41 | 0x126 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat7.sdmmc1_dat7 */ | ||
42 | >; | ||
43 | }; | ||
44 | |||
45 | /* NOTE: Clocked externally, needs INPUT also for sdmmc2_clk.sdmmc2_clk */ | ||
46 | mmc2_pins: pinmux_mmc2_pins { | ||
47 | pinctrl-single,pins = < | ||
48 | 0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk.sdmmc2_clk */ | ||
49 | 0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd.sdmmc2_cmd */ | ||
50 | 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0.sdmmc2_dat0 */ | ||
51 | 0x12e (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */ | ||
52 | 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2.sdmmc2_dat2 */ | ||
53 | 0x132 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3.sdmmc2_dat3 */ | ||
54 | >; | ||
55 | }; | ||
56 | |||
57 | uart3_pins: pinmux_uart3_pins { | ||
58 | pinctrl-single,pins = < | ||
59 | 0x16e (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */ | ||
60 | 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */ | ||
61 | >; | ||
62 | }; | ||
63 | |||
64 | wl12xx_gpio: pinmux_wl12xx_gpio { | ||
65 | pinctrl-single,pins = < | ||
66 | 0x150 (PIN_OUTPUT | MUX_MODE4) /* uart1_cts.gpio_150 */ | ||
67 | 0x14e (PIN_INPUT | MUX_MODE4) /* uart1_rts.gpio_149 */ | ||
68 | >; | ||
69 | }; | ||
70 | |||
71 | smsc911x_pins: pinmux_smsc911x_pins { | ||
72 | pinctrl-single,pins = < | ||
73 | 0x1a2 (PIN_INPUT | MUX_MODE4) /* mcspi1_cs2.gpio_176 */ | ||
74 | >; | ||
75 | }; | ||
76 | }; | ||
77 | |||
78 | &mmc1 { | ||
79 | pinctrl-names = "default"; | ||
80 | pinctrl-0 = <&mmc1_pins>; | ||
81 | }; | ||
82 | |||
83 | &mmc2 { | ||
84 | pinctrl-names = "default"; | ||
85 | pinctrl-0 = <&mmc2_pins>; | ||
86 | }; | ||
87 | |||
88 | &mmc3 { | ||
89 | status = "disabled"; | ||
90 | }; | ||
91 | |||
92 | &uart3 { | ||
93 | pinctrl-names = "default"; | ||
94 | pinctrl-0 = <&uart3_pins>; | ||
95 | }; | ||
96 | |||
97 | &gpmc { | ||
98 | ranges = <0 0 0x00000000 0x20000000>, | ||
99 | <5 0 0x2c000000 0x01000000>; | ||
100 | |||
101 | nand@0,0 { | ||
102 | linux,mtd-name= "hynix,h8kds0un0mer-4em"; | ||
103 | reg = <0 0 0>; | ||
104 | nand-bus-width = <16>; | ||
105 | ti,nand-ecc-opt = "bch8"; | ||
106 | |||
107 | gpmc,sync-clk-ps = <0>; | ||
108 | gpmc,cs-on-ns = <0>; | ||
109 | gpmc,cs-rd-off-ns = <44>; | ||
110 | gpmc,cs-wr-off-ns = <44>; | ||
111 | gpmc,adv-on-ns = <6>; | ||
112 | gpmc,adv-rd-off-ns = <34>; | ||
113 | gpmc,adv-wr-off-ns = <44>; | ||
114 | gpmc,we-off-ns = <40>; | ||
115 | gpmc,oe-off-ns = <54>; | ||
116 | gpmc,access-ns = <64>; | ||
117 | gpmc,rd-cycle-ns = <82>; | ||
118 | gpmc,wr-cycle-ns = <82>; | ||
119 | gpmc,wr-access-ns = <40>; | ||
120 | gpmc,wr-data-mux-bus-ns = <0>; | ||
121 | |||
122 | #address-cells = <1>; | ||
123 | #size-cells = <1>; | ||
124 | |||
125 | partition@0 { | ||
126 | label = "X-Loader"; | ||
127 | reg = <0 0x80000>; | ||
128 | }; | ||
129 | partition@0x80000 { | ||
130 | label = "U-Boot"; | ||
131 | reg = <0x80000 0x1c0000>; | ||
132 | }; | ||
133 | partition@0x1c0000 { | ||
134 | label = "Environment"; | ||
135 | reg = <0x240000 0x40000>; | ||
136 | }; | ||
137 | partition@0x280000 { | ||
138 | label = "Kernel"; | ||
139 | reg = <0x280000 0x500000>; | ||
140 | }; | ||
141 | partition@0x780000 { | ||
142 | label = "Filesystem"; | ||
143 | reg = <0x780000 0x1f880000>; | ||
144 | }; | ||
145 | }; | ||
146 | |||
147 | ethernet@gpmc { | ||
148 | pinctrl-names = "default"; | ||
149 | pinctrl-0 = <&smsc911x_pins>; | ||
150 | }; | ||
151 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-evm-common.dtsi b/arch/arm/boot/dts/omap3-evm-common.dtsi new file mode 100644 index 000000000000..b5493296d103 --- /dev/null +++ b/arch/arm/boot/dts/omap3-evm-common.dtsi | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * Common support for omap3 EVM boards | ||
3 | */ | ||
4 | |||
5 | #include "omap-gpmc-smsc911x.dtsi" | ||
6 | |||
7 | / { | ||
8 | cpus { | ||
9 | cpu@0 { | ||
10 | cpu0-supply = <&vcc>; | ||
11 | }; | ||
12 | }; | ||
13 | |||
14 | leds { | ||
15 | compatible = "gpio-leds"; | ||
16 | ledb { | ||
17 | label = "omap3evm::ledb"; | ||
18 | gpios = <&twl_gpio 19 GPIO_ACTIVE_HIGH>; /* LEDB */ | ||
19 | linux,default-trigger = "default-on"; | ||
20 | }; | ||
21 | }; | ||
22 | |||
23 | wl12xx_vmmc: wl12xx_vmmc { | ||
24 | compatible = "regulator-fixed"; | ||
25 | regulator-name = "vwl1271"; | ||
26 | regulator-min-microvolt = <1800000>; | ||
27 | regulator-max-microvolt = <1800000>; | ||
28 | gpio = <&gpio5 22 0>; /* gpio150 */ | ||
29 | startup-delay-us = <70000>; | ||
30 | enable-active-high; | ||
31 | vin-supply = <&vmmc2>; | ||
32 | }; | ||
33 | }; | ||
34 | |||
35 | &i2c1 { | ||
36 | clock-frequency = <2600000>; | ||
37 | |||
38 | twl: twl@48 { | ||
39 | reg = <0x48>; | ||
40 | interrupts = <7>; /* SYS_NIRQ cascaded to intc */ | ||
41 | interrupt-parent = <&intc>; | ||
42 | }; | ||
43 | }; | ||
44 | |||
45 | #include "twl4030.dtsi" | ||
46 | #include "twl4030_omap3.dtsi" | ||
47 | |||
48 | &i2c2 { | ||
49 | clock-frequency = <400000>; | ||
50 | }; | ||
51 | |||
52 | &i2c3 { | ||
53 | clock-frequency = <400000>; | ||
54 | |||
55 | /* | ||
56 | * TVP5146 Video decoder-in for analog input support. | ||
57 | */ | ||
58 | tvp5146@5c { | ||
59 | compatible = "ti,tvp5146m2"; | ||
60 | reg = <0x5c>; | ||
61 | }; | ||
62 | }; | ||
63 | |||
64 | &mmc1 { | ||
65 | vmmc-supply = <&vmmc1>; | ||
66 | vmmc_aux-supply = <&vsim>; | ||
67 | bus-width = <8>; | ||
68 | }; | ||
69 | |||
70 | &mmc2 { | ||
71 | vmmc-supply = <&wl12xx_vmmc>; | ||
72 | non-removable; | ||
73 | bus-width = <4>; | ||
74 | cap-power-off-card; | ||
75 | }; | ||
76 | |||
77 | &twl_gpio { | ||
78 | ti,use-leds; | ||
79 | }; | ||
80 | |||
81 | &usb_otg_hs { | ||
82 | interface-type = <0>; | ||
83 | usb-phy = <&usb2_phy>; | ||
84 | mode = <3>; | ||
85 | power = <50>; | ||
86 | }; | ||
87 | |||
88 | &gpmc { | ||
89 | ethernet@gpmc { | ||
90 | interrupt-parent = <&gpio6>; | ||
91 | interrupts = <16 8>; | ||
92 | reg = <5 0 0xff>; | ||
93 | }; | ||
94 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-evm.dts b/arch/arm/boot/dts/omap3-evm.dts index 7d4329d179c4..e10dcd0fa539 100644 --- a/arch/arm/boot/dts/omap3-evm.dts +++ b/arch/arm/boot/dts/omap3-evm.dts | |||
@@ -8,68 +8,14 @@ | |||
8 | /dts-v1/; | 8 | /dts-v1/; |
9 | 9 | ||
10 | #include "omap34xx.dtsi" | 10 | #include "omap34xx.dtsi" |
11 | #include "omap3-evm-common.dtsi" | ||
11 | 12 | ||
12 | / { | 13 | / { |
13 | model = "TI OMAP3 EVM (OMAP3530, AM/DM37x)"; | 14 | model = "TI OMAP35XX EVM (TMDSEVM3530)"; |
14 | compatible = "ti,omap3-evm", "ti,omap3"; | 15 | compatible = "ti,omap3-evm", "ti,omap3"; |
15 | 16 | ||
16 | cpus { | ||
17 | cpu@0 { | ||
18 | cpu0-supply = <&vcc>; | ||
19 | }; | ||
20 | }; | ||
21 | |||
22 | memory { | 17 | memory { |
23 | device_type = "memory"; | 18 | device_type = "memory"; |
24 | reg = <0x80000000 0x10000000>; /* 256 MB */ | 19 | reg = <0x80000000 0x10000000>; /* 256 MB */ |
25 | }; | 20 | }; |
26 | |||
27 | leds { | ||
28 | compatible = "gpio-leds"; | ||
29 | ledb { | ||
30 | label = "omap3evm::ledb"; | ||
31 | gpios = <&twl_gpio 19 GPIO_ACTIVE_HIGH>; /* LEDB */ | ||
32 | linux,default-trigger = "default-on"; | ||
33 | }; | ||
34 | }; | ||
35 | }; | ||
36 | |||
37 | &i2c1 { | ||
38 | clock-frequency = <2600000>; | ||
39 | |||
40 | twl: twl@48 { | ||
41 | reg = <0x48>; | ||
42 | interrupts = <7>; /* SYS_NIRQ cascaded to intc */ | ||
43 | interrupt-parent = <&intc>; | ||
44 | }; | ||
45 | }; | ||
46 | |||
47 | #include "twl4030.dtsi" | ||
48 | #include "twl4030_omap3.dtsi" | ||
49 | |||
50 | &i2c2 { | ||
51 | clock-frequency = <400000>; | ||
52 | }; | ||
53 | |||
54 | &i2c3 { | ||
55 | clock-frequency = <400000>; | ||
56 | |||
57 | /* | ||
58 | * TVP5146 Video decoder-in for analog input support. | ||
59 | */ | ||
60 | tvp5146@5c { | ||
61 | compatible = "ti,tvp5146m2"; | ||
62 | reg = <0x5c>; | ||
63 | }; | ||
64 | }; | ||
65 | |||
66 | &twl_gpio { | ||
67 | ti,use-leds; | ||
68 | }; | ||
69 | |||
70 | &usb_otg_hs { | ||
71 | interface-type = <0>; | ||
72 | usb-phy = <&usb2_phy>; | ||
73 | mode = <3>; | ||
74 | power = <50>; | ||
75 | }; | 21 | }; |
diff --git a/arch/arm/boot/dts/omap3-igep0020.dts b/arch/arm/boot/dts/omap3-igep0020.dts index 750ce84fc195..d5cc79267250 100644 --- a/arch/arm/boot/dts/omap3-igep0020.dts +++ b/arch/arm/boot/dts/omap3-igep0020.dts | |||
@@ -10,6 +10,7 @@ | |||
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include "omap3-igep.dtsi" | 12 | #include "omap3-igep.dtsi" |
13 | #include "omap-gpmc-smsc911x.dtsi" | ||
13 | 14 | ||
14 | / { | 15 | / { |
15 | model = "IGEPv2"; | 16 | model = "IGEPv2"; |
@@ -44,18 +45,6 @@ | |||
44 | }; | 45 | }; |
45 | }; | 46 | }; |
46 | 47 | ||
47 | vddvario: regulator-vddvario { | ||
48 | compatible = "regulator-fixed"; | ||
49 | regulator-name = "vddvario"; | ||
50 | regulator-always-on; | ||
51 | }; | ||
52 | |||
53 | vdd33a: regulator-vdd33a { | ||
54 | compatible = "regulator-fixed"; | ||
55 | regulator-name = "vdd33a"; | ||
56 | regulator-always-on; | ||
57 | }; | ||
58 | |||
59 | /* HS USB Port 1 Power */ | 48 | /* HS USB Port 1 Power */ |
60 | hsusb1_power: hsusb1_power_reg { | 49 | hsusb1_power: hsusb1_power_reg { |
61 | compatible = "regulator-fixed"; | 50 | compatible = "regulator-fixed"; |
@@ -169,42 +158,12 @@ | |||
169 | }; | 158 | }; |
170 | }; | 159 | }; |
171 | 160 | ||
172 | ethernet@5,0 { | 161 | ethernet@gpmc { |
173 | pinctrl-names = "default"; | 162 | pinctrl-names = "default"; |
174 | pinctrl-0 = <&smsc911x_pins>; | 163 | pinctrl-0 = <&smsc911x_pins>; |
175 | compatible = "smsc,lan9221", "smsc,lan9115"; | ||
176 | reg = <5 0 0xff>; | 164 | reg = <5 0 0xff>; |
177 | bank-width = <2>; | ||
178 | |||
179 | gpmc,mux-add-data; | ||
180 | gpmc,cs-on-ns = <0>; | ||
181 | gpmc,cs-rd-off-ns = <186>; | ||
182 | gpmc,cs-wr-off-ns = <186>; | ||
183 | gpmc,adv-on-ns = <12>; | ||
184 | gpmc,adv-rd-off-ns = <48>; | ||
185 | gpmc,adv-wr-off-ns = <48>; | ||
186 | gpmc,oe-on-ns = <54>; | ||
187 | gpmc,oe-off-ns = <168>; | ||
188 | gpmc,we-on-ns = <54>; | ||
189 | gpmc,we-off-ns = <168>; | ||
190 | gpmc,rd-cycle-ns = <186>; | ||
191 | gpmc,wr-cycle-ns = <186>; | ||
192 | gpmc,access-ns = <114>; | ||
193 | gpmc,page-burst-access-ns = <6>; | ||
194 | gpmc,bus-turnaround-ns = <12>; | ||
195 | gpmc,cycle2cycle-delay-ns = <18>; | ||
196 | gpmc,wr-data-mux-bus-ns = <90>; | ||
197 | gpmc,wr-access-ns = <186>; | ||
198 | gpmc,cycle2cycle-samecsen; | ||
199 | gpmc,cycle2cycle-diffcsen; | ||
200 | |||
201 | interrupt-parent = <&gpio6>; | 165 | interrupt-parent = <&gpio6>; |
202 | interrupts = <16 IRQ_TYPE_LEVEL_LOW>; | 166 | interrupts = <16 IRQ_TYPE_LEVEL_LOW>; |
203 | vmmc-supply = <&vddvario>; | ||
204 | vmmc_aux-supply = <&vdd33a>; | ||
205 | reg-io-width = <4>; | ||
206 | |||
207 | smsc,save-mac-address; | ||
208 | }; | 167 | }; |
209 | }; | 168 | }; |
210 | 169 | ||
diff --git a/arch/arm/boot/dts/omap3-n9.dts b/arch/arm/boot/dts/omap3-n9.dts new file mode 100644 index 000000000000..39828ce464ee --- /dev/null +++ b/arch/arm/boot/dts/omap3-n9.dts | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * omap3-n9.dts - Device Tree file for Nokia N9 | ||
3 | * | ||
4 | * Written by: Aaro Koskinen <aaro.koskinen@iki.fi> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | /dts-v1/; | ||
12 | |||
13 | #include "omap3-n950-n9.dtsi" | ||
14 | |||
15 | / { | ||
16 | model = "Nokia N9"; | ||
17 | compatible = "nokia,omap3-n9", "ti,omap3"; | ||
18 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-n950-n9.dtsi b/arch/arm/boot/dts/omap3-n950-n9.dtsi new file mode 100644 index 000000000000..94eb77d3b9dd --- /dev/null +++ b/arch/arm/boot/dts/omap3-n950-n9.dtsi | |||
@@ -0,0 +1,174 @@ | |||
1 | /* | ||
2 | * omap3-n950-n9.dtsi - Device Tree file for Nokia N950 & N9 (common stuff) | ||
3 | * | ||
4 | * Written by: Aaro Koskinen <aaro.koskinen@iki.fi> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include "omap36xx.dtsi" | ||
12 | |||
13 | / { | ||
14 | cpus { | ||
15 | cpu@0 { | ||
16 | cpu0-supply = <&vcc>; | ||
17 | }; | ||
18 | }; | ||
19 | |||
20 | memory { | ||
21 | device_type = "memory"; | ||
22 | reg = <0x80000000 0x40000000>; /* 1 GB */ | ||
23 | }; | ||
24 | |||
25 | vemmc: fixedregulator@0 { | ||
26 | compatible = "regulator-fixed"; | ||
27 | regulator-name = "VEMMC"; | ||
28 | regulator-min-microvolt = <2900000>; | ||
29 | regulator-max-microvolt = <2900000>; | ||
30 | gpio = <&gpio5 29 0>; /* gpio line 157 */ | ||
31 | startup-delay-us = <150>; | ||
32 | enable-active-high; | ||
33 | }; | ||
34 | }; | ||
35 | |||
36 | &omap3_pmx_core { | ||
37 | mmc2_pins: pinmux_mmc2_pins { | ||
38 | pinctrl-single,pins = < | ||
39 | 0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk */ | ||
40 | 0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd */ | ||
41 | 0x12c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat0 */ | ||
42 | 0x12e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat1 */ | ||
43 | 0x130 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat2 */ | ||
44 | 0x132 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_dat3 */ | ||
45 | >; | ||
46 | }; | ||
47 | }; | ||
48 | |||
49 | &i2c1 { | ||
50 | clock-frequency = <2900000>; | ||
51 | |||
52 | twl: twl@48 { | ||
53 | reg = <0x48>; | ||
54 | interrupts = <7>; /* SYS_NIRQ cascaded to intc */ | ||
55 | interrupt-parent = <&intc>; | ||
56 | }; | ||
57 | }; | ||
58 | |||
59 | /include/ "twl4030.dtsi" | ||
60 | |||
61 | &twl { | ||
62 | compatible = "ti,twl5031"; | ||
63 | }; | ||
64 | |||
65 | &twl_gpio { | ||
66 | ti,pullups = <0x000001>; /* BIT(0) */ | ||
67 | ti,pulldowns = <0x008106>; /* BIT(1) | BIT(2) | BIT(8) | BIT(15) */ | ||
68 | }; | ||
69 | |||
70 | &i2c2 { | ||
71 | clock-frequency = <400000>; | ||
72 | }; | ||
73 | |||
74 | &i2c3 { | ||
75 | clock-frequency = <400000>; | ||
76 | }; | ||
77 | |||
78 | &mmc1 { | ||
79 | status = "disabled"; | ||
80 | }; | ||
81 | |||
82 | &mmc2 { | ||
83 | pinctrl-names = "default"; | ||
84 | pinctrl-0 = <&mmc2_pins>; | ||
85 | vmmc-supply = <&vemmc>; | ||
86 | bus-width = <4>; | ||
87 | ti,non-removable; | ||
88 | }; | ||
89 | |||
90 | &mmc3 { | ||
91 | status = "disabled"; | ||
92 | }; | ||
93 | |||
94 | &usb_otg_hs { | ||
95 | interface-type = <0>; | ||
96 | usb-phy = <&usb2_phy>; | ||
97 | phys = <&usb2_phy>; | ||
98 | phy-names = "usb2-phy"; | ||
99 | mode = <3>; | ||
100 | power = <50>; | ||
101 | }; | ||
102 | |||
103 | &gpmc { | ||
104 | ranges = <0 0 0x04000000 0x20000000>; | ||
105 | |||
106 | onenand@0,0 { | ||
107 | #address-cells = <1>; | ||
108 | #size-cells = <1>; | ||
109 | reg = <0 0 0x20000000>; | ||
110 | |||
111 | gpmc,sync-read; | ||
112 | gpmc,sync-write; | ||
113 | gpmc,burst-length = <16>; | ||
114 | gpmc,burst-read; | ||
115 | gpmc,burst-wrap; | ||
116 | gpmc,burst-write; | ||
117 | gpmc,device-width = <2>; | ||
118 | gpmc,mux-add-data = <2>; | ||
119 | gpmc,cs-on-ns = <0>; | ||
120 | gpmc,cs-rd-off-ns = <87>; | ||
121 | gpmc,cs-wr-off-ns = <87>; | ||
122 | gpmc,adv-on-ns = <0>; | ||
123 | gpmc,adv-rd-off-ns = <10>; | ||
124 | gpmc,adv-wr-off-ns = <10>; | ||
125 | gpmc,oe-on-ns = <15>; | ||
126 | gpmc,oe-off-ns = <87>; | ||
127 | gpmc,we-on-ns = <0>; | ||
128 | gpmc,we-off-ns = <87>; | ||
129 | gpmc,rd-cycle-ns = <112>; | ||
130 | gpmc,wr-cycle-ns = <112>; | ||
131 | gpmc,access-ns = <81>; | ||
132 | gpmc,page-burst-access-ns = <15>; | ||
133 | gpmc,bus-turnaround-ns = <0>; | ||
134 | gpmc,cycle2cycle-delay-ns = <0>; | ||
135 | gpmc,wait-monitoring-ns = <0>; | ||
136 | gpmc,clk-activation-ns = <5>; | ||
137 | gpmc,wr-data-mux-bus-ns = <30>; | ||
138 | gpmc,wr-access-ns = <81>; | ||
139 | gpmc,sync-clk-ps = <15000>; | ||
140 | |||
141 | /* | ||
142 | * MTD partition table corresponding to Nokia's MeeGo 1.2 | ||
143 | * Harmattan release. | ||
144 | */ | ||
145 | partition@0 { | ||
146 | label = "bootloader"; | ||
147 | reg = <0x00000000 0x00100000>; | ||
148 | }; | ||
149 | partition@1 { | ||
150 | label = "config"; | ||
151 | reg = <0x00100000 0x002c0000>; | ||
152 | }; | ||
153 | partition@2 { | ||
154 | label = "kernel"; | ||
155 | reg = <0x003c0000 0x01000000>; | ||
156 | }; | ||
157 | partition@3 { | ||
158 | label = "log"; | ||
159 | reg = <0x013c0000 0x00200000>; | ||
160 | }; | ||
161 | partition@4 { | ||
162 | label = "var"; | ||
163 | reg = <0x015c0000 0x1ca40000>; | ||
164 | }; | ||
165 | partition@5 { | ||
166 | label = "moslo"; | ||
167 | reg = <0x1e000000 0x02000000>; | ||
168 | }; | ||
169 | partition@6 { | ||
170 | label = "omap2-onenand"; | ||
171 | reg = <0x00000000 0x20000000>; | ||
172 | }; | ||
173 | }; | ||
174 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-n950.dts b/arch/arm/boot/dts/omap3-n950.dts new file mode 100644 index 000000000000..b076a526b999 --- /dev/null +++ b/arch/arm/boot/dts/omap3-n950.dts | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * omap3-n950.dts - Device Tree file for Nokia N950 | ||
3 | * | ||
4 | * Written by: Aaro Koskinen <aaro.koskinen@iki.fi> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | /dts-v1/; | ||
12 | |||
13 | #include "omap3-n950-n9.dtsi" | ||
14 | |||
15 | / { | ||
16 | model = "Nokia N950"; | ||
17 | compatible = "nokia,omap3-n950", "ti,omap3"; | ||
18 | }; | ||
diff --git a/arch/arm/boot/dts/omap3-zoom3.dts b/arch/arm/boot/dts/omap3-zoom3.dts new file mode 100644 index 000000000000..15eb9fe5169c --- /dev/null +++ b/arch/arm/boot/dts/omap3-zoom3.dts | |||
@@ -0,0 +1,217 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2013 Texas Instruments Incorporated - http://www.ti.com/ | ||
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 | /dts-v1/; | ||
9 | |||
10 | #include "omap36xx.dtsi" | ||
11 | #include "omap-zoom-common.dtsi" | ||
12 | |||
13 | / { | ||
14 | model = "TI Zoom3"; | ||
15 | compatible = "ti,omap3-zoom3", "ti,omap36xx", "ti,omap3"; | ||
16 | |||
17 | cpus { | ||
18 | cpu@0 { | ||
19 | cpu0-supply = <&vcc>; | ||
20 | }; | ||
21 | }; | ||
22 | |||
23 | memory { | ||
24 | device_type = "memory"; | ||
25 | reg = <0x80000000 0x20000000>; /* 512 MB */ | ||
26 | }; | ||
27 | |||
28 | vddvario: regulator-vddvario { | ||
29 | compatible = "regulator-fixed"; | ||
30 | regulator-name = "vddvario"; | ||
31 | regulator-always-on; | ||
32 | }; | ||
33 | |||
34 | vdd33a: regulator-vdd33a { | ||
35 | compatible = "regulator-fixed"; | ||
36 | regulator-name = "vdd33a"; | ||
37 | regulator-always-on; | ||
38 | }; | ||
39 | |||
40 | wl12xx_vmmc: wl12xx_vmmc { | ||
41 | pinctrl-names = "default"; | ||
42 | pinctrl-0 = <&wl12xx_gpio>; | ||
43 | compatible = "regulator-fixed"; | ||
44 | regulator-name = "vwl1271"; | ||
45 | regulator-min-microvolt = <1800000>; | ||
46 | regulator-max-microvolt = <1800000>; | ||
47 | gpio = <&gpio4 5 0>; /* gpio101 */ | ||
48 | startup-delay-us = <70000>; | ||
49 | enable-active-high; | ||
50 | }; | ||
51 | }; | ||
52 | |||
53 | &omap3_pmx_core { | ||
54 | /* REVISIT: twl gpio0 is mmc0_cd */ | ||
55 | mmc1_pins: pinmux_mmc1_pins { | ||
56 | pinctrl-single,pins = < | ||
57 | 0x114 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* sdmmc1_clk.sdmmc1_clk */ | ||
58 | 0x116 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* sdmmc1_cmd.sdmmc1_cmd */ | ||
59 | 0x118 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat0.sdmmc1_dat0 */ | ||
60 | 0x11a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat1.sdmmc1_dat1 */ | ||
61 | 0x11c (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat2.sdmmc1_dat2 */ | ||
62 | 0x11e (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc1_dat3.sdmmc1_dat3 */ | ||
63 | >; | ||
64 | }; | ||
65 | |||
66 | mmc2_pins: pinmux_mmc2_pins { | ||
67 | pinctrl-single,pins = < | ||
68 | 0x128 (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_clk.sdmmc2_clk */ | ||
69 | 0x12a (PIN_INPUT_PULLUP | MUX_MODE0) /* sdmmc2_cmd.sdmmc2_cmd */ | ||
70 | 0x12c (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat0.sdmmc2_dat0 */ | ||
71 | 0x12e (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat1.sdmmc2_dat1 */ | ||
72 | 0x130 (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat2.sdmmc2_dat2 */ | ||
73 | 0x132 (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat3.sdmmc2_dat3 */ | ||
74 | 0x134 (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat4.sdmmc2_dat4 */ | ||
75 | 0x136 (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat5.sdmmc2_dat5 */ | ||
76 | 0x138 (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat6.sdmmc2_dat6 */ | ||
77 | 0x13a (PIN_INPUT | MUX_MODE0) /* sdmmc2_dat7.sdmmc2_dat7 */ | ||
78 | >; | ||
79 | }; | ||
80 | |||
81 | mmc3_pins: pinmux_mmc3_pins { | ||
82 | pinctrl-single,pins = < | ||
83 | 0x168 (PIN_INPUT | MUX_MODE4) /* mcbsp1_clkx.gpio_162 WLAN IRQ */ | ||
84 | 0x1a0 (PIN_INPUT_PULLUP | MUX_MODE3) /* mcspi1_cs1.sdmmc3_cmd */ | ||
85 | 0x5a8 (PIN_INPUT_PULLUP | MUX_MODE2) /* etk_clk.sdmmc3_clk */ | ||
86 | 0x5b4 (PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d4.sdmmc3_dat0 */ | ||
87 | 0x5b6 (WAKEUP_EN | PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d5.sdmmc3_dat1 */ | ||
88 | 0x5b8 (PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d6.sdmmc3_dat2 */ | ||
89 | 0x5b2 (PIN_INPUT_PULLUP | MUX_MODE2) /* etk_d3.sdmmc3_dat3 */ | ||
90 | >; | ||
91 | }; | ||
92 | |||
93 | uart1_pins: pinmux_uart1_pins { | ||
94 | pinctrl-single,pins = < | ||
95 | 0x150 (PIN_INPUT | MUX_MODE0) /* uart1_cts.uart1_cts */ | ||
96 | 0x14e (PIN_OUTPUT | MUX_MODE0) /* uart1_rts.uart1_rts */ | ||
97 | 0x152 (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart1_rx.uart1_rx */ | ||
98 | 0x14c (PIN_OUTPUT | MUX_MODE0) /* uart1_tx.uart1_tx */ | ||
99 | >; | ||
100 | }; | ||
101 | |||
102 | uart2_pins: pinmux_uart2_pins { | ||
103 | pinctrl-single,pins = < | ||
104 | 0x144 (PIN_INPUT_PULLUP | MUX_MODE0) /* uart2_cts.uart2_cts */ | ||
105 | 0x146 (PIN_OUTPUT | MUX_MODE0) /* uart2_rts.uart2_rts */ | ||
106 | 0x14a (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart2_rx.uart2_rx */ | ||
107 | 0x148 (PIN_OUTPUT | MUX_MODE0) /* uart2_tx.uart2_tx */ | ||
108 | >; | ||
109 | }; | ||
110 | |||
111 | uart3_pins: pinmux_uart3_pins { | ||
112 | pinctrl-single,pins = < | ||
113 | 0x16a (PIN_INPUT_PULLDOWN | MUX_MODE0) /* uart3_cts_rctx.uart3_cts_rctx */ | ||
114 | 0x16c (PIN_OUTPUT | MUX_MODE0) /* uart3_rts_sd.uart3_rts_sd */ | ||
115 | 0x16e (WAKEUP_EN | PIN_INPUT | MUX_MODE0) /* uart3_rx_irrx.uart3_rx_irrx */ | ||
116 | 0x170 (PIN_OUTPUT | MUX_MODE0) /* uart3_tx_irtx.uart3_tx_irtx */ | ||
117 | >; | ||
118 | }; | ||
119 | |||
120 | /* wl12xx GPIO output for WLAN_EN */ | ||
121 | wl12xx_gpio: pinmux_wl12xx_gpio { | ||
122 | pinctrl-single,pins = < | ||
123 | 0xea (PIN_OUTPUT| MUX_MODE4) /* cam_d2.gpio_101 */ | ||
124 | >; | ||
125 | }; | ||
126 | }; | ||
127 | |||
128 | &omap3_pmx_wkup { | ||
129 | wlan_host_wkup: pinmux_wlan_host_wkup_pins { | ||
130 | pinctrl-single,pins = < | ||
131 | 0x1a (PIN_INPUT_PULLUP | MUX_MODE4) /* sys_clkout1.gpio_10 WLAN_HOST_WKUP */ | ||
132 | >; | ||
133 | }; | ||
134 | }; | ||
135 | |||
136 | &i2c1 { | ||
137 | clock-frequency = <2600000>; | ||
138 | |||
139 | twl: twl@48 { | ||
140 | reg = <0x48>; | ||
141 | interrupts = <7>; /* SYS_NIRQ cascaded to intc */ | ||
142 | interrupt-parent = <&intc>; | ||
143 | }; | ||
144 | }; | ||
145 | |||
146 | #include "twl4030.dtsi" | ||
147 | |||
148 | &i2c2 { | ||
149 | clock-frequency = <400000>; | ||
150 | }; | ||
151 | |||
152 | &i2c3 { | ||
153 | clock-frequency = <400000>; | ||
154 | |||
155 | /* | ||
156 | * TVP5146 Video decoder-in for analog input support. | ||
157 | */ | ||
158 | tvp5146@5c { | ||
159 | compatible = "ti,tvp5146m2"; | ||
160 | reg = <0x5c>; | ||
161 | }; | ||
162 | }; | ||
163 | |||
164 | &twl_gpio { | ||
165 | ti,use-leds; | ||
166 | }; | ||
167 | |||
168 | &mmc1 { | ||
169 | vmmc-supply = <&vmmc1>; | ||
170 | vmmc_aux-supply = <&vsim>; | ||
171 | bus-width = <4>; | ||
172 | pinctrl-names = "default"; | ||
173 | pinctrl-0 = <&mmc1_pins>; | ||
174 | }; | ||
175 | /* | ||
176 | &mmc2 { | ||
177 | vmmc-supply = <&vmmc2>; | ||
178 | ti,non-removable; | ||
179 | bus-width = <8>; | ||
180 | pinctrl-names = "default"; | ||
181 | pinctrl-0 = <&mmc2_pins>; | ||
182 | }; | ||
183 | */ | ||
184 | &mmc3 { | ||
185 | vmmc-supply = <&wl12xx_vmmc>; | ||
186 | non-removable; | ||
187 | bus-width = <4>; | ||
188 | cap-power-off-card; | ||
189 | pinctrl-names = "default"; | ||
190 | pinctrl-0 = <&mmc3_pins>; | ||
191 | }; | ||
192 | |||
193 | &uart1 { | ||
194 | pinctrl-names = "default"; | ||
195 | pinctrl-0 = <&uart1_pins>; | ||
196 | }; | ||
197 | |||
198 | &uart2 { | ||
199 | pinctrl-names = "default"; | ||
200 | pinctrl-0 = <&uart2_pins>; | ||
201 | }; | ||
202 | |||
203 | &uart3 { | ||
204 | pinctrl-names = "default"; | ||
205 | pinctrl-0 = <&uart3_pins>; | ||
206 | }; | ||
207 | |||
208 | &uart4 { | ||
209 | status = "disabled"; | ||
210 | }; | ||
211 | |||
212 | &usb_otg_hs { | ||
213 | interface-type = <0>; | ||
214 | usb-phy = <&usb2_phy>; | ||
215 | mode = <3>; | ||
216 | power = <50>; | ||
217 | }; | ||
diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index 8e8b3ec844cb..f275beea67b6 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi | |||
@@ -110,7 +110,7 @@ | |||
110 | #interrupt-cells = <1>; | 110 | #interrupt-cells = <1>; |
111 | interrupt-controller; | 111 | interrupt-controller; |
112 | pinctrl-single,register-width = <16>; | 112 | pinctrl-single,register-width = <16>; |
113 | pinctrl-single,function-mask = <0x7f1f>; | 113 | pinctrl-single,function-mask = <0xff1f>; |
114 | }; | 114 | }; |
115 | 115 | ||
116 | omap3_pmx_wkup: pinmux@48002a00 { | 116 | omap3_pmx_wkup: pinmux@48002a00 { |
@@ -121,7 +121,7 @@ | |||
121 | #interrupt-cells = <1>; | 121 | #interrupt-cells = <1>; |
122 | interrupt-controller; | 122 | interrupt-controller; |
123 | pinctrl-single,register-width = <16>; | 123 | pinctrl-single,register-width = <16>; |
124 | pinctrl-single,function-mask = <0x7f1f>; | 124 | pinctrl-single,function-mask = <0xff1f>; |
125 | }; | 125 | }; |
126 | 126 | ||
127 | gpio1: gpio@48310000 { | 127 | gpio1: gpio@48310000 { |
diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh index 06ea7d42ce8e..2a45092a40e3 100644 --- a/arch/arm/boot/install.sh +++ b/arch/arm/boot/install.sh | |||
@@ -20,6 +20,20 @@ | |||
20 | # $4 - default install path (blank if root directory) | 20 | # $4 - default install path (blank if root directory) |
21 | # | 21 | # |
22 | 22 | ||
23 | verify () { | ||
24 | if [ ! -f "$1" ]; then | ||
25 | echo "" 1>&2 | ||
26 | echo " *** Missing file: $1" 1>&2 | ||
27 | echo ' *** You need to run "make" before "make install".' 1>&2 | ||
28 | echo "" 1>&2 | ||
29 | exit 1 | ||
30 | fi | ||
31 | } | ||
32 | |||
33 | # Make sure the files actually exist | ||
34 | verify "$2" | ||
35 | verify "$3" | ||
36 | |||
23 | # User may have a custom install script | 37 | # User may have a custom install script |
24 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi | 38 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi |
25 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi | 39 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi |
diff --git a/arch/arm/include/asm/jump_label.h b/arch/arm/include/asm/jump_label.h index bfc198c75913..863c892b4aaa 100644 --- a/arch/arm/include/asm/jump_label.h +++ b/arch/arm/include/asm/jump_label.h | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | static __always_inline bool arch_static_branch(struct static_key *key) | 17 | static __always_inline bool arch_static_branch(struct static_key *key) |
18 | { | 18 | { |
19 | asm goto("1:\n\t" | 19 | asm_volatile_goto("1:\n\t" |
20 | JUMP_LABEL_NOP "\n\t" | 20 | JUMP_LABEL_NOP "\n\t" |
21 | ".pushsection __jump_table, \"aw\"\n\t" | 21 | ".pushsection __jump_table, \"aw\"\n\t" |
22 | ".word 1b, %l[l_yes], %c0\n\t" | 22 | ".word 1b, %l[l_yes], %c0\n\t" |
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig index f6a1db112168..68c9688815aa 100644 --- a/arch/arm/mach-omap2/Kconfig +++ b/arch/arm/mach-omap2/Kconfig | |||
@@ -256,12 +256,6 @@ config MACH_OVERO | |||
256 | default y | 256 | default y |
257 | select OMAP_PACKAGE_CBB | 257 | select OMAP_PACKAGE_CBB |
258 | 258 | ||
259 | config MACH_OMAP3EVM | ||
260 | bool "OMAP 3530 EVM board" | ||
261 | depends on ARCH_OMAP3 | ||
262 | default y | ||
263 | select OMAP_PACKAGE_CBB | ||
264 | |||
265 | config MACH_OMAP3517EVM | 259 | config MACH_OMAP3517EVM |
266 | bool "OMAP3517/ AM3517 EVM board" | 260 | bool "OMAP3517/ AM3517 EVM board" |
267 | depends on ARCH_OMAP3 | 261 | depends on ARCH_OMAP3 |
@@ -310,33 +304,12 @@ config MACH_NOKIA_N8X0 | |||
310 | select MACH_NOKIA_N810_WIMAX | 304 | select MACH_NOKIA_N810_WIMAX |
311 | select OMAP_PACKAGE_ZAC | 305 | select OMAP_PACKAGE_ZAC |
312 | 306 | ||
313 | config MACH_NOKIA_RM680 | ||
314 | bool "Nokia N950 (RM-680) / N9 (RM-696) phones" | ||
315 | depends on ARCH_OMAP3 | ||
316 | default y | ||
317 | select MACH_NOKIA_RM696 | ||
318 | select OMAP_PACKAGE_CBB | ||
319 | |||
320 | config MACH_NOKIA_RX51 | 307 | config MACH_NOKIA_RX51 |
321 | bool "Nokia N900 (RX-51) phone" | 308 | bool "Nokia N900 (RX-51) phone" |
322 | depends on ARCH_OMAP3 | 309 | depends on ARCH_OMAP3 |
323 | default y | 310 | default y |
324 | select OMAP_PACKAGE_CBB | 311 | select OMAP_PACKAGE_CBB |
325 | 312 | ||
326 | config MACH_OMAP_ZOOM2 | ||
327 | bool "OMAP3 Zoom2 board" | ||
328 | depends on ARCH_OMAP3 | ||
329 | default y | ||
330 | select OMAP_PACKAGE_CBB | ||
331 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
332 | |||
333 | config MACH_OMAP_ZOOM3 | ||
334 | bool "OMAP3630 Zoom3 board" | ||
335 | depends on ARCH_OMAP3 | ||
336 | default y | ||
337 | select OMAP_PACKAGE_CBP | ||
338 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
339 | |||
340 | config MACH_CM_T35 | 313 | config MACH_CM_T35 |
341 | bool "CompuLab CM-T35/CM-T3730 modules" | 314 | bool "CompuLab CM-T35/CM-T3730 modules" |
342 | depends on ARCH_OMAP3 | 315 | depends on ARCH_OMAP3 |
@@ -353,31 +326,12 @@ config MACH_CM_T3517 | |||
353 | config MACH_CM_T3730 | 326 | config MACH_CM_T3730 |
354 | bool | 327 | bool |
355 | 328 | ||
356 | config MACH_IGEP0020 | ||
357 | bool "IGEP v2 board" | ||
358 | depends on ARCH_OMAP3 | ||
359 | default y | ||
360 | select OMAP_PACKAGE_CBB | ||
361 | |||
362 | config MACH_IGEP0030 | ||
363 | bool "IGEP OMAP3 module" | ||
364 | depends on ARCH_OMAP3 | ||
365 | default y | ||
366 | select MACH_IGEP0020 | ||
367 | select OMAP_PACKAGE_CBB | ||
368 | |||
369 | config MACH_SBC3530 | 329 | config MACH_SBC3530 |
370 | bool "OMAP3 SBC STALKER board" | 330 | bool "OMAP3 SBC STALKER board" |
371 | depends on ARCH_OMAP3 | 331 | depends on ARCH_OMAP3 |
372 | default y | 332 | default y |
373 | select OMAP_PACKAGE_CUS | 333 | select OMAP_PACKAGE_CUS |
374 | 334 | ||
375 | config MACH_OMAP_3630SDP | ||
376 | bool "OMAP3630 SDP board" | ||
377 | depends on ARCH_OMAP3 | ||
378 | default y | ||
379 | select OMAP_PACKAGE_CBP | ||
380 | |||
381 | config MACH_TI8168EVM | 335 | config MACH_TI8168EVM |
382 | bool "TI8168 Evaluation Module" | 336 | bool "TI8168 Evaluation Module" |
383 | depends on SOC_TI81XX | 337 | depends on SOC_TI81XX |
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index f8d4a1b83864..096d6bbcd3bc 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -242,26 +242,14 @@ obj-$(CONFIG_MACH_OMAP_LDP) += board-ldp.o | |||
242 | obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o | 242 | obj-$(CONFIG_MACH_OMAP3530_LV_SOM) += board-omap3logic.o |
243 | obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o | 243 | obj-$(CONFIG_MACH_OMAP3_TORPEDO) += board-omap3logic.o |
244 | obj-$(CONFIG_MACH_OVERO) += board-overo.o | 244 | obj-$(CONFIG_MACH_OVERO) += board-overo.o |
245 | obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o | ||
246 | obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o | 245 | obj-$(CONFIG_MACH_OMAP3_PANDORA) += board-omap3pandora.o |
247 | obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o | 246 | obj-$(CONFIG_MACH_OMAP_3430SDP) += board-3430sdp.o |
248 | obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o | 247 | obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o |
249 | obj-$(CONFIG_MACH_NOKIA_RM680) += board-rm680.o sdram-nokia.o | ||
250 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o sdram-nokia.o | 248 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o sdram-nokia.o |
251 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-peripherals.o | 249 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-peripherals.o |
252 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-video.o | 250 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51-video.o |
253 | obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom.o board-zoom-peripherals.o | ||
254 | obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom-display.o | ||
255 | obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom-debugboard.o | ||
256 | obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom.o board-zoom-peripherals.o | ||
257 | obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom-display.o | ||
258 | obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom-debugboard.o | ||
259 | obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o | ||
260 | obj-$(CONFIG_MACH_OMAP_3630SDP) += board-zoom-peripherals.o | ||
261 | obj-$(CONFIG_MACH_OMAP_3630SDP) += board-zoom-display.o | ||
262 | obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o | 251 | obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o |
263 | obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o | 252 | obj-$(CONFIG_MACH_CM_T3517) += board-cm-t3517.o |
264 | obj-$(CONFIG_MACH_IGEP0020) += board-igep0020.o | ||
265 | obj-$(CONFIG_MACH_TOUCHBOOK) += board-omap3touchbook.o | 253 | obj-$(CONFIG_MACH_TOUCHBOOK) += board-omap3touchbook.o |
266 | 254 | ||
267 | obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o | 255 | obj-$(CONFIG_MACH_OMAP3517EVM) += board-am3517evm.o |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c deleted file mode 100644 index 20d6d8189240..000000000000 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ /dev/null | |||
@@ -1,225 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Texas Instruments Inc. | ||
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 | #include <linux/kernel.h> | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/platform_device.h> | ||
12 | #include <linux/input.h> | ||
13 | #include <linux/gpio.h> | ||
14 | #include <linux/mtd/nand.h> | ||
15 | |||
16 | #include <asm/mach-types.h> | ||
17 | #include <asm/mach/arch.h> | ||
18 | |||
19 | #include "common.h" | ||
20 | #include "gpmc-smc91x.h" | ||
21 | |||
22 | #include "board-zoom.h" | ||
23 | |||
24 | #include "board-flash.h" | ||
25 | #include "mux.h" | ||
26 | #include "sdram-hynix-h8mbx00u0mer-0em.h" | ||
27 | |||
28 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | ||
29 | |||
30 | static struct omap_smc91x_platform_data board_smc91x_data = { | ||
31 | .cs = 3, | ||
32 | .flags = GPMC_MUX_ADD_DATA | IORESOURCE_IRQ_LOWLEVEL, | ||
33 | }; | ||
34 | |||
35 | static void __init board_smc91x_init(void) | ||
36 | { | ||
37 | board_smc91x_data.gpio_irq = 158; | ||
38 | gpmc_smc91x_init(&board_smc91x_data); | ||
39 | } | ||
40 | |||
41 | #else | ||
42 | |||
43 | static inline void board_smc91x_init(void) | ||
44 | { | ||
45 | } | ||
46 | |||
47 | #endif /* defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) */ | ||
48 | |||
49 | static void enable_board_wakeup_source(void) | ||
50 | { | ||
51 | /* T2 interrupt line (keypad) */ | ||
52 | omap_mux_init_signal("sys_nirq", | ||
53 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | ||
54 | } | ||
55 | |||
56 | static struct usbhs_phy_data phy_data[] __initdata = { | ||
57 | { | ||
58 | .port = 1, | ||
59 | .reset_gpio = 126, | ||
60 | .vcc_gpio = -EINVAL, | ||
61 | }, | ||
62 | { | ||
63 | .port = 2, | ||
64 | .reset_gpio = 61, | ||
65 | .vcc_gpio = -EINVAL, | ||
66 | }, | ||
67 | }; | ||
68 | |||
69 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { | ||
70 | |||
71 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | ||
72 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | ||
73 | }; | ||
74 | |||
75 | #ifdef CONFIG_OMAP_MUX | ||
76 | static struct omap_board_mux board_mux[] __initdata = { | ||
77 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
78 | }; | ||
79 | #endif | ||
80 | |||
81 | /* | ||
82 | * SDP3630 CS organization | ||
83 | * See also the Switch S8 settings in the comments. | ||
84 | */ | ||
85 | static char chip_sel_sdp[][GPMC_CS_NUM] = { | ||
86 | {PDC_NOR, PDC_NAND, PDC_ONENAND, DBG_MPDB, 0, 0, 0, 0}, /* S8:1111 */ | ||
87 | {PDC_ONENAND, PDC_NAND, PDC_NOR, DBG_MPDB, 0, 0, 0, 0}, /* S8:1110 */ | ||
88 | {PDC_NAND, PDC_ONENAND, PDC_NOR, DBG_MPDB, 0, 0, 0, 0}, /* S8:1101 */ | ||
89 | }; | ||
90 | |||
91 | static struct mtd_partition sdp_nor_partitions[] = { | ||
92 | /* bootloader (U-Boot, etc) in first sector */ | ||
93 | { | ||
94 | .name = "Bootloader-NOR", | ||
95 | .offset = 0, | ||
96 | .size = SZ_256K, | ||
97 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
98 | }, | ||
99 | /* bootloader params in the next sector */ | ||
100 | { | ||
101 | .name = "Params-NOR", | ||
102 | .offset = MTDPART_OFS_APPEND, | ||
103 | .size = SZ_256K, | ||
104 | .mask_flags = 0, | ||
105 | }, | ||
106 | /* kernel */ | ||
107 | { | ||
108 | .name = "Kernel-NOR", | ||
109 | .offset = MTDPART_OFS_APPEND, | ||
110 | .size = SZ_2M, | ||
111 | .mask_flags = 0 | ||
112 | }, | ||
113 | /* file system */ | ||
114 | { | ||
115 | .name = "Filesystem-NOR", | ||
116 | .offset = MTDPART_OFS_APPEND, | ||
117 | .size = MTDPART_SIZ_FULL, | ||
118 | .mask_flags = 0 | ||
119 | } | ||
120 | }; | ||
121 | |||
122 | static struct mtd_partition sdp_onenand_partitions[] = { | ||
123 | { | ||
124 | .name = "X-Loader-OneNAND", | ||
125 | .offset = 0, | ||
126 | .size = 4 * (64 * 2048), | ||
127 | .mask_flags = MTD_WRITEABLE /* force read-only */ | ||
128 | }, | ||
129 | { | ||
130 | .name = "U-Boot-OneNAND", | ||
131 | .offset = MTDPART_OFS_APPEND, | ||
132 | .size = 2 * (64 * 2048), | ||
133 | .mask_flags = MTD_WRITEABLE /* force read-only */ | ||
134 | }, | ||
135 | { | ||
136 | .name = "U-Boot Environment-OneNAND", | ||
137 | .offset = MTDPART_OFS_APPEND, | ||
138 | .size = 1 * (64 * 2048), | ||
139 | }, | ||
140 | { | ||
141 | .name = "Kernel-OneNAND", | ||
142 | .offset = MTDPART_OFS_APPEND, | ||
143 | .size = 16 * (64 * 2048), | ||
144 | }, | ||
145 | { | ||
146 | .name = "File System-OneNAND", | ||
147 | .offset = MTDPART_OFS_APPEND, | ||
148 | .size = MTDPART_SIZ_FULL, | ||
149 | }, | ||
150 | }; | ||
151 | |||
152 | static struct mtd_partition sdp_nand_partitions[] = { | ||
153 | /* All the partition sizes are listed in terms of NAND block size */ | ||
154 | { | ||
155 | .name = "X-Loader-NAND", | ||
156 | .offset = 0, | ||
157 | .size = 4 * (64 * 2048), | ||
158 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
159 | }, | ||
160 | { | ||
161 | .name = "U-Boot-NAND", | ||
162 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ | ||
163 | .size = 10 * (64 * 2048), | ||
164 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
165 | }, | ||
166 | { | ||
167 | .name = "Boot Env-NAND", | ||
168 | |||
169 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */ | ||
170 | .size = 6 * (64 * 2048), | ||
171 | }, | ||
172 | { | ||
173 | .name = "Kernel-NAND", | ||
174 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x280000 */ | ||
175 | .size = 40 * (64 * 2048), | ||
176 | }, | ||
177 | { | ||
178 | .name = "File System - NAND", | ||
179 | .size = MTDPART_SIZ_FULL, | ||
180 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x780000 */ | ||
181 | }, | ||
182 | }; | ||
183 | |||
184 | static struct flash_partitions sdp_flash_partitions[] = { | ||
185 | { | ||
186 | .parts = sdp_nor_partitions, | ||
187 | .nr_parts = ARRAY_SIZE(sdp_nor_partitions), | ||
188 | }, | ||
189 | { | ||
190 | .parts = sdp_onenand_partitions, | ||
191 | .nr_parts = ARRAY_SIZE(sdp_onenand_partitions), | ||
192 | }, | ||
193 | { | ||
194 | .parts = sdp_nand_partitions, | ||
195 | .nr_parts = ARRAY_SIZE(sdp_nand_partitions), | ||
196 | }, | ||
197 | }; | ||
198 | |||
199 | static void __init omap_sdp_init(void) | ||
200 | { | ||
201 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); | ||
202 | zoom_peripherals_init(); | ||
203 | omap_sdrc_init(h8mbx00u0mer0em_sdrc_params, | ||
204 | h8mbx00u0mer0em_sdrc_params); | ||
205 | zoom_display_init(); | ||
206 | board_smc91x_init(); | ||
207 | board_flash_init(sdp_flash_partitions, chip_sel_sdp, NAND_BUSWIDTH_16); | ||
208 | enable_board_wakeup_source(); | ||
209 | |||
210 | usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data)); | ||
211 | usbhs_init(&usbhs_bdata); | ||
212 | } | ||
213 | |||
214 | MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board") | ||
215 | .atag_offset = 0x100, | ||
216 | .reserve = omap_reserve, | ||
217 | .map_io = omap3_map_io, | ||
218 | .init_early = omap3630_init_early, | ||
219 | .init_irq = omap3_init_irq, | ||
220 | .handle_irq = omap3_intc_handle_irq, | ||
221 | .init_machine = omap_sdp_init, | ||
222 | .init_late = omap3630_init_late, | ||
223 | .init_time = omap3_sync32k_timer_init, | ||
224 | .restart = omap3xxx_restart, | ||
225 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 3017a9d67ac8..3896b12b0006 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -95,6 +95,24 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)") | |||
95 | .restart = omap3xxx_restart, | 95 | .restart = omap3xxx_restart, |
96 | MACHINE_END | 96 | MACHINE_END |
97 | 97 | ||
98 | static const char *omap36xx_boards_compat[] __initdata = { | ||
99 | "ti,omap36xx", | ||
100 | NULL, | ||
101 | }; | ||
102 | |||
103 | DT_MACHINE_START(OMAP36XX_DT, "Generic OMAP36xx (Flattened Device Tree)") | ||
104 | .reserve = omap_reserve, | ||
105 | .map_io = omap3_map_io, | ||
106 | .init_early = omap3630_init_early, | ||
107 | .init_irq = omap_intc_of_init, | ||
108 | .handle_irq = omap3_intc_handle_irq, | ||
109 | .init_machine = omap_generic_init, | ||
110 | .init_late = omap3_init_late, | ||
111 | .init_time = omap3_sync32k_timer_init, | ||
112 | .dt_compat = omap36xx_boards_compat, | ||
113 | .restart = omap3xxx_restart, | ||
114 | MACHINE_END | ||
115 | |||
98 | static const char *omap3_gp_boards_compat[] __initdata = { | 116 | static const char *omap3_gp_boards_compat[] __initdata = { |
99 | "ti,omap3-beagle", | 117 | "ti,omap3-beagle", |
100 | "timll,omap3-devkit8000", | 118 | "timll,omap3-devkit8000", |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c deleted file mode 100644 index d648d50d9d24..000000000000 --- a/arch/arm/mach-omap2/board-igep0020.c +++ /dev/null | |||
@@ -1,683 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Integration Software and Electronic Engineering. | ||
3 | * | ||
4 | * Modified from mach-omap2/board-generic.c | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/delay.h> | ||
15 | #include <linux/err.h> | ||
16 | #include <linux/clk.h> | ||
17 | #include <linux/io.h> | ||
18 | #include <linux/gpio.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | #include <linux/input.h> | ||
21 | #include <linux/usb/phy.h> | ||
22 | |||
23 | #include <linux/regulator/machine.h> | ||
24 | #include <linux/regulator/fixed.h> | ||
25 | #include <linux/i2c/twl.h> | ||
26 | #include <linux/mmc/host.h> | ||
27 | |||
28 | #include <linux/mtd/nand.h> | ||
29 | |||
30 | #include <asm/mach-types.h> | ||
31 | #include <asm/mach/arch.h> | ||
32 | |||
33 | #include <video/omapdss.h> | ||
34 | #include <video/omap-panel-data.h> | ||
35 | #include <linux/platform_data/mtd-onenand-omap2.h> | ||
36 | |||
37 | #include "common.h" | ||
38 | #include "gpmc.h" | ||
39 | #include "mux.h" | ||
40 | #include "hsmmc.h" | ||
41 | #include "sdram-numonyx-m65kxxxxam.h" | ||
42 | #include "common-board-devices.h" | ||
43 | #include "board-flash.h" | ||
44 | #include "control.h" | ||
45 | #include "gpmc-onenand.h" | ||
46 | #include "dss-common.h" | ||
47 | |||
48 | #define IGEP2_SMSC911X_CS 5 | ||
49 | #define IGEP2_SMSC911X_GPIO 176 | ||
50 | #define IGEP2_GPIO_USBH_NRESET 24 | ||
51 | #define IGEP2_GPIO_LED0_GREEN 26 | ||
52 | #define IGEP2_GPIO_LED0_RED 27 | ||
53 | #define IGEP2_GPIO_LED1_RED 28 | ||
54 | |||
55 | #define IGEP2_RB_GPIO_WIFI_NPD 94 | ||
56 | #define IGEP2_RB_GPIO_WIFI_NRESET 95 | ||
57 | #define IGEP2_RB_GPIO_BT_NRESET 137 | ||
58 | #define IGEP2_RC_GPIO_WIFI_NPD 138 | ||
59 | #define IGEP2_RC_GPIO_WIFI_NRESET 139 | ||
60 | #define IGEP2_RC_GPIO_BT_NRESET 137 | ||
61 | |||
62 | #define IGEP3_GPIO_LED0_GREEN 54 | ||
63 | #define IGEP3_GPIO_LED0_RED 53 | ||
64 | #define IGEP3_GPIO_LED1_RED 16 | ||
65 | #define IGEP3_GPIO_USBH_NRESET 183 | ||
66 | |||
67 | #define IGEP_SYSBOOT_MASK 0x1f | ||
68 | #define IGEP_SYSBOOT_NAND 0x0f | ||
69 | #define IGEP_SYSBOOT_ONENAND 0x10 | ||
70 | |||
71 | /* | ||
72 | * IGEP2 Hardware Revision Table | ||
73 | * | ||
74 | * -------------------------------------------------------------------------- | ||
75 | * | Id. | Hw Rev. | HW0 (28) | WIFI_NPD | WIFI_NRESET | BT_NRESET | | ||
76 | * -------------------------------------------------------------------------- | ||
77 | * | 0 | B | high | gpio94 | gpio95 | - | | ||
78 | * | 0 | B/C (B-compatible) | high | gpio94 | gpio95 | gpio137 | | ||
79 | * | 1 | C | low | gpio138 | gpio139 | gpio137 | | ||
80 | * -------------------------------------------------------------------------- | ||
81 | */ | ||
82 | |||
83 | #define IGEP2_BOARD_HWREV_B 0 | ||
84 | #define IGEP2_BOARD_HWREV_C 1 | ||
85 | #define IGEP3_BOARD_HWREV 2 | ||
86 | |||
87 | static u8 hwrev; | ||
88 | |||
89 | static void __init igep2_get_revision(void) | ||
90 | { | ||
91 | u8 ret; | ||
92 | |||
93 | if (machine_is_igep0030()) { | ||
94 | hwrev = IGEP3_BOARD_HWREV; | ||
95 | return; | ||
96 | } | ||
97 | |||
98 | omap_mux_init_gpio(IGEP2_GPIO_LED1_RED, OMAP_PIN_INPUT); | ||
99 | |||
100 | if (gpio_request_one(IGEP2_GPIO_LED1_RED, GPIOF_IN, "GPIO_HW0_REV")) { | ||
101 | pr_warning("IGEP2: Could not obtain gpio GPIO_HW0_REV\n"); | ||
102 | pr_err("IGEP2: Unknown Hardware Revision\n"); | ||
103 | return; | ||
104 | } | ||
105 | |||
106 | ret = gpio_get_value(IGEP2_GPIO_LED1_RED); | ||
107 | if (ret == 0) { | ||
108 | pr_info("IGEP2: Hardware Revision C (B-NON compatible)\n"); | ||
109 | hwrev = IGEP2_BOARD_HWREV_C; | ||
110 | } else if (ret == 1) { | ||
111 | pr_info("IGEP2: Hardware Revision B/C (B compatible)\n"); | ||
112 | hwrev = IGEP2_BOARD_HWREV_B; | ||
113 | } else { | ||
114 | pr_err("IGEP2: Unknown Hardware Revision\n"); | ||
115 | hwrev = -1; | ||
116 | } | ||
117 | |||
118 | gpio_free(IGEP2_GPIO_LED1_RED); | ||
119 | } | ||
120 | |||
121 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | ||
122 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) || \ | ||
123 | defined(CONFIG_MTD_NAND_OMAP2) || \ | ||
124 | defined(CONFIG_MTD_NAND_OMAP2_MODULE) | ||
125 | |||
126 | #define ONENAND_MAP 0x20000000 | ||
127 | |||
128 | /* NAND04GR4E1A ( x2 Flash built-in COMBO POP MEMORY ) | ||
129 | * Since the device is equipped with two DataRAMs, and two-plane NAND | ||
130 | * Flash memory array, these two component enables simultaneous program | ||
131 | * of 4KiB. Plane1 has only even blocks such as block0, block2, block4 | ||
132 | * while Plane2 has only odd blocks such as block1, block3, block5. | ||
133 | * So MTD regards it as 4KiB page size and 256KiB block size 64*(2*2048) | ||
134 | */ | ||
135 | |||
136 | static struct mtd_partition igep_flash_partitions[] = { | ||
137 | { | ||
138 | .name = "X-Loader", | ||
139 | .offset = 0, | ||
140 | .size = 2 * (64*(2*2048)) | ||
141 | }, | ||
142 | { | ||
143 | .name = "U-Boot", | ||
144 | .offset = MTDPART_OFS_APPEND, | ||
145 | .size = 6 * (64*(2*2048)), | ||
146 | }, | ||
147 | { | ||
148 | .name = "Environment", | ||
149 | .offset = MTDPART_OFS_APPEND, | ||
150 | .size = 2 * (64*(2*2048)), | ||
151 | }, | ||
152 | { | ||
153 | .name = "Kernel", | ||
154 | .offset = MTDPART_OFS_APPEND, | ||
155 | .size = 12 * (64*(2*2048)), | ||
156 | }, | ||
157 | { | ||
158 | .name = "File System", | ||
159 | .offset = MTDPART_OFS_APPEND, | ||
160 | .size = MTDPART_SIZ_FULL, | ||
161 | }, | ||
162 | }; | ||
163 | |||
164 | static inline u32 igep_get_sysboot_value(void) | ||
165 | { | ||
166 | return omap_ctrl_readl(OMAP343X_CONTROL_STATUS) & IGEP_SYSBOOT_MASK; | ||
167 | } | ||
168 | |||
169 | static void __init igep_flash_init(void) | ||
170 | { | ||
171 | u32 mux; | ||
172 | mux = igep_get_sysboot_value(); | ||
173 | |||
174 | if (mux == IGEP_SYSBOOT_NAND) { | ||
175 | pr_info("IGEP: initializing NAND memory device\n"); | ||
176 | board_nand_init(igep_flash_partitions, | ||
177 | ARRAY_SIZE(igep_flash_partitions), | ||
178 | 0, NAND_BUSWIDTH_16, nand_default_timings); | ||
179 | } else if (mux == IGEP_SYSBOOT_ONENAND) { | ||
180 | pr_info("IGEP: initializing OneNAND memory device\n"); | ||
181 | board_onenand_init(igep_flash_partitions, | ||
182 | ARRAY_SIZE(igep_flash_partitions), 0); | ||
183 | } else { | ||
184 | pr_err("IGEP: Flash: unsupported sysboot sequence found\n"); | ||
185 | } | ||
186 | } | ||
187 | |||
188 | #else | ||
189 | static void __init igep_flash_init(void) {} | ||
190 | #endif | ||
191 | |||
192 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | ||
193 | |||
194 | #include <linux/smsc911x.h> | ||
195 | #include "gpmc-smsc911x.h" | ||
196 | |||
197 | static struct omap_smsc911x_platform_data smsc911x_cfg = { | ||
198 | .cs = IGEP2_SMSC911X_CS, | ||
199 | .gpio_irq = IGEP2_SMSC911X_GPIO, | ||
200 | .gpio_reset = -EINVAL, | ||
201 | .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, | ||
202 | }; | ||
203 | |||
204 | static inline void __init igep2_init_smsc911x(void) | ||
205 | { | ||
206 | gpmc_smsc911x_init(&smsc911x_cfg); | ||
207 | } | ||
208 | |||
209 | #else | ||
210 | static inline void __init igep2_init_smsc911x(void) { } | ||
211 | #endif | ||
212 | |||
213 | static struct regulator_consumer_supply igep_vmmc1_supply[] = { | ||
214 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | ||
215 | }; | ||
216 | |||
217 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | ||
218 | static struct regulator_init_data igep_vmmc1 = { | ||
219 | .constraints = { | ||
220 | .min_uV = 1850000, | ||
221 | .max_uV = 3150000, | ||
222 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
223 | | REGULATOR_MODE_STANDBY, | ||
224 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
225 | | REGULATOR_CHANGE_MODE | ||
226 | | REGULATOR_CHANGE_STATUS, | ||
227 | }, | ||
228 | .num_consumer_supplies = ARRAY_SIZE(igep_vmmc1_supply), | ||
229 | .consumer_supplies = igep_vmmc1_supply, | ||
230 | }; | ||
231 | |||
232 | static struct regulator_consumer_supply igep_vio_supply[] = { | ||
233 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"), | ||
234 | }; | ||
235 | |||
236 | static struct regulator_init_data igep_vio = { | ||
237 | .constraints = { | ||
238 | .min_uV = 1800000, | ||
239 | .max_uV = 1800000, | ||
240 | .apply_uV = 1, | ||
241 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
242 | | REGULATOR_MODE_STANDBY, | ||
243 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
244 | | REGULATOR_CHANGE_MODE | ||
245 | | REGULATOR_CHANGE_STATUS, | ||
246 | }, | ||
247 | .num_consumer_supplies = ARRAY_SIZE(igep_vio_supply), | ||
248 | .consumer_supplies = igep_vio_supply, | ||
249 | }; | ||
250 | |||
251 | static struct regulator_consumer_supply igep_vmmc2_supply[] = { | ||
252 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), | ||
253 | }; | ||
254 | |||
255 | static struct regulator_init_data igep_vmmc2 = { | ||
256 | .constraints = { | ||
257 | .valid_modes_mask = REGULATOR_MODE_NORMAL, | ||
258 | .always_on = 1, | ||
259 | }, | ||
260 | .num_consumer_supplies = ARRAY_SIZE(igep_vmmc2_supply), | ||
261 | .consumer_supplies = igep_vmmc2_supply, | ||
262 | }; | ||
263 | |||
264 | static struct fixed_voltage_config igep_vwlan = { | ||
265 | .supply_name = "vwlan", | ||
266 | .microvolts = 3300000, | ||
267 | .gpio = -EINVAL, | ||
268 | .enabled_at_boot = 1, | ||
269 | .init_data = &igep_vmmc2, | ||
270 | }; | ||
271 | |||
272 | static struct platform_device igep_vwlan_device = { | ||
273 | .name = "reg-fixed-voltage", | ||
274 | .id = 0, | ||
275 | .dev = { | ||
276 | .platform_data = &igep_vwlan, | ||
277 | }, | ||
278 | }; | ||
279 | |||
280 | static struct omap2_hsmmc_info mmc[] = { | ||
281 | { | ||
282 | .mmc = 1, | ||
283 | .caps = MMC_CAP_4_BIT_DATA, | ||
284 | .gpio_cd = -EINVAL, | ||
285 | .gpio_wp = -EINVAL, | ||
286 | .deferred = true, | ||
287 | }, | ||
288 | #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE) | ||
289 | { | ||
290 | .mmc = 2, | ||
291 | .caps = MMC_CAP_4_BIT_DATA, | ||
292 | .gpio_cd = -EINVAL, | ||
293 | .gpio_wp = -EINVAL, | ||
294 | }, | ||
295 | #endif | ||
296 | {} /* Terminator */ | ||
297 | }; | ||
298 | |||
299 | #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE) | ||
300 | #include <linux/leds.h> | ||
301 | |||
302 | static struct gpio_led igep_gpio_leds[] = { | ||
303 | [0] = { | ||
304 | .name = "omap3:red:user0", | ||
305 | .default_state = 0, | ||
306 | }, | ||
307 | [1] = { | ||
308 | .name = "omap3:green:boot", | ||
309 | .default_state = 1, | ||
310 | }, | ||
311 | [2] = { | ||
312 | .name = "omap3:red:user1", | ||
313 | .default_state = 0, | ||
314 | }, | ||
315 | [3] = { | ||
316 | .name = "omap3:green:user1", | ||
317 | .default_state = 0, | ||
318 | .gpio = -EINVAL, /* gets replaced */ | ||
319 | .active_low = 1, | ||
320 | }, | ||
321 | }; | ||
322 | |||
323 | static struct gpio_led_platform_data igep_led_pdata = { | ||
324 | .leds = igep_gpio_leds, | ||
325 | .num_leds = ARRAY_SIZE(igep_gpio_leds), | ||
326 | }; | ||
327 | |||
328 | static struct platform_device igep_led_device = { | ||
329 | .name = "leds-gpio", | ||
330 | .id = -1, | ||
331 | .dev = { | ||
332 | .platform_data = &igep_led_pdata, | ||
333 | }, | ||
334 | }; | ||
335 | |||
336 | static void __init igep_leds_init(void) | ||
337 | { | ||
338 | if (machine_is_igep0020()) { | ||
339 | igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED; | ||
340 | igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN; | ||
341 | igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED; | ||
342 | } else { | ||
343 | igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED; | ||
344 | igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN; | ||
345 | igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED; | ||
346 | } | ||
347 | |||
348 | platform_device_register(&igep_led_device); | ||
349 | } | ||
350 | |||
351 | #else | ||
352 | static struct gpio igep_gpio_leds[] __initdata = { | ||
353 | { -EINVAL, GPIOF_OUT_INIT_LOW, "gpio-led:red:d0" }, | ||
354 | { -EINVAL, GPIOF_OUT_INIT_LOW, "gpio-led:green:d0" }, | ||
355 | { -EINVAL, GPIOF_OUT_INIT_LOW, "gpio-led:red:d1" }, | ||
356 | }; | ||
357 | |||
358 | static inline void igep_leds_init(void) | ||
359 | { | ||
360 | int i; | ||
361 | |||
362 | if (machine_is_igep0020()) { | ||
363 | igep_gpio_leds[0].gpio = IGEP2_GPIO_LED0_RED; | ||
364 | igep_gpio_leds[1].gpio = IGEP2_GPIO_LED0_GREEN; | ||
365 | igep_gpio_leds[2].gpio = IGEP2_GPIO_LED1_RED; | ||
366 | } else { | ||
367 | igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED; | ||
368 | igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN; | ||
369 | igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED; | ||
370 | } | ||
371 | |||
372 | if (gpio_request_array(igep_gpio_leds, ARRAY_SIZE(igep_gpio_leds))) { | ||
373 | pr_warning("IGEP v2: Could not obtain leds gpios\n"); | ||
374 | return; | ||
375 | } | ||
376 | |||
377 | for (i = 0; i < ARRAY_SIZE(igep_gpio_leds); i++) | ||
378 | gpio_export(igep_gpio_leds[i].gpio, 0); | ||
379 | } | ||
380 | #endif | ||
381 | |||
382 | static struct gpio igep2_twl_gpios[] = { | ||
383 | { -EINVAL, GPIOF_IN, "GPIO_EHCI_NOC" }, | ||
384 | { -EINVAL, GPIOF_OUT_INIT_LOW, "GPIO_USBH_CPEN" }, | ||
385 | }; | ||
386 | |||
387 | static int igep_twl_gpio_setup(struct device *dev, | ||
388 | unsigned gpio, unsigned ngpio) | ||
389 | { | ||
390 | int ret; | ||
391 | |||
392 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | ||
393 | mmc[0].gpio_cd = gpio + 0; | ||
394 | omap_hsmmc_late_init(mmc); | ||
395 | |||
396 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ | ||
397 | #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) | ||
398 | ret = gpio_request_one(gpio + TWL4030_GPIO_MAX + 1, GPIOF_OUT_INIT_HIGH, | ||
399 | "gpio-led:green:d1"); | ||
400 | if (ret == 0) | ||
401 | gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0); | ||
402 | else | ||
403 | pr_warning("IGEP: Could not obtain gpio GPIO_LED1_GREEN\n"); | ||
404 | #else | ||
405 | igep_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1; | ||
406 | #endif | ||
407 | |||
408 | if (machine_is_igep0030()) | ||
409 | return 0; | ||
410 | |||
411 | /* | ||
412 | * REVISIT: need ehci-omap hooks for external VBUS | ||
413 | * power switch and overcurrent detect | ||
414 | */ | ||
415 | igep2_twl_gpios[0].gpio = gpio + 1; | ||
416 | |||
417 | /* TWL4030_GPIO_MAX + 0 == ledA, GPIO_USBH_CPEN (out, active low) */ | ||
418 | igep2_twl_gpios[1].gpio = gpio + TWL4030_GPIO_MAX; | ||
419 | |||
420 | ret = gpio_request_array(igep2_twl_gpios, ARRAY_SIZE(igep2_twl_gpios)); | ||
421 | if (ret < 0) | ||
422 | pr_err("IGEP2: Could not obtain gpio for USBH_CPEN"); | ||
423 | |||
424 | return 0; | ||
425 | }; | ||
426 | |||
427 | static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { | ||
428 | .use_leds = true, | ||
429 | .setup = igep_twl_gpio_setup, | ||
430 | }; | ||
431 | |||
432 | static int igep2_keymap[] = { | ||
433 | KEY(0, 0, KEY_LEFT), | ||
434 | KEY(0, 1, KEY_RIGHT), | ||
435 | KEY(0, 2, KEY_A), | ||
436 | KEY(0, 3, KEY_B), | ||
437 | KEY(1, 0, KEY_DOWN), | ||
438 | KEY(1, 1, KEY_UP), | ||
439 | KEY(1, 2, KEY_E), | ||
440 | KEY(1, 3, KEY_F), | ||
441 | KEY(2, 0, KEY_ENTER), | ||
442 | KEY(2, 1, KEY_I), | ||
443 | KEY(2, 2, KEY_J), | ||
444 | KEY(2, 3, KEY_K), | ||
445 | KEY(3, 0, KEY_M), | ||
446 | KEY(3, 1, KEY_N), | ||
447 | KEY(3, 2, KEY_O), | ||
448 | KEY(3, 3, KEY_P) | ||
449 | }; | ||
450 | |||
451 | static struct matrix_keymap_data igep2_keymap_data = { | ||
452 | .keymap = igep2_keymap, | ||
453 | .keymap_size = ARRAY_SIZE(igep2_keymap), | ||
454 | }; | ||
455 | |||
456 | static struct twl4030_keypad_data igep2_keypad_pdata = { | ||
457 | .keymap_data = &igep2_keymap_data, | ||
458 | .rows = 4, | ||
459 | .cols = 4, | ||
460 | .rep = 1, | ||
461 | }; | ||
462 | |||
463 | static struct twl4030_platform_data igep_twldata = { | ||
464 | /* platform_data for children goes here */ | ||
465 | .gpio = &igep_twl4030_gpio_pdata, | ||
466 | .vmmc1 = &igep_vmmc1, | ||
467 | .vio = &igep_vio, | ||
468 | }; | ||
469 | |||
470 | static struct i2c_board_info __initdata igep2_i2c3_boardinfo[] = { | ||
471 | { | ||
472 | I2C_BOARD_INFO("eeprom", 0x50), | ||
473 | }, | ||
474 | }; | ||
475 | |||
476 | static void __init igep_i2c_init(void) | ||
477 | { | ||
478 | int ret; | ||
479 | |||
480 | omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_USB, | ||
481 | TWL_COMMON_REGULATOR_VPLL2); | ||
482 | igep_twldata.vpll2->constraints.apply_uV = true; | ||
483 | igep_twldata.vpll2->constraints.name = "VDVI"; | ||
484 | |||
485 | if (machine_is_igep0020()) { | ||
486 | /* | ||
487 | * Bus 3 is attached to the DVI port where devices like the | ||
488 | * pico DLP projector don't work reliably with 400kHz | ||
489 | */ | ||
490 | ret = omap_register_i2c_bus(3, 100, igep2_i2c3_boardinfo, | ||
491 | ARRAY_SIZE(igep2_i2c3_boardinfo)); | ||
492 | if (ret) | ||
493 | pr_warning("IGEP2: Could not register I2C3 bus (%d)\n", ret); | ||
494 | |||
495 | igep_twldata.keypad = &igep2_keypad_pdata; | ||
496 | /* Get common pmic data */ | ||
497 | omap3_pmic_get_config(&igep_twldata, TWL_COMMON_PDATA_AUDIO, 0); | ||
498 | } | ||
499 | |||
500 | omap3_pmic_init("twl4030", &igep_twldata); | ||
501 | } | ||
502 | |||
503 | static struct usbhs_phy_data igep2_phy_data[] __initdata = { | ||
504 | { | ||
505 | .port = 1, | ||
506 | .reset_gpio = IGEP2_GPIO_USBH_NRESET, | ||
507 | .vcc_gpio = -EINVAL, | ||
508 | }, | ||
509 | }; | ||
510 | |||
511 | static struct usbhs_phy_data igep3_phy_data[] __initdata = { | ||
512 | { | ||
513 | .port = 2, | ||
514 | .reset_gpio = IGEP3_GPIO_USBH_NRESET, | ||
515 | .vcc_gpio = -EINVAL, | ||
516 | }, | ||
517 | }; | ||
518 | |||
519 | static struct usbhs_omap_platform_data igep2_usbhs_bdata __initdata = { | ||
520 | .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY, | ||
521 | }; | ||
522 | |||
523 | static struct usbhs_omap_platform_data igep3_usbhs_bdata __initdata = { | ||
524 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | ||
525 | }; | ||
526 | |||
527 | #ifdef CONFIG_OMAP_MUX | ||
528 | static struct omap_board_mux board_mux[] __initdata = { | ||
529 | /* Display Sub System */ | ||
530 | OMAP3_MUX(DSS_PCLK, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
531 | OMAP3_MUX(DSS_HSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
532 | OMAP3_MUX(DSS_VSYNC, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
533 | OMAP3_MUX(DSS_ACBIAS, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
534 | OMAP3_MUX(DSS_DATA0, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
535 | OMAP3_MUX(DSS_DATA1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
536 | OMAP3_MUX(DSS_DATA2, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
537 | OMAP3_MUX(DSS_DATA3, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
538 | OMAP3_MUX(DSS_DATA4, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
539 | OMAP3_MUX(DSS_DATA5, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
540 | OMAP3_MUX(DSS_DATA6, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
541 | OMAP3_MUX(DSS_DATA7, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
542 | OMAP3_MUX(DSS_DATA8, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
543 | OMAP3_MUX(DSS_DATA9, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
544 | OMAP3_MUX(DSS_DATA10, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
545 | OMAP3_MUX(DSS_DATA11, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
546 | OMAP3_MUX(DSS_DATA12, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
547 | OMAP3_MUX(DSS_DATA13, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
548 | OMAP3_MUX(DSS_DATA14, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
549 | OMAP3_MUX(DSS_DATA15, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
550 | OMAP3_MUX(DSS_DATA16, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
551 | OMAP3_MUX(DSS_DATA17, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
552 | OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
553 | OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
554 | OMAP3_MUX(DSS_DATA20, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
555 | OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
556 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
557 | OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT), | ||
558 | /* TFP410 PanelBus DVI Transmitte (GPIO_170) */ | ||
559 | OMAP3_MUX(HDQ_SIO, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
560 | /* SMSC9221 LAN Controller ETH IRQ (GPIO_176) */ | ||
561 | OMAP3_MUX(MCSPI1_CS2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
562 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
563 | }; | ||
564 | #endif | ||
565 | |||
566 | #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE) | ||
567 | static struct gpio igep_wlan_bt_gpios[] __initdata = { | ||
568 | { -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_WIFI_NPD" }, | ||
569 | { -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_WIFI_NRESET" }, | ||
570 | { -EINVAL, GPIOF_OUT_INIT_HIGH, "GPIO_BT_NRESET" }, | ||
571 | }; | ||
572 | |||
573 | static void __init igep_wlan_bt_init(void) | ||
574 | { | ||
575 | int err; | ||
576 | |||
577 | /* GPIO's for WLAN-BT combo depends on hardware revision */ | ||
578 | if (hwrev == IGEP2_BOARD_HWREV_B) { | ||
579 | igep_wlan_bt_gpios[0].gpio = IGEP2_RB_GPIO_WIFI_NPD; | ||
580 | igep_wlan_bt_gpios[1].gpio = IGEP2_RB_GPIO_WIFI_NRESET; | ||
581 | igep_wlan_bt_gpios[2].gpio = IGEP2_RB_GPIO_BT_NRESET; | ||
582 | } else if (hwrev == IGEP2_BOARD_HWREV_C || machine_is_igep0030()) { | ||
583 | igep_wlan_bt_gpios[0].gpio = IGEP2_RC_GPIO_WIFI_NPD; | ||
584 | igep_wlan_bt_gpios[1].gpio = IGEP2_RC_GPIO_WIFI_NRESET; | ||
585 | igep_wlan_bt_gpios[2].gpio = IGEP2_RC_GPIO_BT_NRESET; | ||
586 | } else | ||
587 | return; | ||
588 | |||
589 | /* Make sure that the GPIO pins are muxed correctly */ | ||
590 | omap_mux_init_gpio(igep_wlan_bt_gpios[0].gpio, OMAP_PIN_OUTPUT); | ||
591 | omap_mux_init_gpio(igep_wlan_bt_gpios[1].gpio, OMAP_PIN_OUTPUT); | ||
592 | omap_mux_init_gpio(igep_wlan_bt_gpios[2].gpio, OMAP_PIN_OUTPUT); | ||
593 | |||
594 | err = gpio_request_array(igep_wlan_bt_gpios, | ||
595 | ARRAY_SIZE(igep_wlan_bt_gpios)); | ||
596 | if (err) { | ||
597 | pr_warning("IGEP2: Could not obtain WIFI/BT gpios\n"); | ||
598 | return; | ||
599 | } | ||
600 | |||
601 | gpio_export(igep_wlan_bt_gpios[0].gpio, 0); | ||
602 | gpio_export(igep_wlan_bt_gpios[1].gpio, 0); | ||
603 | gpio_export(igep_wlan_bt_gpios[2].gpio, 0); | ||
604 | |||
605 | gpio_set_value(igep_wlan_bt_gpios[1].gpio, 0); | ||
606 | udelay(10); | ||
607 | gpio_set_value(igep_wlan_bt_gpios[1].gpio, 1); | ||
608 | |||
609 | } | ||
610 | #else | ||
611 | static inline void __init igep_wlan_bt_init(void) { } | ||
612 | #endif | ||
613 | |||
614 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
615 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
616 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
617 | }; | ||
618 | |||
619 | static void __init igep_init(void) | ||
620 | { | ||
621 | regulator_register_fixed(1, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
622 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
623 | |||
624 | /* Get IGEP2 hardware revision */ | ||
625 | igep2_get_revision(); | ||
626 | |||
627 | omap_hsmmc_init(mmc); | ||
628 | |||
629 | /* Register I2C busses and drivers */ | ||
630 | igep_i2c_init(); | ||
631 | platform_device_register(&igep_vwlan_device); | ||
632 | omap3_igep2_display_init_of(); | ||
633 | omap_serial_init(); | ||
634 | omap_sdrc_init(m65kxxxxam_sdrc_params, | ||
635 | m65kxxxxam_sdrc_params); | ||
636 | usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); | ||
637 | usb_musb_init(NULL); | ||
638 | |||
639 | igep_flash_init(); | ||
640 | igep_leds_init(); | ||
641 | omap_twl4030_audio_init("igep2", NULL); | ||
642 | |||
643 | /* | ||
644 | * WLAN-BT combo module from MuRata which has a Marvell WLAN | ||
645 | * (88W8686) + CSR Bluetooth chipset. Uses SDIO interface. | ||
646 | */ | ||
647 | igep_wlan_bt_init(); | ||
648 | |||
649 | if (machine_is_igep0020()) { | ||
650 | igep2_init_smsc911x(); | ||
651 | usbhs_init_phys(igep2_phy_data, ARRAY_SIZE(igep2_phy_data)); | ||
652 | usbhs_init(&igep2_usbhs_bdata); | ||
653 | } else { | ||
654 | usbhs_init_phys(igep3_phy_data, ARRAY_SIZE(igep3_phy_data)); | ||
655 | usbhs_init(&igep3_usbhs_bdata); | ||
656 | } | ||
657 | } | ||
658 | |||
659 | MACHINE_START(IGEP0020, "IGEP v2 board") | ||
660 | .atag_offset = 0x100, | ||
661 | .reserve = omap_reserve, | ||
662 | .map_io = omap3_map_io, | ||
663 | .init_early = omap35xx_init_early, | ||
664 | .init_irq = omap3_init_irq, | ||
665 | .handle_irq = omap3_intc_handle_irq, | ||
666 | .init_machine = igep_init, | ||
667 | .init_late = omap35xx_init_late, | ||
668 | .init_time = omap3_sync32k_timer_init, | ||
669 | .restart = omap3xxx_restart, | ||
670 | MACHINE_END | ||
671 | |||
672 | MACHINE_START(IGEP0030, "IGEP OMAP3 module") | ||
673 | .atag_offset = 0x100, | ||
674 | .reserve = omap_reserve, | ||
675 | .map_io = omap3_map_io, | ||
676 | .init_early = omap35xx_init_early, | ||
677 | .init_irq = omap3_init_irq, | ||
678 | .handle_irq = omap3_intc_handle_irq, | ||
679 | .init_machine = igep_init, | ||
680 | .init_late = omap35xx_init_late, | ||
681 | .init_time = omap3_sync32k_timer_init, | ||
682 | .restart = omap3xxx_restart, | ||
683 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c index dd8da2c5399f..4ec8d82b0492 100644 --- a/arch/arm/mach-omap2/board-ldp.c +++ b/arch/arm/mach-omap2/board-ldp.c | |||
@@ -36,7 +36,6 @@ | |||
36 | #include <asm/mach/map.h> | 36 | #include <asm/mach/map.h> |
37 | 37 | ||
38 | #include "common.h" | 38 | #include "common.h" |
39 | #include "board-zoom.h" | ||
40 | #include "gpmc.h" | 39 | #include "gpmc.h" |
41 | #include "gpmc-smsc911x.h" | 40 | #include "gpmc-smsc911x.h" |
42 | 41 | ||
@@ -406,7 +405,7 @@ static void __init omap_ldp_init(void) | |||
406 | usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); | 405 | usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); |
407 | usb_musb_init(NULL); | 406 | usb_musb_init(NULL); |
408 | board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions), | 407 | board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions), |
409 | ZOOM_NAND_CS, 0, nand_default_timings); | 408 | 0, 0, nand_default_timings); |
410 | 409 | ||
411 | omap_hsmmc_init(mmc); | 410 | omap_hsmmc_init(mmc); |
412 | ldp_display_init(); | 411 | ldp_display_init(); |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c deleted file mode 100644 index 18143873346c..000000000000 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ /dev/null | |||
@@ -1,756 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/board-omap3evm.c | ||
3 | * | ||
4 | * Copyright (C) 2008 Texas Instruments | ||
5 | * | ||
6 | * Modified from mach-omap2/board-3430sdp.c | ||
7 | * | ||
8 | * Initial code: Syed Mohammed Khasim | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/platform_device.h> | ||
18 | #include <linux/delay.h> | ||
19 | #include <linux/err.h> | ||
20 | #include <linux/clk.h> | ||
21 | #include <linux/gpio.h> | ||
22 | #include <linux/input.h> | ||
23 | #include <linux/input/matrix_keypad.h> | ||
24 | #include <linux/leds.h> | ||
25 | #include <linux/interrupt.h> | ||
26 | |||
27 | #include <linux/mtd/mtd.h> | ||
28 | #include <linux/mtd/partitions.h> | ||
29 | #include <linux/mtd/nand.h> | ||
30 | |||
31 | #include <linux/spi/spi.h> | ||
32 | #include <linux/spi/ads7846.h> | ||
33 | #include <linux/i2c/twl.h> | ||
34 | #include <linux/usb/otg.h> | ||
35 | #include <linux/usb/musb.h> | ||
36 | #include <linux/usb/usb_phy_gen_xceiv.h> | ||
37 | #include <linux/smsc911x.h> | ||
38 | |||
39 | #include <linux/wl12xx.h> | ||
40 | #include <linux/regulator/fixed.h> | ||
41 | #include <linux/regulator/machine.h> | ||
42 | #include <linux/mmc/host.h> | ||
43 | #include <linux/export.h> | ||
44 | #include <linux/usb/phy.h> | ||
45 | |||
46 | #include <asm/mach-types.h> | ||
47 | #include <asm/mach/arch.h> | ||
48 | #include <asm/mach/map.h> | ||
49 | |||
50 | #include <linux/platform_data/mtd-nand-omap2.h> | ||
51 | #include "common.h" | ||
52 | #include <linux/platform_data/spi-omap2-mcspi.h> | ||
53 | #include <video/omapdss.h> | ||
54 | #include <video/omap-panel-data.h> | ||
55 | |||
56 | #include "soc.h" | ||
57 | #include "mux.h" | ||
58 | #include "sdram-micron-mt46h32m32lf-6.h" | ||
59 | #include "hsmmc.h" | ||
60 | #include "common-board-devices.h" | ||
61 | #include "board-flash.h" | ||
62 | |||
63 | #define NAND_CS 0 | ||
64 | |||
65 | #define OMAP3_EVM_TS_GPIO 175 | ||
66 | #define OMAP3_EVM_EHCI_VBUS 22 | ||
67 | #define OMAP3_EVM_EHCI_SELECT 61 | ||
68 | |||
69 | #define OMAP3EVM_ETHR_START 0x2c000000 | ||
70 | #define OMAP3EVM_ETHR_SIZE 1024 | ||
71 | #define OMAP3EVM_ETHR_ID_REV 0x50 | ||
72 | #define OMAP3EVM_ETHR_GPIO_IRQ 176 | ||
73 | #define OMAP3EVM_SMSC911X_CS 5 | ||
74 | /* | ||
75 | * Eth Reset signal | ||
76 | * 64 = Generation 1 (<=RevD) | ||
77 | * 7 = Generation 2 (>=RevE) | ||
78 | */ | ||
79 | #define OMAP3EVM_GEN1_ETHR_GPIO_RST 64 | ||
80 | #define OMAP3EVM_GEN2_ETHR_GPIO_RST 7 | ||
81 | |||
82 | /* | ||
83 | * OMAP35x EVM revision | ||
84 | * Run time detection of EVM revision is done by reading Ethernet | ||
85 | * PHY ID - | ||
86 | * GEN_1 = 0x01150000 | ||
87 | * GEN_2 = 0x92200000 | ||
88 | */ | ||
89 | enum { | ||
90 | OMAP3EVM_BOARD_GEN_1 = 0, /* EVM Rev between A - D */ | ||
91 | OMAP3EVM_BOARD_GEN_2, /* EVM Rev >= Rev E */ | ||
92 | }; | ||
93 | |||
94 | static u8 omap3_evm_version; | ||
95 | |||
96 | static u8 get_omap3_evm_rev(void) | ||
97 | { | ||
98 | return omap3_evm_version; | ||
99 | } | ||
100 | |||
101 | static void __init omap3_evm_get_revision(void) | ||
102 | { | ||
103 | void __iomem *ioaddr; | ||
104 | unsigned int smsc_id; | ||
105 | |||
106 | /* Ethernet PHY ID is stored at ID_REV register */ | ||
107 | ioaddr = ioremap_nocache(OMAP3EVM_ETHR_START, SZ_1K); | ||
108 | if (!ioaddr) | ||
109 | return; | ||
110 | smsc_id = readl(ioaddr + OMAP3EVM_ETHR_ID_REV) & 0xFFFF0000; | ||
111 | iounmap(ioaddr); | ||
112 | |||
113 | switch (smsc_id) { | ||
114 | /*SMSC9115 chipset*/ | ||
115 | case 0x01150000: | ||
116 | omap3_evm_version = OMAP3EVM_BOARD_GEN_1; | ||
117 | break; | ||
118 | /*SMSC 9220 chipset*/ | ||
119 | case 0x92200000: | ||
120 | default: | ||
121 | omap3_evm_version = OMAP3EVM_BOARD_GEN_2; | ||
122 | } | ||
123 | } | ||
124 | |||
125 | #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) | ||
126 | #include "gpmc-smsc911x.h" | ||
127 | |||
128 | static struct omap_smsc911x_platform_data smsc911x_cfg = { | ||
129 | .cs = OMAP3EVM_SMSC911X_CS, | ||
130 | .gpio_irq = OMAP3EVM_ETHR_GPIO_IRQ, | ||
131 | .gpio_reset = -EINVAL, | ||
132 | .flags = SMSC911X_USE_32BIT | SMSC911X_SAVE_MAC_ADDRESS, | ||
133 | }; | ||
134 | |||
135 | static inline void __init omap3evm_init_smsc911x(void) | ||
136 | { | ||
137 | /* Configure ethernet controller reset gpio */ | ||
138 | if (cpu_is_omap3430()) { | ||
139 | if (get_omap3_evm_rev() == OMAP3EVM_BOARD_GEN_1) | ||
140 | smsc911x_cfg.gpio_reset = OMAP3EVM_GEN1_ETHR_GPIO_RST; | ||
141 | else | ||
142 | smsc911x_cfg.gpio_reset = OMAP3EVM_GEN2_ETHR_GPIO_RST; | ||
143 | } | ||
144 | |||
145 | gpmc_smsc911x_init(&smsc911x_cfg); | ||
146 | } | ||
147 | |||
148 | #else | ||
149 | static inline void __init omap3evm_init_smsc911x(void) { return; } | ||
150 | #endif | ||
151 | |||
152 | /* | ||
153 | * OMAP3EVM LCD Panel control signals | ||
154 | */ | ||
155 | #define OMAP3EVM_LCD_PANEL_LR 2 | ||
156 | #define OMAP3EVM_LCD_PANEL_UD 3 | ||
157 | #define OMAP3EVM_LCD_PANEL_INI 152 | ||
158 | #define OMAP3EVM_LCD_PANEL_QVGA 154 | ||
159 | #define OMAP3EVM_LCD_PANEL_RESB 155 | ||
160 | |||
161 | #define OMAP3EVM_LCD_PANEL_ENVDD 153 | ||
162 | #define OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO 210 | ||
163 | |||
164 | /* | ||
165 | * OMAP3EVM DVI control signals | ||
166 | */ | ||
167 | #define OMAP3EVM_DVI_PANEL_EN_GPIO 199 | ||
168 | |||
169 | #ifdef CONFIG_BROKEN | ||
170 | static void __init omap3_evm_display_init(void) | ||
171 | { | ||
172 | int r; | ||
173 | |||
174 | r = gpio_request_one(OMAP3EVM_LCD_PANEL_ENVDD, GPIOF_OUT_INIT_LOW, | ||
175 | "lcd_panel_envdd"); | ||
176 | if (r) | ||
177 | pr_err("failed to get lcd_panel_envdd GPIO\n"); | ||
178 | |||
179 | r = gpio_request_one(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, | ||
180 | GPIOF_OUT_INIT_LOW, "lcd_panel_bklight"); | ||
181 | if (r) | ||
182 | pr_err("failed to get lcd_panel_bklight GPIO\n"); | ||
183 | |||
184 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) | ||
185 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 0); | ||
186 | else | ||
187 | gpio_set_value_cansleep(OMAP3EVM_LCD_PANEL_BKLIGHT_GPIO, 1); | ||
188 | } | ||
189 | #endif | ||
190 | |||
191 | static struct panel_sharp_ls037v7dw01_platform_data omap3_evm_lcd_pdata = { | ||
192 | .name = "lcd", | ||
193 | .source = "dpi.0", | ||
194 | |||
195 | .data_lines = 18, | ||
196 | |||
197 | .resb_gpio = OMAP3EVM_LCD_PANEL_RESB, | ||
198 | .ini_gpio = OMAP3EVM_LCD_PANEL_INI, | ||
199 | .mo_gpio = OMAP3EVM_LCD_PANEL_QVGA, | ||
200 | .lr_gpio = OMAP3EVM_LCD_PANEL_LR, | ||
201 | .ud_gpio = OMAP3EVM_LCD_PANEL_UD, | ||
202 | }; | ||
203 | |||
204 | static struct platform_device omap3_evm_lcd_device = { | ||
205 | .name = "panel-sharp-ls037v7dw01", | ||
206 | .id = 0, | ||
207 | .dev.platform_data = &omap3_evm_lcd_pdata, | ||
208 | }; | ||
209 | |||
210 | static struct connector_dvi_platform_data omap3_evm_dvi_connector_pdata = { | ||
211 | .name = "dvi", | ||
212 | .source = "tfp410.0", | ||
213 | .i2c_bus_num = -1, | ||
214 | }; | ||
215 | |||
216 | static struct platform_device omap3_evm_dvi_connector_device = { | ||
217 | .name = "connector-dvi", | ||
218 | .id = 0, | ||
219 | .dev.platform_data = &omap3_evm_dvi_connector_pdata, | ||
220 | }; | ||
221 | |||
222 | static struct encoder_tfp410_platform_data omap3_evm_tfp410_pdata = { | ||
223 | .name = "tfp410.0", | ||
224 | .source = "dpi.0", | ||
225 | .data_lines = 24, | ||
226 | .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO, | ||
227 | }; | ||
228 | |||
229 | static struct platform_device omap3_evm_tfp410_device = { | ||
230 | .name = "tfp410", | ||
231 | .id = 0, | ||
232 | .dev.platform_data = &omap3_evm_tfp410_pdata, | ||
233 | }; | ||
234 | |||
235 | static struct connector_atv_platform_data omap3_evm_tv_pdata = { | ||
236 | .name = "tv", | ||
237 | .source = "venc.0", | ||
238 | .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO, | ||
239 | .invert_polarity = false, | ||
240 | }; | ||
241 | |||
242 | static struct platform_device omap3_evm_tv_connector_device = { | ||
243 | .name = "connector-analog-tv", | ||
244 | .id = 0, | ||
245 | .dev.platform_data = &omap3_evm_tv_pdata, | ||
246 | }; | ||
247 | |||
248 | static struct omap_dss_board_info omap3_evm_dss_data = { | ||
249 | .default_display_name = "lcd", | ||
250 | }; | ||
251 | |||
252 | static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = { | ||
253 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | ||
254 | }; | ||
255 | |||
256 | static struct regulator_consumer_supply omap3evm_vsim_supply[] = { | ||
257 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), | ||
258 | }; | ||
259 | |||
260 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | ||
261 | static struct regulator_init_data omap3evm_vmmc1 = { | ||
262 | .constraints = { | ||
263 | .min_uV = 1850000, | ||
264 | .max_uV = 3150000, | ||
265 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
266 | | REGULATOR_MODE_STANDBY, | ||
267 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
268 | | REGULATOR_CHANGE_MODE | ||
269 | | REGULATOR_CHANGE_STATUS, | ||
270 | }, | ||
271 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc1_supply), | ||
272 | .consumer_supplies = omap3evm_vmmc1_supply, | ||
273 | }; | ||
274 | |||
275 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ | ||
276 | static struct regulator_init_data omap3evm_vsim = { | ||
277 | .constraints = { | ||
278 | .min_uV = 1800000, | ||
279 | .max_uV = 3000000, | ||
280 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
281 | | REGULATOR_MODE_STANDBY, | ||
282 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
283 | | REGULATOR_CHANGE_MODE | ||
284 | | REGULATOR_CHANGE_STATUS, | ||
285 | }, | ||
286 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vsim_supply), | ||
287 | .consumer_supplies = omap3evm_vsim_supply, | ||
288 | }; | ||
289 | |||
290 | static struct omap2_hsmmc_info mmc[] = { | ||
291 | { | ||
292 | .mmc = 1, | ||
293 | .caps = MMC_CAP_4_BIT_DATA, | ||
294 | .gpio_cd = -EINVAL, | ||
295 | .gpio_wp = 63, | ||
296 | .deferred = true, | ||
297 | }, | ||
298 | #ifdef CONFIG_WILINK_PLATFORM_DATA | ||
299 | { | ||
300 | .name = "wl1271", | ||
301 | .mmc = 2, | ||
302 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
303 | .gpio_wp = -EINVAL, | ||
304 | .gpio_cd = -EINVAL, | ||
305 | .nonremovable = true, | ||
306 | }, | ||
307 | #endif | ||
308 | {} /* Terminator */ | ||
309 | }; | ||
310 | |||
311 | static struct gpio_led gpio_leds[] = { | ||
312 | { | ||
313 | .name = "omap3evm::ledb", | ||
314 | /* normally not visible (board underside) */ | ||
315 | .default_trigger = "default-on", | ||
316 | .gpio = -EINVAL, /* gets replaced */ | ||
317 | .active_low = true, | ||
318 | }, | ||
319 | }; | ||
320 | |||
321 | static struct gpio_led_platform_data gpio_led_info = { | ||
322 | .leds = gpio_leds, | ||
323 | .num_leds = ARRAY_SIZE(gpio_leds), | ||
324 | }; | ||
325 | |||
326 | static struct platform_device leds_gpio = { | ||
327 | .name = "leds-gpio", | ||
328 | .id = -1, | ||
329 | .dev = { | ||
330 | .platform_data = &gpio_led_info, | ||
331 | }, | ||
332 | }; | ||
333 | |||
334 | |||
335 | static int omap3evm_twl_gpio_setup(struct device *dev, | ||
336 | unsigned gpio, unsigned ngpio) | ||
337 | { | ||
338 | int r, lcd_bl_en; | ||
339 | |||
340 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | ||
341 | mmc[0].gpio_cd = gpio + 0; | ||
342 | omap_hsmmc_late_init(mmc); | ||
343 | |||
344 | /* | ||
345 | * Most GPIOs are for USB OTG. Some are mostly sent to | ||
346 | * the P2 connector; notably LEDA for the LCD backlight. | ||
347 | */ | ||
348 | |||
349 | /* TWL4030_GPIO_MAX + 0 == ledA, LCD Backlight control */ | ||
350 | lcd_bl_en = get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2 ? | ||
351 | GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW; | ||
352 | r = gpio_request_one(gpio + TWL4030_GPIO_MAX, lcd_bl_en, "EN_LCD_BKL"); | ||
353 | if (r) | ||
354 | printk(KERN_ERR "failed to get/set lcd_bkl gpio\n"); | ||
355 | |||
356 | /* gpio + 7 == DVI Enable */ | ||
357 | gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "EN_DVI"); | ||
358 | |||
359 | /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ | ||
360 | gpio_leds[0].gpio = gpio + TWL4030_GPIO_MAX + 1; | ||
361 | |||
362 | platform_device_register(&leds_gpio); | ||
363 | |||
364 | /* Enable VBUS switch by setting TWL4030.GPIO2DIR as output | ||
365 | * for starting USB tranceiver | ||
366 | */ | ||
367 | #ifdef CONFIG_TWL4030_CORE | ||
368 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { | ||
369 | u8 val; | ||
370 | |||
371 | twl_i2c_read_u8(TWL4030_MODULE_GPIO, &val, REG_GPIODATADIR1); | ||
372 | val |= 0x04; /* TWL4030.GPIO2DIR BIT at GPIODATADIR1(0x9B) */ | ||
373 | twl_i2c_write_u8(TWL4030_MODULE_GPIO, val, REG_GPIODATADIR1); | ||
374 | } | ||
375 | #endif | ||
376 | |||
377 | return 0; | ||
378 | } | ||
379 | |||
380 | static struct twl4030_gpio_platform_data omap3evm_gpio_data = { | ||
381 | .use_leds = true, | ||
382 | .setup = omap3evm_twl_gpio_setup, | ||
383 | }; | ||
384 | |||
385 | static uint32_t board_keymap[] = { | ||
386 | KEY(0, 0, KEY_LEFT), | ||
387 | KEY(0, 1, KEY_DOWN), | ||
388 | KEY(0, 2, KEY_ENTER), | ||
389 | KEY(0, 3, KEY_M), | ||
390 | |||
391 | KEY(1, 0, KEY_RIGHT), | ||
392 | KEY(1, 1, KEY_UP), | ||
393 | KEY(1, 2, KEY_I), | ||
394 | KEY(1, 3, KEY_N), | ||
395 | |||
396 | KEY(2, 0, KEY_A), | ||
397 | KEY(2, 1, KEY_E), | ||
398 | KEY(2, 2, KEY_J), | ||
399 | KEY(2, 3, KEY_O), | ||
400 | |||
401 | KEY(3, 0, KEY_B), | ||
402 | KEY(3, 1, KEY_F), | ||
403 | KEY(3, 2, KEY_K), | ||
404 | KEY(3, 3, KEY_P) | ||
405 | }; | ||
406 | |||
407 | static struct matrix_keymap_data board_map_data = { | ||
408 | .keymap = board_keymap, | ||
409 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
410 | }; | ||
411 | |||
412 | static struct twl4030_keypad_data omap3evm_kp_data = { | ||
413 | .keymap_data = &board_map_data, | ||
414 | .rows = 4, | ||
415 | .cols = 4, | ||
416 | .rep = 1, | ||
417 | }; | ||
418 | |||
419 | /* ads7846 on SPI */ | ||
420 | static struct regulator_consumer_supply omap3evm_vio_supply[] = { | ||
421 | REGULATOR_SUPPLY("vcc", "spi1.0"), | ||
422 | }; | ||
423 | |||
424 | /* VIO for ads7846 */ | ||
425 | static struct regulator_init_data omap3evm_vio = { | ||
426 | .constraints = { | ||
427 | .min_uV = 1800000, | ||
428 | .max_uV = 1800000, | ||
429 | .apply_uV = true, | ||
430 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
431 | | REGULATOR_MODE_STANDBY, | ||
432 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
433 | | REGULATOR_CHANGE_STATUS, | ||
434 | }, | ||
435 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vio_supply), | ||
436 | .consumer_supplies = omap3evm_vio_supply, | ||
437 | }; | ||
438 | |||
439 | #ifdef CONFIG_WILINK_PLATFORM_DATA | ||
440 | |||
441 | #define OMAP3EVM_WLAN_PMENA_GPIO (150) | ||
442 | #define OMAP3EVM_WLAN_IRQ_GPIO (149) | ||
443 | |||
444 | static struct regulator_consumer_supply omap3evm_vmmc2_supply[] = { | ||
445 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), | ||
446 | }; | ||
447 | |||
448 | /* VMMC2 for driving the WL12xx module */ | ||
449 | static struct regulator_init_data omap3evm_vmmc2 = { | ||
450 | .constraints = { | ||
451 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
452 | }, | ||
453 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vmmc2_supply), | ||
454 | .consumer_supplies = omap3evm_vmmc2_supply, | ||
455 | }; | ||
456 | |||
457 | static struct fixed_voltage_config omap3evm_vwlan = { | ||
458 | .supply_name = "vwl1271", | ||
459 | .microvolts = 1800000, /* 1.80V */ | ||
460 | .gpio = OMAP3EVM_WLAN_PMENA_GPIO, | ||
461 | .startup_delay = 70000, /* 70ms */ | ||
462 | .enable_high = 1, | ||
463 | .enabled_at_boot = 0, | ||
464 | .init_data = &omap3evm_vmmc2, | ||
465 | }; | ||
466 | |||
467 | static struct platform_device omap3evm_wlan_regulator = { | ||
468 | .name = "reg-fixed-voltage", | ||
469 | .id = 1, | ||
470 | .dev = { | ||
471 | .platform_data = &omap3evm_vwlan, | ||
472 | }, | ||
473 | }; | ||
474 | |||
475 | struct wl12xx_platform_data omap3evm_wlan_data __initdata = { | ||
476 | .board_ref_clock = WL12XX_REFCLOCK_38, /* 38.4 MHz */ | ||
477 | }; | ||
478 | #endif | ||
479 | |||
480 | /* VAUX2 for USB */ | ||
481 | static struct regulator_consumer_supply omap3evm_vaux2_supplies[] = { | ||
482 | REGULATOR_SUPPLY("VDD_CSIPHY1", "omap3isp"), /* OMAP ISP */ | ||
483 | REGULATOR_SUPPLY("VDD_CSIPHY2", "omap3isp"), /* OMAP ISP */ | ||
484 | REGULATOR_SUPPLY("vcc", "usb_phy_gen_xceiv.2"), /* hsusb port 2 */ | ||
485 | REGULATOR_SUPPLY("vaux2", NULL), | ||
486 | }; | ||
487 | |||
488 | static struct regulator_init_data omap3evm_vaux2 = { | ||
489 | .constraints = { | ||
490 | .min_uV = 2800000, | ||
491 | .max_uV = 2800000, | ||
492 | .apply_uV = true, | ||
493 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
494 | | REGULATOR_MODE_STANDBY, | ||
495 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
496 | | REGULATOR_CHANGE_STATUS, | ||
497 | }, | ||
498 | .num_consumer_supplies = ARRAY_SIZE(omap3evm_vaux2_supplies), | ||
499 | .consumer_supplies = omap3evm_vaux2_supplies, | ||
500 | }; | ||
501 | |||
502 | static struct twl4030_platform_data omap3evm_twldata = { | ||
503 | /* platform_data for children goes here */ | ||
504 | .keypad = &omap3evm_kp_data, | ||
505 | .gpio = &omap3evm_gpio_data, | ||
506 | .vio = &omap3evm_vio, | ||
507 | .vmmc1 = &omap3evm_vmmc1, | ||
508 | .vsim = &omap3evm_vsim, | ||
509 | }; | ||
510 | |||
511 | static int __init omap3_evm_i2c_init(void) | ||
512 | { | ||
513 | omap3_pmic_get_config(&omap3evm_twldata, | ||
514 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_MADC | | ||
515 | TWL_COMMON_PDATA_AUDIO, | ||
516 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
517 | |||
518 | omap3evm_twldata.vdac->constraints.apply_uV = true; | ||
519 | omap3evm_twldata.vpll2->constraints.apply_uV = true; | ||
520 | |||
521 | omap3_pmic_init("twl4030", &omap3evm_twldata); | ||
522 | omap_register_i2c_bus(2, 400, NULL, 0); | ||
523 | omap_register_i2c_bus(3, 400, NULL, 0); | ||
524 | return 0; | ||
525 | } | ||
526 | |||
527 | static struct usbhs_phy_data phy_data[] __initdata = { | ||
528 | { | ||
529 | .port = 2, | ||
530 | .reset_gpio = -1, /* set at runtime */ | ||
531 | .vcc_gpio = -EINVAL, | ||
532 | }, | ||
533 | }; | ||
534 | |||
535 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { | ||
536 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | ||
537 | }; | ||
538 | |||
539 | #ifdef CONFIG_OMAP_MUX | ||
540 | static struct omap_board_mux omap35x_board_mux[] __initdata = { | ||
541 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | | ||
542 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | ||
543 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
544 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
545 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | ||
546 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
547 | OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
548 | OMAP_PIN_OFF_NONE), | ||
549 | OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
550 | OMAP_PIN_OFF_NONE), | ||
551 | #ifdef CONFIG_WILINK_PLATFORM_DATA | ||
552 | /* WLAN IRQ - GPIO 149 */ | ||
553 | OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
554 | |||
555 | /* WLAN POWER ENABLE - GPIO 150 */ | ||
556 | OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
557 | |||
558 | /* MMC2 SDIO pin muxes for WL12xx */ | ||
559 | OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
560 | OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
561 | OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
562 | OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
563 | OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
564 | OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
565 | #endif | ||
566 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
567 | }; | ||
568 | |||
569 | static struct omap_board_mux omap36x_board_mux[] __initdata = { | ||
570 | OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP | | ||
571 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | ||
572 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
573 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP | | ||
574 | OMAP_PIN_OFF_INPUT_PULLUP | OMAP_PIN_OFF_OUTPUT_LOW | | ||
575 | OMAP_PIN_OFF_WAKEUPENABLE), | ||
576 | /* AM/DM37x EVM: DSS data bus muxed with sys_boot */ | ||
577 | OMAP3_MUX(DSS_DATA18, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
578 | OMAP3_MUX(DSS_DATA19, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
579 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
580 | OMAP3_MUX(DSS_DATA21, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
581 | OMAP3_MUX(DSS_DATA22, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
582 | OMAP3_MUX(DSS_DATA23, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
583 | OMAP3_MUX(SYS_BOOT0, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
584 | OMAP3_MUX(SYS_BOOT1, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
585 | OMAP3_MUX(SYS_BOOT3, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
586 | OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
587 | OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
588 | OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE), | ||
589 | #ifdef CONFIG_WILINK_PLATFORM_DATA | ||
590 | /* WLAN IRQ - GPIO 149 */ | ||
591 | OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
592 | |||
593 | /* WLAN POWER ENABLE - GPIO 150 */ | ||
594 | OMAP3_MUX(UART1_CTS, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
595 | |||
596 | /* MMC2 SDIO pin muxes for WL12xx */ | ||
597 | OMAP3_MUX(SDMMC2_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
598 | OMAP3_MUX(SDMMC2_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
599 | OMAP3_MUX(SDMMC2_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
600 | OMAP3_MUX(SDMMC2_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
601 | OMAP3_MUX(SDMMC2_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
602 | OMAP3_MUX(SDMMC2_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP), | ||
603 | #endif | ||
604 | |||
605 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
606 | }; | ||
607 | #else | ||
608 | #define omap35x_board_mux NULL | ||
609 | #define omap36x_board_mux NULL | ||
610 | #endif | ||
611 | |||
612 | static struct omap_musb_board_data musb_board_data = { | ||
613 | .interface_type = MUSB_INTERFACE_ULPI, | ||
614 | .mode = MUSB_OTG, | ||
615 | .power = 100, | ||
616 | }; | ||
617 | |||
618 | static struct gpio omap3_evm_ehci_gpios[] __initdata = { | ||
619 | { OMAP3_EVM_EHCI_VBUS, GPIOF_OUT_INIT_HIGH, "enable EHCI VBUS" }, | ||
620 | { OMAP3_EVM_EHCI_SELECT, GPIOF_OUT_INIT_LOW, "select EHCI port" }, | ||
621 | }; | ||
622 | |||
623 | static void __init omap3_evm_wl12xx_init(void) | ||
624 | { | ||
625 | #ifdef CONFIG_WILINK_PLATFORM_DATA | ||
626 | int ret; | ||
627 | |||
628 | /* WL12xx WLAN Init */ | ||
629 | omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO); | ||
630 | ret = wl12xx_set_platform_data(&omap3evm_wlan_data); | ||
631 | if (ret) | ||
632 | pr_err("error setting wl12xx data: %d\n", ret); | ||
633 | ret = platform_device_register(&omap3evm_wlan_regulator); | ||
634 | if (ret) | ||
635 | pr_err("error registering wl12xx device: %d\n", ret); | ||
636 | #endif | ||
637 | } | ||
638 | |||
639 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
640 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
641 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
642 | }; | ||
643 | |||
644 | static struct mtd_partition omap3evm_nand_partitions[] = { | ||
645 | /* All the partition sizes are listed in terms of NAND block size */ | ||
646 | { | ||
647 | .name = "X-Loader", | ||
648 | .offset = 0, | ||
649 | .size = 4*(SZ_128K), | ||
650 | .mask_flags = MTD_WRITEABLE | ||
651 | }, | ||
652 | { | ||
653 | .name = "U-Boot", | ||
654 | .offset = MTDPART_OFS_APPEND, | ||
655 | .size = 14*(SZ_128K), | ||
656 | .mask_flags = MTD_WRITEABLE | ||
657 | }, | ||
658 | { | ||
659 | .name = "U-Boot Env", | ||
660 | .offset = MTDPART_OFS_APPEND, | ||
661 | .size = 2*(SZ_128K) | ||
662 | }, | ||
663 | { | ||
664 | .name = "Kernel", | ||
665 | .offset = MTDPART_OFS_APPEND, | ||
666 | .size = 40*(SZ_128K) | ||
667 | }, | ||
668 | { | ||
669 | .name = "File system", | ||
670 | .size = MTDPART_SIZ_FULL, | ||
671 | .offset = MTDPART_OFS_APPEND, | ||
672 | }, | ||
673 | }; | ||
674 | |||
675 | static void __init omap3_evm_init(void) | ||
676 | { | ||
677 | struct omap_board_mux *obm; | ||
678 | |||
679 | omap3_evm_get_revision(); | ||
680 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
681 | |||
682 | obm = (cpu_is_omap3630()) ? omap36x_board_mux : omap35x_board_mux; | ||
683 | omap3_mux_init(obm, OMAP_PACKAGE_CBB); | ||
684 | |||
685 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); | ||
686 | omap_hsmmc_init(mmc); | ||
687 | |||
688 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) | ||
689 | omap3evm_twldata.vaux2 = &omap3evm_vaux2; | ||
690 | |||
691 | omap3_evm_i2c_init(); | ||
692 | |||
693 | omap_display_init(&omap3_evm_dss_data); | ||
694 | platform_device_register(&omap3_evm_lcd_device); | ||
695 | platform_device_register(&omap3_evm_tfp410_device); | ||
696 | platform_device_register(&omap3_evm_dvi_connector_device); | ||
697 | platform_device_register(&omap3_evm_tv_connector_device); | ||
698 | |||
699 | omap_serial_init(); | ||
700 | omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL); | ||
701 | |||
702 | /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */ | ||
703 | usb_nop_xceiv_register(); | ||
704 | |||
705 | if (get_omap3_evm_rev() >= OMAP3EVM_BOARD_GEN_2) { | ||
706 | /* enable EHCI VBUS using GPIO22 */ | ||
707 | omap_mux_init_gpio(OMAP3_EVM_EHCI_VBUS, OMAP_PIN_INPUT_PULLUP); | ||
708 | /* Select EHCI port on main board */ | ||
709 | omap_mux_init_gpio(OMAP3_EVM_EHCI_SELECT, | ||
710 | OMAP_PIN_INPUT_PULLUP); | ||
711 | gpio_request_array(omap3_evm_ehci_gpios, | ||
712 | ARRAY_SIZE(omap3_evm_ehci_gpios)); | ||
713 | |||
714 | /* setup EHCI phy reset config */ | ||
715 | omap_mux_init_gpio(21, OMAP_PIN_INPUT_PULLUP); | ||
716 | phy_data[0].reset_gpio = 21; | ||
717 | |||
718 | /* EVM REV >= E can supply 500mA with EXTVBUS programming */ | ||
719 | musb_board_data.power = 500; | ||
720 | musb_board_data.extvbus = 1; | ||
721 | } else { | ||
722 | /* setup EHCI phy reset on MDC */ | ||
723 | omap_mux_init_gpio(135, OMAP_PIN_OUTPUT); | ||
724 | phy_data[0].reset_gpio = 135; | ||
725 | } | ||
726 | usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); | ||
727 | usb_musb_init(&musb_board_data); | ||
728 | |||
729 | usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data)); | ||
730 | usbhs_init(&usbhs_bdata); | ||
731 | board_nand_init(omap3evm_nand_partitions, | ||
732 | ARRAY_SIZE(omap3evm_nand_partitions), NAND_CS, | ||
733 | NAND_BUSWIDTH_16, NULL); | ||
734 | |||
735 | omap_ads7846_init(1, OMAP3_EVM_TS_GPIO, 310, NULL); | ||
736 | omap3evm_init_smsc911x(); | ||
737 | #ifdef CONFIG_BROKEN | ||
738 | omap3_evm_display_init(); | ||
739 | #endif | ||
740 | omap3_evm_wl12xx_init(); | ||
741 | omap_twl4030_audio_init("omap3evm", NULL); | ||
742 | } | ||
743 | |||
744 | MACHINE_START(OMAP3EVM, "OMAP3 EVM") | ||
745 | /* Maintainer: Syed Mohammed Khasim - Texas Instruments */ | ||
746 | .atag_offset = 0x100, | ||
747 | .reserve = omap_reserve, | ||
748 | .map_io = omap3_map_io, | ||
749 | .init_early = omap35xx_init_early, | ||
750 | .init_irq = omap3_init_irq, | ||
751 | .handle_irq = omap3_intc_handle_irq, | ||
752 | .init_machine = omap3_evm_init, | ||
753 | .init_late = omap35xx_init_late, | ||
754 | .init_time = omap3_sync32k_timer_init, | ||
755 | .restart = omap3xxx_restart, | ||
756 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c deleted file mode 100644 index 345e8c4b8731..000000000000 --- a/arch/arm/mach-omap2/board-rm680.c +++ /dev/null | |||
@@ -1,167 +0,0 @@ | |||
1 | /* | ||
2 | * Board support file for Nokia N950 (RM-680) / N9 (RM-696). | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/io.h> | ||
12 | #include <linux/i2c.h> | ||
13 | #include <linux/gpio.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/i2c/twl.h> | ||
16 | #include <linux/platform_device.h> | ||
17 | #include <linux/regulator/fixed.h> | ||
18 | #include <linux/regulator/machine.h> | ||
19 | #include <linux/regulator/consumer.h> | ||
20 | #include <linux/platform_data/mtd-onenand-omap2.h> | ||
21 | #include <linux/usb/phy.h> | ||
22 | |||
23 | #include <asm/mach/arch.h> | ||
24 | #include <asm/mach-types.h> | ||
25 | |||
26 | #include "common.h" | ||
27 | #include "mux.h" | ||
28 | #include "gpmc.h" | ||
29 | #include "mmc.h" | ||
30 | #include "hsmmc.h" | ||
31 | #include "sdram-nokia.h" | ||
32 | #include "common-board-devices.h" | ||
33 | #include "gpmc-onenand.h" | ||
34 | |||
35 | static struct regulator_consumer_supply rm680_vemmc_consumers[] = { | ||
36 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), | ||
37 | }; | ||
38 | |||
39 | /* Fixed regulator for internal eMMC */ | ||
40 | static struct regulator_init_data rm680_vemmc = { | ||
41 | .constraints = { | ||
42 | .name = "rm680_vemmc", | ||
43 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
44 | | REGULATOR_MODE_STANDBY, | ||
45 | .valid_ops_mask = REGULATOR_CHANGE_STATUS | ||
46 | | REGULATOR_CHANGE_MODE, | ||
47 | }, | ||
48 | .num_consumer_supplies = ARRAY_SIZE(rm680_vemmc_consumers), | ||
49 | .consumer_supplies = rm680_vemmc_consumers, | ||
50 | }; | ||
51 | |||
52 | static struct fixed_voltage_config rm680_vemmc_config = { | ||
53 | .supply_name = "VEMMC", | ||
54 | .microvolts = 2900000, | ||
55 | .gpio = 157, | ||
56 | .startup_delay = 150, | ||
57 | .enable_high = 1, | ||
58 | .init_data = &rm680_vemmc, | ||
59 | }; | ||
60 | |||
61 | static struct platform_device rm680_vemmc_device = { | ||
62 | .name = "reg-fixed-voltage", | ||
63 | .dev = { | ||
64 | .platform_data = &rm680_vemmc_config, | ||
65 | }, | ||
66 | }; | ||
67 | |||
68 | static struct platform_device *rm680_peripherals_devices[] __initdata = { | ||
69 | &rm680_vemmc_device, | ||
70 | }; | ||
71 | |||
72 | /* TWL */ | ||
73 | static struct twl4030_gpio_platform_data rm680_gpio_data = { | ||
74 | .pullups = BIT(0), | ||
75 | .pulldowns = BIT(1) | BIT(2) | BIT(8) | BIT(15), | ||
76 | }; | ||
77 | |||
78 | static struct twl4030_platform_data rm680_twl_data = { | ||
79 | .gpio = &rm680_gpio_data, | ||
80 | /* add rest of the children here */ | ||
81 | }; | ||
82 | |||
83 | static void __init rm680_i2c_init(void) | ||
84 | { | ||
85 | omap3_pmic_get_config(&rm680_twl_data, TWL_COMMON_PDATA_USB, 0); | ||
86 | omap_pmic_init(1, 2900, "twl5031", 7 + OMAP_INTC_START, &rm680_twl_data); | ||
87 | omap_register_i2c_bus(2, 400, NULL, 0); | ||
88 | omap_register_i2c_bus(3, 400, NULL, 0); | ||
89 | } | ||
90 | |||
91 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ | ||
92 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) | ||
93 | static struct omap_onenand_platform_data board_onenand_data[] = { | ||
94 | { | ||
95 | .gpio_irq = 65, | ||
96 | .flags = ONENAND_SYNC_READWRITE, | ||
97 | } | ||
98 | }; | ||
99 | #endif | ||
100 | |||
101 | /* eMMC */ | ||
102 | static struct omap2_hsmmc_info mmc[] __initdata = { | ||
103 | { | ||
104 | .name = "internal", | ||
105 | .mmc = 2, | ||
106 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_MMC_HIGHSPEED, | ||
107 | .gpio_cd = -EINVAL, | ||
108 | .gpio_wp = -EINVAL, | ||
109 | }, | ||
110 | { /* Terminator */ } | ||
111 | }; | ||
112 | |||
113 | static void __init rm680_peripherals_init(void) | ||
114 | { | ||
115 | platform_add_devices(rm680_peripherals_devices, | ||
116 | ARRAY_SIZE(rm680_peripherals_devices)); | ||
117 | rm680_i2c_init(); | ||
118 | gpmc_onenand_init(board_onenand_data); | ||
119 | omap_hsmmc_init(mmc); | ||
120 | } | ||
121 | |||
122 | #ifdef CONFIG_OMAP_MUX | ||
123 | static struct omap_board_mux board_mux[] __initdata = { | ||
124 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
125 | }; | ||
126 | #endif | ||
127 | |||
128 | static void __init rm680_init(void) | ||
129 | { | ||
130 | struct omap_sdrc_params *sdrc_params; | ||
131 | |||
132 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
133 | omap_serial_init(); | ||
134 | |||
135 | sdrc_params = nokia_get_sdram_timings(); | ||
136 | omap_sdrc_init(sdrc_params, sdrc_params); | ||
137 | |||
138 | usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); | ||
139 | usb_musb_init(NULL); | ||
140 | rm680_peripherals_init(); | ||
141 | } | ||
142 | |||
143 | MACHINE_START(NOKIA_RM680, "Nokia RM-680 board") | ||
144 | .atag_offset = 0x100, | ||
145 | .reserve = omap_reserve, | ||
146 | .map_io = omap3_map_io, | ||
147 | .init_early = omap3630_init_early, | ||
148 | .init_irq = omap3_init_irq, | ||
149 | .handle_irq = omap3_intc_handle_irq, | ||
150 | .init_machine = rm680_init, | ||
151 | .init_late = omap3630_init_late, | ||
152 | .init_time = omap3_sync32k_timer_init, | ||
153 | .restart = omap3xxx_restart, | ||
154 | MACHINE_END | ||
155 | |||
156 | MACHINE_START(NOKIA_RM696, "Nokia RM-696 board") | ||
157 | .atag_offset = 0x100, | ||
158 | .reserve = omap_reserve, | ||
159 | .map_io = omap3_map_io, | ||
160 | .init_early = omap3630_init_early, | ||
161 | .init_irq = omap3_init_irq, | ||
162 | .handle_irq = omap3_intc_handle_irq, | ||
163 | .init_machine = rm680_init, | ||
164 | .init_late = omap3630_init_late, | ||
165 | .init_time = omap3_sync32k_timer_init, | ||
166 | .restart = omap3xxx_restart, | ||
167 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index c3270c0f1fce..f6fe388af989 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -167,38 +167,47 @@ static struct lp55xx_led_config rx51_lp5523_led_config[] = { | |||
167 | .name = "lp5523:kb1", | 167 | .name = "lp5523:kb1", |
168 | .chan_nr = 0, | 168 | .chan_nr = 0, |
169 | .led_current = 50, | 169 | .led_current = 50, |
170 | .max_current = 100, | ||
170 | }, { | 171 | }, { |
171 | .name = "lp5523:kb2", | 172 | .name = "lp5523:kb2", |
172 | .chan_nr = 1, | 173 | .chan_nr = 1, |
173 | .led_current = 50, | 174 | .led_current = 50, |
175 | .max_current = 100, | ||
174 | }, { | 176 | }, { |
175 | .name = "lp5523:kb3", | 177 | .name = "lp5523:kb3", |
176 | .chan_nr = 2, | 178 | .chan_nr = 2, |
177 | .led_current = 50, | 179 | .led_current = 50, |
180 | .max_current = 100, | ||
178 | }, { | 181 | }, { |
179 | .name = "lp5523:kb4", | 182 | .name = "lp5523:kb4", |
180 | .chan_nr = 3, | 183 | .chan_nr = 3, |
181 | .led_current = 50, | 184 | .led_current = 50, |
185 | .max_current = 100, | ||
182 | }, { | 186 | }, { |
183 | .name = "lp5523:b", | 187 | .name = "lp5523:b", |
184 | .chan_nr = 4, | 188 | .chan_nr = 4, |
185 | .led_current = 50, | 189 | .led_current = 50, |
190 | .max_current = 100, | ||
186 | }, { | 191 | }, { |
187 | .name = "lp5523:g", | 192 | .name = "lp5523:g", |
188 | .chan_nr = 5, | 193 | .chan_nr = 5, |
189 | .led_current = 50, | 194 | .led_current = 50, |
195 | .max_current = 100, | ||
190 | }, { | 196 | }, { |
191 | .name = "lp5523:r", | 197 | .name = "lp5523:r", |
192 | .chan_nr = 6, | 198 | .chan_nr = 6, |
193 | .led_current = 50, | 199 | .led_current = 50, |
200 | .max_current = 100, | ||
194 | }, { | 201 | }, { |
195 | .name = "lp5523:kb5", | 202 | .name = "lp5523:kb5", |
196 | .chan_nr = 7, | 203 | .chan_nr = 7, |
197 | .led_current = 50, | 204 | .led_current = 50, |
205 | .max_current = 100, | ||
198 | }, { | 206 | }, { |
199 | .name = "lp5523:kb6", | 207 | .name = "lp5523:kb6", |
200 | .chan_nr = 8, | 208 | .chan_nr = 8, |
201 | .led_current = 50, | 209 | .led_current = 50, |
210 | .max_current = 100, | ||
202 | } | 211 | } |
203 | }; | 212 | }; |
204 | 213 | ||
diff --git a/arch/arm/mach-omap2/board-zoom-debugboard.c b/arch/arm/mach-omap2/board-zoom-debugboard.c deleted file mode 100644 index 42e5f231a799..000000000000 --- a/arch/arm/mach-omap2/board-zoom-debugboard.c +++ /dev/null | |||
@@ -1,139 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Texas Instruments Inc. | ||
3 | * Mikkel Christensen <mlc@ti.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License version 2 as | ||
7 | * published by the Free Software Foundation. | ||
8 | */ | ||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/gpio.h> | ||
13 | #include <linux/serial_8250.h> | ||
14 | #include <linux/smsc911x.h> | ||
15 | #include <linux/interrupt.h> | ||
16 | |||
17 | #include <linux/regulator/fixed.h> | ||
18 | #include <linux/regulator/machine.h> | ||
19 | |||
20 | #include "gpmc.h" | ||
21 | #include "gpmc-smsc911x.h" | ||
22 | |||
23 | #include "board-zoom.h" | ||
24 | |||
25 | #include "soc.h" | ||
26 | #include "common.h" | ||
27 | |||
28 | #define ZOOM_SMSC911X_CS 7 | ||
29 | #define ZOOM_SMSC911X_GPIO 158 | ||
30 | #define ZOOM_QUADUART_CS 3 | ||
31 | #define ZOOM_QUADUART_GPIO 102 | ||
32 | #define ZOOM_QUADUART_RST_GPIO 152 | ||
33 | #define QUART_CLK 1843200 | ||
34 | #define DEBUG_BASE 0x08000000 | ||
35 | #define ZOOM_ETHR_START DEBUG_BASE | ||
36 | |||
37 | static struct omap_smsc911x_platform_data zoom_smsc911x_cfg = { | ||
38 | .cs = ZOOM_SMSC911X_CS, | ||
39 | .gpio_irq = ZOOM_SMSC911X_GPIO, | ||
40 | .gpio_reset = -EINVAL, | ||
41 | .flags = SMSC911X_USE_32BIT, | ||
42 | }; | ||
43 | |||
44 | static inline void __init zoom_init_smsc911x(void) | ||
45 | { | ||
46 | gpmc_smsc911x_init(&zoom_smsc911x_cfg); | ||
47 | } | ||
48 | |||
49 | static struct plat_serial8250_port serial_platform_data[] = { | ||
50 | { | ||
51 | .mapbase = ZOOM_UART_BASE, | ||
52 | .flags = UPF_BOOT_AUTOCONF|UPF_IOREMAP|UPF_SHARE_IRQ, | ||
53 | .irqflags = IRQF_SHARED | IRQF_TRIGGER_RISING, | ||
54 | .iotype = UPIO_MEM, | ||
55 | .regshift = 1, | ||
56 | .uartclk = QUART_CLK, | ||
57 | }, { | ||
58 | .flags = 0 | ||
59 | } | ||
60 | }; | ||
61 | |||
62 | static struct platform_device zoom_debugboard_serial_device = { | ||
63 | .name = "serial8250", | ||
64 | .id = PLAT8250_DEV_PLATFORM, | ||
65 | .dev = { | ||
66 | .platform_data = serial_platform_data, | ||
67 | }, | ||
68 | }; | ||
69 | |||
70 | static inline void __init zoom_init_quaduart(void) | ||
71 | { | ||
72 | int quart_cs; | ||
73 | unsigned long cs_mem_base; | ||
74 | int quart_gpio = 0; | ||
75 | |||
76 | if (gpio_request_one(ZOOM_QUADUART_RST_GPIO, | ||
77 | GPIOF_OUT_INIT_LOW, | ||
78 | "TL16CP754C GPIO") < 0) { | ||
79 | pr_err("Failed to request GPIO%d for TL16CP754C\n", | ||
80 | ZOOM_QUADUART_RST_GPIO); | ||
81 | return; | ||
82 | } | ||
83 | |||
84 | quart_cs = ZOOM_QUADUART_CS; | ||
85 | |||
86 | if (gpmc_cs_request(quart_cs, SZ_1M, &cs_mem_base) < 0) { | ||
87 | pr_err("Failed to request GPMC mem for Quad UART(TL16CP754C)\n"); | ||
88 | return; | ||
89 | } | ||
90 | |||
91 | quart_gpio = ZOOM_QUADUART_GPIO; | ||
92 | |||
93 | if (gpio_request_one(quart_gpio, GPIOF_IN, "TL16CP754C GPIO") < 0) | ||
94 | printk(KERN_ERR "Failed to request GPIO%d for TL16CP754C\n", | ||
95 | quart_gpio); | ||
96 | |||
97 | serial_platform_data[0].irq = gpio_to_irq(102); | ||
98 | } | ||
99 | |||
100 | static inline int omap_zoom_debugboard_detect(void) | ||
101 | { | ||
102 | int debug_board_detect = 0; | ||
103 | int ret = 1; | ||
104 | |||
105 | debug_board_detect = ZOOM_SMSC911X_GPIO; | ||
106 | |||
107 | if (gpio_request_one(debug_board_detect, GPIOF_IN, | ||
108 | "Zoom debug board detect") < 0) { | ||
109 | pr_err("Failed to request GPIO%d for Zoom debug board detect\n", | ||
110 | debug_board_detect); | ||
111 | return 0; | ||
112 | } | ||
113 | |||
114 | if (!gpio_get_value(debug_board_detect)) { | ||
115 | ret = 0; | ||
116 | } | ||
117 | gpio_free(debug_board_detect); | ||
118 | return ret; | ||
119 | } | ||
120 | |||
121 | static struct platform_device *zoom_devices[] __initdata = { | ||
122 | &zoom_debugboard_serial_device, | ||
123 | }; | ||
124 | |||
125 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
126 | REGULATOR_SUPPLY("vddvario", "smsc911x.0"), | ||
127 | REGULATOR_SUPPLY("vdd33a", "smsc911x.0"), | ||
128 | }; | ||
129 | |||
130 | int __init zoom_debugboard_init(void) | ||
131 | { | ||
132 | if (!omap_zoom_debugboard_detect()) | ||
133 | return 0; | ||
134 | |||
135 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
136 | zoom_init_smsc911x(); | ||
137 | zoom_init_quaduart(); | ||
138 | return platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices)); | ||
139 | } | ||
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c deleted file mode 100644 index 3d8ecc1e05bd..000000000000 --- a/arch/arm/mach-omap2/board-zoom-display.c +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2010 Texas Instruments Inc. | ||
3 | * | ||
4 | * Modified from mach-omap2/board-zoom-peripherals.c | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/gpio.h> | ||
15 | #include <linux/spi/spi.h> | ||
16 | #include <linux/platform_data/spi-omap2-mcspi.h> | ||
17 | #include <video/omapdss.h> | ||
18 | #include <video/omap-panel-data.h> | ||
19 | |||
20 | #include "board-zoom.h" | ||
21 | #include "soc.h" | ||
22 | #include "common.h" | ||
23 | |||
24 | #define LCD_PANEL_RESET_GPIO_PROD 96 | ||
25 | #define LCD_PANEL_RESET_GPIO_PILOT 55 | ||
26 | #define LCD_PANEL_QVGA_GPIO 56 | ||
27 | |||
28 | static struct panel_nec_nl8048hl11_platform_data zoom_lcd_pdata = { | ||
29 | .name = "lcd", | ||
30 | .source = "dpi.0", | ||
31 | |||
32 | .data_lines = 24, | ||
33 | |||
34 | .res_gpio = -1, /* filled in code */ | ||
35 | .qvga_gpio = LCD_PANEL_QVGA_GPIO, | ||
36 | }; | ||
37 | |||
38 | static struct omap_dss_board_info zoom_dss_data = { | ||
39 | .default_display_name = "lcd", | ||
40 | }; | ||
41 | |||
42 | static void __init zoom_lcd_panel_init(void) | ||
43 | { | ||
44 | zoom_lcd_pdata.res_gpio = (omap_rev() > OMAP3430_REV_ES3_0) ? | ||
45 | LCD_PANEL_RESET_GPIO_PROD : | ||
46 | LCD_PANEL_RESET_GPIO_PILOT; | ||
47 | } | ||
48 | |||
49 | static struct omap2_mcspi_device_config dss_lcd_mcspi_config = { | ||
50 | .turbo_mode = 1, | ||
51 | }; | ||
52 | |||
53 | static struct spi_board_info nec_8048_spi_board_info[] __initdata = { | ||
54 | [0] = { | ||
55 | .modalias = "panel-nec-nl8048hl11", | ||
56 | .bus_num = 1, | ||
57 | .chip_select = 2, | ||
58 | .max_speed_hz = 375000, | ||
59 | .controller_data = &dss_lcd_mcspi_config, | ||
60 | .platform_data = &zoom_lcd_pdata, | ||
61 | }, | ||
62 | }; | ||
63 | |||
64 | void __init zoom_display_init(void) | ||
65 | { | ||
66 | omap_display_init(&zoom_dss_data); | ||
67 | zoom_lcd_panel_init(); | ||
68 | spi_register_board_info(nec_8048_spi_board_info, | ||
69 | ARRAY_SIZE(nec_8048_spi_board_info)); | ||
70 | } | ||
71 | |||
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c deleted file mode 100644 index a90375d5b2b6..000000000000 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ /dev/null | |||
@@ -1,360 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009 Texas Instruments Inc. | ||
3 | * | ||
4 | * Modified from mach-omap2/board-zoom2.c | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/input.h> | ||
15 | #include <linux/input/matrix_keypad.h> | ||
16 | #include <linux/gpio.h> | ||
17 | #include <linux/i2c/twl.h> | ||
18 | #include <linux/regulator/machine.h> | ||
19 | #include <linux/regulator/fixed.h> | ||
20 | #include <linux/wl12xx.h> | ||
21 | #include <linux/mmc/host.h> | ||
22 | #include <linux/platform_data/gpio-omap.h> | ||
23 | #include <linux/platform_data/omap-twl4030.h> | ||
24 | #include <linux/usb/phy.h> | ||
25 | #include <linux/pwm.h> | ||
26 | #include <linux/leds_pwm.h> | ||
27 | #include <linux/pwm_backlight.h> | ||
28 | |||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | #include <asm/mach/map.h> | ||
32 | |||
33 | #include "common.h" | ||
34 | |||
35 | #include "board-zoom.h" | ||
36 | |||
37 | #include "mux.h" | ||
38 | #include "hsmmc.h" | ||
39 | #include "common-board-devices.h" | ||
40 | |||
41 | #define OMAP_ZOOM_WLAN_PMENA_GPIO (101) | ||
42 | #define OMAP_ZOOM_TSC2004_IRQ_GPIO (153) | ||
43 | #define OMAP_ZOOM_WLAN_IRQ_GPIO (162) | ||
44 | |||
45 | /* Zoom2 has Qwerty keyboard*/ | ||
46 | static uint32_t board_keymap[] = { | ||
47 | KEY(0, 0, KEY_E), | ||
48 | KEY(0, 1, KEY_R), | ||
49 | KEY(0, 2, KEY_T), | ||
50 | KEY(0, 3, KEY_HOME), | ||
51 | KEY(0, 6, KEY_I), | ||
52 | KEY(0, 7, KEY_LEFTSHIFT), | ||
53 | KEY(1, 0, KEY_D), | ||
54 | KEY(1, 1, KEY_F), | ||
55 | KEY(1, 2, KEY_G), | ||
56 | KEY(1, 3, KEY_SEND), | ||
57 | KEY(1, 6, KEY_K), | ||
58 | KEY(1, 7, KEY_ENTER), | ||
59 | KEY(2, 0, KEY_X), | ||
60 | KEY(2, 1, KEY_C), | ||
61 | KEY(2, 2, KEY_V), | ||
62 | KEY(2, 3, KEY_END), | ||
63 | KEY(2, 6, KEY_DOT), | ||
64 | KEY(2, 7, KEY_CAPSLOCK), | ||
65 | KEY(3, 0, KEY_Z), | ||
66 | KEY(3, 1, KEY_KPPLUS), | ||
67 | KEY(3, 2, KEY_B), | ||
68 | KEY(3, 3, KEY_F1), | ||
69 | KEY(3, 6, KEY_O), | ||
70 | KEY(3, 7, KEY_SPACE), | ||
71 | KEY(4, 0, KEY_W), | ||
72 | KEY(4, 1, KEY_Y), | ||
73 | KEY(4, 2, KEY_U), | ||
74 | KEY(4, 3, KEY_F2), | ||
75 | KEY(4, 4, KEY_VOLUMEUP), | ||
76 | KEY(4, 6, KEY_L), | ||
77 | KEY(4, 7, KEY_LEFT), | ||
78 | KEY(5, 0, KEY_S), | ||
79 | KEY(5, 1, KEY_H), | ||
80 | KEY(5, 2, KEY_J), | ||
81 | KEY(5, 3, KEY_F3), | ||
82 | KEY(5, 4, KEY_UNKNOWN), | ||
83 | KEY(5, 5, KEY_VOLUMEDOWN), | ||
84 | KEY(5, 6, KEY_M), | ||
85 | KEY(5, 7, KEY_RIGHT), | ||
86 | KEY(6, 0, KEY_Q), | ||
87 | KEY(6, 1, KEY_A), | ||
88 | KEY(6, 2, KEY_N), | ||
89 | KEY(6, 3, KEY_BACKSPACE), | ||
90 | KEY(6, 6, KEY_P), | ||
91 | KEY(6, 7, KEY_UP), | ||
92 | KEY(7, 0, KEY_PROG1), /*MACRO 1 <User defined> */ | ||
93 | KEY(7, 1, KEY_PROG2), /*MACRO 2 <User defined> */ | ||
94 | KEY(7, 2, KEY_PROG3), /*MACRO 3 <User defined> */ | ||
95 | KEY(7, 3, KEY_PROG4), /*MACRO 4 <User defined> */ | ||
96 | KEY(7, 6, KEY_SELECT), | ||
97 | KEY(7, 7, KEY_DOWN) | ||
98 | }; | ||
99 | |||
100 | static struct matrix_keymap_data board_map_data = { | ||
101 | .keymap = board_keymap, | ||
102 | .keymap_size = ARRAY_SIZE(board_keymap), | ||
103 | }; | ||
104 | |||
105 | static struct twl4030_keypad_data zoom_kp_twl4030_data = { | ||
106 | .keymap_data = &board_map_data, | ||
107 | .rows = 8, | ||
108 | .cols = 8, | ||
109 | .rep = 1, | ||
110 | }; | ||
111 | |||
112 | static struct regulator_consumer_supply zoom_vmmc1_supply[] = { | ||
113 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"), | ||
114 | }; | ||
115 | |||
116 | static struct regulator_consumer_supply zoom_vsim_supply[] = { | ||
117 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), | ||
118 | }; | ||
119 | |||
120 | static struct regulator_consumer_supply zoom_vmmc2_supply[] = { | ||
121 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), | ||
122 | }; | ||
123 | |||
124 | static struct regulator_consumer_supply zoom_vmmc3_supply[] = { | ||
125 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"), | ||
126 | }; | ||
127 | |||
128 | /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ | ||
129 | static struct regulator_init_data zoom_vmmc1 = { | ||
130 | .constraints = { | ||
131 | .min_uV = 1850000, | ||
132 | .max_uV = 3150000, | ||
133 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
134 | | REGULATOR_MODE_STANDBY, | ||
135 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
136 | | REGULATOR_CHANGE_MODE | ||
137 | | REGULATOR_CHANGE_STATUS, | ||
138 | }, | ||
139 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc1_supply), | ||
140 | .consumer_supplies = zoom_vmmc1_supply, | ||
141 | }; | ||
142 | |||
143 | /* VMMC2 for MMC2 card */ | ||
144 | static struct regulator_init_data zoom_vmmc2 = { | ||
145 | .constraints = { | ||
146 | .min_uV = 1850000, | ||
147 | .max_uV = 1850000, | ||
148 | .apply_uV = true, | ||
149 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
150 | | REGULATOR_MODE_STANDBY, | ||
151 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
152 | | REGULATOR_CHANGE_STATUS, | ||
153 | }, | ||
154 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc2_supply), | ||
155 | .consumer_supplies = zoom_vmmc2_supply, | ||
156 | }; | ||
157 | |||
158 | /* VSIM for OMAP VDD_MMC1A (i/o for DAT4..DAT7) */ | ||
159 | static struct regulator_init_data zoom_vsim = { | ||
160 | .constraints = { | ||
161 | .min_uV = 1800000, | ||
162 | .max_uV = 3000000, | ||
163 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
164 | | REGULATOR_MODE_STANDBY, | ||
165 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
166 | | REGULATOR_CHANGE_MODE | ||
167 | | REGULATOR_CHANGE_STATUS, | ||
168 | }, | ||
169 | .num_consumer_supplies = ARRAY_SIZE(zoom_vsim_supply), | ||
170 | .consumer_supplies = zoom_vsim_supply, | ||
171 | }; | ||
172 | |||
173 | static struct regulator_init_data zoom_vmmc3 = { | ||
174 | .constraints = { | ||
175 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
176 | }, | ||
177 | .num_consumer_supplies = ARRAY_SIZE(zoom_vmmc3_supply), | ||
178 | .consumer_supplies = zoom_vmmc3_supply, | ||
179 | }; | ||
180 | |||
181 | static struct fixed_voltage_config zoom_vwlan = { | ||
182 | .supply_name = "vwl1271", | ||
183 | .microvolts = 1800000, /* 1.8V */ | ||
184 | .gpio = OMAP_ZOOM_WLAN_PMENA_GPIO, | ||
185 | .startup_delay = 70000, /* 70msec */ | ||
186 | .enable_high = 1, | ||
187 | .enabled_at_boot = 0, | ||
188 | .init_data = &zoom_vmmc3, | ||
189 | }; | ||
190 | |||
191 | static struct platform_device omap_vwlan_device = { | ||
192 | .name = "reg-fixed-voltage", | ||
193 | .id = 1, | ||
194 | .dev = { | ||
195 | .platform_data = &zoom_vwlan, | ||
196 | }, | ||
197 | }; | ||
198 | |||
199 | static struct pwm_lookup zoom_pwm_lookup[] = { | ||
200 | PWM_LOOKUP("twl-pwm", 0, "leds_pwm", "zoom::keypad"), | ||
201 | PWM_LOOKUP("twl-pwm", 1, "pwm-backlight", "backlight"), | ||
202 | }; | ||
203 | |||
204 | static struct led_pwm zoom_pwm_leds[] = { | ||
205 | { | ||
206 | .name = "zoom::keypad", | ||
207 | .max_brightness = 127, | ||
208 | .pwm_period_ns = 7812500, | ||
209 | }, | ||
210 | }; | ||
211 | |||
212 | static struct led_pwm_platform_data zoom_pwm_data = { | ||
213 | .num_leds = ARRAY_SIZE(zoom_pwm_leds), | ||
214 | .leds = zoom_pwm_leds, | ||
215 | }; | ||
216 | |||
217 | static struct platform_device zoom_leds_pwm = { | ||
218 | .name = "leds_pwm", | ||
219 | .id = -1, | ||
220 | .dev = { | ||
221 | .platform_data = &zoom_pwm_data, | ||
222 | }, | ||
223 | }; | ||
224 | |||
225 | static struct platform_pwm_backlight_data zoom_backlight_data = { | ||
226 | .pwm_id = 1, | ||
227 | .max_brightness = 127, | ||
228 | .dft_brightness = 127, | ||
229 | .pwm_period_ns = 7812500, | ||
230 | }; | ||
231 | |||
232 | static struct platform_device zoom_backlight_pwm = { | ||
233 | .name = "pwm-backlight", | ||
234 | .id = -1, | ||
235 | .dev = { | ||
236 | .platform_data = &zoom_backlight_data, | ||
237 | }, | ||
238 | }; | ||
239 | |||
240 | static struct platform_device *zoom_devices[] __initdata = { | ||
241 | &omap_vwlan_device, | ||
242 | &zoom_leds_pwm, | ||
243 | &zoom_backlight_pwm, | ||
244 | }; | ||
245 | |||
246 | static struct wl12xx_platform_data omap_zoom_wlan_data __initdata = { | ||
247 | .board_ref_clock = WL12XX_REFCLOCK_26, /* 26 MHz */ | ||
248 | }; | ||
249 | |||
250 | static struct omap2_hsmmc_info mmc[] = { | ||
251 | { | ||
252 | .name = "external", | ||
253 | .mmc = 1, | ||
254 | .caps = MMC_CAP_4_BIT_DATA, | ||
255 | .gpio_wp = -EINVAL, | ||
256 | .power_saving = true, | ||
257 | .deferred = true, | ||
258 | }, | ||
259 | { | ||
260 | .name = "internal", | ||
261 | .mmc = 2, | ||
262 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, | ||
263 | .gpio_cd = -EINVAL, | ||
264 | .gpio_wp = -EINVAL, | ||
265 | .nonremovable = true, | ||
266 | .power_saving = true, | ||
267 | }, | ||
268 | { | ||
269 | .name = "wl1271", | ||
270 | .mmc = 3, | ||
271 | .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, | ||
272 | .gpio_wp = -EINVAL, | ||
273 | .gpio_cd = -EINVAL, | ||
274 | .nonremovable = true, | ||
275 | }, | ||
276 | {} /* Terminator */ | ||
277 | }; | ||
278 | |||
279 | static struct omap_tw4030_pdata omap_twl4030_audio_data = { | ||
280 | .voice_connected = true, | ||
281 | .custom_routing = true, | ||
282 | |||
283 | .has_hs = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, | ||
284 | .has_hf = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, | ||
285 | |||
286 | .has_mainmic = true, | ||
287 | .has_submic = true, | ||
288 | .has_hsmic = true, | ||
289 | .has_linein = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, | ||
290 | }; | ||
291 | |||
292 | static int zoom_twl_gpio_setup(struct device *dev, | ||
293 | unsigned gpio, unsigned ngpio) | ||
294 | { | ||
295 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | ||
296 | mmc[0].gpio_cd = gpio + 0; | ||
297 | omap_hsmmc_late_init(mmc); | ||
298 | |||
299 | /* Audio setup */ | ||
300 | omap_twl4030_audio_data.jack_detect = gpio + 2; | ||
301 | omap_twl4030_audio_init("Zoom2", &omap_twl4030_audio_data); | ||
302 | |||
303 | return 0; | ||
304 | } | ||
305 | |||
306 | static struct twl4030_gpio_platform_data zoom_gpio_data = { | ||
307 | .setup = zoom_twl_gpio_setup, | ||
308 | }; | ||
309 | |||
310 | static struct twl4030_platform_data zoom_twldata = { | ||
311 | /* platform_data for children goes here */ | ||
312 | .gpio = &zoom_gpio_data, | ||
313 | .keypad = &zoom_kp_twl4030_data, | ||
314 | .vmmc1 = &zoom_vmmc1, | ||
315 | .vmmc2 = &zoom_vmmc2, | ||
316 | .vsim = &zoom_vsim, | ||
317 | }; | ||
318 | |||
319 | static int __init omap_i2c_init(void) | ||
320 | { | ||
321 | omap3_pmic_get_config(&zoom_twldata, | ||
322 | TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_BCI | | ||
323 | TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, | ||
324 | TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); | ||
325 | |||
326 | if (machine_is_omap_zoom2()) | ||
327 | zoom_twldata.audio->codec->ramp_delay_value = 3; /* 161 ms */ | ||
328 | |||
329 | omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata); | ||
330 | omap_register_i2c_bus(2, 400, NULL, 0); | ||
331 | omap_register_i2c_bus(3, 400, NULL, 0); | ||
332 | return 0; | ||
333 | } | ||
334 | |||
335 | static void enable_board_wakeup_source(void) | ||
336 | { | ||
337 | /* T2 interrupt line (keypad) */ | ||
338 | omap_mux_init_signal("sys_nirq", | ||
339 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | ||
340 | } | ||
341 | |||
342 | void __init zoom_peripherals_init(void) | ||
343 | { | ||
344 | int ret; | ||
345 | |||
346 | omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO); | ||
347 | ret = wl12xx_set_platform_data(&omap_zoom_wlan_data); | ||
348 | |||
349 | if (ret) | ||
350 | pr_err("error setting wl12xx data: %d\n", ret); | ||
351 | |||
352 | omap_hsmmc_init(mmc); | ||
353 | omap_i2c_init(); | ||
354 | pwm_add_table(zoom_pwm_lookup, ARRAY_SIZE(zoom_pwm_lookup)); | ||
355 | platform_add_devices(zoom_devices, ARRAY_SIZE(zoom_devices)); | ||
356 | usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); | ||
357 | usb_musb_init(NULL); | ||
358 | enable_board_wakeup_source(); | ||
359 | omap_serial_init(); | ||
360 | } | ||
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c deleted file mode 100644 index 1a3dd865d8eb..000000000000 --- a/arch/arm/mach-omap2/board-zoom.c +++ /dev/null | |||
@@ -1,159 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2009-2010 Texas Instruments Inc. | ||
3 | * Mikkel Christensen <mlc@ti.com> | ||
4 | * Felipe Balbi <balbi@ti.com> | ||
5 | * | ||
6 | * Modified from mach-omap2/board-ldp.c | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/platform_device.h> | ||
16 | #include <linux/input.h> | ||
17 | #include <linux/gpio.h> | ||
18 | #include <linux/i2c/twl.h> | ||
19 | #include <linux/mtd/nand.h> | ||
20 | |||
21 | #include <asm/mach-types.h> | ||
22 | #include <asm/mach/arch.h> | ||
23 | |||
24 | #include "common.h" | ||
25 | |||
26 | #include "board-zoom.h" | ||
27 | |||
28 | #include "board-flash.h" | ||
29 | #include "mux.h" | ||
30 | #include "sdram-micron-mt46h32m32lf-6.h" | ||
31 | #include "sdram-hynix-h8mbx00u0mer-0em.h" | ||
32 | |||
33 | #define ZOOM3_EHCI_RESET_GPIO 64 | ||
34 | |||
35 | #ifdef CONFIG_OMAP_MUX | ||
36 | static struct omap_board_mux board_mux[] __initdata = { | ||
37 | /* WLAN IRQ - GPIO 162 */ | ||
38 | OMAP3_MUX(MCBSP1_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT), | ||
39 | /* WLAN POWER ENABLE - GPIO 101 */ | ||
40 | OMAP3_MUX(CAM_D2, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), | ||
41 | /* WLAN SDIO: MMC3 CMD */ | ||
42 | OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE3 | OMAP_PIN_INPUT_PULLUP), | ||
43 | /* WLAN SDIO: MMC3 CLK */ | ||
44 | OMAP3_MUX(ETK_CLK, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), | ||
45 | /* WLAN SDIO: MMC3 DAT[0-3] */ | ||
46 | OMAP3_MUX(ETK_D3, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), | ||
47 | OMAP3_MUX(ETK_D4, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), | ||
48 | OMAP3_MUX(ETK_D5, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), | ||
49 | OMAP3_MUX(ETK_D6, OMAP_MUX_MODE2 | OMAP_PIN_INPUT_PULLUP), | ||
50 | { .reg_offset = OMAP_MUX_TERMINATOR }, | ||
51 | }; | ||
52 | #endif | ||
53 | |||
54 | static struct mtd_partition zoom_nand_partitions[] = { | ||
55 | /* All the partition sizes are listed in terms of NAND block size */ | ||
56 | { | ||
57 | .name = "X-Loader-NAND", | ||
58 | .offset = 0, | ||
59 | .size = 4 * (64 * 2048), /* 512KB, 0x80000 */ | ||
60 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
61 | }, | ||
62 | { | ||
63 | .name = "U-Boot-NAND", | ||
64 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x80000 */ | ||
65 | .size = 10 * (64 * 2048), /* 1.25MB, 0x140000 */ | ||
66 | .mask_flags = MTD_WRITEABLE, /* force read-only */ | ||
67 | }, | ||
68 | { | ||
69 | .name = "Boot Env-NAND", | ||
70 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x1c0000 */ | ||
71 | .size = 2 * (64 * 2048), /* 256KB, 0x40000 */ | ||
72 | }, | ||
73 | { | ||
74 | .name = "Kernel-NAND", | ||
75 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x0200000*/ | ||
76 | .size = 240 * (64 * 2048), /* 30M, 0x1E00000 */ | ||
77 | }, | ||
78 | { | ||
79 | .name = "system", | ||
80 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x2000000 */ | ||
81 | .size = 3328 * (64 * 2048), /* 416M, 0x1A000000 */ | ||
82 | }, | ||
83 | { | ||
84 | .name = "userdata", | ||
85 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x1C000000*/ | ||
86 | .size = 256 * (64 * 2048), /* 32M, 0x2000000 */ | ||
87 | }, | ||
88 | { | ||
89 | .name = "cache", | ||
90 | .offset = MTDPART_OFS_APPEND, /* Offset = 0x1E000000*/ | ||
91 | .size = 256 * (64 * 2048), /* 32M, 0x2000000 */ | ||
92 | }, | ||
93 | }; | ||
94 | |||
95 | static struct usbhs_phy_data phy_data[] __initdata = { | ||
96 | { | ||
97 | .port = 2, | ||
98 | .reset_gpio = ZOOM3_EHCI_RESET_GPIO, | ||
99 | .vcc_gpio = -EINVAL, | ||
100 | }, | ||
101 | }; | ||
102 | |||
103 | static struct usbhs_omap_platform_data usbhs_bdata __initdata = { | ||
104 | .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY, | ||
105 | }; | ||
106 | |||
107 | static void __init omap_zoom_init(void) | ||
108 | { | ||
109 | if (machine_is_omap_zoom2()) { | ||
110 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | ||
111 | } else if (machine_is_omap_zoom3()) { | ||
112 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); | ||
113 | omap_mux_init_gpio(ZOOM3_EHCI_RESET_GPIO, OMAP_PIN_OUTPUT); | ||
114 | |||
115 | usbhs_init_phys(phy_data, ARRAY_SIZE(phy_data)); | ||
116 | usbhs_init(&usbhs_bdata); | ||
117 | } | ||
118 | |||
119 | board_nand_init(zoom_nand_partitions, | ||
120 | ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS, | ||
121 | NAND_BUSWIDTH_16, nand_default_timings); | ||
122 | zoom_debugboard_init(); | ||
123 | zoom_peripherals_init(); | ||
124 | |||
125 | if (machine_is_omap_zoom2()) | ||
126 | omap_sdrc_init(mt46h32m32lf6_sdrc_params, | ||
127 | mt46h32m32lf6_sdrc_params); | ||
128 | else if (machine_is_omap_zoom3()) | ||
129 | omap_sdrc_init(h8mbx00u0mer0em_sdrc_params, | ||
130 | h8mbx00u0mer0em_sdrc_params); | ||
131 | |||
132 | zoom_display_init(); | ||
133 | } | ||
134 | |||
135 | MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") | ||
136 | .atag_offset = 0x100, | ||
137 | .reserve = omap_reserve, | ||
138 | .map_io = omap3_map_io, | ||
139 | .init_early = omap3430_init_early, | ||
140 | .init_irq = omap3_init_irq, | ||
141 | .handle_irq = omap3_intc_handle_irq, | ||
142 | .init_machine = omap_zoom_init, | ||
143 | .init_late = omap3430_init_late, | ||
144 | .init_time = omap3_sync32k_timer_init, | ||
145 | .restart = omap3xxx_restart, | ||
146 | MACHINE_END | ||
147 | |||
148 | MACHINE_START(OMAP_ZOOM3, "OMAP Zoom3 board") | ||
149 | .atag_offset = 0x100, | ||
150 | .reserve = omap_reserve, | ||
151 | .map_io = omap3_map_io, | ||
152 | .init_early = omap3630_init_early, | ||
153 | .init_irq = omap3_init_irq, | ||
154 | .handle_irq = omap3_intc_handle_irq, | ||
155 | .init_machine = omap_zoom_init, | ||
156 | .init_late = omap3630_init_late, | ||
157 | .init_time = omap3_sync32k_timer_init, | ||
158 | .restart = omap3xxx_restart, | ||
159 | MACHINE_END | ||
diff --git a/arch/arm/mach-omap2/board-zoom.h b/arch/arm/mach-omap2/board-zoom.h deleted file mode 100644 index 2e9486940ead..000000000000 --- a/arch/arm/mach-omap2/board-zoom.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * Defines for zoom boards | ||
3 | */ | ||
4 | #include <video/omapdss.h> | ||
5 | |||
6 | #define ZOOM_NAND_CS 0 | ||
7 | |||
8 | extern int __init zoom_debugboard_init(void); | ||
9 | extern void __init zoom_peripherals_init(void); | ||
10 | extern void __init zoom_display_init(void); | ||
diff --git a/arch/arm/mach-omap2/gpmc-onenand.c b/arch/arm/mach-omap2/gpmc-onenand.c index 64b5a8346982..8b6876c98ce1 100644 --- a/arch/arm/mach-omap2/gpmc-onenand.c +++ b/arch/arm/mach-omap2/gpmc-onenand.c | |||
@@ -272,9 +272,19 @@ static int omap2_onenand_setup_async(void __iomem *onenand_base) | |||
272 | struct gpmc_timings t; | 272 | struct gpmc_timings t; |
273 | int ret; | 273 | int ret; |
274 | 274 | ||
275 | if (gpmc_onenand_data->of_node) | 275 | if (gpmc_onenand_data->of_node) { |
276 | gpmc_read_settings_dt(gpmc_onenand_data->of_node, | 276 | gpmc_read_settings_dt(gpmc_onenand_data->of_node, |
277 | &onenand_async); | 277 | &onenand_async); |
278 | if (onenand_async.sync_read || onenand_async.sync_write) { | ||
279 | if (onenand_async.sync_write) | ||
280 | gpmc_onenand_data->flags |= | ||
281 | ONENAND_SYNC_READWRITE; | ||
282 | else | ||
283 | gpmc_onenand_data->flags |= ONENAND_SYNC_READ; | ||
284 | onenand_async.sync_read = false; | ||
285 | onenand_async.sync_write = false; | ||
286 | } | ||
287 | } | ||
278 | 288 | ||
279 | omap2_onenand_set_async_mode(onenand_base); | 289 | omap2_onenand_set_async_mode(onenand_base); |
280 | 290 | ||
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 5d2080ef7923..16f78a990d04 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define OMAP_PULL_UP (1 << 4) | 28 | #define OMAP_PULL_UP (1 << 4) |
29 | #define OMAP_ALTELECTRICALSEL (1 << 5) | 29 | #define OMAP_ALTELECTRICALSEL (1 << 5) |
30 | 30 | ||
31 | /* 34xx specific mux bit defines */ | 31 | /* omap3/4/5 specific mux bit defines */ |
32 | #define OMAP_INPUT_EN (1 << 8) | 32 | #define OMAP_INPUT_EN (1 << 8) |
33 | #define OMAP_OFF_EN (1 << 9) | 33 | #define OMAP_OFF_EN (1 << 9) |
34 | #define OMAP_OFFOUT_EN (1 << 10) | 34 | #define OMAP_OFFOUT_EN (1 << 10) |
@@ -36,8 +36,6 @@ | |||
36 | #define OMAP_OFF_PULL_EN (1 << 12) | 36 | #define OMAP_OFF_PULL_EN (1 << 12) |
37 | #define OMAP_OFF_PULL_UP (1 << 13) | 37 | #define OMAP_OFF_PULL_UP (1 << 13) |
38 | #define OMAP_WAKEUP_EN (1 << 14) | 38 | #define OMAP_WAKEUP_EN (1 << 14) |
39 | |||
40 | /* 44xx specific mux bit defines */ | ||
41 | #define OMAP_WAKEUP_EVENT (1 << 15) | 39 | #define OMAP_WAKEUP_EVENT (1 << 15) |
42 | 40 | ||
43 | /* Active pin states */ | 41 | /* Active pin states */ |
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index fa74a0625da1..ead48fa5715e 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c | |||
@@ -628,7 +628,7 @@ void __init omap4_local_timer_init(void) | |||
628 | #endif /* CONFIG_HAVE_ARM_TWD */ | 628 | #endif /* CONFIG_HAVE_ARM_TWD */ |
629 | #endif /* CONFIG_ARCH_OMAP4 */ | 629 | #endif /* CONFIG_ARCH_OMAP4 */ |
630 | 630 | ||
631 | #ifdef CONFIG_SOC_OMAP5 | 631 | #if defined(CONFIG_SOC_OMAP5) || defined(CONFIG_SOC_DRA7XX) |
632 | void __init omap5_realtime_timer_init(void) | 632 | void __init omap5_realtime_timer_init(void) |
633 | { | 633 | { |
634 | omap4_sync32k_timer_init(); | 634 | omap4_sync32k_timer_init(); |
@@ -636,7 +636,7 @@ void __init omap5_realtime_timer_init(void) | |||
636 | 636 | ||
637 | clocksource_of_init(); | 637 | clocksource_of_init(); |
638 | } | 638 | } |
639 | #endif /* CONFIG_SOC_OMAP5 */ | 639 | #endif /* CONFIG_SOC_OMAP5 || CONFIG_SOC_DRA7XX */ |
640 | 640 | ||
641 | /** | 641 | /** |
642 | * omap_timer_init - build and register timer device with an | 642 | * omap_timer_init - build and register timer device with an |
diff --git a/arch/mips/include/asm/jump_label.h b/arch/mips/include/asm/jump_label.h index 4d6d77ed9b9d..e194f957ca8c 100644 --- a/arch/mips/include/asm/jump_label.h +++ b/arch/mips/include/asm/jump_label.h | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | static __always_inline bool arch_static_branch(struct static_key *key) | 23 | static __always_inline bool arch_static_branch(struct static_key *key) |
24 | { | 24 | { |
25 | asm goto("1:\tnop\n\t" | 25 | asm_volatile_goto("1:\tnop\n\t" |
26 | "nop\n\t" | 26 | "nop\n\t" |
27 | ".pushsection __jump_table, \"aw\"\n\t" | 27 | ".pushsection __jump_table, \"aw\"\n\t" |
28 | WORD_INSN " 1b, %l[l_yes], %0\n\t" | 28 | WORD_INSN " 1b, %l[l_yes], %0\n\t" |
diff --git a/arch/mips/kernel/octeon_switch.S b/arch/mips/kernel/octeon_switch.S index 4204d76af854..029e002a4ea0 100644 --- a/arch/mips/kernel/octeon_switch.S +++ b/arch/mips/kernel/octeon_switch.S | |||
@@ -73,7 +73,7 @@ | |||
73 | 3: | 73 | 3: |
74 | 74 | ||
75 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) | 75 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) |
76 | PTR_L t8, __stack_chk_guard | 76 | PTR_LA t8, __stack_chk_guard |
77 | LONG_L t9, TASK_STACK_CANARY(a1) | 77 | LONG_L t9, TASK_STACK_CANARY(a1) |
78 | LONG_S t9, 0(t8) | 78 | LONG_S t9, 0(t8) |
79 | #endif | 79 | #endif |
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 38af83f84c4a..20b7b040e76f 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S | |||
@@ -67,7 +67,7 @@ LEAF(resume) | |||
67 | 1: | 67 | 1: |
68 | 68 | ||
69 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) | 69 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) |
70 | PTR_L t8, __stack_chk_guard | 70 | PTR_LA t8, __stack_chk_guard |
71 | LONG_L t9, TASK_STACK_CANARY(a1) | 71 | LONG_L t9, TASK_STACK_CANARY(a1) |
72 | LONG_S t9, 0(t8) | 72 | LONG_S t9, 0(t8) |
73 | #endif | 73 | #endif |
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index 921238a6bd26..078de5eaca8f 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S | |||
@@ -69,7 +69,7 @@ | |||
69 | 1: | 69 | 1: |
70 | 70 | ||
71 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) | 71 | #if defined(CONFIG_CC_STACKPROTECTOR) && !defined(CONFIG_SMP) |
72 | PTR_L t8, __stack_chk_guard | 72 | PTR_LA t8, __stack_chk_guard |
73 | LONG_L t9, TASK_STACK_CANARY(a1) | 73 | LONG_L t9, TASK_STACK_CANARY(a1) |
74 | LONG_S t9, 0(t8) | 74 | LONG_S t9, 0(t8) |
75 | #endif | 75 | #endif |
diff --git a/arch/parisc/include/asm/traps.h b/arch/parisc/include/asm/traps.h index 1945f995f2df..4736020ba5ea 100644 --- a/arch/parisc/include/asm/traps.h +++ b/arch/parisc/include/asm/traps.h | |||
@@ -6,7 +6,7 @@ struct pt_regs; | |||
6 | 6 | ||
7 | /* traps.c */ | 7 | /* traps.c */ |
8 | void parisc_terminate(char *msg, struct pt_regs *regs, | 8 | void parisc_terminate(char *msg, struct pt_regs *regs, |
9 | int code, unsigned long offset); | 9 | int code, unsigned long offset) __noreturn __cold; |
10 | 10 | ||
11 | /* mm/fault.c */ | 11 | /* mm/fault.c */ |
12 | void do_page_fault(struct pt_regs *regs, unsigned long code, | 12 | void do_page_fault(struct pt_regs *regs, unsigned long code, |
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c index c035673209f7..b521c0adf4ec 100644 --- a/arch/parisc/kernel/cache.c +++ b/arch/parisc/kernel/cache.c | |||
@@ -602,6 +602,7 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long | |||
602 | __flush_cache_page(vma, vmaddr, PFN_PHYS(pfn)); | 602 | __flush_cache_page(vma, vmaddr, PFN_PHYS(pfn)); |
603 | } | 603 | } |
604 | } | 604 | } |
605 | EXPORT_SYMBOL_GPL(flush_cache_page); | ||
605 | 606 | ||
606 | #ifdef CONFIG_PARISC_TMPALIAS | 607 | #ifdef CONFIG_PARISC_TMPALIAS |
607 | 608 | ||
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index 8a252f2d6c08..2b96602e812f 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c | |||
@@ -72,7 +72,6 @@ enum ipi_message_type { | |||
72 | IPI_NOP=0, | 72 | IPI_NOP=0, |
73 | IPI_RESCHEDULE=1, | 73 | IPI_RESCHEDULE=1, |
74 | IPI_CALL_FUNC, | 74 | IPI_CALL_FUNC, |
75 | IPI_CALL_FUNC_SINGLE, | ||
76 | IPI_CPU_START, | 75 | IPI_CPU_START, |
77 | IPI_CPU_STOP, | 76 | IPI_CPU_STOP, |
78 | IPI_CPU_TEST | 77 | IPI_CPU_TEST |
@@ -164,11 +163,6 @@ ipi_interrupt(int irq, void *dev_id) | |||
164 | generic_smp_call_function_interrupt(); | 163 | generic_smp_call_function_interrupt(); |
165 | break; | 164 | break; |
166 | 165 | ||
167 | case IPI_CALL_FUNC_SINGLE: | ||
168 | smp_debug(100, KERN_DEBUG "CPU%d IPI_CALL_FUNC_SINGLE\n", this_cpu); | ||
169 | generic_smp_call_function_single_interrupt(); | ||
170 | break; | ||
171 | |||
172 | case IPI_CPU_START: | 166 | case IPI_CPU_START: |
173 | smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_START\n", this_cpu); | 167 | smp_debug(100, KERN_DEBUG "CPU%d IPI_CPU_START\n", this_cpu); |
174 | break; | 168 | break; |
@@ -260,7 +254,7 @@ void arch_send_call_function_ipi_mask(const struct cpumask *mask) | |||
260 | 254 | ||
261 | void arch_send_call_function_single_ipi(int cpu) | 255 | void arch_send_call_function_single_ipi(int cpu) |
262 | { | 256 | { |
263 | send_IPI_single(cpu, IPI_CALL_FUNC_SINGLE); | 257 | send_IPI_single(cpu, IPI_CALL_FUNC); |
264 | } | 258 | } |
265 | 259 | ||
266 | /* | 260 | /* |
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c index 04e47c6a4562..1cd1d0c83b6d 100644 --- a/arch/parisc/kernel/traps.c +++ b/arch/parisc/kernel/traps.c | |||
@@ -291,11 +291,6 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err) | |||
291 | do_exit(SIGSEGV); | 291 | do_exit(SIGSEGV); |
292 | } | 292 | } |
293 | 293 | ||
294 | int syscall_ipi(int (*syscall) (struct pt_regs *), struct pt_regs *regs) | ||
295 | { | ||
296 | return syscall(regs); | ||
297 | } | ||
298 | |||
299 | /* gdb uses break 4,8 */ | 294 | /* gdb uses break 4,8 */ |
300 | #define GDB_BREAK_INSN 0x10004 | 295 | #define GDB_BREAK_INSN 0x10004 |
301 | static void handle_gdb_break(struct pt_regs *regs, int wot) | 296 | static void handle_gdb_break(struct pt_regs *regs, int wot) |
@@ -805,14 +800,14 @@ void notrace handle_interruption(int code, struct pt_regs *regs) | |||
805 | else { | 800 | else { |
806 | 801 | ||
807 | /* | 802 | /* |
808 | * The kernel should never fault on its own address space. | 803 | * The kernel should never fault on its own address space, |
804 | * unless pagefault_disable() was called before. | ||
809 | */ | 805 | */ |
810 | 806 | ||
811 | if (fault_space == 0) | 807 | if (fault_space == 0 && !in_atomic()) |
812 | { | 808 | { |
813 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC); | 809 | pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC); |
814 | parisc_terminate("Kernel Fault", regs, code, fault_address); | 810 | parisc_terminate("Kernel Fault", regs, code, fault_address); |
815 | |||
816 | } | 811 | } |
817 | } | 812 | } |
818 | 813 | ||
diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c index ac4370b1ca40..b5507ec06b84 100644 --- a/arch/parisc/lib/memcpy.c +++ b/arch/parisc/lib/memcpy.c | |||
@@ -56,7 +56,7 @@ | |||
56 | #ifdef __KERNEL__ | 56 | #ifdef __KERNEL__ |
57 | #include <linux/module.h> | 57 | #include <linux/module.h> |
58 | #include <linux/compiler.h> | 58 | #include <linux/compiler.h> |
59 | #include <asm/uaccess.h> | 59 | #include <linux/uaccess.h> |
60 | #define s_space "%%sr1" | 60 | #define s_space "%%sr1" |
61 | #define d_space "%%sr2" | 61 | #define d_space "%%sr2" |
62 | #else | 62 | #else |
@@ -524,4 +524,17 @@ EXPORT_SYMBOL(copy_to_user); | |||
524 | EXPORT_SYMBOL(copy_from_user); | 524 | EXPORT_SYMBOL(copy_from_user); |
525 | EXPORT_SYMBOL(copy_in_user); | 525 | EXPORT_SYMBOL(copy_in_user); |
526 | EXPORT_SYMBOL(memcpy); | 526 | EXPORT_SYMBOL(memcpy); |
527 | |||
528 | long probe_kernel_read(void *dst, const void *src, size_t size) | ||
529 | { | ||
530 | unsigned long addr = (unsigned long)src; | ||
531 | |||
532 | if (size < 0 || addr < PAGE_SIZE) | ||
533 | return -EFAULT; | ||
534 | |||
535 | /* check for I/O space F_EXTEND(0xfff00000) access as well? */ | ||
536 | |||
537 | return __probe_kernel_read(dst, src, size); | ||
538 | } | ||
539 | |||
527 | #endif | 540 | #endif |
diff --git a/arch/parisc/mm/fault.c b/arch/parisc/mm/fault.c index 00c0ed333a3d..0293588d5b8c 100644 --- a/arch/parisc/mm/fault.c +++ b/arch/parisc/mm/fault.c | |||
@@ -171,20 +171,25 @@ void do_page_fault(struct pt_regs *regs, unsigned long code, | |||
171 | unsigned long address) | 171 | unsigned long address) |
172 | { | 172 | { |
173 | struct vm_area_struct *vma, *prev_vma; | 173 | struct vm_area_struct *vma, *prev_vma; |
174 | struct task_struct *tsk = current; | 174 | struct task_struct *tsk; |
175 | struct mm_struct *mm = tsk->mm; | 175 | struct mm_struct *mm; |
176 | unsigned long acc_type; | 176 | unsigned long acc_type; |
177 | int fault; | 177 | int fault; |
178 | unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; | 178 | unsigned int flags; |
179 | 179 | ||
180 | if (in_atomic() || !mm) | 180 | if (in_atomic()) |
181 | goto no_context; | 181 | goto no_context; |
182 | 182 | ||
183 | tsk = current; | ||
184 | mm = tsk->mm; | ||
185 | if (!mm) | ||
186 | goto no_context; | ||
187 | |||
188 | flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; | ||
183 | if (user_mode(regs)) | 189 | if (user_mode(regs)) |
184 | flags |= FAULT_FLAG_USER; | 190 | flags |= FAULT_FLAG_USER; |
185 | 191 | ||
186 | acc_type = parisc_acctyp(code, regs->iir); | 192 | acc_type = parisc_acctyp(code, regs->iir); |
187 | |||
188 | if (acc_type & VM_WRITE) | 193 | if (acc_type & VM_WRITE) |
189 | flags |= FAULT_FLAG_WRITE; | 194 | flags |= FAULT_FLAG_WRITE; |
190 | retry: | 195 | retry: |
diff --git a/arch/powerpc/include/asm/jump_label.h b/arch/powerpc/include/asm/jump_label.h index ae098c438f00..f016bb699b5f 100644 --- a/arch/powerpc/include/asm/jump_label.h +++ b/arch/powerpc/include/asm/jump_label.h | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | static __always_inline bool arch_static_branch(struct static_key *key) | 20 | static __always_inline bool arch_static_branch(struct static_key *key) |
21 | { | 21 | { |
22 | asm goto("1:\n\t" | 22 | asm_volatile_goto("1:\n\t" |
23 | "nop\n\t" | 23 | "nop\n\t" |
24 | ".pushsection __jump_table, \"aw\"\n\t" | 24 | ".pushsection __jump_table, \"aw\"\n\t" |
25 | JUMP_ENTRY_TYPE "1b, %l[l_yes], %c0\n\t" | 25 | JUMP_ENTRY_TYPE "1b, %l[l_yes], %c0\n\t" |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 57d286a78f86..c7cb8c232d2f 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -495,14 +495,15 @@ void __do_irq(struct pt_regs *regs) | |||
495 | void do_IRQ(struct pt_regs *regs) | 495 | void do_IRQ(struct pt_regs *regs) |
496 | { | 496 | { |
497 | struct pt_regs *old_regs = set_irq_regs(regs); | 497 | struct pt_regs *old_regs = set_irq_regs(regs); |
498 | struct thread_info *curtp, *irqtp; | 498 | struct thread_info *curtp, *irqtp, *sirqtp; |
499 | 499 | ||
500 | /* Switch to the irq stack to handle this */ | 500 | /* Switch to the irq stack to handle this */ |
501 | curtp = current_thread_info(); | 501 | curtp = current_thread_info(); |
502 | irqtp = hardirq_ctx[raw_smp_processor_id()]; | 502 | irqtp = hardirq_ctx[raw_smp_processor_id()]; |
503 | sirqtp = softirq_ctx[raw_smp_processor_id()]; | ||
503 | 504 | ||
504 | /* Already there ? */ | 505 | /* Already there ? */ |
505 | if (unlikely(curtp == irqtp)) { | 506 | if (unlikely(curtp == irqtp || curtp == sirqtp)) { |
506 | __do_irq(regs); | 507 | __do_irq(regs); |
507 | set_irq_regs(old_regs); | 508 | set_irq_regs(old_regs); |
508 | return; | 509 | return; |
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 294b7af28cdd..c71103b8a748 100644 --- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S +++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S | |||
@@ -1066,7 +1066,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206) | |||
1066 | BEGIN_FTR_SECTION | 1066 | BEGIN_FTR_SECTION |
1067 | mfspr r8, SPRN_DSCR | 1067 | mfspr r8, SPRN_DSCR |
1068 | ld r7, HSTATE_DSCR(r13) | 1068 | ld r7, HSTATE_DSCR(r13) |
1069 | std r8, VCPU_DSCR(r7) | 1069 | std r8, VCPU_DSCR(r9) |
1070 | mtspr SPRN_DSCR, r7 | 1070 | mtspr SPRN_DSCR, r7 |
1071 | END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206) | 1071 | END_FTR_SECTION_IFSET(CPU_FTR_ARCH_206) |
1072 | 1072 | ||
diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index 1c6a9d729df4..c65593abae8e 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm/e500_mmu_host.c | |||
@@ -332,6 +332,13 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, | |||
332 | unsigned long hva; | 332 | unsigned long hva; |
333 | int pfnmap = 0; | 333 | int pfnmap = 0; |
334 | int tsize = BOOK3E_PAGESZ_4K; | 334 | int tsize = BOOK3E_PAGESZ_4K; |
335 | int ret = 0; | ||
336 | unsigned long mmu_seq; | ||
337 | struct kvm *kvm = vcpu_e500->vcpu.kvm; | ||
338 | |||
339 | /* used to check for invalidations in progress */ | ||
340 | mmu_seq = kvm->mmu_notifier_seq; | ||
341 | smp_rmb(); | ||
335 | 342 | ||
336 | /* | 343 | /* |
337 | * Translate guest physical to true physical, acquiring | 344 | * Translate guest physical to true physical, acquiring |
@@ -449,6 +456,12 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, | |||
449 | gvaddr &= ~((tsize_pages << PAGE_SHIFT) - 1); | 456 | gvaddr &= ~((tsize_pages << PAGE_SHIFT) - 1); |
450 | } | 457 | } |
451 | 458 | ||
459 | spin_lock(&kvm->mmu_lock); | ||
460 | if (mmu_notifier_retry(kvm, mmu_seq)) { | ||
461 | ret = -EAGAIN; | ||
462 | goto out; | ||
463 | } | ||
464 | |||
452 | kvmppc_e500_ref_setup(ref, gtlbe, pfn); | 465 | kvmppc_e500_ref_setup(ref, gtlbe, pfn); |
453 | 466 | ||
454 | kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize, | 467 | kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize, |
@@ -457,10 +470,13 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500, | |||
457 | /* Clear i-cache for new pages */ | 470 | /* Clear i-cache for new pages */ |
458 | kvmppc_mmu_flush_icache(pfn); | 471 | kvmppc_mmu_flush_icache(pfn); |
459 | 472 | ||
473 | out: | ||
474 | spin_unlock(&kvm->mmu_lock); | ||
475 | |||
460 | /* Drop refcount on page, so that mmu notifiers can clear it */ | 476 | /* Drop refcount on page, so that mmu notifiers can clear it */ |
461 | kvm_release_pfn_clean(pfn); | 477 | kvm_release_pfn_clean(pfn); |
462 | 478 | ||
463 | return 0; | 479 | return ret; |
464 | } | 480 | } |
465 | 481 | ||
466 | /* XXX only map the one-one case, for now use TLB0 */ | 482 | /* XXX only map the one-one case, for now use TLB0 */ |
diff --git a/arch/s390/include/asm/jump_label.h b/arch/s390/include/asm/jump_label.h index 6c32190dc73e..346b1c85ffb4 100644 --- a/arch/s390/include/asm/jump_label.h +++ b/arch/s390/include/asm/jump_label.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | static __always_inline bool arch_static_branch(struct static_key *key) | 16 | static __always_inline bool arch_static_branch(struct static_key *key) |
17 | { | 17 | { |
18 | asm goto("0: brcl 0,0\n" | 18 | asm_volatile_goto("0: brcl 0,0\n" |
19 | ".pushsection __jump_table, \"aw\"\n" | 19 | ".pushsection __jump_table, \"aw\"\n" |
20 | ASM_ALIGN "\n" | 20 | ASM_ALIGN "\n" |
21 | ASM_PTR " 0b, %l[label], %0\n" | 21 | ASM_PTR " 0b, %l[label], %0\n" |
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c index c84f33d51f7b..7dd21720e5b0 100644 --- a/arch/s390/kernel/crash_dump.c +++ b/arch/s390/kernel/crash_dump.c | |||
@@ -40,28 +40,26 @@ static inline void *load_real_addr(void *addr) | |||
40 | } | 40 | } |
41 | 41 | ||
42 | /* | 42 | /* |
43 | * Copy up to one page to vmalloc or real memory | 43 | * Copy real to virtual or real memory |
44 | */ | 44 | */ |
45 | static ssize_t copy_page_real(void *buf, void *src, size_t csize) | 45 | static int copy_from_realmem(void *dest, void *src, size_t count) |
46 | { | 46 | { |
47 | size_t size; | 47 | unsigned long size; |
48 | int rc; | ||
48 | 49 | ||
49 | if (is_vmalloc_addr(buf)) { | 50 | if (!count) |
50 | BUG_ON(csize >= PAGE_SIZE); | 51 | return 0; |
51 | /* If buf is not page aligned, copy first part */ | 52 | if (!is_vmalloc_or_module_addr(dest)) |
52 | size = min(roundup(__pa(buf), PAGE_SIZE) - __pa(buf), csize); | 53 | return memcpy_real(dest, src, count); |
53 | if (size) { | 54 | do { |
54 | if (memcpy_real(load_real_addr(buf), src, size)) | 55 | size = min(count, PAGE_SIZE - (__pa(dest) & ~PAGE_MASK)); |
55 | return -EFAULT; | 56 | if (memcpy_real(load_real_addr(dest), src, size)) |
56 | buf += size; | 57 | return -EFAULT; |
57 | src += size; | 58 | count -= size; |
58 | } | 59 | dest += size; |
59 | /* Copy second part */ | 60 | src += size; |
60 | size = csize - size; | 61 | } while (count); |
61 | return (size) ? memcpy_real(load_real_addr(buf), src, size) : 0; | 62 | return 0; |
62 | } else { | ||
63 | return memcpy_real(buf, src, csize); | ||
64 | } | ||
65 | } | 63 | } |
66 | 64 | ||
67 | /* | 65 | /* |
@@ -114,7 +112,7 @@ static ssize_t copy_oldmem_page_kdump(char *buf, size_t csize, | |||
114 | rc = copy_to_user_real((void __force __user *) buf, | 112 | rc = copy_to_user_real((void __force __user *) buf, |
115 | (void *) src, csize); | 113 | (void *) src, csize); |
116 | else | 114 | else |
117 | rc = copy_page_real(buf, (void *) src, csize); | 115 | rc = copy_from_realmem(buf, (void *) src, csize); |
118 | return (rc == 0) ? rc : csize; | 116 | return (rc == 0) ? rc : csize; |
119 | } | 117 | } |
120 | 118 | ||
@@ -210,7 +208,7 @@ int copy_from_oldmem(void *dest, void *src, size_t count) | |||
210 | if (OLDMEM_BASE) { | 208 | if (OLDMEM_BASE) { |
211 | if ((unsigned long) src < OLDMEM_SIZE) { | 209 | if ((unsigned long) src < OLDMEM_SIZE) { |
212 | copied = min(count, OLDMEM_SIZE - (unsigned long) src); | 210 | copied = min(count, OLDMEM_SIZE - (unsigned long) src); |
213 | rc = memcpy_real(dest, src + OLDMEM_BASE, copied); | 211 | rc = copy_from_realmem(dest, src + OLDMEM_BASE, copied); |
214 | if (rc) | 212 | if (rc) |
215 | return rc; | 213 | return rc; |
216 | } | 214 | } |
@@ -223,7 +221,7 @@ int copy_from_oldmem(void *dest, void *src, size_t count) | |||
223 | return rc; | 221 | return rc; |
224 | } | 222 | } |
225 | } | 223 | } |
226 | return memcpy_real(dest + copied, src + copied, count - copied); | 224 | return copy_from_realmem(dest + copied, src + copied, count - copied); |
227 | } | 225 | } |
228 | 226 | ||
229 | /* | 227 | /* |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index cc30d1fb000c..0dc2b6d0a1ec 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -266,6 +266,7 @@ sysc_sigpending: | |||
266 | tm __TI_flags+3(%r12),_TIF_SYSCALL | 266 | tm __TI_flags+3(%r12),_TIF_SYSCALL |
267 | jno sysc_return | 267 | jno sysc_return |
268 | lm %r2,%r7,__PT_R2(%r11) # load svc arguments | 268 | lm %r2,%r7,__PT_R2(%r11) # load svc arguments |
269 | l %r10,__TI_sysc_table(%r12) # 31 bit system call table | ||
269 | xr %r8,%r8 # svc 0 returns -ENOSYS | 270 | xr %r8,%r8 # svc 0 returns -ENOSYS |
270 | clc __PT_INT_CODE+2(2,%r11),BASED(.Lnr_syscalls+2) | 271 | clc __PT_INT_CODE+2(2,%r11),BASED(.Lnr_syscalls+2) |
271 | jnl sysc_nr_ok # invalid svc number -> do svc 0 | 272 | jnl sysc_nr_ok # invalid svc number -> do svc 0 |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 2b2188b97c6a..e5b43c97a834 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -297,6 +297,7 @@ sysc_sigpending: | |||
297 | tm __TI_flags+7(%r12),_TIF_SYSCALL | 297 | tm __TI_flags+7(%r12),_TIF_SYSCALL |
298 | jno sysc_return | 298 | jno sysc_return |
299 | lmg %r2,%r7,__PT_R2(%r11) # load svc arguments | 299 | lmg %r2,%r7,__PT_R2(%r11) # load svc arguments |
300 | lg %r10,__TI_sysc_table(%r12) # address of system call table | ||
300 | lghi %r8,0 # svc 0 returns -ENOSYS | 301 | lghi %r8,0 # svc 0 returns -ENOSYS |
301 | llgh %r1,__PT_INT_CODE+2(%r11) # load new svc number | 302 | llgh %r1,__PT_INT_CODE+2(%r11) # load new svc number |
302 | cghi %r1,NR_syscalls | 303 | cghi %r1,NR_syscalls |
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 0ce9fb245034..d86e64eddb42 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c | |||
@@ -67,6 +67,11 @@ static int __kprobes is_prohibited_opcode(kprobe_opcode_t *insn) | |||
67 | case 0xac: /* stnsm */ | 67 | case 0xac: /* stnsm */ |
68 | case 0xad: /* stosm */ | 68 | case 0xad: /* stosm */ |
69 | return -EINVAL; | 69 | return -EINVAL; |
70 | case 0xc6: | ||
71 | switch (insn[0] & 0x0f) { | ||
72 | case 0x00: /* exrl */ | ||
73 | return -EINVAL; | ||
74 | } | ||
70 | } | 75 | } |
71 | switch (insn[0]) { | 76 | switch (insn[0]) { |
72 | case 0x0101: /* pr */ | 77 | case 0x0101: /* pr */ |
@@ -180,7 +185,6 @@ static int __kprobes is_insn_relative_long(kprobe_opcode_t *insn) | |||
180 | break; | 185 | break; |
181 | case 0xc6: | 186 | case 0xc6: |
182 | switch (insn[0] & 0x0f) { | 187 | switch (insn[0] & 0x0f) { |
183 | case 0x00: /* exrl */ | ||
184 | case 0x02: /* pfdrl */ | 188 | case 0x02: /* pfdrl */ |
185 | case 0x04: /* cghrl */ | 189 | case 0x04: /* cghrl */ |
186 | case 0x05: /* chrl */ | 190 | case 0x05: /* chrl */ |
diff --git a/arch/sparc/include/asm/jump_label.h b/arch/sparc/include/asm/jump_label.h index 5080d16a832f..ec2e2e2aba7d 100644 --- a/arch/sparc/include/asm/jump_label.h +++ b/arch/sparc/include/asm/jump_label.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | static __always_inline bool arch_static_branch(struct static_key *key) | 10 | static __always_inline bool arch_static_branch(struct static_key *key) |
11 | { | 11 | { |
12 | asm goto("1:\n\t" | 12 | asm_volatile_goto("1:\n\t" |
13 | "nop\n\t" | 13 | "nop\n\t" |
14 | "nop\n\t" | 14 | "nop\n\t" |
15 | ".pushsection __jump_table, \"aw\"\n\t" | 15 | ".pushsection __jump_table, \"aw\"\n\t" |
diff --git a/arch/tile/include/asm/atomic.h b/arch/tile/include/asm/atomic.h index d385eaadece7..709798460763 100644 --- a/arch/tile/include/asm/atomic.h +++ b/arch/tile/include/asm/atomic.h | |||
@@ -166,7 +166,7 @@ static inline int atomic_cmpxchg(atomic_t *v, int o, int n) | |||
166 | * | 166 | * |
167 | * Atomically sets @v to @i and returns old @v | 167 | * Atomically sets @v to @i and returns old @v |
168 | */ | 168 | */ |
169 | static inline u64 atomic64_xchg(atomic64_t *v, u64 n) | 169 | static inline long long atomic64_xchg(atomic64_t *v, long long n) |
170 | { | 170 | { |
171 | return xchg64(&v->counter, n); | 171 | return xchg64(&v->counter, n); |
172 | } | 172 | } |
@@ -180,7 +180,8 @@ static inline u64 atomic64_xchg(atomic64_t *v, u64 n) | |||
180 | * Atomically checks if @v holds @o and replaces it with @n if so. | 180 | * Atomically checks if @v holds @o and replaces it with @n if so. |
181 | * Returns the old value at @v. | 181 | * Returns the old value at @v. |
182 | */ | 182 | */ |
183 | static inline u64 atomic64_cmpxchg(atomic64_t *v, u64 o, u64 n) | 183 | static inline long long atomic64_cmpxchg(atomic64_t *v, long long o, |
184 | long long n) | ||
184 | { | 185 | { |
185 | return cmpxchg64(&v->counter, o, n); | 186 | return cmpxchg64(&v->counter, o, n); |
186 | } | 187 | } |
diff --git a/arch/tile/include/asm/atomic_32.h b/arch/tile/include/asm/atomic_32.h index 0d0395b1b152..1ad4a1f7d42b 100644 --- a/arch/tile/include/asm/atomic_32.h +++ b/arch/tile/include/asm/atomic_32.h | |||
@@ -80,7 +80,7 @@ static inline void atomic_set(atomic_t *v, int n) | |||
80 | /* A 64bit atomic type */ | 80 | /* A 64bit atomic type */ |
81 | 81 | ||
82 | typedef struct { | 82 | typedef struct { |
83 | u64 __aligned(8) counter; | 83 | long long counter; |
84 | } atomic64_t; | 84 | } atomic64_t; |
85 | 85 | ||
86 | #define ATOMIC64_INIT(val) { (val) } | 86 | #define ATOMIC64_INIT(val) { (val) } |
@@ -91,14 +91,14 @@ typedef struct { | |||
91 | * | 91 | * |
92 | * Atomically reads the value of @v. | 92 | * Atomically reads the value of @v. |
93 | */ | 93 | */ |
94 | static inline u64 atomic64_read(const atomic64_t *v) | 94 | static inline long long atomic64_read(const atomic64_t *v) |
95 | { | 95 | { |
96 | /* | 96 | /* |
97 | * Requires an atomic op to read both 32-bit parts consistently. | 97 | * Requires an atomic op to read both 32-bit parts consistently. |
98 | * Casting away const is safe since the atomic support routines | 98 | * Casting away const is safe since the atomic support routines |
99 | * do not write to memory if the value has not been modified. | 99 | * do not write to memory if the value has not been modified. |
100 | */ | 100 | */ |
101 | return _atomic64_xchg_add((u64 *)&v->counter, 0); | 101 | return _atomic64_xchg_add((long long *)&v->counter, 0); |
102 | } | 102 | } |
103 | 103 | ||
104 | /** | 104 | /** |
@@ -108,7 +108,7 @@ static inline u64 atomic64_read(const atomic64_t *v) | |||
108 | * | 108 | * |
109 | * Atomically adds @i to @v. | 109 | * Atomically adds @i to @v. |
110 | */ | 110 | */ |
111 | static inline void atomic64_add(u64 i, atomic64_t *v) | 111 | static inline void atomic64_add(long long i, atomic64_t *v) |
112 | { | 112 | { |
113 | _atomic64_xchg_add(&v->counter, i); | 113 | _atomic64_xchg_add(&v->counter, i); |
114 | } | 114 | } |
@@ -120,7 +120,7 @@ static inline void atomic64_add(u64 i, atomic64_t *v) | |||
120 | * | 120 | * |
121 | * Atomically adds @i to @v and returns @i + @v | 121 | * Atomically adds @i to @v and returns @i + @v |
122 | */ | 122 | */ |
123 | static inline u64 atomic64_add_return(u64 i, atomic64_t *v) | 123 | static inline long long atomic64_add_return(long long i, atomic64_t *v) |
124 | { | 124 | { |
125 | smp_mb(); /* barrier for proper semantics */ | 125 | smp_mb(); /* barrier for proper semantics */ |
126 | return _atomic64_xchg_add(&v->counter, i) + i; | 126 | return _atomic64_xchg_add(&v->counter, i) + i; |
@@ -135,7 +135,8 @@ static inline u64 atomic64_add_return(u64 i, atomic64_t *v) | |||
135 | * Atomically adds @a to @v, so long as @v was not already @u. | 135 | * Atomically adds @a to @v, so long as @v was not already @u. |
136 | * Returns non-zero if @v was not @u, and zero otherwise. | 136 | * Returns non-zero if @v was not @u, and zero otherwise. |
137 | */ | 137 | */ |
138 | static inline u64 atomic64_add_unless(atomic64_t *v, u64 a, u64 u) | 138 | static inline long long atomic64_add_unless(atomic64_t *v, long long a, |
139 | long long u) | ||
139 | { | 140 | { |
140 | smp_mb(); /* barrier for proper semantics */ | 141 | smp_mb(); /* barrier for proper semantics */ |
141 | return _atomic64_xchg_add_unless(&v->counter, a, u) != u; | 142 | return _atomic64_xchg_add_unless(&v->counter, a, u) != u; |
@@ -151,7 +152,7 @@ static inline u64 atomic64_add_unless(atomic64_t *v, u64 a, u64 u) | |||
151 | * atomic64_set() can't be just a raw store, since it would be lost if it | 152 | * atomic64_set() can't be just a raw store, since it would be lost if it |
152 | * fell between the load and store of one of the other atomic ops. | 153 | * fell between the load and store of one of the other atomic ops. |
153 | */ | 154 | */ |
154 | static inline void atomic64_set(atomic64_t *v, u64 n) | 155 | static inline void atomic64_set(atomic64_t *v, long long n) |
155 | { | 156 | { |
156 | _atomic64_xchg(&v->counter, n); | 157 | _atomic64_xchg(&v->counter, n); |
157 | } | 158 | } |
@@ -236,11 +237,13 @@ extern struct __get_user __atomic_xchg_add_unless(volatile int *p, | |||
236 | extern struct __get_user __atomic_or(volatile int *p, int *lock, int n); | 237 | extern struct __get_user __atomic_or(volatile int *p, int *lock, int n); |
237 | extern struct __get_user __atomic_andn(volatile int *p, int *lock, int n); | 238 | extern struct __get_user __atomic_andn(volatile int *p, int *lock, int n); |
238 | extern struct __get_user __atomic_xor(volatile int *p, int *lock, int n); | 239 | extern struct __get_user __atomic_xor(volatile int *p, int *lock, int n); |
239 | extern u64 __atomic64_cmpxchg(volatile u64 *p, int *lock, u64 o, u64 n); | 240 | extern long long __atomic64_cmpxchg(volatile long long *p, int *lock, |
240 | extern u64 __atomic64_xchg(volatile u64 *p, int *lock, u64 n); | 241 | long long o, long long n); |
241 | extern u64 __atomic64_xchg_add(volatile u64 *p, int *lock, u64 n); | 242 | extern long long __atomic64_xchg(volatile long long *p, int *lock, long long n); |
242 | extern u64 __atomic64_xchg_add_unless(volatile u64 *p, | 243 | extern long long __atomic64_xchg_add(volatile long long *p, int *lock, |
243 | int *lock, u64 o, u64 n); | 244 | long long n); |
245 | extern long long __atomic64_xchg_add_unless(volatile long long *p, | ||
246 | int *lock, long long o, long long n); | ||
244 | 247 | ||
245 | /* Return failure from the atomic wrappers. */ | 248 | /* Return failure from the atomic wrappers. */ |
246 | struct __get_user __atomic_bad_address(int __user *addr); | 249 | struct __get_user __atomic_bad_address(int __user *addr); |
diff --git a/arch/tile/include/asm/cmpxchg.h b/arch/tile/include/asm/cmpxchg.h index 4001d5eab4bb..0ccda3c425be 100644 --- a/arch/tile/include/asm/cmpxchg.h +++ b/arch/tile/include/asm/cmpxchg.h | |||
@@ -35,10 +35,10 @@ int _atomic_xchg(int *ptr, int n); | |||
35 | int _atomic_xchg_add(int *v, int i); | 35 | int _atomic_xchg_add(int *v, int i); |
36 | int _atomic_xchg_add_unless(int *v, int a, int u); | 36 | int _atomic_xchg_add_unless(int *v, int a, int u); |
37 | int _atomic_cmpxchg(int *ptr, int o, int n); | 37 | int _atomic_cmpxchg(int *ptr, int o, int n); |
38 | u64 _atomic64_xchg(u64 *v, u64 n); | 38 | long long _atomic64_xchg(long long *v, long long n); |
39 | u64 _atomic64_xchg_add(u64 *v, u64 i); | 39 | long long _atomic64_xchg_add(long long *v, long long i); |
40 | u64 _atomic64_xchg_add_unless(u64 *v, u64 a, u64 u); | 40 | long long _atomic64_xchg_add_unless(long long *v, long long a, long long u); |
41 | u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | 41 | long long _atomic64_cmpxchg(long long *v, long long o, long long n); |
42 | 42 | ||
43 | #define xchg(ptr, n) \ | 43 | #define xchg(ptr, n) \ |
44 | ({ \ | 44 | ({ \ |
@@ -53,7 +53,8 @@ u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | |||
53 | if (sizeof(*(ptr)) != 4) \ | 53 | if (sizeof(*(ptr)) != 4) \ |
54 | __cmpxchg_called_with_bad_pointer(); \ | 54 | __cmpxchg_called_with_bad_pointer(); \ |
55 | smp_mb(); \ | 55 | smp_mb(); \ |
56 | (typeof(*(ptr)))_atomic_cmpxchg((int *)ptr, (int)o, (int)n); \ | 56 | (typeof(*(ptr)))_atomic_cmpxchg((int *)ptr, (int)o, \ |
57 | (int)n); \ | ||
57 | }) | 58 | }) |
58 | 59 | ||
59 | #define xchg64(ptr, n) \ | 60 | #define xchg64(ptr, n) \ |
@@ -61,7 +62,8 @@ u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | |||
61 | if (sizeof(*(ptr)) != 8) \ | 62 | if (sizeof(*(ptr)) != 8) \ |
62 | __xchg_called_with_bad_pointer(); \ | 63 | __xchg_called_with_bad_pointer(); \ |
63 | smp_mb(); \ | 64 | smp_mb(); \ |
64 | (typeof(*(ptr)))_atomic64_xchg((u64 *)(ptr), (u64)(n)); \ | 65 | (typeof(*(ptr)))_atomic64_xchg((long long *)(ptr), \ |
66 | (long long)(n)); \ | ||
65 | }) | 67 | }) |
66 | 68 | ||
67 | #define cmpxchg64(ptr, o, n) \ | 69 | #define cmpxchg64(ptr, o, n) \ |
@@ -69,7 +71,8 @@ u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | |||
69 | if (sizeof(*(ptr)) != 8) \ | 71 | if (sizeof(*(ptr)) != 8) \ |
70 | __cmpxchg_called_with_bad_pointer(); \ | 72 | __cmpxchg_called_with_bad_pointer(); \ |
71 | smp_mb(); \ | 73 | smp_mb(); \ |
72 | (typeof(*(ptr)))_atomic64_cmpxchg((u64 *)ptr, (u64)o, (u64)n); \ | 74 | (typeof(*(ptr)))_atomic64_cmpxchg((long long *)ptr, \ |
75 | (long long)o, (long long)n); \ | ||
73 | }) | 76 | }) |
74 | 77 | ||
75 | #else | 78 | #else |
@@ -81,10 +84,11 @@ u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | |||
81 | switch (sizeof(*(ptr))) { \ | 84 | switch (sizeof(*(ptr))) { \ |
82 | case 4: \ | 85 | case 4: \ |
83 | __x = (typeof(__x))(unsigned long) \ | 86 | __x = (typeof(__x))(unsigned long) \ |
84 | __insn_exch4((ptr), (u32)(unsigned long)(n)); \ | 87 | __insn_exch4((ptr), \ |
88 | (u32)(unsigned long)(n)); \ | ||
85 | break; \ | 89 | break; \ |
86 | case 8: \ | 90 | case 8: \ |
87 | __x = (typeof(__x)) \ | 91 | __x = (typeof(__x)) \ |
88 | __insn_exch((ptr), (unsigned long)(n)); \ | 92 | __insn_exch((ptr), (unsigned long)(n)); \ |
89 | break; \ | 93 | break; \ |
90 | default: \ | 94 | default: \ |
@@ -103,10 +107,12 @@ u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n); | |||
103 | switch (sizeof(*(ptr))) { \ | 107 | switch (sizeof(*(ptr))) { \ |
104 | case 4: \ | 108 | case 4: \ |
105 | __x = (typeof(__x))(unsigned long) \ | 109 | __x = (typeof(__x))(unsigned long) \ |
106 | __insn_cmpexch4((ptr), (u32)(unsigned long)(n)); \ | 110 | __insn_cmpexch4((ptr), \ |
111 | (u32)(unsigned long)(n)); \ | ||
107 | break; \ | 112 | break; \ |
108 | case 8: \ | 113 | case 8: \ |
109 | __x = (typeof(__x))__insn_cmpexch((ptr), (u64)(n)); \ | 114 | __x = (typeof(__x))__insn_cmpexch((ptr), \ |
115 | (long long)(n)); \ | ||
110 | break; \ | 116 | break; \ |
111 | default: \ | 117 | default: \ |
112 | __cmpxchg_called_with_bad_pointer(); \ | 118 | __cmpxchg_called_with_bad_pointer(); \ |
diff --git a/arch/tile/include/asm/percpu.h b/arch/tile/include/asm/percpu.h index 63294f5a8efb..4f7ae39fa202 100644 --- a/arch/tile/include/asm/percpu.h +++ b/arch/tile/include/asm/percpu.h | |||
@@ -15,9 +15,37 @@ | |||
15 | #ifndef _ASM_TILE_PERCPU_H | 15 | #ifndef _ASM_TILE_PERCPU_H |
16 | #define _ASM_TILE_PERCPU_H | 16 | #define _ASM_TILE_PERCPU_H |
17 | 17 | ||
18 | register unsigned long __my_cpu_offset __asm__("tp"); | 18 | register unsigned long my_cpu_offset_reg asm("tp"); |
19 | #define __my_cpu_offset __my_cpu_offset | 19 | |
20 | #define set_my_cpu_offset(tp) (__my_cpu_offset = (tp)) | 20 | #ifdef CONFIG_PREEMPT |
21 | /* | ||
22 | * For full preemption, we can't just use the register variable | ||
23 | * directly, since we need barrier() to hazard against it, causing the | ||
24 | * compiler to reload anything computed from a previous "tp" value. | ||
25 | * But we also don't want to use volatile asm, since we'd like the | ||
26 | * compiler to be able to cache the value across multiple percpu reads. | ||
27 | * So we use a fake stack read as a hazard against barrier(). | ||
28 | * The 'U' constraint is like 'm' but disallows postincrement. | ||
29 | */ | ||
30 | static inline unsigned long __my_cpu_offset(void) | ||
31 | { | ||
32 | unsigned long tp; | ||
33 | register unsigned long *sp asm("sp"); | ||
34 | asm("move %0, tp" : "=r" (tp) : "U" (*sp)); | ||
35 | return tp; | ||
36 | } | ||
37 | #define __my_cpu_offset __my_cpu_offset() | ||
38 | #else | ||
39 | /* | ||
40 | * We don't need to hazard against barrier() since "tp" doesn't ever | ||
41 | * change with PREEMPT_NONE, and with PREEMPT_VOLUNTARY it only | ||
42 | * changes at function call points, at which we are already re-reading | ||
43 | * the value of "tp" due to "my_cpu_offset_reg" being a global variable. | ||
44 | */ | ||
45 | #define __my_cpu_offset my_cpu_offset_reg | ||
46 | #endif | ||
47 | |||
48 | #define set_my_cpu_offset(tp) (my_cpu_offset_reg = (tp)) | ||
21 | 49 | ||
22 | #include <asm-generic/percpu.h> | 50 | #include <asm-generic/percpu.h> |
23 | 51 | ||
diff --git a/arch/tile/kernel/hardwall.c b/arch/tile/kernel/hardwall.c index df27a1fd94a3..531f4c365351 100644 --- a/arch/tile/kernel/hardwall.c +++ b/arch/tile/kernel/hardwall.c | |||
@@ -66,7 +66,7 @@ static struct hardwall_type hardwall_types[] = { | |||
66 | 0, | 66 | 0, |
67 | "udn", | 67 | "udn", |
68 | LIST_HEAD_INIT(hardwall_types[HARDWALL_UDN].list), | 68 | LIST_HEAD_INIT(hardwall_types[HARDWALL_UDN].list), |
69 | __SPIN_LOCK_INITIALIZER(hardwall_types[HARDWALL_UDN].lock), | 69 | __SPIN_LOCK_UNLOCKED(hardwall_types[HARDWALL_UDN].lock), |
70 | NULL | 70 | NULL |
71 | }, | 71 | }, |
72 | #ifndef __tilepro__ | 72 | #ifndef __tilepro__ |
@@ -77,7 +77,7 @@ static struct hardwall_type hardwall_types[] = { | |||
77 | 1, /* disabled pending hypervisor support */ | 77 | 1, /* disabled pending hypervisor support */ |
78 | "idn", | 78 | "idn", |
79 | LIST_HEAD_INIT(hardwall_types[HARDWALL_IDN].list), | 79 | LIST_HEAD_INIT(hardwall_types[HARDWALL_IDN].list), |
80 | __SPIN_LOCK_INITIALIZER(hardwall_types[HARDWALL_IDN].lock), | 80 | __SPIN_LOCK_UNLOCKED(hardwall_types[HARDWALL_IDN].lock), |
81 | NULL | 81 | NULL |
82 | }, | 82 | }, |
83 | { /* access to user-space IPI */ | 83 | { /* access to user-space IPI */ |
@@ -87,7 +87,7 @@ static struct hardwall_type hardwall_types[] = { | |||
87 | 0, | 87 | 0, |
88 | "ipi", | 88 | "ipi", |
89 | LIST_HEAD_INIT(hardwall_types[HARDWALL_IPI].list), | 89 | LIST_HEAD_INIT(hardwall_types[HARDWALL_IPI].list), |
90 | __SPIN_LOCK_INITIALIZER(hardwall_types[HARDWALL_IPI].lock), | 90 | __SPIN_LOCK_UNLOCKED(hardwall_types[HARDWALL_IPI].lock), |
91 | NULL | 91 | NULL |
92 | }, | 92 | }, |
93 | #endif | 93 | #endif |
diff --git a/arch/tile/kernel/intvec_32.S b/arch/tile/kernel/intvec_32.S index 088d5c141e68..2cbe6d5dd6b0 100644 --- a/arch/tile/kernel/intvec_32.S +++ b/arch/tile/kernel/intvec_32.S | |||
@@ -815,6 +815,9 @@ STD_ENTRY(interrupt_return) | |||
815 | } | 815 | } |
816 | bzt r28, 1f | 816 | bzt r28, 1f |
817 | bnz r29, 1f | 817 | bnz r29, 1f |
818 | /* Disable interrupts explicitly for preemption. */ | ||
819 | IRQ_DISABLE(r20,r21) | ||
820 | TRACE_IRQS_OFF | ||
818 | jal preempt_schedule_irq | 821 | jal preempt_schedule_irq |
819 | FEEDBACK_REENTER(interrupt_return) | 822 | FEEDBACK_REENTER(interrupt_return) |
820 | 1: | 823 | 1: |
diff --git a/arch/tile/kernel/intvec_64.S b/arch/tile/kernel/intvec_64.S index ec755d3f3734..b8fc497f2437 100644 --- a/arch/tile/kernel/intvec_64.S +++ b/arch/tile/kernel/intvec_64.S | |||
@@ -841,6 +841,9 @@ STD_ENTRY(interrupt_return) | |||
841 | } | 841 | } |
842 | beqzt r28, 1f | 842 | beqzt r28, 1f |
843 | bnez r29, 1f | 843 | bnez r29, 1f |
844 | /* Disable interrupts explicitly for preemption. */ | ||
845 | IRQ_DISABLE(r20,r21) | ||
846 | TRACE_IRQS_OFF | ||
844 | jal preempt_schedule_irq | 847 | jal preempt_schedule_irq |
845 | FEEDBACK_REENTER(interrupt_return) | 848 | FEEDBACK_REENTER(interrupt_return) |
846 | 1: | 849 | 1: |
diff --git a/arch/tile/kernel/stack.c b/arch/tile/kernel/stack.c index 362284af3afd..c93977a62116 100644 --- a/arch/tile/kernel/stack.c +++ b/arch/tile/kernel/stack.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/mmzone.h> | 23 | #include <linux/mmzone.h> |
24 | #include <linux/dcache.h> | 24 | #include <linux/dcache.h> |
25 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
26 | #include <linux/string.h> | ||
26 | #include <asm/backtrace.h> | 27 | #include <asm/backtrace.h> |
27 | #include <asm/page.h> | 28 | #include <asm/page.h> |
28 | #include <asm/ucontext.h> | 29 | #include <asm/ucontext.h> |
@@ -332,21 +333,18 @@ static void describe_addr(struct KBacktraceIterator *kbt, | |||
332 | } | 333 | } |
333 | 334 | ||
334 | if (vma->vm_file) { | 335 | if (vma->vm_file) { |
335 | char *s; | ||
336 | p = d_path(&vma->vm_file->f_path, buf, bufsize); | 336 | p = d_path(&vma->vm_file->f_path, buf, bufsize); |
337 | if (IS_ERR(p)) | 337 | if (IS_ERR(p)) |
338 | p = "?"; | 338 | p = "?"; |
339 | s = strrchr(p, '/'); | 339 | name = kbasename(p); |
340 | if (s) | ||
341 | p = s+1; | ||
342 | } else { | 340 | } else { |
343 | p = "anon"; | 341 | name = "anon"; |
344 | } | 342 | } |
345 | 343 | ||
346 | /* Generate a string description of the vma info. */ | 344 | /* Generate a string description of the vma info. */ |
347 | namelen = strlen(p); | 345 | namelen = strlen(name); |
348 | remaining = (bufsize - 1) - namelen; | 346 | remaining = (bufsize - 1) - namelen; |
349 | memmove(buf, p, namelen); | 347 | memmove(buf, name, namelen); |
350 | snprintf(buf + namelen, remaining, "[%lx+%lx] ", | 348 | snprintf(buf + namelen, remaining, "[%lx+%lx] ", |
351 | vma->vm_start, vma->vm_end - vma->vm_start); | 349 | vma->vm_start, vma->vm_end - vma->vm_start); |
352 | } | 350 | } |
diff --git a/arch/tile/lib/atomic_32.c b/arch/tile/lib/atomic_32.c index 759efa337be8..c89b211fd9e7 100644 --- a/arch/tile/lib/atomic_32.c +++ b/arch/tile/lib/atomic_32.c | |||
@@ -107,19 +107,19 @@ unsigned long _atomic_xor(volatile unsigned long *p, unsigned long mask) | |||
107 | EXPORT_SYMBOL(_atomic_xor); | 107 | EXPORT_SYMBOL(_atomic_xor); |
108 | 108 | ||
109 | 109 | ||
110 | u64 _atomic64_xchg(u64 *v, u64 n) | 110 | long long _atomic64_xchg(long long *v, long long n) |
111 | { | 111 | { |
112 | return __atomic64_xchg(v, __atomic_setup(v), n); | 112 | return __atomic64_xchg(v, __atomic_setup(v), n); |
113 | } | 113 | } |
114 | EXPORT_SYMBOL(_atomic64_xchg); | 114 | EXPORT_SYMBOL(_atomic64_xchg); |
115 | 115 | ||
116 | u64 _atomic64_xchg_add(u64 *v, u64 i) | 116 | long long _atomic64_xchg_add(long long *v, long long i) |
117 | { | 117 | { |
118 | return __atomic64_xchg_add(v, __atomic_setup(v), i); | 118 | return __atomic64_xchg_add(v, __atomic_setup(v), i); |
119 | } | 119 | } |
120 | EXPORT_SYMBOL(_atomic64_xchg_add); | 120 | EXPORT_SYMBOL(_atomic64_xchg_add); |
121 | 121 | ||
122 | u64 _atomic64_xchg_add_unless(u64 *v, u64 a, u64 u) | 122 | long long _atomic64_xchg_add_unless(long long *v, long long a, long long u) |
123 | { | 123 | { |
124 | /* | 124 | /* |
125 | * Note: argument order is switched here since it is easier | 125 | * Note: argument order is switched here since it is easier |
@@ -130,7 +130,7 @@ u64 _atomic64_xchg_add_unless(u64 *v, u64 a, u64 u) | |||
130 | } | 130 | } |
131 | EXPORT_SYMBOL(_atomic64_xchg_add_unless); | 131 | EXPORT_SYMBOL(_atomic64_xchg_add_unless); |
132 | 132 | ||
133 | u64 _atomic64_cmpxchg(u64 *v, u64 o, u64 n) | 133 | long long _atomic64_cmpxchg(long long *v, long long o, long long n) |
134 | { | 134 | { |
135 | return __atomic64_cmpxchg(v, __atomic_setup(v), o, n); | 135 | return __atomic64_cmpxchg(v, __atomic_setup(v), o, n); |
136 | } | 136 | } |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index ee2fb9d37745..145d703227bf 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -860,7 +860,7 @@ source "kernel/Kconfig.preempt" | |||
860 | 860 | ||
861 | config X86_UP_APIC | 861 | config X86_UP_APIC |
862 | bool "Local APIC support on uniprocessors" | 862 | bool "Local APIC support on uniprocessors" |
863 | depends on X86_32 && !SMP && !X86_32_NON_STANDARD | 863 | depends on X86_32 && !SMP && !X86_32_NON_STANDARD && !PCI_MSI |
864 | ---help--- | 864 | ---help--- |
865 | A local APIC (Advanced Programmable Interrupt Controller) is an | 865 | A local APIC (Advanced Programmable Interrupt Controller) is an |
866 | integrated interrupt controller in the CPU. If you have a single-CPU | 866 | integrated interrupt controller in the CPU. If you have a single-CPU |
@@ -885,11 +885,11 @@ config X86_UP_IOAPIC | |||
885 | 885 | ||
886 | config X86_LOCAL_APIC | 886 | config X86_LOCAL_APIC |
887 | def_bool y | 887 | def_bool y |
888 | depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC | 888 | depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC || PCI_MSI |
889 | 889 | ||
890 | config X86_IO_APIC | 890 | config X86_IO_APIC |
891 | def_bool y | 891 | def_bool y |
892 | depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC | 892 | depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC || PCI_MSI |
893 | 893 | ||
894 | config X86_VISWS_APIC | 894 | config X86_VISWS_APIC |
895 | def_bool y | 895 | def_bool y |
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index d3f5c63078d8..89270b4318db 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -374,7 +374,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit) | |||
374 | * Catch too early usage of this before alternatives | 374 | * Catch too early usage of this before alternatives |
375 | * have run. | 375 | * have run. |
376 | */ | 376 | */ |
377 | asm goto("1: jmp %l[t_warn]\n" | 377 | asm_volatile_goto("1: jmp %l[t_warn]\n" |
378 | "2:\n" | 378 | "2:\n" |
379 | ".section .altinstructions,\"a\"\n" | 379 | ".section .altinstructions,\"a\"\n" |
380 | " .long 1b - .\n" | 380 | " .long 1b - .\n" |
@@ -388,7 +388,7 @@ static __always_inline __pure bool __static_cpu_has(u16 bit) | |||
388 | 388 | ||
389 | #endif | 389 | #endif |
390 | 390 | ||
391 | asm goto("1: jmp %l[t_no]\n" | 391 | asm_volatile_goto("1: jmp %l[t_no]\n" |
392 | "2:\n" | 392 | "2:\n" |
393 | ".section .altinstructions,\"a\"\n" | 393 | ".section .altinstructions,\"a\"\n" |
394 | " .long 1b - .\n" | 394 | " .long 1b - .\n" |
@@ -453,7 +453,7 @@ static __always_inline __pure bool _static_cpu_has_safe(u16 bit) | |||
453 | * have. Thus, we force the jump to the widest, 4-byte, signed relative | 453 | * have. Thus, we force the jump to the widest, 4-byte, signed relative |
454 | * offset even though the last would often fit in less bytes. | 454 | * offset even though the last would often fit in less bytes. |
455 | */ | 455 | */ |
456 | asm goto("1: .byte 0xe9\n .long %l[t_dynamic] - 2f\n" | 456 | asm_volatile_goto("1: .byte 0xe9\n .long %l[t_dynamic] - 2f\n" |
457 | "2:\n" | 457 | "2:\n" |
458 | ".section .altinstructions,\"a\"\n" | 458 | ".section .altinstructions,\"a\"\n" |
459 | " .long 1b - .\n" /* src offset */ | 459 | " .long 1b - .\n" /* src offset */ |
diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h index 64507f35800c..6a2cefb4395a 100644 --- a/arch/x86/include/asm/jump_label.h +++ b/arch/x86/include/asm/jump_label.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | static __always_inline bool arch_static_branch(struct static_key *key) | 19 | static __always_inline bool arch_static_branch(struct static_key *key) |
20 | { | 20 | { |
21 | asm goto("1:" | 21 | asm_volatile_goto("1:" |
22 | ".byte " __stringify(STATIC_KEY_INIT_NOP) "\n\t" | 22 | ".byte " __stringify(STATIC_KEY_INIT_NOP) "\n\t" |
23 | ".pushsection __jump_table, \"aw\" \n\t" | 23 | ".pushsection __jump_table, \"aw\" \n\t" |
24 | _ASM_ALIGN "\n\t" | 24 | _ASM_ALIGN "\n\t" |
diff --git a/arch/x86/include/asm/mutex_64.h b/arch/x86/include/asm/mutex_64.h index e7e6751648ed..07537a44216e 100644 --- a/arch/x86/include/asm/mutex_64.h +++ b/arch/x86/include/asm/mutex_64.h | |||
@@ -20,7 +20,7 @@ | |||
20 | static inline void __mutex_fastpath_lock(atomic_t *v, | 20 | static inline void __mutex_fastpath_lock(atomic_t *v, |
21 | void (*fail_fn)(atomic_t *)) | 21 | void (*fail_fn)(atomic_t *)) |
22 | { | 22 | { |
23 | asm volatile goto(LOCK_PREFIX " decl %0\n" | 23 | asm_volatile_goto(LOCK_PREFIX " decl %0\n" |
24 | " jns %l[exit]\n" | 24 | " jns %l[exit]\n" |
25 | : : "m" (v->counter) | 25 | : : "m" (v->counter) |
26 | : "memory", "cc" | 26 | : "memory", "cc" |
@@ -75,7 +75,7 @@ static inline int __mutex_fastpath_lock_retval(atomic_t *count) | |||
75 | static inline void __mutex_fastpath_unlock(atomic_t *v, | 75 | static inline void __mutex_fastpath_unlock(atomic_t *v, |
76 | void (*fail_fn)(atomic_t *)) | 76 | void (*fail_fn)(atomic_t *)) |
77 | { | 77 | { |
78 | asm volatile goto(LOCK_PREFIX " incl %0\n" | 78 | asm_volatile_goto(LOCK_PREFIX " incl %0\n" |
79 | " jg %l[exit]\n" | 79 | " jg %l[exit]\n" |
80 | : : "m" (v->counter) | 80 | : : "m" (v->counter) |
81 | : "memory", "cc" | 81 | : "memory", "cc" |
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 897783b3302a..9d8449158cf9 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -1888,10 +1888,7 @@ void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now) | |||
1888 | userpg->cap_user_rdpmc = x86_pmu.attr_rdpmc; | 1888 | userpg->cap_user_rdpmc = x86_pmu.attr_rdpmc; |
1889 | userpg->pmc_width = x86_pmu.cntval_bits; | 1889 | userpg->pmc_width = x86_pmu.cntval_bits; |
1890 | 1890 | ||
1891 | if (!boot_cpu_has(X86_FEATURE_CONSTANT_TSC)) | 1891 | if (!sched_clock_stable) |
1892 | return; | ||
1893 | |||
1894 | if (!boot_cpu_has(X86_FEATURE_NONSTOP_TSC)) | ||
1895 | return; | 1892 | return; |
1896 | 1893 | ||
1897 | userpg->cap_user_time = 1; | 1894 | userpg->cap_user_time = 1; |
@@ -1899,10 +1896,8 @@ void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now) | |||
1899 | userpg->time_shift = CYC2NS_SCALE_FACTOR; | 1896 | userpg->time_shift = CYC2NS_SCALE_FACTOR; |
1900 | userpg->time_offset = this_cpu_read(cyc2ns_offset) - now; | 1897 | userpg->time_offset = this_cpu_read(cyc2ns_offset) - now; |
1901 | 1898 | ||
1902 | if (sched_clock_stable && !check_tsc_disabled()) { | 1899 | userpg->cap_user_time_zero = 1; |
1903 | userpg->cap_user_time_zero = 1; | 1900 | userpg->time_zero = this_cpu_read(cyc2ns_offset); |
1904 | userpg->time_zero = this_cpu_read(cyc2ns_offset); | ||
1905 | } | ||
1906 | } | 1901 | } |
1907 | 1902 | ||
1908 | /* | 1903 | /* |
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index e643e744e4d8..7e920bff99a3 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -326,6 +326,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
326 | DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6320"), | 326 | DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6320"), |
327 | }, | 327 | }, |
328 | }, | 328 | }, |
329 | { /* Handle problems with rebooting on the Latitude E5410. */ | ||
330 | .callback = set_pci_reboot, | ||
331 | .ident = "Dell Latitude E5410", | ||
332 | .matches = { | ||
333 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
334 | DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E5410"), | ||
335 | }, | ||
336 | }, | ||
329 | { /* Handle problems with rebooting on the Latitude E5420. */ | 337 | { /* Handle problems with rebooting on the Latitude E5420. */ |
330 | .callback = set_pci_reboot, | 338 | .callback = set_pci_reboot, |
331 | .ident = "Dell Latitude E5420", | 339 | .ident = "Dell Latitude E5420", |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 3b8e7459dd4d..2b2fce1b2009 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -3255,25 +3255,29 @@ static void vmx_decache_cr4_guest_bits(struct kvm_vcpu *vcpu) | |||
3255 | 3255 | ||
3256 | static void ept_load_pdptrs(struct kvm_vcpu *vcpu) | 3256 | static void ept_load_pdptrs(struct kvm_vcpu *vcpu) |
3257 | { | 3257 | { |
3258 | struct kvm_mmu *mmu = vcpu->arch.walk_mmu; | ||
3259 | |||
3258 | if (!test_bit(VCPU_EXREG_PDPTR, | 3260 | if (!test_bit(VCPU_EXREG_PDPTR, |
3259 | (unsigned long *)&vcpu->arch.regs_dirty)) | 3261 | (unsigned long *)&vcpu->arch.regs_dirty)) |
3260 | return; | 3262 | return; |
3261 | 3263 | ||
3262 | if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) { | 3264 | if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) { |
3263 | vmcs_write64(GUEST_PDPTR0, vcpu->arch.mmu.pdptrs[0]); | 3265 | vmcs_write64(GUEST_PDPTR0, mmu->pdptrs[0]); |
3264 | vmcs_write64(GUEST_PDPTR1, vcpu->arch.mmu.pdptrs[1]); | 3266 | vmcs_write64(GUEST_PDPTR1, mmu->pdptrs[1]); |
3265 | vmcs_write64(GUEST_PDPTR2, vcpu->arch.mmu.pdptrs[2]); | 3267 | vmcs_write64(GUEST_PDPTR2, mmu->pdptrs[2]); |
3266 | vmcs_write64(GUEST_PDPTR3, vcpu->arch.mmu.pdptrs[3]); | 3268 | vmcs_write64(GUEST_PDPTR3, mmu->pdptrs[3]); |
3267 | } | 3269 | } |
3268 | } | 3270 | } |
3269 | 3271 | ||
3270 | static void ept_save_pdptrs(struct kvm_vcpu *vcpu) | 3272 | static void ept_save_pdptrs(struct kvm_vcpu *vcpu) |
3271 | { | 3273 | { |
3274 | struct kvm_mmu *mmu = vcpu->arch.walk_mmu; | ||
3275 | |||
3272 | if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) { | 3276 | if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) { |
3273 | vcpu->arch.mmu.pdptrs[0] = vmcs_read64(GUEST_PDPTR0); | 3277 | mmu->pdptrs[0] = vmcs_read64(GUEST_PDPTR0); |
3274 | vcpu->arch.mmu.pdptrs[1] = vmcs_read64(GUEST_PDPTR1); | 3278 | mmu->pdptrs[1] = vmcs_read64(GUEST_PDPTR1); |
3275 | vcpu->arch.mmu.pdptrs[2] = vmcs_read64(GUEST_PDPTR2); | 3279 | mmu->pdptrs[2] = vmcs_read64(GUEST_PDPTR2); |
3276 | vcpu->arch.mmu.pdptrs[3] = vmcs_read64(GUEST_PDPTR3); | 3280 | mmu->pdptrs[3] = vmcs_read64(GUEST_PDPTR3); |
3277 | } | 3281 | } |
3278 | 3282 | ||
3279 | __set_bit(VCPU_EXREG_PDPTR, | 3283 | __set_bit(VCPU_EXREG_PDPTR, |
@@ -7777,10 +7781,6 @@ static void prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) | |||
7777 | vmcs_write64(GUEST_PDPTR1, vmcs12->guest_pdptr1); | 7781 | vmcs_write64(GUEST_PDPTR1, vmcs12->guest_pdptr1); |
7778 | vmcs_write64(GUEST_PDPTR2, vmcs12->guest_pdptr2); | 7782 | vmcs_write64(GUEST_PDPTR2, vmcs12->guest_pdptr2); |
7779 | vmcs_write64(GUEST_PDPTR3, vmcs12->guest_pdptr3); | 7783 | vmcs_write64(GUEST_PDPTR3, vmcs12->guest_pdptr3); |
7780 | __clear_bit(VCPU_EXREG_PDPTR, | ||
7781 | (unsigned long *)&vcpu->arch.regs_avail); | ||
7782 | __clear_bit(VCPU_EXREG_PDPTR, | ||
7783 | (unsigned long *)&vcpu->arch.regs_dirty); | ||
7784 | } | 7784 | } |
7785 | 7785 | ||
7786 | kvm_register_write(vcpu, VCPU_REGS_RSP, vmcs12->guest_rsp); | 7786 | kvm_register_write(vcpu, VCPU_REGS_RSP, vmcs12->guest_rsp); |
diff --git a/drivers/char/random.c b/drivers/char/random.c index 7737b5bd26af..7a744d391756 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -640,7 +640,7 @@ struct timer_rand_state { | |||
640 | */ | 640 | */ |
641 | void add_device_randomness(const void *buf, unsigned int size) | 641 | void add_device_randomness(const void *buf, unsigned int size) |
642 | { | 642 | { |
643 | unsigned long time = get_cycles() ^ jiffies; | 643 | unsigned long time = random_get_entropy() ^ jiffies; |
644 | 644 | ||
645 | mix_pool_bytes(&input_pool, buf, size, NULL); | 645 | mix_pool_bytes(&input_pool, buf, size, NULL); |
646 | mix_pool_bytes(&input_pool, &time, sizeof(time), NULL); | 646 | mix_pool_bytes(&input_pool, &time, sizeof(time), NULL); |
@@ -677,7 +677,7 @@ static void add_timer_randomness(struct timer_rand_state *state, unsigned num) | |||
677 | goto out; | 677 | goto out; |
678 | 678 | ||
679 | sample.jiffies = jiffies; | 679 | sample.jiffies = jiffies; |
680 | sample.cycles = get_cycles(); | 680 | sample.cycles = random_get_entropy(); |
681 | sample.num = num; | 681 | sample.num = num; |
682 | mix_pool_bytes(&input_pool, &sample, sizeof(sample), NULL); | 682 | mix_pool_bytes(&input_pool, &sample, sizeof(sample), NULL); |
683 | 683 | ||
@@ -744,7 +744,7 @@ void add_interrupt_randomness(int irq, int irq_flags) | |||
744 | struct fast_pool *fast_pool = &__get_cpu_var(irq_randomness); | 744 | struct fast_pool *fast_pool = &__get_cpu_var(irq_randomness); |
745 | struct pt_regs *regs = get_irq_regs(); | 745 | struct pt_regs *regs = get_irq_regs(); |
746 | unsigned long now = jiffies; | 746 | unsigned long now = jiffies; |
747 | __u32 input[4], cycles = get_cycles(); | 747 | __u32 input[4], cycles = random_get_entropy(); |
748 | 748 | ||
749 | input[0] = cycles ^ jiffies; | 749 | input[0] = cycles ^ jiffies; |
750 | input[1] = irq; | 750 | input[1] = irq; |
@@ -1459,12 +1459,11 @@ struct ctl_table random_table[] = { | |||
1459 | 1459 | ||
1460 | static u32 random_int_secret[MD5_MESSAGE_BYTES / 4] ____cacheline_aligned; | 1460 | static u32 random_int_secret[MD5_MESSAGE_BYTES / 4] ____cacheline_aligned; |
1461 | 1461 | ||
1462 | static int __init random_int_secret_init(void) | 1462 | int random_int_secret_init(void) |
1463 | { | 1463 | { |
1464 | get_random_bytes(random_int_secret, sizeof(random_int_secret)); | 1464 | get_random_bytes(random_int_secret, sizeof(random_int_secret)); |
1465 | return 0; | 1465 | return 0; |
1466 | } | 1466 | } |
1467 | late_initcall(random_int_secret_init); | ||
1468 | 1467 | ||
1469 | /* | 1468 | /* |
1470 | * Get a random word for internal kernel use only. Similar to urandom but | 1469 | * Get a random word for internal kernel use only. Similar to urandom but |
@@ -1483,7 +1482,7 @@ unsigned int get_random_int(void) | |||
1483 | 1482 | ||
1484 | hash = get_cpu_var(get_random_int_hash); | 1483 | hash = get_cpu_var(get_random_int_hash); |
1485 | 1484 | ||
1486 | hash[0] += current->pid + jiffies + get_cycles(); | 1485 | hash[0] += current->pid + jiffies + random_get_entropy(); |
1487 | md5_transform(hash, random_int_secret); | 1486 | md5_transform(hash, random_int_secret); |
1488 | ret = hash[0]; | 1487 | ret = hash[0]; |
1489 | put_cpu_var(get_random_int_hash); | 1488 | put_cpu_var(get_random_int_hash); |
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 098a8da450f0..3519111c566b 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c | |||
@@ -306,6 +306,7 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg( | |||
306 | EDMA_SLOT_ANY); | 306 | EDMA_SLOT_ANY); |
307 | if (echan->slot[i] < 0) { | 307 | if (echan->slot[i] < 0) { |
308 | dev_err(dev, "Failed to allocate slot\n"); | 308 | dev_err(dev, "Failed to allocate slot\n"); |
309 | kfree(edesc); | ||
309 | return NULL; | 310 | return NULL; |
310 | } | 311 | } |
311 | } | 312 | } |
diff --git a/drivers/dma/sh/rcar-hpbdma.c b/drivers/dma/sh/rcar-hpbdma.c index 45a520281ce1..ebad84591a6e 100644 --- a/drivers/dma/sh/rcar-hpbdma.c +++ b/drivers/dma/sh/rcar-hpbdma.c | |||
@@ -93,6 +93,7 @@ struct hpb_dmae_chan { | |||
93 | void __iomem *base; | 93 | void __iomem *base; |
94 | const struct hpb_dmae_slave_config *cfg; | 94 | const struct hpb_dmae_slave_config *cfg; |
95 | char dev_id[16]; /* unique name per DMAC of channel */ | 95 | char dev_id[16]; /* unique name per DMAC of channel */ |
96 | dma_addr_t slave_addr; | ||
96 | }; | 97 | }; |
97 | 98 | ||
98 | struct hpb_dmae_device { | 99 | struct hpb_dmae_device { |
@@ -432,7 +433,6 @@ hpb_dmae_alloc_chan_resources(struct hpb_dmae_chan *hpb_chan, | |||
432 | hpb_chan->xfer_mode = XFER_DOUBLE; | 433 | hpb_chan->xfer_mode = XFER_DOUBLE; |
433 | } else { | 434 | } else { |
434 | dev_err(hpb_chan->shdma_chan.dev, "DCR setting error"); | 435 | dev_err(hpb_chan->shdma_chan.dev, "DCR setting error"); |
435 | shdma_free_irq(&hpb_chan->shdma_chan); | ||
436 | return -EINVAL; | 436 | return -EINVAL; |
437 | } | 437 | } |
438 | 438 | ||
@@ -446,7 +446,8 @@ hpb_dmae_alloc_chan_resources(struct hpb_dmae_chan *hpb_chan, | |||
446 | return 0; | 446 | return 0; |
447 | } | 447 | } |
448 | 448 | ||
449 | static int hpb_dmae_set_slave(struct shdma_chan *schan, int slave_id, bool try) | 449 | static int hpb_dmae_set_slave(struct shdma_chan *schan, int slave_id, |
450 | dma_addr_t slave_addr, bool try) | ||
450 | { | 451 | { |
451 | struct hpb_dmae_chan *chan = to_chan(schan); | 452 | struct hpb_dmae_chan *chan = to_chan(schan); |
452 | const struct hpb_dmae_slave_config *sc = | 453 | const struct hpb_dmae_slave_config *sc = |
@@ -457,6 +458,7 @@ static int hpb_dmae_set_slave(struct shdma_chan *schan, int slave_id, bool try) | |||
457 | if (try) | 458 | if (try) |
458 | return 0; | 459 | return 0; |
459 | chan->cfg = sc; | 460 | chan->cfg = sc; |
461 | chan->slave_addr = slave_addr ? : sc->addr; | ||
460 | return hpb_dmae_alloc_chan_resources(chan, sc); | 462 | return hpb_dmae_alloc_chan_resources(chan, sc); |
461 | } | 463 | } |
462 | 464 | ||
@@ -468,7 +470,7 @@ static dma_addr_t hpb_dmae_slave_addr(struct shdma_chan *schan) | |||
468 | { | 470 | { |
469 | struct hpb_dmae_chan *chan = to_chan(schan); | 471 | struct hpb_dmae_chan *chan = to_chan(schan); |
470 | 472 | ||
471 | return chan->cfg->addr; | 473 | return chan->slave_addr; |
472 | } | 474 | } |
473 | 475 | ||
474 | static struct shdma_desc *hpb_dmae_embedded_desc(void *buf, int i) | 476 | static struct shdma_desc *hpb_dmae_embedded_desc(void *buf, int i) |
@@ -614,7 +616,6 @@ static void hpb_dmae_chan_remove(struct hpb_dmae_device *hpbdev) | |||
614 | shdma_for_each_chan(schan, &hpbdev->shdma_dev, i) { | 616 | shdma_for_each_chan(schan, &hpbdev->shdma_dev, i) { |
615 | BUG_ON(!schan); | 617 | BUG_ON(!schan); |
616 | 618 | ||
617 | shdma_free_irq(schan); | ||
618 | shdma_chan_remove(schan); | 619 | shdma_chan_remove(schan); |
619 | } | 620 | } |
620 | dma_dev->chancnt = 0; | 621 | dma_dev->chancnt = 0; |
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 1688ff500513..830f7501cb4d 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -2925,6 +2925,8 @@ int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb) | |||
2925 | /* Speaker Allocation Data Block */ | 2925 | /* Speaker Allocation Data Block */ |
2926 | if (dbl == 3) { | 2926 | if (dbl == 3) { |
2927 | *sadb = kmalloc(dbl, GFP_KERNEL); | 2927 | *sadb = kmalloc(dbl, GFP_KERNEL); |
2928 | if (!*sadb) | ||
2929 | return -ENOMEM; | ||
2928 | memcpy(*sadb, &db[1], dbl); | 2930 | memcpy(*sadb, &db[1], dbl); |
2929 | count = dbl; | 2931 | count = dbl; |
2930 | break; | 2932 | break; |
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index f6f6cc7fc133..3d13ca6e257f 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c | |||
@@ -416,14 +416,6 @@ static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode) | |||
416 | return; | 416 | return; |
417 | 417 | ||
418 | /* | 418 | /* |
419 | * fbdev->blank can be called from irq context in case of a panic. | ||
420 | * Since we already have our own special panic handler which will | ||
421 | * restore the fbdev console mode completely, just bail out early. | ||
422 | */ | ||
423 | if (oops_in_progress) | ||
424 | return; | ||
425 | |||
426 | /* | ||
427 | * For each CRTC in this fb, turn the connectors on/off. | 419 | * For each CRTC in this fb, turn the connectors on/off. |
428 | */ | 420 | */ |
429 | drm_modeset_lock_all(dev); | 421 | drm_modeset_lock_all(dev); |
diff --git a/drivers/gpu/drm/gma500/gtt.c b/drivers/gpu/drm/gma500/gtt.c index 92babac362ec..2db731f00930 100644 --- a/drivers/gpu/drm/gma500/gtt.c +++ b/drivers/gpu/drm/gma500/gtt.c | |||
@@ -204,6 +204,7 @@ static int psb_gtt_attach_pages(struct gtt_range *gt) | |||
204 | if (IS_ERR(pages)) | 204 | if (IS_ERR(pages)) |
205 | return PTR_ERR(pages); | 205 | return PTR_ERR(pages); |
206 | 206 | ||
207 | gt->npage = gt->gem.size / PAGE_SIZE; | ||
207 | gt->pages = pages; | 208 | gt->pages = pages; |
208 | 209 | ||
209 | return 0; | 210 | return 0; |
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c index c27a21034a5e..d5c784d48671 100644 --- a/drivers/gpu/drm/i915/i915_dma.c +++ b/drivers/gpu/drm/i915/i915_dma.c | |||
@@ -1290,12 +1290,9 @@ static int i915_load_modeset_init(struct drm_device *dev) | |||
1290 | * then we do not take part in VGA arbitration and the | 1290 | * then we do not take part in VGA arbitration and the |
1291 | * vga_client_register() fails with -ENODEV. | 1291 | * vga_client_register() fails with -ENODEV. |
1292 | */ | 1292 | */ |
1293 | if (!HAS_PCH_SPLIT(dev)) { | 1293 | ret = vga_client_register(dev->pdev, dev, NULL, i915_vga_set_decode); |
1294 | ret = vga_client_register(dev->pdev, dev, NULL, | 1294 | if (ret && ret != -ENODEV) |
1295 | i915_vga_set_decode); | 1295 | goto out; |
1296 | if (ret && ret != -ENODEV) | ||
1297 | goto out; | ||
1298 | } | ||
1299 | 1296 | ||
1300 | intel_register_dsm_handler(); | 1297 | intel_register_dsm_handler(); |
1301 | 1298 | ||
@@ -1351,12 +1348,6 @@ static int i915_load_modeset_init(struct drm_device *dev) | |||
1351 | */ | 1348 | */ |
1352 | intel_fbdev_initial_config(dev); | 1349 | intel_fbdev_initial_config(dev); |
1353 | 1350 | ||
1354 | /* | ||
1355 | * Must do this after fbcon init so that | ||
1356 | * vgacon_save_screen() works during the handover. | ||
1357 | */ | ||
1358 | i915_disable_vga_mem(dev); | ||
1359 | |||
1360 | /* Only enable hotplug handling once the fbdev is fully set up. */ | 1351 | /* Only enable hotplug handling once the fbdev is fully set up. */ |
1361 | dev_priv->enable_hotplug_processing = true; | 1352 | dev_priv->enable_hotplug_processing = true; |
1362 | 1353 | ||
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index c159e1a6810f..38f96f65d87a 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -3881,6 +3881,9 @@ | |||
3881 | #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030 | 3881 | #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030 |
3882 | #define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11) | 3882 | #define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11) |
3883 | 3883 | ||
3884 | #define HSW_SCRATCH1 0xb038 | ||
3885 | #define HSW_SCRATCH1_L3_DATA_ATOMICS_DISABLE (1<<27) | ||
3886 | |||
3884 | #define HSW_FUSE_STRAP 0x42014 | 3887 | #define HSW_FUSE_STRAP 0x42014 |
3885 | #define HSW_CDCLK_LIMIT (1 << 24) | 3888 | #define HSW_CDCLK_LIMIT (1 << 24) |
3886 | 3889 | ||
@@ -4728,6 +4731,9 @@ | |||
4728 | #define GEN7_ROW_CHICKEN2_GT2 0xf4f4 | 4731 | #define GEN7_ROW_CHICKEN2_GT2 0xf4f4 |
4729 | #define DOP_CLOCK_GATING_DISABLE (1<<0) | 4732 | #define DOP_CLOCK_GATING_DISABLE (1<<0) |
4730 | 4733 | ||
4734 | #define HSW_ROW_CHICKEN3 0xe49c | ||
4735 | #define HSW_ROW_CHICKEN3_L3_GLOBAL_ATOMICS_DISABLE (1 << 6) | ||
4736 | |||
4731 | #define G4X_AUD_VID_DID (dev_priv->info->display_mmio_offset + 0x62020) | 4737 | #define G4X_AUD_VID_DID (dev_priv->info->display_mmio_offset + 0x62020) |
4732 | #define INTEL_AUDIO_DEVCL 0x808629FB | 4738 | #define INTEL_AUDIO_DEVCL 0x808629FB |
4733 | #define INTEL_AUDIO_DEVBLC 0x80862801 | 4739 | #define INTEL_AUDIO_DEVBLC 0x80862801 |
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index e5822e79f912..581fb4b2f766 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -3941,8 +3941,6 @@ static void intel_connector_check_state(struct intel_connector *connector) | |||
3941 | * consider. */ | 3941 | * consider. */ |
3942 | void intel_connector_dpms(struct drm_connector *connector, int mode) | 3942 | void intel_connector_dpms(struct drm_connector *connector, int mode) |
3943 | { | 3943 | { |
3944 | struct intel_encoder *encoder = intel_attached_encoder(connector); | ||
3945 | |||
3946 | /* All the simple cases only support two dpms states. */ | 3944 | /* All the simple cases only support two dpms states. */ |
3947 | if (mode != DRM_MODE_DPMS_ON) | 3945 | if (mode != DRM_MODE_DPMS_ON) |
3948 | mode = DRM_MODE_DPMS_OFF; | 3946 | mode = DRM_MODE_DPMS_OFF; |
@@ -3953,10 +3951,8 @@ void intel_connector_dpms(struct drm_connector *connector, int mode) | |||
3953 | connector->dpms = mode; | 3951 | connector->dpms = mode; |
3954 | 3952 | ||
3955 | /* Only need to change hw state when actually enabled */ | 3953 | /* Only need to change hw state when actually enabled */ |
3956 | if (encoder->base.crtc) | 3954 | if (connector->encoder) |
3957 | intel_encoder_dpms(encoder, mode); | 3955 | intel_encoder_dpms(to_intel_encoder(connector->encoder), mode); |
3958 | else | ||
3959 | WARN_ON(encoder->connectors_active != false); | ||
3960 | 3956 | ||
3961 | intel_modeset_check_state(connector->dev); | 3957 | intel_modeset_check_state(connector->dev); |
3962 | } | 3958 | } |
@@ -10049,33 +10045,6 @@ static void i915_disable_vga(struct drm_device *dev) | |||
10049 | POSTING_READ(vga_reg); | 10045 | POSTING_READ(vga_reg); |
10050 | } | 10046 | } |
10051 | 10047 | ||
10052 | static void i915_enable_vga_mem(struct drm_device *dev) | ||
10053 | { | ||
10054 | /* Enable VGA memory on Intel HD */ | ||
10055 | if (HAS_PCH_SPLIT(dev)) { | ||
10056 | vga_get_uninterruptible(dev->pdev, VGA_RSRC_LEGACY_IO); | ||
10057 | outb(inb(VGA_MSR_READ) | VGA_MSR_MEM_EN, VGA_MSR_WRITE); | ||
10058 | vga_set_legacy_decoding(dev->pdev, VGA_RSRC_LEGACY_IO | | ||
10059 | VGA_RSRC_LEGACY_MEM | | ||
10060 | VGA_RSRC_NORMAL_IO | | ||
10061 | VGA_RSRC_NORMAL_MEM); | ||
10062 | vga_put(dev->pdev, VGA_RSRC_LEGACY_IO); | ||
10063 | } | ||
10064 | } | ||
10065 | |||
10066 | void i915_disable_vga_mem(struct drm_device *dev) | ||
10067 | { | ||
10068 | /* Disable VGA memory on Intel HD */ | ||
10069 | if (HAS_PCH_SPLIT(dev)) { | ||
10070 | vga_get_uninterruptible(dev->pdev, VGA_RSRC_LEGACY_IO); | ||
10071 | outb(inb(VGA_MSR_READ) & ~VGA_MSR_MEM_EN, VGA_MSR_WRITE); | ||
10072 | vga_set_legacy_decoding(dev->pdev, VGA_RSRC_LEGACY_IO | | ||
10073 | VGA_RSRC_NORMAL_IO | | ||
10074 | VGA_RSRC_NORMAL_MEM); | ||
10075 | vga_put(dev->pdev, VGA_RSRC_LEGACY_IO); | ||
10076 | } | ||
10077 | } | ||
10078 | |||
10079 | void intel_modeset_init_hw(struct drm_device *dev) | 10048 | void intel_modeset_init_hw(struct drm_device *dev) |
10080 | { | 10049 | { |
10081 | intel_init_power_well(dev); | 10050 | intel_init_power_well(dev); |
@@ -10354,7 +10323,6 @@ void i915_redisable_vga(struct drm_device *dev) | |||
10354 | if (I915_READ(vga_reg) != VGA_DISP_DISABLE) { | 10323 | if (I915_READ(vga_reg) != VGA_DISP_DISABLE) { |
10355 | DRM_DEBUG_KMS("Something enabled VGA plane, disabling it\n"); | 10324 | DRM_DEBUG_KMS("Something enabled VGA plane, disabling it\n"); |
10356 | i915_disable_vga(dev); | 10325 | i915_disable_vga(dev); |
10357 | i915_disable_vga_mem(dev); | ||
10358 | } | 10326 | } |
10359 | } | 10327 | } |
10360 | 10328 | ||
@@ -10568,8 +10536,6 @@ void intel_modeset_cleanup(struct drm_device *dev) | |||
10568 | 10536 | ||
10569 | intel_disable_fbc(dev); | 10537 | intel_disable_fbc(dev); |
10570 | 10538 | ||
10571 | i915_enable_vga_mem(dev); | ||
10572 | |||
10573 | intel_disable_gt_powersave(dev); | 10539 | intel_disable_gt_powersave(dev); |
10574 | 10540 | ||
10575 | ironlake_teardown_rc6(dev); | 10541 | ironlake_teardown_rc6(dev); |
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 79c14e298ba6..2c555f91bfae 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1467,7 +1467,7 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp) | |||
1467 | 1467 | ||
1468 | /* Avoid continuous PSR exit by masking memup and hpd */ | 1468 | /* Avoid continuous PSR exit by masking memup and hpd */ |
1469 | I915_WRITE(EDP_PSR_DEBUG_CTL, EDP_PSR_DEBUG_MASK_MEMUP | | 1469 | I915_WRITE(EDP_PSR_DEBUG_CTL, EDP_PSR_DEBUG_MASK_MEMUP | |
1470 | EDP_PSR_DEBUG_MASK_HPD); | 1470 | EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP); |
1471 | 1471 | ||
1472 | intel_dp->psr_setup_done = true; | 1472 | intel_dp->psr_setup_done = true; |
1473 | } | 1473 | } |
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 28cae80495e2..9b7b68fd5d47 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
@@ -793,6 +793,5 @@ extern void hsw_pc8_disable_interrupts(struct drm_device *dev); | |||
793 | extern void hsw_pc8_restore_interrupts(struct drm_device *dev); | 793 | extern void hsw_pc8_restore_interrupts(struct drm_device *dev); |
794 | extern void intel_aux_display_runtime_get(struct drm_i915_private *dev_priv); | 794 | extern void intel_aux_display_runtime_get(struct drm_i915_private *dev_priv); |
795 | extern void intel_aux_display_runtime_put(struct drm_i915_private *dev_priv); | 795 | extern void intel_aux_display_runtime_put(struct drm_i915_private *dev_priv); |
796 | extern void i915_disable_vga_mem(struct drm_device *dev); | ||
797 | 796 | ||
798 | #endif /* __INTEL_DRV_H__ */ | 797 | #endif /* __INTEL_DRV_H__ */ |
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index dd176b7296c1..f4c5e95b2d6f 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c | |||
@@ -3864,8 +3864,6 @@ static void valleyview_enable_rps(struct drm_device *dev) | |||
3864 | dev_priv->rps.rpe_delay), | 3864 | dev_priv->rps.rpe_delay), |
3865 | dev_priv->rps.rpe_delay); | 3865 | dev_priv->rps.rpe_delay); |
3866 | 3866 | ||
3867 | INIT_DELAYED_WORK(&dev_priv->rps.vlv_work, vlv_rps_timer_work); | ||
3868 | |||
3869 | valleyview_set_rps(dev_priv->dev, dev_priv->rps.rpe_delay); | 3867 | valleyview_set_rps(dev_priv->dev, dev_priv->rps.rpe_delay); |
3870 | 3868 | ||
3871 | gen6_enable_rps_interrupts(dev); | 3869 | gen6_enable_rps_interrupts(dev); |
@@ -4955,6 +4953,11 @@ static void haswell_init_clock_gating(struct drm_device *dev) | |||
4955 | I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER, | 4953 | I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER, |
4956 | GEN7_WA_L3_CHICKEN_MODE); | 4954 | GEN7_WA_L3_CHICKEN_MODE); |
4957 | 4955 | ||
4956 | /* L3 caching of data atomics doesn't work -- disable it. */ | ||
4957 | I915_WRITE(HSW_SCRATCH1, HSW_SCRATCH1_L3_DATA_ATOMICS_DISABLE); | ||
4958 | I915_WRITE(HSW_ROW_CHICKEN3, | ||
4959 | _MASKED_BIT_ENABLE(HSW_ROW_CHICKEN3_L3_GLOBAL_ATOMICS_DISABLE)); | ||
4960 | |||
4958 | /* This is required by WaCatErrorRejectionIssue:hsw */ | 4961 | /* This is required by WaCatErrorRejectionIssue:hsw */ |
4959 | I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG, | 4962 | I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG, |
4960 | I915_READ(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) | | 4963 | I915_READ(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) | |
@@ -5681,5 +5684,7 @@ void intel_pm_init(struct drm_device *dev) | |||
5681 | 5684 | ||
5682 | INIT_DELAYED_WORK(&dev_priv->rps.delayed_resume_work, | 5685 | INIT_DELAYED_WORK(&dev_priv->rps.delayed_resume_work, |
5683 | intel_gen6_powersave_work); | 5686 | intel_gen6_powersave_work); |
5687 | |||
5688 | INIT_DELAYED_WORK(&dev_priv->rps.vlv_work, vlv_rps_timer_work); | ||
5684 | } | 5689 | } |
5685 | 5690 | ||
diff --git a/drivers/gpu/drm/nouveau/core/subdev/mc/base.c b/drivers/gpu/drm/nouveau/core/subdev/mc/base.c index 37712a6df923..e290cfa4acee 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/mc/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/mc/base.c | |||
@@ -113,7 +113,7 @@ nouveau_mc_create_(struct nouveau_object *parent, struct nouveau_object *engine, | |||
113 | pmc->use_msi = false; | 113 | pmc->use_msi = false; |
114 | break; | 114 | break; |
115 | default: | 115 | default: |
116 | pmc->use_msi = nouveau_boolopt(device->cfgopt, "NvMSI", true); | 116 | pmc->use_msi = nouveau_boolopt(device->cfgopt, "NvMSI", false); |
117 | if (pmc->use_msi) { | 117 | if (pmc->use_msi) { |
118 | pmc->use_msi = pci_enable_msi(device->pdev) == 0; | 118 | pmc->use_msi = pci_enable_msi(device->pdev) == 0; |
119 | if (pmc->use_msi) { | 119 | if (pmc->use_msi) { |
diff --git a/drivers/gpu/drm/radeon/btc_dpm.c b/drivers/gpu/drm/radeon/btc_dpm.c index b162e98a2953..9b6950d9b3c0 100644 --- a/drivers/gpu/drm/radeon/btc_dpm.c +++ b/drivers/gpu/drm/radeon/btc_dpm.c | |||
@@ -1930,7 +1930,7 @@ static int btc_set_mc_special_registers(struct radeon_device *rdev, | |||
1930 | } | 1930 | } |
1931 | j++; | 1931 | j++; |
1932 | 1932 | ||
1933 | if (j > SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE) | 1933 | if (j >= SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE) |
1934 | return -EINVAL; | 1934 | return -EINVAL; |
1935 | 1935 | ||
1936 | tmp = RREG32(MC_PMG_CMD_MRS); | 1936 | tmp = RREG32(MC_PMG_CMD_MRS); |
@@ -1945,7 +1945,7 @@ static int btc_set_mc_special_registers(struct radeon_device *rdev, | |||
1945 | } | 1945 | } |
1946 | j++; | 1946 | j++; |
1947 | 1947 | ||
1948 | if (j > SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE) | 1948 | if (j >= SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE) |
1949 | return -EINVAL; | 1949 | return -EINVAL; |
1950 | break; | 1950 | break; |
1951 | case MC_SEQ_RESERVE_M >> 2: | 1951 | case MC_SEQ_RESERVE_M >> 2: |
@@ -1959,7 +1959,7 @@ static int btc_set_mc_special_registers(struct radeon_device *rdev, | |||
1959 | } | 1959 | } |
1960 | j++; | 1960 | j++; |
1961 | 1961 | ||
1962 | if (j > SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE) | 1962 | if (j >= SMC_EVERGREEN_MC_REGISTER_ARRAY_SIZE) |
1963 | return -EINVAL; | 1963 | return -EINVAL; |
1964 | break; | 1964 | break; |
1965 | default: | 1965 | default: |
diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index d02fd1c045d5..b874ccdf52f7 100644 --- a/drivers/gpu/drm/radeon/cik.c +++ b/drivers/gpu/drm/radeon/cik.c | |||
@@ -77,6 +77,8 @@ static void cik_pcie_gen3_enable(struct radeon_device *rdev); | |||
77 | static void cik_program_aspm(struct radeon_device *rdev); | 77 | static void cik_program_aspm(struct radeon_device *rdev); |
78 | static void cik_init_pg(struct radeon_device *rdev); | 78 | static void cik_init_pg(struct radeon_device *rdev); |
79 | static void cik_init_cg(struct radeon_device *rdev); | 79 | static void cik_init_cg(struct radeon_device *rdev); |
80 | static void cik_fini_pg(struct radeon_device *rdev); | ||
81 | static void cik_fini_cg(struct radeon_device *rdev); | ||
80 | static void cik_enable_gui_idle_interrupt(struct radeon_device *rdev, | 82 | static void cik_enable_gui_idle_interrupt(struct radeon_device *rdev, |
81 | bool enable); | 83 | bool enable); |
82 | 84 | ||
@@ -4185,6 +4187,10 @@ static void cik_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask) | |||
4185 | dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", | 4187 | dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", |
4186 | RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS)); | 4188 | RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS)); |
4187 | 4189 | ||
4190 | /* disable CG/PG */ | ||
4191 | cik_fini_pg(rdev); | ||
4192 | cik_fini_cg(rdev); | ||
4193 | |||
4188 | /* stop the rlc */ | 4194 | /* stop the rlc */ |
4189 | cik_rlc_stop(rdev); | 4195 | cik_rlc_stop(rdev); |
4190 | 4196 | ||
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 555164e270a7..b5c67a99dda9 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -3131,7 +3131,7 @@ static void evergreen_gpu_init(struct radeon_device *rdev) | |||
3131 | rdev->config.evergreen.sx_max_export_size = 256; | 3131 | rdev->config.evergreen.sx_max_export_size = 256; |
3132 | rdev->config.evergreen.sx_max_export_pos_size = 64; | 3132 | rdev->config.evergreen.sx_max_export_pos_size = 64; |
3133 | rdev->config.evergreen.sx_max_export_smx_size = 192; | 3133 | rdev->config.evergreen.sx_max_export_smx_size = 192; |
3134 | rdev->config.evergreen.max_hw_contexts = 8; | 3134 | rdev->config.evergreen.max_hw_contexts = 4; |
3135 | rdev->config.evergreen.sq_num_cf_insts = 2; | 3135 | rdev->config.evergreen.sq_num_cf_insts = 2; |
3136 | 3136 | ||
3137 | rdev->config.evergreen.sc_prim_fifo_size = 0x40; | 3137 | rdev->config.evergreen.sc_prim_fifo_size = 0x40; |
diff --git a/drivers/gpu/drm/radeon/evergreen_hdmi.c b/drivers/gpu/drm/radeon/evergreen_hdmi.c index f71ce390aebe..f815c20640bd 100644 --- a/drivers/gpu/drm/radeon/evergreen_hdmi.c +++ b/drivers/gpu/drm/radeon/evergreen_hdmi.c | |||
@@ -288,8 +288,7 @@ void evergreen_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode | |||
288 | /* fglrx clears sth in AFMT_AUDIO_PACKET_CONTROL2 here */ | 288 | /* fglrx clears sth in AFMT_AUDIO_PACKET_CONTROL2 here */ |
289 | 289 | ||
290 | WREG32(HDMI_ACR_PACKET_CONTROL + offset, | 290 | WREG32(HDMI_ACR_PACKET_CONTROL + offset, |
291 | HDMI_ACR_AUTO_SEND | /* allow hw to sent ACR packets when required */ | 291 | HDMI_ACR_AUTO_SEND); /* allow hw to sent ACR packets when required */ |
292 | HDMI_ACR_SOURCE); /* select SW CTS value */ | ||
293 | 292 | ||
294 | evergreen_hdmi_update_ACR(encoder, mode->clock); | 293 | evergreen_hdmi_update_ACR(encoder, mode->clock); |
295 | 294 | ||
diff --git a/drivers/gpu/drm/radeon/evergreend.h b/drivers/gpu/drm/radeon/evergreend.h index 8768fd6a1e27..4f6d2962767d 100644 --- a/drivers/gpu/drm/radeon/evergreend.h +++ b/drivers/gpu/drm/radeon/evergreend.h | |||
@@ -1501,7 +1501,7 @@ | |||
1501 | * 6. COMMAND [29:22] | BYTE_COUNT [20:0] | 1501 | * 6. COMMAND [29:22] | BYTE_COUNT [20:0] |
1502 | */ | 1502 | */ |
1503 | # define PACKET3_CP_DMA_DST_SEL(x) ((x) << 20) | 1503 | # define PACKET3_CP_DMA_DST_SEL(x) ((x) << 20) |
1504 | /* 0 - SRC_ADDR | 1504 | /* 0 - DST_ADDR |
1505 | * 1 - GDS | 1505 | * 1 - GDS |
1506 | */ | 1506 | */ |
1507 | # define PACKET3_CP_DMA_ENGINE(x) ((x) << 27) | 1507 | # define PACKET3_CP_DMA_ENGINE(x) ((x) << 27) |
@@ -1516,7 +1516,7 @@ | |||
1516 | # define PACKET3_CP_DMA_CP_SYNC (1 << 31) | 1516 | # define PACKET3_CP_DMA_CP_SYNC (1 << 31) |
1517 | /* COMMAND */ | 1517 | /* COMMAND */ |
1518 | # define PACKET3_CP_DMA_DIS_WC (1 << 21) | 1518 | # define PACKET3_CP_DMA_DIS_WC (1 << 21) |
1519 | # define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 23) | 1519 | # define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 22) |
1520 | /* 0 - none | 1520 | /* 0 - none |
1521 | * 1 - 8 in 16 | 1521 | * 1 - 8 in 16 |
1522 | * 2 - 8 in 32 | 1522 | * 2 - 8 in 32 |
diff --git a/drivers/gpu/drm/radeon/r600_hdmi.c b/drivers/gpu/drm/radeon/r600_hdmi.c index b0fa6002af3e..5b729319f27b 100644 --- a/drivers/gpu/drm/radeon/r600_hdmi.c +++ b/drivers/gpu/drm/radeon/r600_hdmi.c | |||
@@ -57,15 +57,15 @@ enum r600_hdmi_iec_status_bits { | |||
57 | static const struct radeon_hdmi_acr r600_hdmi_predefined_acr[] = { | 57 | static const struct radeon_hdmi_acr r600_hdmi_predefined_acr[] = { |
58 | /* 32kHz 44.1kHz 48kHz */ | 58 | /* 32kHz 44.1kHz 48kHz */ |
59 | /* Clock N CTS N CTS N CTS */ | 59 | /* Clock N CTS N CTS N CTS */ |
60 | { 25174, 4576, 28125, 7007, 31250, 6864, 28125 }, /* 25,20/1.001 MHz */ | 60 | { 25175, 4576, 28125, 7007, 31250, 6864, 28125 }, /* 25,20/1.001 MHz */ |
61 | { 25200, 4096, 25200, 6272, 28000, 6144, 25200 }, /* 25.20 MHz */ | 61 | { 25200, 4096, 25200, 6272, 28000, 6144, 25200 }, /* 25.20 MHz */ |
62 | { 27000, 4096, 27000, 6272, 30000, 6144, 27000 }, /* 27.00 MHz */ | 62 | { 27000, 4096, 27000, 6272, 30000, 6144, 27000 }, /* 27.00 MHz */ |
63 | { 27027, 4096, 27027, 6272, 30030, 6144, 27027 }, /* 27.00*1.001 MHz */ | 63 | { 27027, 4096, 27027, 6272, 30030, 6144, 27027 }, /* 27.00*1.001 MHz */ |
64 | { 54000, 4096, 54000, 6272, 60000, 6144, 54000 }, /* 54.00 MHz */ | 64 | { 54000, 4096, 54000, 6272, 60000, 6144, 54000 }, /* 54.00 MHz */ |
65 | { 54054, 4096, 54054, 6272, 60060, 6144, 54054 }, /* 54.00*1.001 MHz */ | 65 | { 54054, 4096, 54054, 6272, 60060, 6144, 54054 }, /* 54.00*1.001 MHz */ |
66 | { 74175, 11648, 210937, 17836, 234375, 11648, 140625 }, /* 74.25/1.001 MHz */ | 66 | { 74176, 11648, 210937, 17836, 234375, 11648, 140625 }, /* 74.25/1.001 MHz */ |
67 | { 74250, 4096, 74250, 6272, 82500, 6144, 74250 }, /* 74.25 MHz */ | 67 | { 74250, 4096, 74250, 6272, 82500, 6144, 74250 }, /* 74.25 MHz */ |
68 | { 148351, 11648, 421875, 8918, 234375, 5824, 140625 }, /* 148.50/1.001 MHz */ | 68 | { 148352, 11648, 421875, 8918, 234375, 5824, 140625 }, /* 148.50/1.001 MHz */ |
69 | { 148500, 4096, 148500, 6272, 165000, 6144, 148500 }, /* 148.50 MHz */ | 69 | { 148500, 4096, 148500, 6272, 165000, 6144, 148500 }, /* 148.50 MHz */ |
70 | { 0, 4096, 0, 6272, 0, 6144, 0 } /* Other */ | 70 | { 0, 4096, 0, 6272, 0, 6144, 0 } /* Other */ |
71 | }; | 71 | }; |
@@ -75,8 +75,15 @@ static const struct radeon_hdmi_acr r600_hdmi_predefined_acr[] = { | |||
75 | */ | 75 | */ |
76 | static void r600_hdmi_calc_cts(uint32_t clock, int *CTS, int N, int freq) | 76 | static void r600_hdmi_calc_cts(uint32_t clock, int *CTS, int N, int freq) |
77 | { | 77 | { |
78 | if (*CTS == 0) | 78 | u64 n; |
79 | *CTS = clock * N / (128 * freq) * 1000; | 79 | u32 d; |
80 | |||
81 | if (*CTS == 0) { | ||
82 | n = (u64)clock * (u64)N * 1000ULL; | ||
83 | d = 128 * freq; | ||
84 | do_div(n, d); | ||
85 | *CTS = n; | ||
86 | } | ||
80 | DRM_DEBUG("Using ACR timing N=%d CTS=%d for frequency %d\n", | 87 | DRM_DEBUG("Using ACR timing N=%d CTS=%d for frequency %d\n", |
81 | N, *CTS, freq); | 88 | N, *CTS, freq); |
82 | } | 89 | } |
@@ -444,8 +451,8 @@ void r600_hdmi_setmode(struct drm_encoder *encoder, struct drm_display_mode *mod | |||
444 | } | 451 | } |
445 | 452 | ||
446 | WREG32(HDMI0_ACR_PACKET_CONTROL + offset, | 453 | WREG32(HDMI0_ACR_PACKET_CONTROL + offset, |
447 | HDMI0_ACR_AUTO_SEND | /* allow hw to sent ACR packets when required */ | 454 | HDMI0_ACR_SOURCE | /* select SW CTS value - XXX verify that hw CTS works on all families */ |
448 | HDMI0_ACR_SOURCE); /* select SW CTS value */ | 455 | HDMI0_ACR_AUTO_SEND); /* allow hw to sent ACR packets when required */ |
449 | 456 | ||
450 | WREG32(HDMI0_VBI_PACKET_CONTROL + offset, | 457 | WREG32(HDMI0_VBI_PACKET_CONTROL + offset, |
451 | HDMI0_NULL_SEND | /* send null packets when required */ | 458 | HDMI0_NULL_SEND | /* send null packets when required */ |
diff --git a/drivers/gpu/drm/radeon/r600d.h b/drivers/gpu/drm/radeon/r600d.h index e673fe26ea84..7b3c7b5932c5 100644 --- a/drivers/gpu/drm/radeon/r600d.h +++ b/drivers/gpu/drm/radeon/r600d.h | |||
@@ -1523,7 +1523,7 @@ | |||
1523 | */ | 1523 | */ |
1524 | # define PACKET3_CP_DMA_CP_SYNC (1 << 31) | 1524 | # define PACKET3_CP_DMA_CP_SYNC (1 << 31) |
1525 | /* COMMAND */ | 1525 | /* COMMAND */ |
1526 | # define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 23) | 1526 | # define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 22) |
1527 | /* 0 - none | 1527 | /* 0 - none |
1528 | * 1 - 8 in 16 | 1528 | * 1 - 8 in 16 |
1529 | * 2 - 8 in 32 | 1529 | * 2 - 8 in 32 |
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index ac07ad1d4f8c..4f6b7fc7ad3c 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
@@ -945,6 +945,8 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable) | |||
945 | if (enable) { | 945 | if (enable) { |
946 | mutex_lock(&rdev->pm.mutex); | 946 | mutex_lock(&rdev->pm.mutex); |
947 | rdev->pm.dpm.uvd_active = true; | 947 | rdev->pm.dpm.uvd_active = true; |
948 | /* disable this for now */ | ||
949 | #if 0 | ||
948 | if ((rdev->pm.dpm.sd == 1) && (rdev->pm.dpm.hd == 0)) | 950 | if ((rdev->pm.dpm.sd == 1) && (rdev->pm.dpm.hd == 0)) |
949 | dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_SD; | 951 | dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_SD; |
950 | else if ((rdev->pm.dpm.sd == 2) && (rdev->pm.dpm.hd == 0)) | 952 | else if ((rdev->pm.dpm.sd == 2) && (rdev->pm.dpm.hd == 0)) |
@@ -954,6 +956,7 @@ void radeon_dpm_enable_uvd(struct radeon_device *rdev, bool enable) | |||
954 | else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 2)) | 956 | else if ((rdev->pm.dpm.sd == 0) && (rdev->pm.dpm.hd == 2)) |
955 | dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_HD2; | 957 | dpm_state = POWER_STATE_TYPE_INTERNAL_UVD_HD2; |
956 | else | 958 | else |
959 | #endif | ||
957 | dpm_state = POWER_STATE_TYPE_INTERNAL_UVD; | 960 | dpm_state = POWER_STATE_TYPE_INTERNAL_UVD; |
958 | rdev->pm.dpm.state = dpm_state; | 961 | rdev->pm.dpm.state = dpm_state; |
959 | mutex_unlock(&rdev->pm.mutex); | 962 | mutex_unlock(&rdev->pm.mutex); |
diff --git a/drivers/gpu/drm/radeon/radeon_test.c b/drivers/gpu/drm/radeon/radeon_test.c index f4d6bcee9006..12e8099a0823 100644 --- a/drivers/gpu/drm/radeon/radeon_test.c +++ b/drivers/gpu/drm/radeon/radeon_test.c | |||
@@ -36,8 +36,8 @@ static void radeon_do_test_moves(struct radeon_device *rdev, int flag) | |||
36 | struct radeon_bo *vram_obj = NULL; | 36 | struct radeon_bo *vram_obj = NULL; |
37 | struct radeon_bo **gtt_obj = NULL; | 37 | struct radeon_bo **gtt_obj = NULL; |
38 | uint64_t gtt_addr, vram_addr; | 38 | uint64_t gtt_addr, vram_addr; |
39 | unsigned i, n, size; | 39 | unsigned n, size; |
40 | int r, ring; | 40 | int i, r, ring; |
41 | 41 | ||
42 | switch (flag) { | 42 | switch (flag) { |
43 | case RADEON_TEST_COPY_DMA: | 43 | case RADEON_TEST_COPY_DMA: |
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c index a0f11856ddde..4f2e73f79638 100644 --- a/drivers/gpu/drm/radeon/radeon_uvd.c +++ b/drivers/gpu/drm/radeon/radeon_uvd.c | |||
@@ -798,7 +798,8 @@ void radeon_uvd_note_usage(struct radeon_device *rdev) | |||
798 | (rdev->pm.dpm.hd != hd)) { | 798 | (rdev->pm.dpm.hd != hd)) { |
799 | rdev->pm.dpm.sd = sd; | 799 | rdev->pm.dpm.sd = sd; |
800 | rdev->pm.dpm.hd = hd; | 800 | rdev->pm.dpm.hd = hd; |
801 | streams_changed = true; | 801 | /* disable this for now */ |
802 | /*streams_changed = true;*/ | ||
802 | } | 803 | } |
803 | } | 804 | } |
804 | 805 | ||
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index c354c1094967..d4652af425b8 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -85,6 +85,9 @@ extern void si_dma_vm_set_page(struct radeon_device *rdev, | |||
85 | uint32_t incr, uint32_t flags); | 85 | uint32_t incr, uint32_t flags); |
86 | static void si_enable_gui_idle_interrupt(struct radeon_device *rdev, | 86 | static void si_enable_gui_idle_interrupt(struct radeon_device *rdev, |
87 | bool enable); | 87 | bool enable); |
88 | static void si_fini_pg(struct radeon_device *rdev); | ||
89 | static void si_fini_cg(struct radeon_device *rdev); | ||
90 | static void si_rlc_stop(struct radeon_device *rdev); | ||
88 | 91 | ||
89 | static const u32 verde_rlc_save_restore_register_list[] = | 92 | static const u32 verde_rlc_save_restore_register_list[] = |
90 | { | 93 | { |
@@ -3608,6 +3611,13 @@ static void si_gpu_soft_reset(struct radeon_device *rdev, u32 reset_mask) | |||
3608 | dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", | 3611 | dev_info(rdev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n", |
3609 | RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS)); | 3612 | RREG32(VM_CONTEXT1_PROTECTION_FAULT_STATUS)); |
3610 | 3613 | ||
3614 | /* disable PG/CG */ | ||
3615 | si_fini_pg(rdev); | ||
3616 | si_fini_cg(rdev); | ||
3617 | |||
3618 | /* stop the rlc */ | ||
3619 | si_rlc_stop(rdev); | ||
3620 | |||
3611 | /* Disable CP parsing/prefetching */ | 3621 | /* Disable CP parsing/prefetching */ |
3612 | WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT); | 3622 | WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT); |
3613 | 3623 | ||
diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 9ace28702c76..2332aa1bf93c 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c | |||
@@ -5208,7 +5208,7 @@ static int si_set_mc_special_registers(struct radeon_device *rdev, | |||
5208 | table->mc_reg_table_entry[k].mc_data[j] |= 0x100; | 5208 | table->mc_reg_table_entry[k].mc_data[j] |= 0x100; |
5209 | } | 5209 | } |
5210 | j++; | 5210 | j++; |
5211 | if (j > SMC_SISLANDS_MC_REGISTER_ARRAY_SIZE) | 5211 | if (j >= SMC_SISLANDS_MC_REGISTER_ARRAY_SIZE) |
5212 | return -EINVAL; | 5212 | return -EINVAL; |
5213 | 5213 | ||
5214 | if (!pi->mem_gddr5) { | 5214 | if (!pi->mem_gddr5) { |
@@ -5218,7 +5218,7 @@ static int si_set_mc_special_registers(struct radeon_device *rdev, | |||
5218 | table->mc_reg_table_entry[k].mc_data[j] = | 5218 | table->mc_reg_table_entry[k].mc_data[j] = |
5219 | (table->mc_reg_table_entry[k].mc_data[i] & 0xffff0000) >> 16; | 5219 | (table->mc_reg_table_entry[k].mc_data[i] & 0xffff0000) >> 16; |
5220 | j++; | 5220 | j++; |
5221 | if (j > SMC_SISLANDS_MC_REGISTER_ARRAY_SIZE) | 5221 | if (j >= SMC_SISLANDS_MC_REGISTER_ARRAY_SIZE) |
5222 | return -EINVAL; | 5222 | return -EINVAL; |
5223 | } | 5223 | } |
5224 | break; | 5224 | break; |
@@ -5231,7 +5231,7 @@ static int si_set_mc_special_registers(struct radeon_device *rdev, | |||
5231 | (temp_reg & 0xffff0000) | | 5231 | (temp_reg & 0xffff0000) | |
5232 | (table->mc_reg_table_entry[k].mc_data[i] & 0x0000ffff); | 5232 | (table->mc_reg_table_entry[k].mc_data[i] & 0x0000ffff); |
5233 | j++; | 5233 | j++; |
5234 | if (j > SMC_SISLANDS_MC_REGISTER_ARRAY_SIZE) | 5234 | if (j >= SMC_SISLANDS_MC_REGISTER_ARRAY_SIZE) |
5235 | return -EINVAL; | 5235 | return -EINVAL; |
5236 | break; | 5236 | break; |
5237 | default: | 5237 | default: |
diff --git a/drivers/gpu/drm/radeon/sid.h b/drivers/gpu/drm/radeon/sid.h index 52d2ab6b67a0..7e2e0ea66a00 100644 --- a/drivers/gpu/drm/radeon/sid.h +++ b/drivers/gpu/drm/radeon/sid.h | |||
@@ -1553,7 +1553,7 @@ | |||
1553 | * 6. COMMAND [30:21] | BYTE_COUNT [20:0] | 1553 | * 6. COMMAND [30:21] | BYTE_COUNT [20:0] |
1554 | */ | 1554 | */ |
1555 | # define PACKET3_CP_DMA_DST_SEL(x) ((x) << 20) | 1555 | # define PACKET3_CP_DMA_DST_SEL(x) ((x) << 20) |
1556 | /* 0 - SRC_ADDR | 1556 | /* 0 - DST_ADDR |
1557 | * 1 - GDS | 1557 | * 1 - GDS |
1558 | */ | 1558 | */ |
1559 | # define PACKET3_CP_DMA_ENGINE(x) ((x) << 27) | 1559 | # define PACKET3_CP_DMA_ENGINE(x) ((x) << 27) |
@@ -1568,7 +1568,7 @@ | |||
1568 | # define PACKET3_CP_DMA_CP_SYNC (1 << 31) | 1568 | # define PACKET3_CP_DMA_CP_SYNC (1 << 31) |
1569 | /* COMMAND */ | 1569 | /* COMMAND */ |
1570 | # define PACKET3_CP_DMA_DIS_WC (1 << 21) | 1570 | # define PACKET3_CP_DMA_DIS_WC (1 << 21) |
1571 | # define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 23) | 1571 | # define PACKET3_CP_DMA_CMD_SRC_SWAP(x) ((x) << 22) |
1572 | /* 0 - none | 1572 | /* 0 - none |
1573 | * 1 - 8 in 16 | 1573 | * 1 - 8 in 16 |
1574 | * 2 - 8 in 32 | 1574 | * 2 - 8 in 32 |
diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c index 7f998bf1cc9d..9364129ba292 100644 --- a/drivers/gpu/drm/radeon/trinity_dpm.c +++ b/drivers/gpu/drm/radeon/trinity_dpm.c | |||
@@ -1868,7 +1868,7 @@ int trinity_dpm_init(struct radeon_device *rdev) | |||
1868 | for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++) | 1868 | for (i = 0; i < SUMO_MAX_HARDWARE_POWERLEVELS; i++) |
1869 | pi->at[i] = TRINITY_AT_DFLT; | 1869 | pi->at[i] = TRINITY_AT_DFLT; |
1870 | 1870 | ||
1871 | pi->enable_bapm = true; | 1871 | pi->enable_bapm = false; |
1872 | pi->enable_nbps_policy = true; | 1872 | pi->enable_nbps_policy = true; |
1873 | pi->enable_sclk_ds = true; | 1873 | pi->enable_sclk_ds = true; |
1874 | pi->enable_gfx_power_gating = true; | 1874 | pi->enable_gfx_power_gating = true; |
diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig index 71b70e3a7a71..c91d547191dd 100644 --- a/drivers/hid/Kconfig +++ b/drivers/hid/Kconfig | |||
@@ -241,6 +241,7 @@ config HID_HOLTEK | |||
241 | - Sharkoon Drakonia / Perixx MX-2000 gaming mice | 241 | - Sharkoon Drakonia / Perixx MX-2000 gaming mice |
242 | - Tracer Sniper TRM-503 / NOVA Gaming Slider X200 / | 242 | - Tracer Sniper TRM-503 / NOVA Gaming Slider X200 / |
243 | Zalman ZM-GM1 | 243 | Zalman ZM-GM1 |
244 | - SHARKOON DarkGlider Gaming mouse | ||
244 | 245 | ||
245 | config HOLTEK_FF | 246 | config HOLTEK_FF |
246 | bool "Holtek On Line Grip force feedback support" | 247 | bool "Holtek On Line Grip force feedback support" |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index b8470b1a10fe..5a8c01112a23 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1715,6 +1715,7 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
1715 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) }, | 1715 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) }, |
1716 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) }, | 1716 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) }, |
1717 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) }, | 1717 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) }, |
1718 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) }, | ||
1718 | { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) }, | 1719 | { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) }, |
1719 | { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) }, | 1720 | { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) }, |
1720 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) }, | 1721 | { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) }, |
diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c index 7e6db3cf46f9..e696566cde46 100644 --- a/drivers/hid/hid-holtek-mouse.c +++ b/drivers/hid/hid-holtek-mouse.c | |||
@@ -27,6 +27,7 @@ | |||
27 | * - USB ID 04d9:a067, sold as Sharkoon Drakonia and Perixx MX-2000 | 27 | * - USB ID 04d9:a067, sold as Sharkoon Drakonia and Perixx MX-2000 |
28 | * - USB ID 04d9:a04a, sold as Tracer Sniper TRM-503, NOVA Gaming Slider X200 | 28 | * - USB ID 04d9:a04a, sold as Tracer Sniper TRM-503, NOVA Gaming Slider X200 |
29 | * and Zalman ZM-GM1 | 29 | * and Zalman ZM-GM1 |
30 | * - USB ID 04d9:a081, sold as SHARKOON DarkGlider Gaming mouse | ||
30 | */ | 31 | */ |
31 | 32 | ||
32 | static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc, | 33 | static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc, |
@@ -46,6 +47,7 @@ static __u8 *holtek_mouse_report_fixup(struct hid_device *hdev, __u8 *rdesc, | |||
46 | } | 47 | } |
47 | break; | 48 | break; |
48 | case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A: | 49 | case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A: |
50 | case USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081: | ||
49 | if (*rsize >= 113 && rdesc[106] == 0xff && rdesc[107] == 0x7f | 51 | if (*rsize >= 113 && rdesc[106] == 0xff && rdesc[107] == 0x7f |
50 | && rdesc[111] == 0xff && rdesc[112] == 0x7f) { | 52 | && rdesc[111] == 0xff && rdesc[112] == 0x7f) { |
51 | hid_info(hdev, "Fixing up report descriptor\n"); | 53 | hid_info(hdev, "Fixing up report descriptor\n"); |
@@ -63,6 +65,8 @@ static const struct hid_device_id holtek_mouse_devices[] = { | |||
63 | USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) }, | 65 | USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) }, |
64 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, | 66 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, |
65 | USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) }, | 67 | USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) }, |
68 | { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, | ||
69 | USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081) }, | ||
66 | { } | 70 | { } |
67 | }; | 71 | }; |
68 | MODULE_DEVICE_TABLE(hid, holtek_mouse_devices); | 72 | MODULE_DEVICE_TABLE(hid, holtek_mouse_devices); |
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index e60e8d530697..9cbc7ab07dfa 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h | |||
@@ -450,6 +450,7 @@ | |||
450 | #define USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD 0xa055 | 450 | #define USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD 0xa055 |
451 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067 0xa067 | 451 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067 0xa067 |
452 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A 0xa04a | 452 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A 0xa04a |
453 | #define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A081 0xa081 | ||
453 | 454 | ||
454 | #define USB_VENDOR_ID_IMATION 0x0718 | 455 | #define USB_VENDOR_ID_IMATION 0x0718 |
455 | #define USB_DEVICE_ID_DISC_STAKKA 0xd000 | 456 | #define USB_DEVICE_ID_DISC_STAKKA 0xd000 |
diff --git a/drivers/hid/hid-roccat-kone.c b/drivers/hid/hid-roccat-kone.c index 602c188e9d86..6101816a7ddd 100644 --- a/drivers/hid/hid-roccat-kone.c +++ b/drivers/hid/hid-roccat-kone.c | |||
@@ -382,7 +382,7 @@ static ssize_t kone_sysfs_write_profilex(struct file *fp, | |||
382 | } | 382 | } |
383 | #define PROFILE_ATTR(number) \ | 383 | #define PROFILE_ATTR(number) \ |
384 | static struct bin_attribute bin_attr_profile##number = { \ | 384 | static struct bin_attribute bin_attr_profile##number = { \ |
385 | .attr = { .name = "profile##number", .mode = 0660 }, \ | 385 | .attr = { .name = "profile" #number, .mode = 0660 }, \ |
386 | .size = sizeof(struct kone_profile), \ | 386 | .size = sizeof(struct kone_profile), \ |
387 | .read = kone_sysfs_read_profilex, \ | 387 | .read = kone_sysfs_read_profilex, \ |
388 | .write = kone_sysfs_write_profilex, \ | 388 | .write = kone_sysfs_write_profilex, \ |
diff --git a/drivers/hid/hid-roccat-koneplus.c b/drivers/hid/hid-roccat-koneplus.c index 5ddf605b6b89..5e99fcdc71b9 100644 --- a/drivers/hid/hid-roccat-koneplus.c +++ b/drivers/hid/hid-roccat-koneplus.c | |||
@@ -229,13 +229,13 @@ static ssize_t koneplus_sysfs_read_profilex_buttons(struct file *fp, | |||
229 | 229 | ||
230 | #define PROFILE_ATTR(number) \ | 230 | #define PROFILE_ATTR(number) \ |
231 | static struct bin_attribute bin_attr_profile##number##_settings = { \ | 231 | static struct bin_attribute bin_attr_profile##number##_settings = { \ |
232 | .attr = { .name = "profile##number##_settings", .mode = 0440 }, \ | 232 | .attr = { .name = "profile" #number "_settings", .mode = 0440 }, \ |
233 | .size = KONEPLUS_SIZE_PROFILE_SETTINGS, \ | 233 | .size = KONEPLUS_SIZE_PROFILE_SETTINGS, \ |
234 | .read = koneplus_sysfs_read_profilex_settings, \ | 234 | .read = koneplus_sysfs_read_profilex_settings, \ |
235 | .private = &profile_numbers[number-1], \ | 235 | .private = &profile_numbers[number-1], \ |
236 | }; \ | 236 | }; \ |
237 | static struct bin_attribute bin_attr_profile##number##_buttons = { \ | 237 | static struct bin_attribute bin_attr_profile##number##_buttons = { \ |
238 | .attr = { .name = "profile##number##_buttons", .mode = 0440 }, \ | 238 | .attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \ |
239 | .size = KONEPLUS_SIZE_PROFILE_BUTTONS, \ | 239 | .size = KONEPLUS_SIZE_PROFILE_BUTTONS, \ |
240 | .read = koneplus_sysfs_read_profilex_buttons, \ | 240 | .read = koneplus_sysfs_read_profilex_buttons, \ |
241 | .private = &profile_numbers[number-1], \ | 241 | .private = &profile_numbers[number-1], \ |
diff --git a/drivers/hid/hid-roccat-kovaplus.c b/drivers/hid/hid-roccat-kovaplus.c index 515bc03136c0..0c8e1ef0b67d 100644 --- a/drivers/hid/hid-roccat-kovaplus.c +++ b/drivers/hid/hid-roccat-kovaplus.c | |||
@@ -257,13 +257,13 @@ static ssize_t kovaplus_sysfs_read_profilex_buttons(struct file *fp, | |||
257 | 257 | ||
258 | #define PROFILE_ATTR(number) \ | 258 | #define PROFILE_ATTR(number) \ |
259 | static struct bin_attribute bin_attr_profile##number##_settings = { \ | 259 | static struct bin_attribute bin_attr_profile##number##_settings = { \ |
260 | .attr = { .name = "profile##number##_settings", .mode = 0440 }, \ | 260 | .attr = { .name = "profile" #number "_settings", .mode = 0440 }, \ |
261 | .size = KOVAPLUS_SIZE_PROFILE_SETTINGS, \ | 261 | .size = KOVAPLUS_SIZE_PROFILE_SETTINGS, \ |
262 | .read = kovaplus_sysfs_read_profilex_settings, \ | 262 | .read = kovaplus_sysfs_read_profilex_settings, \ |
263 | .private = &profile_numbers[number-1], \ | 263 | .private = &profile_numbers[number-1], \ |
264 | }; \ | 264 | }; \ |
265 | static struct bin_attribute bin_attr_profile##number##_buttons = { \ | 265 | static struct bin_attribute bin_attr_profile##number##_buttons = { \ |
266 | .attr = { .name = "profile##number##_buttons", .mode = 0440 }, \ | 266 | .attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \ |
267 | .size = KOVAPLUS_SIZE_PROFILE_BUTTONS, \ | 267 | .size = KOVAPLUS_SIZE_PROFILE_BUTTONS, \ |
268 | .read = kovaplus_sysfs_read_profilex_buttons, \ | 268 | .read = kovaplus_sysfs_read_profilex_buttons, \ |
269 | .private = &profile_numbers[number-1], \ | 269 | .private = &profile_numbers[number-1], \ |
diff --git a/drivers/hid/hid-roccat-pyra.c b/drivers/hid/hid-roccat-pyra.c index 5a6dbbeee790..1a07e07d99a0 100644 --- a/drivers/hid/hid-roccat-pyra.c +++ b/drivers/hid/hid-roccat-pyra.c | |||
@@ -225,13 +225,13 @@ static ssize_t pyra_sysfs_read_profilex_buttons(struct file *fp, | |||
225 | 225 | ||
226 | #define PROFILE_ATTR(number) \ | 226 | #define PROFILE_ATTR(number) \ |
227 | static struct bin_attribute bin_attr_profile##number##_settings = { \ | 227 | static struct bin_attribute bin_attr_profile##number##_settings = { \ |
228 | .attr = { .name = "profile##number##_settings", .mode = 0440 }, \ | 228 | .attr = { .name = "profile" #number "_settings", .mode = 0440 }, \ |
229 | .size = PYRA_SIZE_PROFILE_SETTINGS, \ | 229 | .size = PYRA_SIZE_PROFILE_SETTINGS, \ |
230 | .read = pyra_sysfs_read_profilex_settings, \ | 230 | .read = pyra_sysfs_read_profilex_settings, \ |
231 | .private = &profile_numbers[number-1], \ | 231 | .private = &profile_numbers[number-1], \ |
232 | }; \ | 232 | }; \ |
233 | static struct bin_attribute bin_attr_profile##number##_buttons = { \ | 233 | static struct bin_attribute bin_attr_profile##number##_buttons = { \ |
234 | .attr = { .name = "profile##number##_buttons", .mode = 0440 }, \ | 234 | .attr = { .name = "profile" #number "_buttons", .mode = 0440 }, \ |
235 | .size = PYRA_SIZE_PROFILE_BUTTONS, \ | 235 | .size = PYRA_SIZE_PROFILE_BUTTONS, \ |
236 | .read = pyra_sysfs_read_profilex_buttons, \ | 236 | .read = pyra_sysfs_read_profilex_buttons, \ |
237 | .private = &profile_numbers[number-1], \ | 237 | .private = &profile_numbers[number-1], \ |
diff --git a/drivers/hid/hid-wiimote-modules.c b/drivers/hid/hid-wiimote-modules.c index 2e7d644dba18..71adf9e60b13 100644 --- a/drivers/hid/hid-wiimote-modules.c +++ b/drivers/hid/hid-wiimote-modules.c | |||
@@ -119,12 +119,22 @@ static const struct wiimod_ops wiimod_keys = { | |||
119 | * the rumble motor, this flag shouldn't be set. | 119 | * the rumble motor, this flag shouldn't be set. |
120 | */ | 120 | */ |
121 | 121 | ||
122 | /* used by wiimod_rumble and wiipro_rumble */ | ||
123 | static void wiimod_rumble_worker(struct work_struct *work) | ||
124 | { | ||
125 | struct wiimote_data *wdata = container_of(work, struct wiimote_data, | ||
126 | rumble_worker); | ||
127 | |||
128 | spin_lock_irq(&wdata->state.lock); | ||
129 | wiiproto_req_rumble(wdata, wdata->state.cache_rumble); | ||
130 | spin_unlock_irq(&wdata->state.lock); | ||
131 | } | ||
132 | |||
122 | static int wiimod_rumble_play(struct input_dev *dev, void *data, | 133 | static int wiimod_rumble_play(struct input_dev *dev, void *data, |
123 | struct ff_effect *eff) | 134 | struct ff_effect *eff) |
124 | { | 135 | { |
125 | struct wiimote_data *wdata = input_get_drvdata(dev); | 136 | struct wiimote_data *wdata = input_get_drvdata(dev); |
126 | __u8 value; | 137 | __u8 value; |
127 | unsigned long flags; | ||
128 | 138 | ||
129 | /* | 139 | /* |
130 | * The wiimote supports only a single rumble motor so if any magnitude | 140 | * The wiimote supports only a single rumble motor so if any magnitude |
@@ -137,9 +147,10 @@ static int wiimod_rumble_play(struct input_dev *dev, void *data, | |||
137 | else | 147 | else |
138 | value = 0; | 148 | value = 0; |
139 | 149 | ||
140 | spin_lock_irqsave(&wdata->state.lock, flags); | 150 | /* Locking state.lock here might deadlock with input_event() calls. |
141 | wiiproto_req_rumble(wdata, value); | 151 | * schedule_work acts as barrier. Merging multiple changes is fine. */ |
142 | spin_unlock_irqrestore(&wdata->state.lock, flags); | 152 | wdata->state.cache_rumble = value; |
153 | schedule_work(&wdata->rumble_worker); | ||
143 | 154 | ||
144 | return 0; | 155 | return 0; |
145 | } | 156 | } |
@@ -147,6 +158,8 @@ static int wiimod_rumble_play(struct input_dev *dev, void *data, | |||
147 | static int wiimod_rumble_probe(const struct wiimod_ops *ops, | 158 | static int wiimod_rumble_probe(const struct wiimod_ops *ops, |
148 | struct wiimote_data *wdata) | 159 | struct wiimote_data *wdata) |
149 | { | 160 | { |
161 | INIT_WORK(&wdata->rumble_worker, wiimod_rumble_worker); | ||
162 | |||
150 | set_bit(FF_RUMBLE, wdata->input->ffbit); | 163 | set_bit(FF_RUMBLE, wdata->input->ffbit); |
151 | if (input_ff_create_memless(wdata->input, NULL, wiimod_rumble_play)) | 164 | if (input_ff_create_memless(wdata->input, NULL, wiimod_rumble_play)) |
152 | return -ENOMEM; | 165 | return -ENOMEM; |
@@ -159,6 +172,8 @@ static void wiimod_rumble_remove(const struct wiimod_ops *ops, | |||
159 | { | 172 | { |
160 | unsigned long flags; | 173 | unsigned long flags; |
161 | 174 | ||
175 | cancel_work_sync(&wdata->rumble_worker); | ||
176 | |||
162 | spin_lock_irqsave(&wdata->state.lock, flags); | 177 | spin_lock_irqsave(&wdata->state.lock, flags); |
163 | wiiproto_req_rumble(wdata, 0); | 178 | wiiproto_req_rumble(wdata, 0); |
164 | spin_unlock_irqrestore(&wdata->state.lock, flags); | 179 | spin_unlock_irqrestore(&wdata->state.lock, flags); |
@@ -1731,7 +1746,6 @@ static int wiimod_pro_play(struct input_dev *dev, void *data, | |||
1731 | { | 1746 | { |
1732 | struct wiimote_data *wdata = input_get_drvdata(dev); | 1747 | struct wiimote_data *wdata = input_get_drvdata(dev); |
1733 | __u8 value; | 1748 | __u8 value; |
1734 | unsigned long flags; | ||
1735 | 1749 | ||
1736 | /* | 1750 | /* |
1737 | * The wiimote supports only a single rumble motor so if any magnitude | 1751 | * The wiimote supports only a single rumble motor so if any magnitude |
@@ -1744,9 +1758,10 @@ static int wiimod_pro_play(struct input_dev *dev, void *data, | |||
1744 | else | 1758 | else |
1745 | value = 0; | 1759 | value = 0; |
1746 | 1760 | ||
1747 | spin_lock_irqsave(&wdata->state.lock, flags); | 1761 | /* Locking state.lock here might deadlock with input_event() calls. |
1748 | wiiproto_req_rumble(wdata, value); | 1762 | * schedule_work acts as barrier. Merging multiple changes is fine. */ |
1749 | spin_unlock_irqrestore(&wdata->state.lock, flags); | 1763 | wdata->state.cache_rumble = value; |
1764 | schedule_work(&wdata->rumble_worker); | ||
1750 | 1765 | ||
1751 | return 0; | 1766 | return 0; |
1752 | } | 1767 | } |
@@ -1756,6 +1771,8 @@ static int wiimod_pro_probe(const struct wiimod_ops *ops, | |||
1756 | { | 1771 | { |
1757 | int ret, i; | 1772 | int ret, i; |
1758 | 1773 | ||
1774 | INIT_WORK(&wdata->rumble_worker, wiimod_rumble_worker); | ||
1775 | |||
1759 | wdata->extension.input = input_allocate_device(); | 1776 | wdata->extension.input = input_allocate_device(); |
1760 | if (!wdata->extension.input) | 1777 | if (!wdata->extension.input) |
1761 | return -ENOMEM; | 1778 | return -ENOMEM; |
@@ -1817,12 +1834,13 @@ static void wiimod_pro_remove(const struct wiimod_ops *ops, | |||
1817 | if (!wdata->extension.input) | 1834 | if (!wdata->extension.input) |
1818 | return; | 1835 | return; |
1819 | 1836 | ||
1837 | input_unregister_device(wdata->extension.input); | ||
1838 | wdata->extension.input = NULL; | ||
1839 | cancel_work_sync(&wdata->rumble_worker); | ||
1840 | |||
1820 | spin_lock_irqsave(&wdata->state.lock, flags); | 1841 | spin_lock_irqsave(&wdata->state.lock, flags); |
1821 | wiiproto_req_rumble(wdata, 0); | 1842 | wiiproto_req_rumble(wdata, 0); |
1822 | spin_unlock_irqrestore(&wdata->state.lock, flags); | 1843 | spin_unlock_irqrestore(&wdata->state.lock, flags); |
1823 | |||
1824 | input_unregister_device(wdata->extension.input); | ||
1825 | wdata->extension.input = NULL; | ||
1826 | } | 1844 | } |
1827 | 1845 | ||
1828 | static const struct wiimod_ops wiimod_pro = { | 1846 | static const struct wiimod_ops wiimod_pro = { |
diff --git a/drivers/hid/hid-wiimote.h b/drivers/hid/hid-wiimote.h index f1474f372c0b..75db0c400037 100644 --- a/drivers/hid/hid-wiimote.h +++ b/drivers/hid/hid-wiimote.h | |||
@@ -133,13 +133,15 @@ struct wiimote_state { | |||
133 | __u8 *cmd_read_buf; | 133 | __u8 *cmd_read_buf; |
134 | __u8 cmd_read_size; | 134 | __u8 cmd_read_size; |
135 | 135 | ||
136 | /* calibration data */ | 136 | /* calibration/cache data */ |
137 | __u16 calib_bboard[4][3]; | 137 | __u16 calib_bboard[4][3]; |
138 | __u8 cache_rumble; | ||
138 | }; | 139 | }; |
139 | 140 | ||
140 | struct wiimote_data { | 141 | struct wiimote_data { |
141 | struct hid_device *hdev; | 142 | struct hid_device *hdev; |
142 | struct input_dev *input; | 143 | struct input_dev *input; |
144 | struct work_struct rumble_worker; | ||
143 | struct led_classdev *leds[4]; | 145 | struct led_classdev *leds[4]; |
144 | struct input_dev *accel; | 146 | struct input_dev *accel; |
145 | struct input_dev *ir; | 147 | struct input_dev *ir; |
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 8918dd12bb69..6a6dd5cd7833 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -308,18 +308,25 @@ static int hidraw_fasync(int fd, struct file *file, int on) | |||
308 | static void drop_ref(struct hidraw *hidraw, int exists_bit) | 308 | static void drop_ref(struct hidraw *hidraw, int exists_bit) |
309 | { | 309 | { |
310 | if (exists_bit) { | 310 | if (exists_bit) { |
311 | hid_hw_close(hidraw->hid); | ||
312 | hidraw->exist = 0; | 311 | hidraw->exist = 0; |
313 | if (hidraw->open) | 312 | if (hidraw->open) { |
313 | hid_hw_close(hidraw->hid); | ||
314 | wake_up_interruptible(&hidraw->wait); | 314 | wake_up_interruptible(&hidraw->wait); |
315 | } | ||
315 | } else { | 316 | } else { |
316 | --hidraw->open; | 317 | --hidraw->open; |
317 | } | 318 | } |
318 | 319 | if (!hidraw->open) { | |
319 | if (!hidraw->open && !hidraw->exist) { | 320 | if (!hidraw->exist) { |
320 | device_destroy(hidraw_class, MKDEV(hidraw_major, hidraw->minor)); | 321 | device_destroy(hidraw_class, |
321 | hidraw_table[hidraw->minor] = NULL; | 322 | MKDEV(hidraw_major, hidraw->minor)); |
322 | kfree(hidraw); | 323 | hidraw_table[hidraw->minor] = NULL; |
324 | kfree(hidraw); | ||
325 | } else { | ||
326 | /* close device for last reader */ | ||
327 | hid_hw_power(hidraw->hid, PM_HINT_NORMAL); | ||
328 | hid_hw_close(hidraw->hid); | ||
329 | } | ||
323 | } | 330 | } |
324 | } | 331 | } |
325 | 332 | ||
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c index 5bf2fb785844..93b00d76374c 100644 --- a/drivers/hid/uhid.c +++ b/drivers/hid/uhid.c | |||
@@ -615,7 +615,7 @@ static const struct file_operations uhid_fops = { | |||
615 | 615 | ||
616 | static struct miscdevice uhid_misc = { | 616 | static struct miscdevice uhid_misc = { |
617 | .fops = &uhid_fops, | 617 | .fops = &uhid_fops, |
618 | .minor = MISC_DYNAMIC_MINOR, | 618 | .minor = UHID_MINOR, |
619 | .name = UHID_NAME, | 619 | .name = UHID_NAME, |
620 | }; | 620 | }; |
621 | 621 | ||
@@ -634,4 +634,5 @@ module_exit(uhid_exit); | |||
634 | MODULE_LICENSE("GPL"); | 634 | MODULE_LICENSE("GPL"); |
635 | MODULE_AUTHOR("David Herrmann <dh.herrmann@gmail.com>"); | 635 | MODULE_AUTHOR("David Herrmann <dh.herrmann@gmail.com>"); |
636 | MODULE_DESCRIPTION("User-space I/O driver support for HID subsystem"); | 636 | MODULE_DESCRIPTION("User-space I/O driver support for HID subsystem"); |
637 | MODULE_ALIAS_MISCDEV(UHID_MINOR); | ||
637 | MODULE_ALIAS("devname:" UHID_NAME); | 638 | MODULE_ALIAS("devname:" UHID_NAME); |
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index 98814d12a604..3288f13d2d87 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c | |||
@@ -230,6 +230,7 @@ static int send_argument(const char *key) | |||
230 | 230 | ||
231 | static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) | 231 | static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) |
232 | { | 232 | { |
233 | u8 status, data = 0; | ||
233 | int i; | 234 | int i; |
234 | 235 | ||
235 | if (send_command(cmd) || send_argument(key)) { | 236 | if (send_command(cmd) || send_argument(key)) { |
@@ -237,6 +238,7 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) | |||
237 | return -EIO; | 238 | return -EIO; |
238 | } | 239 | } |
239 | 240 | ||
241 | /* This has no effect on newer (2012) SMCs */ | ||
240 | if (send_byte(len, APPLESMC_DATA_PORT)) { | 242 | if (send_byte(len, APPLESMC_DATA_PORT)) { |
241 | pr_warn("%.4s: read len fail\n", key); | 243 | pr_warn("%.4s: read len fail\n", key); |
242 | return -EIO; | 244 | return -EIO; |
@@ -250,6 +252,17 @@ static int read_smc(u8 cmd, const char *key, u8 *buffer, u8 len) | |||
250 | buffer[i] = inb(APPLESMC_DATA_PORT); | 252 | buffer[i] = inb(APPLESMC_DATA_PORT); |
251 | } | 253 | } |
252 | 254 | ||
255 | /* Read the data port until bit0 is cleared */ | ||
256 | for (i = 0; i < 16; i++) { | ||
257 | udelay(APPLESMC_MIN_WAIT); | ||
258 | status = inb(APPLESMC_CMD_PORT); | ||
259 | if (!(status & 0x01)) | ||
260 | break; | ||
261 | data = inb(APPLESMC_DATA_PORT); | ||
262 | } | ||
263 | if (i) | ||
264 | pr_warn("flushed %d bytes, last value is: %d\n", i, data); | ||
265 | |||
253 | return 0; | 266 | return 0; |
254 | } | 267 | } |
255 | 268 | ||
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index 4c1b60539a25..0aa01136f8d9 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c | |||
@@ -270,7 +270,8 @@ static SIMPLE_DEV_PM_OPS(dw_i2c_dev_pm_ops, dw_i2c_suspend, dw_i2c_resume); | |||
270 | MODULE_ALIAS("platform:i2c_designware"); | 270 | MODULE_ALIAS("platform:i2c_designware"); |
271 | 271 | ||
272 | static struct platform_driver dw_i2c_driver = { | 272 | static struct platform_driver dw_i2c_driver = { |
273 | .remove = dw_i2c_remove, | 273 | .probe = dw_i2c_probe, |
274 | .remove = dw_i2c_remove, | ||
274 | .driver = { | 275 | .driver = { |
275 | .name = "i2c_designware", | 276 | .name = "i2c_designware", |
276 | .owner = THIS_MODULE, | 277 | .owner = THIS_MODULE, |
@@ -282,7 +283,7 @@ static struct platform_driver dw_i2c_driver = { | |||
282 | 283 | ||
283 | static int __init dw_i2c_init_driver(void) | 284 | static int __init dw_i2c_init_driver(void) |
284 | { | 285 | { |
285 | return platform_driver_probe(&dw_i2c_driver, dw_i2c_probe); | 286 | return platform_driver_register(&dw_i2c_driver); |
286 | } | 287 | } |
287 | subsys_initcall(dw_i2c_init_driver); | 288 | subsys_initcall(dw_i2c_init_driver); |
288 | 289 | ||
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index ccf46656bdad..1d7efa3169cd 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c | |||
@@ -365,7 +365,7 @@ static void i2c_imx_stop(struct imx_i2c_struct *i2c_imx) | |||
365 | clk_disable_unprepare(i2c_imx->clk); | 365 | clk_disable_unprepare(i2c_imx->clk); |
366 | } | 366 | } |
367 | 367 | ||
368 | static void __init i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx, | 368 | static void i2c_imx_set_clk(struct imx_i2c_struct *i2c_imx, |
369 | unsigned int rate) | 369 | unsigned int rate) |
370 | { | 370 | { |
371 | struct imx_i2c_clk_pair *i2c_clk_div = i2c_imx->hwdata->clk_div; | 371 | struct imx_i2c_clk_pair *i2c_clk_div = i2c_imx->hwdata->clk_div; |
@@ -589,7 +589,7 @@ static struct i2c_algorithm i2c_imx_algo = { | |||
589 | .functionality = i2c_imx_func, | 589 | .functionality = i2c_imx_func, |
590 | }; | 590 | }; |
591 | 591 | ||
592 | static int __init i2c_imx_probe(struct platform_device *pdev) | 592 | static int i2c_imx_probe(struct platform_device *pdev) |
593 | { | 593 | { |
594 | const struct of_device_id *of_id = of_match_device(i2c_imx_dt_ids, | 594 | const struct of_device_id *of_id = of_match_device(i2c_imx_dt_ids, |
595 | &pdev->dev); | 595 | &pdev->dev); |
@@ -697,7 +697,7 @@ static int __init i2c_imx_probe(struct platform_device *pdev) | |||
697 | return 0; /* Return OK */ | 697 | return 0; /* Return OK */ |
698 | } | 698 | } |
699 | 699 | ||
700 | static int __exit i2c_imx_remove(struct platform_device *pdev) | 700 | static int i2c_imx_remove(struct platform_device *pdev) |
701 | { | 701 | { |
702 | struct imx_i2c_struct *i2c_imx = platform_get_drvdata(pdev); | 702 | struct imx_i2c_struct *i2c_imx = platform_get_drvdata(pdev); |
703 | 703 | ||
@@ -715,7 +715,8 @@ static int __exit i2c_imx_remove(struct platform_device *pdev) | |||
715 | } | 715 | } |
716 | 716 | ||
717 | static struct platform_driver i2c_imx_driver = { | 717 | static struct platform_driver i2c_imx_driver = { |
718 | .remove = __exit_p(i2c_imx_remove), | 718 | .probe = i2c_imx_probe, |
719 | .remove = i2c_imx_remove, | ||
719 | .driver = { | 720 | .driver = { |
720 | .name = DRIVER_NAME, | 721 | .name = DRIVER_NAME, |
721 | .owner = THIS_MODULE, | 722 | .owner = THIS_MODULE, |
@@ -726,7 +727,7 @@ static struct platform_driver i2c_imx_driver = { | |||
726 | 727 | ||
727 | static int __init i2c_adap_imx_init(void) | 728 | static int __init i2c_adap_imx_init(void) |
728 | { | 729 | { |
729 | return platform_driver_probe(&i2c_imx_driver, i2c_imx_probe); | 730 | return platform_driver_register(&i2c_imx_driver); |
730 | } | 731 | } |
731 | subsys_initcall(i2c_adap_imx_init); | 732 | subsys_initcall(i2c_adap_imx_init); |
732 | 733 | ||
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index f4a01675fa71..b7c857774708 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c | |||
@@ -780,12 +780,13 @@ static struct platform_driver mxs_i2c_driver = { | |||
780 | .owner = THIS_MODULE, | 780 | .owner = THIS_MODULE, |
781 | .of_match_table = mxs_i2c_dt_ids, | 781 | .of_match_table = mxs_i2c_dt_ids, |
782 | }, | 782 | }, |
783 | .probe = mxs_i2c_probe, | ||
783 | .remove = mxs_i2c_remove, | 784 | .remove = mxs_i2c_remove, |
784 | }; | 785 | }; |
785 | 786 | ||
786 | static int __init mxs_i2c_init(void) | 787 | static int __init mxs_i2c_init(void) |
787 | { | 788 | { |
788 | return platform_driver_probe(&mxs_i2c_driver, mxs_i2c_probe); | 789 | return platform_driver_register(&mxs_i2c_driver); |
789 | } | 790 | } |
790 | subsys_initcall(mxs_i2c_init); | 791 | subsys_initcall(mxs_i2c_init); |
791 | 792 | ||
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 6d8308d5dc4e..9967a6f9c2ff 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -939,6 +939,9 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) | |||
939 | /* | 939 | /* |
940 | * ProDB0017052: Clear ARDY bit twice | 940 | * ProDB0017052: Clear ARDY bit twice |
941 | */ | 941 | */ |
942 | if (stat & OMAP_I2C_STAT_ARDY) | ||
943 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_ARDY); | ||
944 | |||
942 | if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK | | 945 | if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK | |
943 | OMAP_I2C_STAT_AL)) { | 946 | OMAP_I2C_STAT_AL)) { |
944 | omap_i2c_ack_stat(dev, (OMAP_I2C_STAT_RRDY | | 947 | omap_i2c_ack_stat(dev, (OMAP_I2C_STAT_RRDY | |
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c index f8f6f2e552db..04a17b9b38bb 100644 --- a/drivers/i2c/busses/i2c-stu300.c +++ b/drivers/i2c/busses/i2c-stu300.c | |||
@@ -859,8 +859,7 @@ static const struct i2c_algorithm stu300_algo = { | |||
859 | .functionality = stu300_func, | 859 | .functionality = stu300_func, |
860 | }; | 860 | }; |
861 | 861 | ||
862 | static int __init | 862 | static int stu300_probe(struct platform_device *pdev) |
863 | stu300_probe(struct platform_device *pdev) | ||
864 | { | 863 | { |
865 | struct stu300_dev *dev; | 864 | struct stu300_dev *dev; |
866 | struct i2c_adapter *adap; | 865 | struct i2c_adapter *adap; |
@@ -966,8 +965,7 @@ static SIMPLE_DEV_PM_OPS(stu300_pm, stu300_suspend, stu300_resume); | |||
966 | #define STU300_I2C_PM NULL | 965 | #define STU300_I2C_PM NULL |
967 | #endif | 966 | #endif |
968 | 967 | ||
969 | static int __exit | 968 | static int stu300_remove(struct platform_device *pdev) |
970 | stu300_remove(struct platform_device *pdev) | ||
971 | { | 969 | { |
972 | struct stu300_dev *dev = platform_get_drvdata(pdev); | 970 | struct stu300_dev *dev = platform_get_drvdata(pdev); |
973 | 971 | ||
@@ -989,13 +987,14 @@ static struct platform_driver stu300_i2c_driver = { | |||
989 | .pm = STU300_I2C_PM, | 987 | .pm = STU300_I2C_PM, |
990 | .of_match_table = stu300_dt_match, | 988 | .of_match_table = stu300_dt_match, |
991 | }, | 989 | }, |
992 | .remove = __exit_p(stu300_remove), | 990 | .probe = stu300_probe, |
991 | .remove = stu300_remove, | ||
993 | 992 | ||
994 | }; | 993 | }; |
995 | 994 | ||
996 | static int __init stu300_init(void) | 995 | static int __init stu300_init(void) |
997 | { | 996 | { |
998 | return platform_driver_probe(&stu300_i2c_driver, stu300_probe); | 997 | return platform_driver_register(&stu300_i2c_driver); |
999 | } | 998 | } |
1000 | 999 | ||
1001 | static void __exit stu300_exit(void) | 1000 | static void __exit stu300_exit(void) |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 29d3f045a2bf..3be58f89ac77 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -1134,6 +1134,9 @@ static void acpi_i2c_register_devices(struct i2c_adapter *adap) | |||
1134 | acpi_handle handle; | 1134 | acpi_handle handle; |
1135 | acpi_status status; | 1135 | acpi_status status; |
1136 | 1136 | ||
1137 | if (!adap->dev.parent) | ||
1138 | return; | ||
1139 | |||
1137 | handle = ACPI_HANDLE(adap->dev.parent); | 1140 | handle = ACPI_HANDLE(adap->dev.parent); |
1138 | if (!handle) | 1141 | if (!handle) |
1139 | return; | 1142 | return; |
diff --git a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c index 74b41ae690f3..928656e241dd 100644 --- a/drivers/i2c/muxes/i2c-arb-gpio-challenge.c +++ b/drivers/i2c/muxes/i2c-arb-gpio-challenge.c | |||
@@ -200,7 +200,7 @@ static int i2c_arbitrator_probe(struct platform_device *pdev) | |||
200 | arb->parent = of_find_i2c_adapter_by_node(parent_np); | 200 | arb->parent = of_find_i2c_adapter_by_node(parent_np); |
201 | if (!arb->parent) { | 201 | if (!arb->parent) { |
202 | dev_err(dev, "Cannot find parent bus\n"); | 202 | dev_err(dev, "Cannot find parent bus\n"); |
203 | return -EINVAL; | 203 | return -EPROBE_DEFER; |
204 | } | 204 | } |
205 | 205 | ||
206 | /* Actually add the mux adapter */ | 206 | /* Actually add the mux adapter */ |
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c index 5d4a99ba743e..a764da777f08 100644 --- a/drivers/i2c/muxes/i2c-mux-gpio.c +++ b/drivers/i2c/muxes/i2c-mux-gpio.c | |||
@@ -66,7 +66,7 @@ static int i2c_mux_gpio_probe_dt(struct gpiomux *mux, | |||
66 | struct device_node *adapter_np, *child; | 66 | struct device_node *adapter_np, *child; |
67 | struct i2c_adapter *adapter; | 67 | struct i2c_adapter *adapter; |
68 | unsigned *values, *gpios; | 68 | unsigned *values, *gpios; |
69 | int i = 0; | 69 | int i = 0, ret; |
70 | 70 | ||
71 | if (!np) | 71 | if (!np) |
72 | return -ENODEV; | 72 | return -ENODEV; |
@@ -79,7 +79,7 @@ static int i2c_mux_gpio_probe_dt(struct gpiomux *mux, | |||
79 | adapter = of_find_i2c_adapter_by_node(adapter_np); | 79 | adapter = of_find_i2c_adapter_by_node(adapter_np); |
80 | if (!adapter) { | 80 | if (!adapter) { |
81 | dev_err(&pdev->dev, "Cannot find parent bus\n"); | 81 | dev_err(&pdev->dev, "Cannot find parent bus\n"); |
82 | return -ENODEV; | 82 | return -EPROBE_DEFER; |
83 | } | 83 | } |
84 | mux->data.parent = i2c_adapter_id(adapter); | 84 | mux->data.parent = i2c_adapter_id(adapter); |
85 | put_device(&adapter->dev); | 85 | put_device(&adapter->dev); |
@@ -116,8 +116,12 @@ static int i2c_mux_gpio_probe_dt(struct gpiomux *mux, | |||
116 | return -ENOMEM; | 116 | return -ENOMEM; |
117 | } | 117 | } |
118 | 118 | ||
119 | for (i = 0; i < mux->data.n_gpios; i++) | 119 | for (i = 0; i < mux->data.n_gpios; i++) { |
120 | gpios[i] = of_get_named_gpio(np, "mux-gpios", i); | 120 | ret = of_get_named_gpio(np, "mux-gpios", i); |
121 | if (ret < 0) | ||
122 | return ret; | ||
123 | gpios[i] = ret; | ||
124 | } | ||
121 | 125 | ||
122 | mux->data.gpios = gpios; | 126 | mux->data.gpios = gpios; |
123 | 127 | ||
@@ -177,7 +181,7 @@ static int i2c_mux_gpio_probe(struct platform_device *pdev) | |||
177 | if (!parent) { | 181 | if (!parent) { |
178 | dev_err(&pdev->dev, "Parent adapter (%d) not found\n", | 182 | dev_err(&pdev->dev, "Parent adapter (%d) not found\n", |
179 | mux->data.parent); | 183 | mux->data.parent); |
180 | return -ENODEV; | 184 | return -EPROBE_DEFER; |
181 | } | 185 | } |
182 | 186 | ||
183 | mux->parent = parent; | 187 | mux->parent = parent; |
diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c index 69a91732ae65..68a37157377d 100644 --- a/drivers/i2c/muxes/i2c-mux-pinctrl.c +++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c | |||
@@ -113,7 +113,7 @@ static int i2c_mux_pinctrl_parse_dt(struct i2c_mux_pinctrl *mux, | |||
113 | adapter = of_find_i2c_adapter_by_node(adapter_np); | 113 | adapter = of_find_i2c_adapter_by_node(adapter_np); |
114 | if (!adapter) { | 114 | if (!adapter) { |
115 | dev_err(mux->dev, "Cannot find parent bus\n"); | 115 | dev_err(mux->dev, "Cannot find parent bus\n"); |
116 | return -ENODEV; | 116 | return -EPROBE_DEFER; |
117 | } | 117 | } |
118 | mux->pdata->parent_bus_num = i2c_adapter_id(adapter); | 118 | mux->pdata->parent_bus_num = i2c_adapter_id(adapter); |
119 | put_device(&adapter->dev); | 119 | put_device(&adapter->dev); |
@@ -211,7 +211,7 @@ static int i2c_mux_pinctrl_probe(struct platform_device *pdev) | |||
211 | if (!mux->parent) { | 211 | if (!mux->parent) { |
212 | dev_err(&pdev->dev, "Parent adapter (%d) not found\n", | 212 | dev_err(&pdev->dev, "Parent adapter (%d) not found\n", |
213 | mux->pdata->parent_bus_num); | 213 | mux->pdata->parent_bus_num); |
214 | ret = -ENODEV; | 214 | ret = -EPROBE_DEFER; |
215 | goto err; | 215 | goto err; |
216 | } | 216 | } |
217 | 217 | ||
diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index fe302e33f72e..c880ebaf1553 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig | |||
@@ -52,7 +52,7 @@ config AMD_IOMMU | |||
52 | select PCI_PRI | 52 | select PCI_PRI |
53 | select PCI_PASID | 53 | select PCI_PASID |
54 | select IOMMU_API | 54 | select IOMMU_API |
55 | depends on X86_64 && PCI && ACPI && X86_IO_APIC | 55 | depends on X86_64 && PCI && ACPI |
56 | ---help--- | 56 | ---help--- |
57 | With this option you can enable support for AMD IOMMU hardware in | 57 | With this option you can enable support for AMD IOMMU hardware in |
58 | your system. An IOMMU is a hardware component which provides | 58 | your system. An IOMMU is a hardware component which provides |
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index 71eb233b9ace..b6a74bcbb08f 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c | |||
@@ -996,6 +996,7 @@ static void request_write(struct cached_dev *dc, struct search *s) | |||
996 | closure_bio_submit(bio, cl, s->d); | 996 | closure_bio_submit(bio, cl, s->d); |
997 | } else { | 997 | } else { |
998 | bch_writeback_add(dc); | 998 | bch_writeback_add(dc); |
999 | s->op.cache_bio = bio; | ||
999 | 1000 | ||
1000 | if (bio->bi_rw & REQ_FLUSH) { | 1001 | if (bio->bi_rw & REQ_FLUSH) { |
1001 | /* Also need to send a flush to the backing device */ | 1002 | /* Also need to send a flush to the backing device */ |
@@ -1008,8 +1009,6 @@ static void request_write(struct cached_dev *dc, struct search *s) | |||
1008 | flush->bi_private = cl; | 1009 | flush->bi_private = cl; |
1009 | 1010 | ||
1010 | closure_bio_submit(flush, cl, s->d); | 1011 | closure_bio_submit(flush, cl, s->d); |
1011 | } else { | ||
1012 | s->op.cache_bio = bio; | ||
1013 | } | 1012 | } |
1014 | } | 1013 | } |
1015 | out: | 1014 | out: |
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index 26b14f9fcac6..6bc9618af094 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c | |||
@@ -168,12 +168,25 @@ static inline int write_disable(struct m25p *flash) | |||
168 | */ | 168 | */ |
169 | static inline int set_4byte(struct m25p *flash, u32 jedec_id, int enable) | 169 | static inline int set_4byte(struct m25p *flash, u32 jedec_id, int enable) |
170 | { | 170 | { |
171 | int status; | ||
172 | bool need_wren = false; | ||
173 | |||
171 | switch (JEDEC_MFR(jedec_id)) { | 174 | switch (JEDEC_MFR(jedec_id)) { |
172 | case CFI_MFR_MACRONIX: | ||
173 | case CFI_MFR_ST: /* Micron, actually */ | 175 | case CFI_MFR_ST: /* Micron, actually */ |
176 | /* Some Micron need WREN command; all will accept it */ | ||
177 | need_wren = true; | ||
178 | case CFI_MFR_MACRONIX: | ||
174 | case 0xEF /* winbond */: | 179 | case 0xEF /* winbond */: |
180 | if (need_wren) | ||
181 | write_enable(flash); | ||
182 | |||
175 | flash->command[0] = enable ? OPCODE_EN4B : OPCODE_EX4B; | 183 | flash->command[0] = enable ? OPCODE_EN4B : OPCODE_EX4B; |
176 | return spi_write(flash->spi, flash->command, 1); | 184 | status = spi_write(flash->spi, flash->command, 1); |
185 | |||
186 | if (need_wren) | ||
187 | write_disable(flash); | ||
188 | |||
189 | return status; | ||
177 | default: | 190 | default: |
178 | /* Spansion style */ | 191 | /* Spansion style */ |
179 | flash->command[0] = OPCODE_BRWR; | 192 | flash->command[0] = OPCODE_BRWR; |
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 7ed4841327f2..d340b2f198c6 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c | |||
@@ -2869,10 +2869,8 @@ static int nand_flash_detect_ext_param_page(struct mtd_info *mtd, | |||
2869 | 2869 | ||
2870 | len = le16_to_cpu(p->ext_param_page_length) * 16; | 2870 | len = le16_to_cpu(p->ext_param_page_length) * 16; |
2871 | ep = kmalloc(len, GFP_KERNEL); | 2871 | ep = kmalloc(len, GFP_KERNEL); |
2872 | if (!ep) { | 2872 | if (!ep) |
2873 | ret = -ENOMEM; | 2873 | return -ENOMEM; |
2874 | goto ext_out; | ||
2875 | } | ||
2876 | 2874 | ||
2877 | /* Send our own NAND_CMD_PARAM. */ | 2875 | /* Send our own NAND_CMD_PARAM. */ |
2878 | chip->cmdfunc(mtd, NAND_CMD_PARAM, 0, -1); | 2876 | chip->cmdfunc(mtd, NAND_CMD_PARAM, 0, -1); |
@@ -2920,7 +2918,7 @@ static int nand_flash_detect_ext_param_page(struct mtd_info *mtd, | |||
2920 | } | 2918 | } |
2921 | 2919 | ||
2922 | pr_info("ONFI extended param page detected.\n"); | 2920 | pr_info("ONFI extended param page detected.\n"); |
2923 | return 0; | 2921 | ret = 0; |
2924 | 2922 | ||
2925 | ext_out: | 2923 | ext_out: |
2926 | kfree(ep); | 2924 | kfree(ep); |
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index 8cd34bf644b3..77df9cb00688 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -145,9 +145,11 @@ bool __init sclp_has_linemode(void) | |||
145 | 145 | ||
146 | if (sccb->header.response_code != 0x20) | 146 | if (sccb->header.response_code != 0x20) |
147 | return 0; | 147 | return 0; |
148 | if (sccb->sclp_send_mask & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK)) | 148 | if (!(sccb->sclp_send_mask & (EVTYP_OPCMD_MASK | EVTYP_PMSGCMD_MASK))) |
149 | return 1; | 149 | return 0; |
150 | return 0; | 150 | if (!(sccb->sclp_receive_mask & (EVTYP_MSG_MASK | EVTYP_PMSGCMD_MASK))) |
151 | return 0; | ||
152 | return 1; | ||
151 | } | 153 | } |
152 | 154 | ||
153 | bool __init sclp_has_vt220(void) | 155 | bool __init sclp_has_vt220(void) |
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index a0f47c83fd62..3f4ca4e09a4c 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c | |||
@@ -810,7 +810,7 @@ static void tty3270_resize_work(struct work_struct *work) | |||
810 | struct winsize ws; | 810 | struct winsize ws; |
811 | 811 | ||
812 | screen = tty3270_alloc_screen(tp->n_rows, tp->n_cols); | 812 | screen = tty3270_alloc_screen(tp->n_rows, tp->n_cols); |
813 | if (!screen) | 813 | if (IS_ERR(screen)) |
814 | return; | 814 | return; |
815 | /* Switch to new output size */ | 815 | /* Switch to new output size */ |
816 | spin_lock_bh(&tp->view.lock); | 816 | spin_lock_bh(&tp->view.lock); |
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index fd7cc566095a..d4ac60b4a56e 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c | |||
@@ -1583,7 +1583,7 @@ static int atmel_spi_probe(struct platform_device *pdev) | |||
1583 | /* Initialize the hardware */ | 1583 | /* Initialize the hardware */ |
1584 | ret = clk_prepare_enable(clk); | 1584 | ret = clk_prepare_enable(clk); |
1585 | if (ret) | 1585 | if (ret) |
1586 | goto out_unmap_regs; | 1586 | goto out_free_irq; |
1587 | spi_writel(as, CR, SPI_BIT(SWRST)); | 1587 | spi_writel(as, CR, SPI_BIT(SWRST)); |
1588 | spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ | 1588 | spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ |
1589 | if (as->caps.has_wdrbt) { | 1589 | if (as->caps.has_wdrbt) { |
@@ -1614,6 +1614,7 @@ out_free_dma: | |||
1614 | spi_writel(as, CR, SPI_BIT(SWRST)); | 1614 | spi_writel(as, CR, SPI_BIT(SWRST)); |
1615 | spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ | 1615 | spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */ |
1616 | clk_disable_unprepare(clk); | 1616 | clk_disable_unprepare(clk); |
1617 | out_free_irq: | ||
1617 | free_irq(irq, master); | 1618 | free_irq(irq, master); |
1618 | out_unmap_regs: | 1619 | out_unmap_regs: |
1619 | iounmap(as->regs); | 1620 | iounmap(as->regs); |
diff --git a/drivers/spi/spi-clps711x.c b/drivers/spi/spi-clps711x.c index 5655acf55bfe..6416798828e7 100644 --- a/drivers/spi/spi-clps711x.c +++ b/drivers/spi/spi-clps711x.c | |||
@@ -226,7 +226,6 @@ static int spi_clps711x_probe(struct platform_device *pdev) | |||
226 | dev_name(&pdev->dev), hw); | 226 | dev_name(&pdev->dev), hw); |
227 | if (ret) { | 227 | if (ret) { |
228 | dev_err(&pdev->dev, "Can't request IRQ\n"); | 228 | dev_err(&pdev->dev, "Can't request IRQ\n"); |
229 | clk_put(hw->spi_clk); | ||
230 | goto clk_out; | 229 | goto clk_out; |
231 | } | 230 | } |
232 | 231 | ||
@@ -247,7 +246,6 @@ err_out: | |||
247 | gpio_free(hw->chipselect[i]); | 246 | gpio_free(hw->chipselect[i]); |
248 | 247 | ||
249 | spi_master_put(master); | 248 | spi_master_put(master); |
250 | kfree(master); | ||
251 | 249 | ||
252 | return ret; | 250 | return ret; |
253 | } | 251 | } |
@@ -263,7 +261,6 @@ static int spi_clps711x_remove(struct platform_device *pdev) | |||
263 | gpio_free(hw->chipselect[i]); | 261 | gpio_free(hw->chipselect[i]); |
264 | 262 | ||
265 | spi_unregister_master(master); | 263 | spi_unregister_master(master); |
266 | kfree(master); | ||
267 | 264 | ||
268 | return 0; | 265 | return 0; |
269 | } | 266 | } |
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c index 6cd07d13ecab..4e44575bd87a 100644 --- a/drivers/spi/spi-fsl-dspi.c +++ b/drivers/spi/spi-fsl-dspi.c | |||
@@ -476,15 +476,9 @@ static int dspi_probe(struct platform_device *pdev) | |||
476 | master->bus_num = bus_num; | 476 | master->bus_num = bus_num; |
477 | 477 | ||
478 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 478 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
479 | if (!res) { | ||
480 | dev_err(&pdev->dev, "can't get platform resource\n"); | ||
481 | ret = -EINVAL; | ||
482 | goto out_master_put; | ||
483 | } | ||
484 | |||
485 | dspi->base = devm_ioremap_resource(&pdev->dev, res); | 479 | dspi->base = devm_ioremap_resource(&pdev->dev, res); |
486 | if (!dspi->base) { | 480 | if (IS_ERR(dspi->base)) { |
487 | ret = -EINVAL; | 481 | ret = PTR_ERR(dspi->base); |
488 | goto out_master_put; | 482 | goto out_master_put; |
489 | } | 483 | } |
490 | 484 | ||
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c index dbc5e999a1f5..6adf4e35816d 100644 --- a/drivers/spi/spi-mpc512x-psc.c +++ b/drivers/spi/spi-mpc512x-psc.c | |||
@@ -522,8 +522,10 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr, | |||
522 | psc_num = master->bus_num; | 522 | psc_num = master->bus_num; |
523 | snprintf(clk_name, sizeof(clk_name), "psc%d_mclk", psc_num); | 523 | snprintf(clk_name, sizeof(clk_name), "psc%d_mclk", psc_num); |
524 | clk = devm_clk_get(dev, clk_name); | 524 | clk = devm_clk_get(dev, clk_name); |
525 | if (IS_ERR(clk)) | 525 | if (IS_ERR(clk)) { |
526 | ret = PTR_ERR(clk); | ||
526 | goto free_irq; | 527 | goto free_irq; |
528 | } | ||
527 | ret = clk_prepare_enable(clk); | 529 | ret = clk_prepare_enable(clk); |
528 | if (ret) | 530 | if (ret) |
529 | goto free_irq; | 531 | goto free_irq; |
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 2eb06ee0b326..c1a50674c1e3 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c | |||
@@ -546,8 +546,17 @@ static irqreturn_t ssp_int(int irq, void *dev_id) | |||
546 | if (pm_runtime_suspended(&drv_data->pdev->dev)) | 546 | if (pm_runtime_suspended(&drv_data->pdev->dev)) |
547 | return IRQ_NONE; | 547 | return IRQ_NONE; |
548 | 548 | ||
549 | sccr1_reg = read_SSCR1(reg); | 549 | /* |
550 | * If the device is not yet in RPM suspended state and we get an | ||
551 | * interrupt that is meant for another device, check if status bits | ||
552 | * are all set to one. That means that the device is already | ||
553 | * powered off. | ||
554 | */ | ||
550 | status = read_SSSR(reg); | 555 | status = read_SSSR(reg); |
556 | if (status == ~0) | ||
557 | return IRQ_NONE; | ||
558 | |||
559 | sccr1_reg = read_SSCR1(reg); | ||
551 | 560 | ||
552 | /* Ignore possible writes if we don't need to write */ | 561 | /* Ignore possible writes if we don't need to write */ |
553 | if (!(sccr1_reg & SSCR1_TIE)) | 562 | if (!(sccr1_reg & SSCR1_TIE)) |
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index 512b8893893b..a80376dc3a10 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
@@ -1428,6 +1428,8 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) | |||
1428 | S3C64XX_SPI_INT_TX_OVERRUN_EN | S3C64XX_SPI_INT_TX_UNDERRUN_EN, | 1428 | S3C64XX_SPI_INT_TX_OVERRUN_EN | S3C64XX_SPI_INT_TX_UNDERRUN_EN, |
1429 | sdd->regs + S3C64XX_SPI_INT_EN); | 1429 | sdd->regs + S3C64XX_SPI_INT_EN); |
1430 | 1430 | ||
1431 | pm_runtime_enable(&pdev->dev); | ||
1432 | |||
1431 | if (spi_register_master(master)) { | 1433 | if (spi_register_master(master)) { |
1432 | dev_err(&pdev->dev, "cannot register SPI master\n"); | 1434 | dev_err(&pdev->dev, "cannot register SPI master\n"); |
1433 | ret = -EBUSY; | 1435 | ret = -EBUSY; |
@@ -1440,8 +1442,6 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) | |||
1440 | mem_res, | 1442 | mem_res, |
1441 | sdd->rx_dma.dmach, sdd->tx_dma.dmach); | 1443 | sdd->rx_dma.dmach, sdd->tx_dma.dmach); |
1442 | 1444 | ||
1443 | pm_runtime_enable(&pdev->dev); | ||
1444 | |||
1445 | return 0; | 1445 | return 0; |
1446 | 1446 | ||
1447 | err3: | 1447 | err3: |
diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c index 0b68cb592fa4..e488a90a98b8 100644 --- a/drivers/spi/spi-sh-hspi.c +++ b/drivers/spi/spi-sh-hspi.c | |||
@@ -296,6 +296,8 @@ static int hspi_probe(struct platform_device *pdev) | |||
296 | goto error1; | 296 | goto error1; |
297 | } | 297 | } |
298 | 298 | ||
299 | pm_runtime_enable(&pdev->dev); | ||
300 | |||
299 | master->num_chipselect = 1; | 301 | master->num_chipselect = 1; |
300 | master->bus_num = pdev->id; | 302 | master->bus_num = pdev->id; |
301 | master->setup = hspi_setup; | 303 | master->setup = hspi_setup; |
@@ -309,8 +311,6 @@ static int hspi_probe(struct platform_device *pdev) | |||
309 | goto error1; | 311 | goto error1; |
310 | } | 312 | } |
311 | 313 | ||
312 | pm_runtime_enable(&pdev->dev); | ||
313 | |||
314 | return 0; | 314 | return 0; |
315 | 315 | ||
316 | error1: | 316 | error1: |
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index 5be5e3d14f79..19f3c3fc65f4 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -802,6 +802,12 @@ static int hpwdt_init_one(struct pci_dev *dev, | |||
802 | return -ENODEV; | 802 | return -ENODEV; |
803 | } | 803 | } |
804 | 804 | ||
805 | /* | ||
806 | * Ignore all auxilary iLO devices with the following PCI ID | ||
807 | */ | ||
808 | if (dev->subsystem_device == 0x1979) | ||
809 | return -ENODEV; | ||
810 | |||
805 | if (pci_enable_device(dev)) { | 811 | if (pci_enable_device(dev)) { |
806 | dev_warn(&dev->dev, | 812 | dev_warn(&dev->dev, |
807 | "Not possible to enable PCI Device: 0x%x:0x%x.\n", | 813 | "Not possible to enable PCI Device: 0x%x:0x%x.\n", |
diff --git a/drivers/watchdog/kempld_wdt.c b/drivers/watchdog/kempld_wdt.c index 491419e0772a..5c3d4df63e68 100644 --- a/drivers/watchdog/kempld_wdt.c +++ b/drivers/watchdog/kempld_wdt.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #define KEMPLD_WDT_STAGE_TIMEOUT(x) (0x1b + (x) * 4) | 35 | #define KEMPLD_WDT_STAGE_TIMEOUT(x) (0x1b + (x) * 4) |
36 | #define KEMPLD_WDT_STAGE_CFG(x) (0x18 + (x)) | 36 | #define KEMPLD_WDT_STAGE_CFG(x) (0x18 + (x)) |
37 | #define STAGE_CFG_GET_PRESCALER(x) (((x) & 0x30) >> 4) | 37 | #define STAGE_CFG_GET_PRESCALER(x) (((x) & 0x30) >> 4) |
38 | #define STAGE_CFG_SET_PRESCALER(x) (((x) & 0x30) << 4) | 38 | #define STAGE_CFG_SET_PRESCALER(x) (((x) & 0x3) << 4) |
39 | #define STAGE_CFG_PRESCALER_MASK 0x30 | 39 | #define STAGE_CFG_PRESCALER_MASK 0x30 |
40 | #define STAGE_CFG_ACTION_MASK 0x7 | 40 | #define STAGE_CFG_ACTION_MASK 0x7 |
41 | #define STAGE_CFG_ASSERT (1 << 3) | 41 | #define STAGE_CFG_ASSERT (1 << 3) |
diff --git a/drivers/watchdog/sunxi_wdt.c b/drivers/watchdog/sunxi_wdt.c index 1f94b42764aa..f6caa77151c7 100644 --- a/drivers/watchdog/sunxi_wdt.c +++ b/drivers/watchdog/sunxi_wdt.c | |||
@@ -146,7 +146,7 @@ static const struct watchdog_ops sunxi_wdt_ops = { | |||
146 | .set_timeout = sunxi_wdt_set_timeout, | 146 | .set_timeout = sunxi_wdt_set_timeout, |
147 | }; | 147 | }; |
148 | 148 | ||
149 | static int __init sunxi_wdt_probe(struct platform_device *pdev) | 149 | static int sunxi_wdt_probe(struct platform_device *pdev) |
150 | { | 150 | { |
151 | struct sunxi_wdt_dev *sunxi_wdt; | 151 | struct sunxi_wdt_dev *sunxi_wdt; |
152 | struct resource *res; | 152 | struct resource *res; |
@@ -187,7 +187,7 @@ static int __init sunxi_wdt_probe(struct platform_device *pdev) | |||
187 | return 0; | 187 | return 0; |
188 | } | 188 | } |
189 | 189 | ||
190 | static int __exit sunxi_wdt_remove(struct platform_device *pdev) | 190 | static int sunxi_wdt_remove(struct platform_device *pdev) |
191 | { | 191 | { |
192 | struct sunxi_wdt_dev *sunxi_wdt = platform_get_drvdata(pdev); | 192 | struct sunxi_wdt_dev *sunxi_wdt = platform_get_drvdata(pdev); |
193 | 193 | ||
diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c index 42913f131dc2..c9b0c627fe7e 100644 --- a/drivers/watchdog/ts72xx_wdt.c +++ b/drivers/watchdog/ts72xx_wdt.c | |||
@@ -310,7 +310,8 @@ static long ts72xx_wdt_ioctl(struct file *file, unsigned int cmd, | |||
310 | 310 | ||
311 | case WDIOC_GETSTATUS: | 311 | case WDIOC_GETSTATUS: |
312 | case WDIOC_GETBOOTSTATUS: | 312 | case WDIOC_GETBOOTSTATUS: |
313 | return put_user(0, p); | 313 | error = put_user(0, p); |
314 | break; | ||
314 | 315 | ||
315 | case WDIOC_KEEPALIVE: | 316 | case WDIOC_KEEPALIVE: |
316 | ts72xx_wdt_kick(wdt); | 317 | ts72xx_wdt_kick(wdt); |
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 4ae17ed13b32..62176ad89846 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1561,8 +1561,9 @@ int btrfs_insert_fs_root(struct btrfs_fs_info *fs_info, | |||
1561 | return ret; | 1561 | return ret; |
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, | 1564 | struct btrfs_root *btrfs_get_fs_root(struct btrfs_fs_info *fs_info, |
1565 | struct btrfs_key *location) | 1565 | struct btrfs_key *location, |
1566 | bool check_ref) | ||
1566 | { | 1567 | { |
1567 | struct btrfs_root *root; | 1568 | struct btrfs_root *root; |
1568 | int ret; | 1569 | int ret; |
@@ -1586,7 +1587,7 @@ struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, | |||
1586 | again: | 1587 | again: |
1587 | root = btrfs_lookup_fs_root(fs_info, location->objectid); | 1588 | root = btrfs_lookup_fs_root(fs_info, location->objectid); |
1588 | if (root) { | 1589 | if (root) { |
1589 | if (btrfs_root_refs(&root->root_item) == 0) | 1590 | if (check_ref && btrfs_root_refs(&root->root_item) == 0) |
1590 | return ERR_PTR(-ENOENT); | 1591 | return ERR_PTR(-ENOENT); |
1591 | return root; | 1592 | return root; |
1592 | } | 1593 | } |
@@ -1595,7 +1596,7 @@ again: | |||
1595 | if (IS_ERR(root)) | 1596 | if (IS_ERR(root)) |
1596 | return root; | 1597 | return root; |
1597 | 1598 | ||
1598 | if (btrfs_root_refs(&root->root_item) == 0) { | 1599 | if (check_ref && btrfs_root_refs(&root->root_item) == 0) { |
1599 | ret = -ENOENT; | 1600 | ret = -ENOENT; |
1600 | goto fail; | 1601 | goto fail; |
1601 | } | 1602 | } |
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index b71acd6e1e5b..5ce2a7da8b11 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h | |||
@@ -68,8 +68,17 @@ struct btrfs_root *btrfs_read_fs_root(struct btrfs_root *tree_root, | |||
68 | int btrfs_init_fs_root(struct btrfs_root *root); | 68 | int btrfs_init_fs_root(struct btrfs_root *root); |
69 | int btrfs_insert_fs_root(struct btrfs_fs_info *fs_info, | 69 | int btrfs_insert_fs_root(struct btrfs_fs_info *fs_info, |
70 | struct btrfs_root *root); | 70 | struct btrfs_root *root); |
71 | struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, | 71 | |
72 | struct btrfs_key *location); | 72 | struct btrfs_root *btrfs_get_fs_root(struct btrfs_fs_info *fs_info, |
73 | struct btrfs_key *key, | ||
74 | bool check_ref); | ||
75 | static inline struct btrfs_root * | ||
76 | btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, | ||
77 | struct btrfs_key *location) | ||
78 | { | ||
79 | return btrfs_get_fs_root(fs_info, location, true); | ||
80 | } | ||
81 | |||
73 | int btrfs_cleanup_fs_roots(struct btrfs_fs_info *fs_info); | 82 | int btrfs_cleanup_fs_roots(struct btrfs_fs_info *fs_info); |
74 | void btrfs_btree_balance_dirty(struct btrfs_root *root); | 83 | void btrfs_btree_balance_dirty(struct btrfs_root *root); |
75 | void btrfs_btree_balance_dirty_nodelay(struct btrfs_root *root); | 84 | void btrfs_btree_balance_dirty_nodelay(struct btrfs_root *root); |
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 22bda32acb89..51731b76900d 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -1490,10 +1490,8 @@ static noinline u64 find_delalloc_range(struct extent_io_tree *tree, | |||
1490 | cur_start = state->end + 1; | 1490 | cur_start = state->end + 1; |
1491 | node = rb_next(node); | 1491 | node = rb_next(node); |
1492 | total_bytes += state->end - state->start + 1; | 1492 | total_bytes += state->end - state->start + 1; |
1493 | if (total_bytes >= max_bytes) { | 1493 | if (total_bytes >= max_bytes) |
1494 | *end = *start + max_bytes - 1; | ||
1495 | break; | 1494 | break; |
1496 | } | ||
1497 | if (!node) | 1495 | if (!node) |
1498 | break; | 1496 | break; |
1499 | } | 1497 | } |
@@ -1635,10 +1633,9 @@ again: | |||
1635 | 1633 | ||
1636 | /* | 1634 | /* |
1637 | * make sure to limit the number of pages we try to lock down | 1635 | * make sure to limit the number of pages we try to lock down |
1638 | * if we're looping. | ||
1639 | */ | 1636 | */ |
1640 | if (delalloc_end + 1 - delalloc_start > max_bytes && loops) | 1637 | if (delalloc_end + 1 - delalloc_start > max_bytes) |
1641 | delalloc_end = delalloc_start + PAGE_CACHE_SIZE - 1; | 1638 | delalloc_end = delalloc_start + max_bytes - 1; |
1642 | 1639 | ||
1643 | /* step two, lock all the pages after the page that has start */ | 1640 | /* step two, lock all the pages after the page that has start */ |
1644 | ret = lock_delalloc_pages(inode, locked_page, | 1641 | ret = lock_delalloc_pages(inode, locked_page, |
@@ -1649,8 +1646,7 @@ again: | |||
1649 | */ | 1646 | */ |
1650 | free_extent_state(cached_state); | 1647 | free_extent_state(cached_state); |
1651 | if (!loops) { | 1648 | if (!loops) { |
1652 | unsigned long offset = (*start) & (PAGE_CACHE_SIZE - 1); | 1649 | max_bytes = PAGE_CACHE_SIZE; |
1653 | max_bytes = PAGE_CACHE_SIZE - offset; | ||
1654 | loops = 1; | 1650 | loops = 1; |
1655 | goto again; | 1651 | goto again; |
1656 | } else { | 1652 | } else { |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 22ebc13b6c99..b0ef7b07b1b3 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -7986,7 +7986,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
7986 | 7986 | ||
7987 | 7987 | ||
7988 | /* check for collisions, even if the name isn't there */ | 7988 | /* check for collisions, even if the name isn't there */ |
7989 | ret = btrfs_check_dir_item_collision(root, new_dir->i_ino, | 7989 | ret = btrfs_check_dir_item_collision(dest, new_dir->i_ino, |
7990 | new_dentry->d_name.name, | 7990 | new_dentry->d_name.name, |
7991 | new_dentry->d_name.len); | 7991 | new_dentry->d_name.len); |
7992 | 7992 | ||
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index a5a26320503f..4a355726151e 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -588,7 +588,7 @@ static struct btrfs_root *read_fs_root(struct btrfs_fs_info *fs_info, | |||
588 | else | 588 | else |
589 | key.offset = (u64)-1; | 589 | key.offset = (u64)-1; |
590 | 590 | ||
591 | return btrfs_read_fs_root_no_name(fs_info, &key); | 591 | return btrfs_get_fs_root(fs_info, &key, false); |
592 | } | 592 | } |
593 | 593 | ||
594 | #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 | 594 | #ifdef BTRFS_COMPAT_EXTENT_TREE_V0 |
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index 0b1f4ef8db98..ec71ea44d2b4 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c | |||
@@ -299,11 +299,6 @@ int btrfs_find_orphan_roots(struct btrfs_root *tree_root) | |||
299 | continue; | 299 | continue; |
300 | } | 300 | } |
301 | 301 | ||
302 | if (btrfs_root_refs(&root->root_item) == 0) { | ||
303 | btrfs_add_dead_root(root); | ||
304 | continue; | ||
305 | } | ||
306 | |||
307 | err = btrfs_init_fs_root(root); | 302 | err = btrfs_init_fs_root(root); |
308 | if (err) { | 303 | if (err) { |
309 | btrfs_free_fs_root(root); | 304 | btrfs_free_fs_root(root); |
@@ -318,6 +313,9 @@ int btrfs_find_orphan_roots(struct btrfs_root *tree_root) | |||
318 | btrfs_free_fs_root(root); | 313 | btrfs_free_fs_root(root); |
319 | break; | 314 | break; |
320 | } | 315 | } |
316 | |||
317 | if (btrfs_root_refs(&root->root_item) == 0) | ||
318 | btrfs_add_dead_root(root); | ||
321 | } | 319 | } |
322 | 320 | ||
323 | btrfs_free_path(path); | 321 | btrfs_free_path(path); |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index 0d424d7ac02b..e274e9c1171f 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -2563,7 +2563,7 @@ retry: | |||
2563 | break; | 2563 | break; |
2564 | } | 2564 | } |
2565 | blk_finish_plug(&plug); | 2565 | blk_finish_plug(&plug); |
2566 | if (!ret && !cycled) { | 2566 | if (!ret && !cycled && wbc->nr_to_write > 0) { |
2567 | cycled = 1; | 2567 | cycled = 1; |
2568 | mpd.last_page = writeback_index - 1; | 2568 | mpd.last_page = writeback_index - 1; |
2569 | mpd.first_page = 0; | 2569 | mpd.first_page = 0; |
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index c081e34f717f..03e9bebba198 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c | |||
@@ -1350,6 +1350,8 @@ retry: | |||
1350 | s_min_extra_isize) { | 1350 | s_min_extra_isize) { |
1351 | tried_min_extra_isize++; | 1351 | tried_min_extra_isize++; |
1352 | new_extra_isize = s_min_extra_isize; | 1352 | new_extra_isize = s_min_extra_isize; |
1353 | kfree(is); is = NULL; | ||
1354 | kfree(bs); bs = NULL; | ||
1353 | goto retry; | 1355 | goto retry; |
1354 | } | 1356 | } |
1355 | error = -1; | 1357 | error = -1; |
diff --git a/fs/statfs.c b/fs/statfs.c index c219e733f553..083dc0ac9140 100644 --- a/fs/statfs.c +++ b/fs/statfs.c | |||
@@ -94,7 +94,7 @@ retry: | |||
94 | 94 | ||
95 | int fd_statfs(int fd, struct kstatfs *st) | 95 | int fd_statfs(int fd, struct kstatfs *st) |
96 | { | 96 | { |
97 | struct fd f = fdget(fd); | 97 | struct fd f = fdget_raw(fd); |
98 | int error = -EBADF; | 98 | int error = -EBADF; |
99 | if (f.file) { | 99 | if (f.file) { |
100 | error = vfs_statfs(&f.file->f_path, st); | 100 | error = vfs_statfs(&f.file->f_path, st); |
diff --git a/include/dt-bindings/pinctrl/omap.h b/include/dt-bindings/pinctrl/omap.h index edbd250809cb..bed35e36fd27 100644 --- a/include/dt-bindings/pinctrl/omap.h +++ b/include/dt-bindings/pinctrl/omap.h | |||
@@ -23,7 +23,7 @@ | |||
23 | #define PULL_UP (1 << 4) | 23 | #define PULL_UP (1 << 4) |
24 | #define ALTELECTRICALSEL (1 << 5) | 24 | #define ALTELECTRICALSEL (1 << 5) |
25 | 25 | ||
26 | /* 34xx specific mux bit defines */ | 26 | /* omap3/4/5 specific mux bit defines */ |
27 | #define INPUT_EN (1 << 8) | 27 | #define INPUT_EN (1 << 8) |
28 | #define OFF_EN (1 << 9) | 28 | #define OFF_EN (1 << 9) |
29 | #define OFFOUT_EN (1 << 10) | 29 | #define OFFOUT_EN (1 << 10) |
@@ -31,8 +31,6 @@ | |||
31 | #define OFF_PULL_EN (1 << 12) | 31 | #define OFF_PULL_EN (1 << 12) |
32 | #define OFF_PULL_UP (1 << 13) | 32 | #define OFF_PULL_UP (1 << 13) |
33 | #define WAKEUP_EN (1 << 14) | 33 | #define WAKEUP_EN (1 << 14) |
34 | |||
35 | /* 44xx specific mux bit defines */ | ||
36 | #define WAKEUP_EVENT (1 << 15) | 34 | #define WAKEUP_EVENT (1 << 15) |
37 | 35 | ||
38 | /* Active pin states */ | 36 | /* Active pin states */ |
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 842de225055f..ded429966c1f 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -65,6 +65,21 @@ | |||
65 | #define __visible __attribute__((externally_visible)) | 65 | #define __visible __attribute__((externally_visible)) |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | /* | ||
69 | * GCC 'asm goto' miscompiles certain code sequences: | ||
70 | * | ||
71 | * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | ||
72 | * | ||
73 | * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. | ||
74 | * Fixed in GCC 4.8.2 and later versions. | ||
75 | * | ||
76 | * (asm goto is automatically volatile - the naming reflects this.) | ||
77 | */ | ||
78 | #if GCC_VERSION <= 40801 | ||
79 | # define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) | ||
80 | #else | ||
81 | # define asm_volatile_goto(x...) do { asm goto(x); } while (0) | ||
82 | #endif | ||
68 | 83 | ||
69 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP | 84 | #ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP |
70 | #if GCC_VERSION >= 40400 | 85 | #if GCC_VERSION >= 40400 |
diff --git a/include/linux/miscdevice.h b/include/linux/miscdevice.h index 09c2300ddb37..cb358355ef43 100644 --- a/include/linux/miscdevice.h +++ b/include/linux/miscdevice.h | |||
@@ -45,6 +45,7 @@ | |||
45 | #define MAPPER_CTRL_MINOR 236 | 45 | #define MAPPER_CTRL_MINOR 236 |
46 | #define LOOP_CTRL_MINOR 237 | 46 | #define LOOP_CTRL_MINOR 237 |
47 | #define VHOST_NET_MINOR 238 | 47 | #define VHOST_NET_MINOR 238 |
48 | #define UHID_MINOR 239 | ||
48 | #define MISC_DYNAMIC_MINOR 255 | 49 | #define MISC_DYNAMIC_MINOR 255 |
49 | 50 | ||
50 | struct device; | 51 | struct device; |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 866e85c5eb94..c8ba627c1d60 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -294,9 +294,31 @@ struct ring_buffer; | |||
294 | */ | 294 | */ |
295 | struct perf_event { | 295 | struct perf_event { |
296 | #ifdef CONFIG_PERF_EVENTS | 296 | #ifdef CONFIG_PERF_EVENTS |
297 | struct list_head group_entry; | 297 | /* |
298 | * entry onto perf_event_context::event_list; | ||
299 | * modifications require ctx->lock | ||
300 | * RCU safe iterations. | ||
301 | */ | ||
298 | struct list_head event_entry; | 302 | struct list_head event_entry; |
303 | |||
304 | /* | ||
305 | * XXX: group_entry and sibling_list should be mutually exclusive; | ||
306 | * either you're a sibling on a group, or you're the group leader. | ||
307 | * Rework the code to always use the same list element. | ||
308 | * | ||
309 | * Locked for modification by both ctx->mutex and ctx->lock; holding | ||
310 | * either sufficies for read. | ||
311 | */ | ||
312 | struct list_head group_entry; | ||
299 | struct list_head sibling_list; | 313 | struct list_head sibling_list; |
314 | |||
315 | /* | ||
316 | * We need storage to track the entries in perf_pmu_migrate_context; we | ||
317 | * cannot use the event_entry because of RCU and we want to keep the | ||
318 | * group in tact which avoids us using the other two entries. | ||
319 | */ | ||
320 | struct list_head migrate_entry; | ||
321 | |||
300 | struct hlist_node hlist_entry; | 322 | struct hlist_node hlist_entry; |
301 | int nr_siblings; | 323 | int nr_siblings; |
302 | int group_flags; | 324 | int group_flags; |
diff --git a/include/linux/random.h b/include/linux/random.h index 3b9377d6b7a5..6312dd9ba449 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
@@ -17,6 +17,7 @@ extern void add_interrupt_randomness(int irq, int irq_flags); | |||
17 | extern void get_random_bytes(void *buf, int nbytes); | 17 | extern void get_random_bytes(void *buf, int nbytes); |
18 | extern void get_random_bytes_arch(void *buf, int nbytes); | 18 | extern void get_random_bytes_arch(void *buf, int nbytes); |
19 | void generate_random_uuid(unsigned char uuid_out[16]); | 19 | void generate_random_uuid(unsigned char uuid_out[16]); |
20 | extern int random_int_secret_init(void); | ||
20 | 21 | ||
21 | #ifndef MODULE | 22 | #ifndef MODULE |
22 | extern const struct file_operations random_fops, urandom_fops; | 23 | extern const struct file_operations random_fops, urandom_fops; |
diff --git a/include/linux/timex.h b/include/linux/timex.h index dd3edd7dfc94..9d3f1a5b6178 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -64,6 +64,20 @@ | |||
64 | 64 | ||
65 | #include <asm/timex.h> | 65 | #include <asm/timex.h> |
66 | 66 | ||
67 | #ifndef random_get_entropy | ||
68 | /* | ||
69 | * The random_get_entropy() function is used by the /dev/random driver | ||
70 | * in order to extract entropy via the relative unpredictability of | ||
71 | * when an interrupt takes places versus a high speed, fine-grained | ||
72 | * timing source or cycle counter. Since it will be occurred on every | ||
73 | * single interrupt, it must have a very low cost/overhead. | ||
74 | * | ||
75 | * By default we use get_cycles() for this purpose, but individual | ||
76 | * architectures may override this in their asm/timex.h header file. | ||
77 | */ | ||
78 | #define random_get_entropy() get_cycles() | ||
79 | #endif | ||
80 | |||
67 | /* | 81 | /* |
68 | * SHIFT_PLL is used as a dampening factor to define how much we | 82 | * SHIFT_PLL is used as a dampening factor to define how much we |
69 | * adjust the frequency correction for a given offset in PLL mode. | 83 | * adjust the frequency correction for a given offset in PLL mode. |
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index 80cf8173a65b..2c02f3a8d2ba 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h | |||
@@ -65,15 +65,8 @@ struct pci_dev; | |||
65 | * out of the arbitration process (and can be safe to take | 65 | * out of the arbitration process (and can be safe to take |
66 | * interrupts at any time. | 66 | * interrupts at any time. |
67 | */ | 67 | */ |
68 | #if defined(CONFIG_VGA_ARB) | ||
69 | extern void vga_set_legacy_decoding(struct pci_dev *pdev, | 68 | extern void vga_set_legacy_decoding(struct pci_dev *pdev, |
70 | unsigned int decodes); | 69 | unsigned int decodes); |
71 | #else | ||
72 | static inline void vga_set_legacy_decoding(struct pci_dev *pdev, | ||
73 | unsigned int decodes) | ||
74 | { | ||
75 | } | ||
76 | #endif | ||
77 | 70 | ||
78 | /** | 71 | /** |
79 | * vga_get - acquire & locks VGA resources | 72 | * vga_get - acquire & locks VGA resources |
diff --git a/init/main.c b/init/main.c index af310afbef28..63d3e8f2970c 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -76,6 +76,7 @@ | |||
76 | #include <linux/elevator.h> | 76 | #include <linux/elevator.h> |
77 | #include <linux/sched_clock.h> | 77 | #include <linux/sched_clock.h> |
78 | #include <linux/context_tracking.h> | 78 | #include <linux/context_tracking.h> |
79 | #include <linux/random.h> | ||
79 | 80 | ||
80 | #include <asm/io.h> | 81 | #include <asm/io.h> |
81 | #include <asm/bugs.h> | 82 | #include <asm/bugs.h> |
@@ -780,6 +781,7 @@ static void __init do_basic_setup(void) | |||
780 | do_ctors(); | 781 | do_ctors(); |
781 | usermodehelper_enable(); | 782 | usermodehelper_enable(); |
782 | do_initcalls(); | 783 | do_initcalls(); |
784 | random_int_secret_init(); | ||
783 | } | 785 | } |
784 | 786 | ||
785 | static void __init do_pre_smp_initcalls(void) | 787 | static void __init do_pre_smp_initcalls(void) |
diff --git a/kernel/events/core.c b/kernel/events/core.c index cb4238e85b38..d49a9d29334c 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -7234,15 +7234,15 @@ void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu) | |||
7234 | perf_remove_from_context(event); | 7234 | perf_remove_from_context(event); |
7235 | unaccount_event_cpu(event, src_cpu); | 7235 | unaccount_event_cpu(event, src_cpu); |
7236 | put_ctx(src_ctx); | 7236 | put_ctx(src_ctx); |
7237 | list_add(&event->event_entry, &events); | 7237 | list_add(&event->migrate_entry, &events); |
7238 | } | 7238 | } |
7239 | mutex_unlock(&src_ctx->mutex); | 7239 | mutex_unlock(&src_ctx->mutex); |
7240 | 7240 | ||
7241 | synchronize_rcu(); | 7241 | synchronize_rcu(); |
7242 | 7242 | ||
7243 | mutex_lock(&dst_ctx->mutex); | 7243 | mutex_lock(&dst_ctx->mutex); |
7244 | list_for_each_entry_safe(event, tmp, &events, event_entry) { | 7244 | list_for_each_entry_safe(event, tmp, &events, migrate_entry) { |
7245 | list_del(&event->event_entry); | 7245 | list_del(&event->migrate_entry); |
7246 | if (event->state >= PERF_EVENT_STATE_OFF) | 7246 | if (event->state >= PERF_EVENT_STATE_OFF) |
7247 | event->state = PERF_EVENT_STATE_INACTIVE; | 7247 | event->state = PERF_EVENT_STATE_INACTIVE; |
7248 | account_event_cpu(event, dst_cpu); | 7248 | account_event_cpu(event, dst_cpu); |
diff --git a/lib/kobject.c b/lib/kobject.c index 669bf190d4fb..084f7b18d0c0 100644 --- a/lib/kobject.c +++ b/lib/kobject.c | |||
@@ -592,7 +592,7 @@ static void kobject_release(struct kref *kref) | |||
592 | { | 592 | { |
593 | struct kobject *kobj = container_of(kref, struct kobject, kref); | 593 | struct kobject *kobj = container_of(kref, struct kobject, kref); |
594 | #ifdef CONFIG_DEBUG_KOBJECT_RELEASE | 594 | #ifdef CONFIG_DEBUG_KOBJECT_RELEASE |
595 | pr_debug("kobject: '%s' (%p): %s, parent %p (delayed)\n", | 595 | pr_info("kobject: '%s' (%p): %s, parent %p (delayed)\n", |
596 | kobject_name(kobj), kobj, __func__, kobj->parent); | 596 | kobject_name(kobj), kobj, __func__, kobj->parent); |
597 | INIT_DELAYED_WORK(&kobj->release, kobject_delayed_cleanup); | 597 | INIT_DELAYED_WORK(&kobj->release, kobject_delayed_cleanup); |
598 | schedule_delayed_work(&kobj->release, HZ); | 598 | schedule_delayed_work(&kobj->release, HZ); |
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 7ea0245fc6bd..50173d412ac5 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -937,6 +937,14 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, | |||
937 | } | 937 | } |
938 | 938 | ||
939 | /* | 939 | /* |
940 | * always configure channel mapping, it may have been changed by the | ||
941 | * user in the meantime | ||
942 | */ | ||
943 | hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca, | ||
944 | channels, per_pin->chmap, | ||
945 | per_pin->chmap_set); | ||
946 | |||
947 | /* | ||
940 | * sizeof(ai) is used instead of sizeof(*hdmi_ai) or | 948 | * sizeof(ai) is used instead of sizeof(*hdmi_ai) or |
941 | * sizeof(*dp_ai) to avoid partial match/update problems when | 949 | * sizeof(*dp_ai) to avoid partial match/update problems when |
942 | * the user switches between HDMI/DP monitors. | 950 | * the user switches between HDMI/DP monitors. |
@@ -947,20 +955,10 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec, | |||
947 | "pin=%d channels=%d\n", | 955 | "pin=%d channels=%d\n", |
948 | pin_nid, | 956 | pin_nid, |
949 | channels); | 957 | channels); |
950 | hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca, | ||
951 | channels, per_pin->chmap, | ||
952 | per_pin->chmap_set); | ||
953 | hdmi_stop_infoframe_trans(codec, pin_nid); | 958 | hdmi_stop_infoframe_trans(codec, pin_nid); |
954 | hdmi_fill_audio_infoframe(codec, pin_nid, | 959 | hdmi_fill_audio_infoframe(codec, pin_nid, |
955 | ai.bytes, sizeof(ai)); | 960 | ai.bytes, sizeof(ai)); |
956 | hdmi_start_infoframe_trans(codec, pin_nid); | 961 | hdmi_start_infoframe_trans(codec, pin_nid); |
957 | } else { | ||
958 | /* For non-pcm audio switch, setup new channel mapping | ||
959 | * accordingly */ | ||
960 | if (per_pin->non_pcm != non_pcm) | ||
961 | hdmi_setup_channel_mapping(codec, pin_nid, non_pcm, ca, | ||
962 | channels, per_pin->chmap, | ||
963 | per_pin->chmap_set); | ||
964 | } | 962 | } |
965 | 963 | ||
966 | per_pin->non_pcm = non_pcm; | 964 | per_pin->non_pcm = non_pcm; |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 0e303b99a47c..bf313bea7085 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -2819,6 +2819,15 @@ static void alc269_fixup_hweq(struct hda_codec *codec, | |||
2819 | alc_write_coef_idx(codec, 0x1e, coef | 0x80); | 2819 | alc_write_coef_idx(codec, 0x1e, coef | 0x80); |
2820 | } | 2820 | } |
2821 | 2821 | ||
2822 | static void alc269_fixup_headset_mic(struct hda_codec *codec, | ||
2823 | const struct hda_fixup *fix, int action) | ||
2824 | { | ||
2825 | struct alc_spec *spec = codec->spec; | ||
2826 | |||
2827 | if (action == HDA_FIXUP_ACT_PRE_PROBE) | ||
2828 | spec->parse_flags |= HDA_PINCFG_HEADSET_MIC; | ||
2829 | } | ||
2830 | |||
2822 | static void alc271_fixup_dmic(struct hda_codec *codec, | 2831 | static void alc271_fixup_dmic(struct hda_codec *codec, |
2823 | const struct hda_fixup *fix, int action) | 2832 | const struct hda_fixup *fix, int action) |
2824 | { | 2833 | { |
@@ -3496,6 +3505,15 @@ static void alc282_fixup_asus_tx300(struct hda_codec *codec, | |||
3496 | } | 3505 | } |
3497 | } | 3506 | } |
3498 | 3507 | ||
3508 | static void alc290_fixup_mono_speakers(struct hda_codec *codec, | ||
3509 | const struct hda_fixup *fix, int action) | ||
3510 | { | ||
3511 | if (action == HDA_FIXUP_ACT_PRE_PROBE) | ||
3512 | /* Remove DAC node 0x03, as it seems to be | ||
3513 | giving mono output */ | ||
3514 | snd_hda_override_wcaps(codec, 0x03, 0); | ||
3515 | } | ||
3516 | |||
3499 | enum { | 3517 | enum { |
3500 | ALC269_FIXUP_SONY_VAIO, | 3518 | ALC269_FIXUP_SONY_VAIO, |
3501 | ALC275_FIXUP_SONY_VAIO_GPIO2, | 3519 | ALC275_FIXUP_SONY_VAIO_GPIO2, |
@@ -3507,6 +3525,7 @@ enum { | |||
3507 | ALC271_FIXUP_DMIC, | 3525 | ALC271_FIXUP_DMIC, |
3508 | ALC269_FIXUP_PCM_44K, | 3526 | ALC269_FIXUP_PCM_44K, |
3509 | ALC269_FIXUP_STEREO_DMIC, | 3527 | ALC269_FIXUP_STEREO_DMIC, |
3528 | ALC269_FIXUP_HEADSET_MIC, | ||
3510 | ALC269_FIXUP_QUANTA_MUTE, | 3529 | ALC269_FIXUP_QUANTA_MUTE, |
3511 | ALC269_FIXUP_LIFEBOOK, | 3530 | ALC269_FIXUP_LIFEBOOK, |
3512 | ALC269_FIXUP_AMIC, | 3531 | ALC269_FIXUP_AMIC, |
@@ -3519,9 +3538,11 @@ enum { | |||
3519 | ALC269_FIXUP_HP_GPIO_LED, | 3538 | ALC269_FIXUP_HP_GPIO_LED, |
3520 | ALC269_FIXUP_INV_DMIC, | 3539 | ALC269_FIXUP_INV_DMIC, |
3521 | ALC269_FIXUP_LENOVO_DOCK, | 3540 | ALC269_FIXUP_LENOVO_DOCK, |
3541 | ALC286_FIXUP_SONY_MIC_NO_PRESENCE, | ||
3522 | ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, | 3542 | ALC269_FIXUP_PINCFG_NO_HP_TO_LINEOUT, |
3523 | ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, | 3543 | ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, |
3524 | ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, | 3544 | ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, |
3545 | ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, | ||
3525 | ALC269_FIXUP_HEADSET_MODE, | 3546 | ALC269_FIXUP_HEADSET_MODE, |
3526 | ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, | 3547 | ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC, |
3527 | ALC269_FIXUP_ASUS_X101_FUNC, | 3548 | ALC269_FIXUP_ASUS_X101_FUNC, |
@@ -3535,6 +3556,7 @@ enum { | |||
3535 | ALC283_FIXUP_CHROME_BOOK, | 3556 | ALC283_FIXUP_CHROME_BOOK, |
3536 | ALC282_FIXUP_ASUS_TX300, | 3557 | ALC282_FIXUP_ASUS_TX300, |
3537 | ALC283_FIXUP_INT_MIC, | 3558 | ALC283_FIXUP_INT_MIC, |
3559 | ALC290_FIXUP_MONO_SPEAKERS, | ||
3538 | }; | 3560 | }; |
3539 | 3561 | ||
3540 | static const struct hda_fixup alc269_fixups[] = { | 3562 | static const struct hda_fixup alc269_fixups[] = { |
@@ -3603,6 +3625,10 @@ static const struct hda_fixup alc269_fixups[] = { | |||
3603 | .type = HDA_FIXUP_FUNC, | 3625 | .type = HDA_FIXUP_FUNC, |
3604 | .v.func = alc269_fixup_stereo_dmic, | 3626 | .v.func = alc269_fixup_stereo_dmic, |
3605 | }, | 3627 | }, |
3628 | [ALC269_FIXUP_HEADSET_MIC] = { | ||
3629 | .type = HDA_FIXUP_FUNC, | ||
3630 | .v.func = alc269_fixup_headset_mic, | ||
3631 | }, | ||
3606 | [ALC269_FIXUP_QUANTA_MUTE] = { | 3632 | [ALC269_FIXUP_QUANTA_MUTE] = { |
3607 | .type = HDA_FIXUP_FUNC, | 3633 | .type = HDA_FIXUP_FUNC, |
3608 | .v.func = alc269_fixup_quanta_mute, | 3634 | .v.func = alc269_fixup_quanta_mute, |
@@ -3712,6 +3738,15 @@ static const struct hda_fixup alc269_fixups[] = { | |||
3712 | .chained = true, | 3738 | .chained = true, |
3713 | .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC | 3739 | .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC |
3714 | }, | 3740 | }, |
3741 | [ALC269_FIXUP_DELL3_MIC_NO_PRESENCE] = { | ||
3742 | .type = HDA_FIXUP_PINS, | ||
3743 | .v.pins = (const struct hda_pintbl[]) { | ||
3744 | { 0x1a, 0x01a1913c }, /* use as headset mic, without its own jack detect */ | ||
3745 | { } | ||
3746 | }, | ||
3747 | .chained = true, | ||
3748 | .chain_id = ALC269_FIXUP_HEADSET_MODE_NO_HP_MIC | ||
3749 | }, | ||
3715 | [ALC269_FIXUP_HEADSET_MODE] = { | 3750 | [ALC269_FIXUP_HEADSET_MODE] = { |
3716 | .type = HDA_FIXUP_FUNC, | 3751 | .type = HDA_FIXUP_FUNC, |
3717 | .v.func = alc_fixup_headset_mode, | 3752 | .v.func = alc_fixup_headset_mode, |
@@ -3720,6 +3755,15 @@ static const struct hda_fixup alc269_fixups[] = { | |||
3720 | .type = HDA_FIXUP_FUNC, | 3755 | .type = HDA_FIXUP_FUNC, |
3721 | .v.func = alc_fixup_headset_mode_no_hp_mic, | 3756 | .v.func = alc_fixup_headset_mode_no_hp_mic, |
3722 | }, | 3757 | }, |
3758 | [ALC286_FIXUP_SONY_MIC_NO_PRESENCE] = { | ||
3759 | .type = HDA_FIXUP_PINS, | ||
3760 | .v.pins = (const struct hda_pintbl[]) { | ||
3761 | { 0x18, 0x01a1913c }, /* use as headset mic, without its own jack detect */ | ||
3762 | { } | ||
3763 | }, | ||
3764 | .chained = true, | ||
3765 | .chain_id = ALC269_FIXUP_HEADSET_MIC | ||
3766 | }, | ||
3723 | [ALC269_FIXUP_ASUS_X101_FUNC] = { | 3767 | [ALC269_FIXUP_ASUS_X101_FUNC] = { |
3724 | .type = HDA_FIXUP_FUNC, | 3768 | .type = HDA_FIXUP_FUNC, |
3725 | .v.func = alc269_fixup_x101_headset_mic, | 3769 | .v.func = alc269_fixup_x101_headset_mic, |
@@ -3804,6 +3848,12 @@ static const struct hda_fixup alc269_fixups[] = { | |||
3804 | .chained = true, | 3848 | .chained = true, |
3805 | .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST | 3849 | .chain_id = ALC269_FIXUP_LIMIT_INT_MIC_BOOST |
3806 | }, | 3850 | }, |
3851 | [ALC290_FIXUP_MONO_SPEAKERS] = { | ||
3852 | .type = HDA_FIXUP_FUNC, | ||
3853 | .v.func = alc290_fixup_mono_speakers, | ||
3854 | .chained = true, | ||
3855 | .chain_id = ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, | ||
3856 | }, | ||
3807 | }; | 3857 | }; |
3808 | 3858 | ||
3809 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { | 3859 | static const struct snd_pci_quirk alc269_fixup_tbl[] = { |
@@ -3845,6 +3895,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
3845 | SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3895 | SND_PCI_QUIRK(0x1028, 0x0608, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3846 | SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3896 | SND_PCI_QUIRK(0x1028, 0x0609, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3847 | SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), | 3897 | SND_PCI_QUIRK(0x1028, 0x0613, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), |
3898 | SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_MONO_SPEAKERS), | ||
3848 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 3899 | SND_PCI_QUIRK(0x1028, 0x15cc, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
3849 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), | 3900 | SND_PCI_QUIRK(0x1028, 0x15cd, "Dell X5 Precision", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE), |
3850 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), | 3901 | SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2), |
@@ -3867,6 +3918,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
3867 | SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), | 3918 | SND_PCI_QUIRK(0x1043, 0x8398, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), |
3868 | SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), | 3919 | SND_PCI_QUIRK(0x1043, 0x83ce, "ASUS P1005", ALC269_FIXUP_STEREO_DMIC), |
3869 | SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101), | 3920 | SND_PCI_QUIRK(0x1043, 0x8516, "ASUS X101CH", ALC269_FIXUP_ASUS_X101), |
3921 | SND_PCI_QUIRK(0x104d, 0x90b6, "Sony VAIO Pro 13", ALC286_FIXUP_SONY_MIC_NO_PRESENCE), | ||
3870 | SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), | 3922 | SND_PCI_QUIRK(0x104d, 0x9073, "Sony VAIO", ALC275_FIXUP_SONY_VAIO_GPIO2), |
3871 | SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), | 3923 | SND_PCI_QUIRK(0x104d, 0x907b, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
3872 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), | 3924 | SND_PCI_QUIRK(0x104d, 0x9084, "Sony VAIO", ALC275_FIXUP_SONY_HWEQ), |
@@ -3952,6 +4004,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
3952 | {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"}, | 4004 | {.id = ALC269_FIXUP_STEREO_DMIC, .name = "alc269-dmic"}, |
3953 | {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, | 4005 | {.id = ALC271_FIXUP_DMIC, .name = "alc271-dmic"}, |
3954 | {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, | 4006 | {.id = ALC269_FIXUP_INV_DMIC, .name = "inv-dmic"}, |
4007 | {.id = ALC269_FIXUP_HEADSET_MIC, .name = "headset-mic"}, | ||
3955 | {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, | 4008 | {.id = ALC269_FIXUP_LENOVO_DOCK, .name = "lenovo-dock"}, |
3956 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, | 4009 | {.id = ALC269_FIXUP_HP_GPIO_LED, .name = "hp-gpio-led"}, |
3957 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, | 4010 | {.id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE, .name = "dell-headset-multi"}, |
@@ -4569,6 +4622,7 @@ static const struct snd_pci_quirk alc662_fixup_tbl[] = { | |||
4569 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 4622 | SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
4570 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), | 4623 | SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE), |
4571 | SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), | 4624 | SND_PCI_QUIRK(0x103c, 0x1632, "HP RP5800", ALC662_FIXUP_HP_RP5800), |
4625 | SND_PCI_QUIRK(0x1043, 0x1477, "ASUS N56VZ", ALC662_FIXUP_ASUS_MODE4), | ||
4572 | SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT), | 4626 | SND_PCI_QUIRK(0x1043, 0x8469, "ASUS mobo", ALC662_FIXUP_NO_JACK_DETECT), |
4573 | SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2), | 4627 | SND_PCI_QUIRK(0x105b, 0x0cd6, "Foxconn", ALC662_FIXUP_ASUS_MODE2), |
4574 | SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), | 4628 | SND_PCI_QUIRK(0x144d, 0xc051, "Samsung R720", ALC662_FIXUP_IDEAPAD), |
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 63fb5219f0f8..6234a51625b1 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c | |||
@@ -299,19 +299,6 @@ static void usX2Y_error_urb_status(struct usX2Ydev *usX2Y, | |||
299 | usX2Y_clients_stop(usX2Y); | 299 | usX2Y_clients_stop(usX2Y); |
300 | } | 300 | } |
301 | 301 | ||
302 | static void usX2Y_error_sequence(struct usX2Ydev *usX2Y, | ||
303 | struct snd_usX2Y_substream *subs, struct urb *urb) | ||
304 | { | ||
305 | snd_printk(KERN_ERR | ||
306 | "Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n" | ||
307 | "Most probably some urb of usb-frame %i is still missing.\n" | ||
308 | "Cause could be too long delays in usb-hcd interrupt handling.\n", | ||
309 | usb_get_current_frame_number(usX2Y->dev), | ||
310 | subs->endpoint, usb_pipein(urb->pipe) ? "in" : "out", | ||
311 | usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame); | ||
312 | usX2Y_clients_stop(usX2Y); | ||
313 | } | ||
314 | |||
315 | static void i_usX2Y_urb_complete(struct urb *urb) | 302 | static void i_usX2Y_urb_complete(struct urb *urb) |
316 | { | 303 | { |
317 | struct snd_usX2Y_substream *subs = urb->context; | 304 | struct snd_usX2Y_substream *subs = urb->context; |
@@ -328,12 +315,9 @@ static void i_usX2Y_urb_complete(struct urb *urb) | |||
328 | usX2Y_error_urb_status(usX2Y, subs, urb); | 315 | usX2Y_error_urb_status(usX2Y, subs, urb); |
329 | return; | 316 | return; |
330 | } | 317 | } |
331 | if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF))) | 318 | |
332 | subs->completed_urb = urb; | 319 | subs->completed_urb = urb; |
333 | else { | 320 | |
334 | usX2Y_error_sequence(usX2Y, subs, urb); | ||
335 | return; | ||
336 | } | ||
337 | { | 321 | { |
338 | struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE], | 322 | struct snd_usX2Y_substream *capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE], |
339 | *playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; | 323 | *playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; |
diff --git a/sound/usb/usx2y/usx2yhwdeppcm.c b/sound/usb/usx2y/usx2yhwdeppcm.c index f2a1acdc4d83..814d0e887c62 100644 --- a/sound/usb/usx2y/usx2yhwdeppcm.c +++ b/sound/usb/usx2y/usx2yhwdeppcm.c | |||
@@ -244,13 +244,8 @@ static void i_usX2Y_usbpcm_urb_complete(struct urb *urb) | |||
244 | usX2Y_error_urb_status(usX2Y, subs, urb); | 244 | usX2Y_error_urb_status(usX2Y, subs, urb); |
245 | return; | 245 | return; |
246 | } | 246 | } |
247 | if (likely((urb->start_frame & 0xFFFF) == (usX2Y->wait_iso_frame & 0xFFFF))) | ||
248 | subs->completed_urb = urb; | ||
249 | else { | ||
250 | usX2Y_error_sequence(usX2Y, subs, urb); | ||
251 | return; | ||
252 | } | ||
253 | 247 | ||
248 | subs->completed_urb = urb; | ||
254 | capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; | 249 | capsubs = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE]; |
255 | capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2]; | 250 | capsubs2 = usX2Y->subs[SNDRV_PCM_STREAM_CAPTURE + 2]; |
256 | playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; | 251 | playbacksubs = usX2Y->subs[SNDRV_PCM_STREAM_PLAYBACK]; |
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 3a0ff7fb71b6..64c043b7a438 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -770,6 +770,7 @@ check: $(OUTPUT)common-cmds.h | |||
770 | install-bin: all | 770 | install-bin: all |
771 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' | 771 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)' |
772 | $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' | 772 | $(INSTALL) $(OUTPUT)perf '$(DESTDIR_SQ)$(bindir_SQ)' |
773 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | ||
773 | $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' | 774 | $(INSTALL) $(OUTPUT)perf-archive -t '$(DESTDIR_SQ)$(perfexec_instdir_SQ)' |
774 | ifndef NO_LIBPERL | 775 | ifndef NO_LIBPERL |
775 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' | 776 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/scripts/perl/Perf-Trace-Util/lib/Perf/Trace' |
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index f686d5ff594e..5098f144b92d 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -457,6 +457,7 @@ static int __run_perf_stat(int argc, const char **argv) | |||
457 | perror("failed to prepare workload"); | 457 | perror("failed to prepare workload"); |
458 | return -1; | 458 | return -1; |
459 | } | 459 | } |
460 | child_pid = evsel_list->workload.pid; | ||
460 | } | 461 | } |
461 | 462 | ||
462 | if (group) | 463 | if (group) |
diff --git a/tools/perf/config/feature-tests.mak b/tools/perf/config/feature-tests.mak index d5a8dd44945f..f79305739ecc 100644 --- a/tools/perf/config/feature-tests.mak +++ b/tools/perf/config/feature-tests.mak | |||
@@ -219,7 +219,7 @@ define SOURCE_LIBAUDIT | |||
219 | 219 | ||
220 | int main(void) | 220 | int main(void) |
221 | { | 221 | { |
222 | printf(\"error message: %s\n\", audit_errno_to_name(0)); | 222 | printf(\"error message: %s\", audit_errno_to_name(0)); |
223 | return audit_open(); | 223 | return audit_open(); |
224 | } | 224 | } |
225 | endef | 225 | endef |
diff --git a/tools/perf/util/dwarf-aux.c b/tools/perf/util/dwarf-aux.c index e23bde19d590..7defd77105d0 100644 --- a/tools/perf/util/dwarf-aux.c +++ b/tools/perf/util/dwarf-aux.c | |||
@@ -426,7 +426,7 @@ static int __die_search_func_cb(Dwarf_Die *fn_die, void *data) | |||
426 | * @die_mem: a buffer for result DIE | 426 | * @die_mem: a buffer for result DIE |
427 | * | 427 | * |
428 | * Search a non-inlined function DIE which includes @addr. Stores the | 428 | * Search a non-inlined function DIE which includes @addr. Stores the |
429 | * DIE to @die_mem and returns it if found. Returns NULl if failed. | 429 | * DIE to @die_mem and returns it if found. Returns NULL if failed. |
430 | */ | 430 | */ |
431 | Dwarf_Die *die_find_realfunc(Dwarf_Die *cu_die, Dwarf_Addr addr, | 431 | Dwarf_Die *die_find_realfunc(Dwarf_Die *cu_die, Dwarf_Addr addr, |
432 | Dwarf_Die *die_mem) | 432 | Dwarf_Die *die_mem) |
@@ -454,15 +454,32 @@ static int __die_find_inline_cb(Dwarf_Die *die_mem, void *data) | |||
454 | } | 454 | } |
455 | 455 | ||
456 | /** | 456 | /** |
457 | * die_find_top_inlinefunc - Search the top inlined function at given address | ||
458 | * @sp_die: a subprogram DIE which including @addr | ||
459 | * @addr: target address | ||
460 | * @die_mem: a buffer for result DIE | ||
461 | * | ||
462 | * Search an inlined function DIE which includes @addr. Stores the | ||
463 | * DIE to @die_mem and returns it if found. Returns NULL if failed. | ||
464 | * Even if several inlined functions are expanded recursively, this | ||
465 | * doesn't trace it down, and returns the topmost one. | ||
466 | */ | ||
467 | Dwarf_Die *die_find_top_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, | ||
468 | Dwarf_Die *die_mem) | ||
469 | { | ||
470 | return die_find_child(sp_die, __die_find_inline_cb, &addr, die_mem); | ||
471 | } | ||
472 | |||
473 | /** | ||
457 | * die_find_inlinefunc - Search an inlined function at given address | 474 | * die_find_inlinefunc - Search an inlined function at given address |
458 | * @cu_die: a CU DIE which including @addr | 475 | * @sp_die: a subprogram DIE which including @addr |
459 | * @addr: target address | 476 | * @addr: target address |
460 | * @die_mem: a buffer for result DIE | 477 | * @die_mem: a buffer for result DIE |
461 | * | 478 | * |
462 | * Search an inlined function DIE which includes @addr. Stores the | 479 | * Search an inlined function DIE which includes @addr. Stores the |
463 | * DIE to @die_mem and returns it if found. Returns NULl if failed. | 480 | * DIE to @die_mem and returns it if found. Returns NULL if failed. |
464 | * If several inlined functions are expanded recursively, this trace | 481 | * If several inlined functions are expanded recursively, this trace |
465 | * it and returns deepest one. | 482 | * it down and returns deepest one. |
466 | */ | 483 | */ |
467 | Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, | 484 | Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, |
468 | Dwarf_Die *die_mem) | 485 | Dwarf_Die *die_mem) |
diff --git a/tools/perf/util/dwarf-aux.h b/tools/perf/util/dwarf-aux.h index 8658d41697d2..b4fe90c6cb2d 100644 --- a/tools/perf/util/dwarf-aux.h +++ b/tools/perf/util/dwarf-aux.h | |||
@@ -79,7 +79,11 @@ extern Dwarf_Die *die_find_child(Dwarf_Die *rt_die, | |||
79 | extern Dwarf_Die *die_find_realfunc(Dwarf_Die *cu_die, Dwarf_Addr addr, | 79 | extern Dwarf_Die *die_find_realfunc(Dwarf_Die *cu_die, Dwarf_Addr addr, |
80 | Dwarf_Die *die_mem); | 80 | Dwarf_Die *die_mem); |
81 | 81 | ||
82 | /* Search an inlined function including given address */ | 82 | /* Search the top inlined function including given address */ |
83 | extern Dwarf_Die *die_find_top_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, | ||
84 | Dwarf_Die *die_mem); | ||
85 | |||
86 | /* Search the deepest inlined function including given address */ | ||
83 | extern Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, | 87 | extern Dwarf_Die *die_find_inlinefunc(Dwarf_Die *sp_die, Dwarf_Addr addr, |
84 | Dwarf_Die *die_mem); | 88 | Dwarf_Die *die_mem); |
85 | 89 | ||
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index ce69901176d8..c3e5a3b817ab 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
@@ -2768,6 +2768,18 @@ int perf_session__read_header(struct perf_session *session) | |||
2768 | if (perf_file_header__read(&f_header, header, fd) < 0) | 2768 | if (perf_file_header__read(&f_header, header, fd) < 0) |
2769 | return -EINVAL; | 2769 | return -EINVAL; |
2770 | 2770 | ||
2771 | /* | ||
2772 | * Sanity check that perf.data was written cleanly; data size is | ||
2773 | * initialized to 0 and updated only if the on_exit function is run. | ||
2774 | * If data size is still 0 then the file contains only partial | ||
2775 | * information. Just warn user and process it as much as it can. | ||
2776 | */ | ||
2777 | if (f_header.data.size == 0) { | ||
2778 | pr_warning("WARNING: The %s file's data size field is 0 which is unexpected.\n" | ||
2779 | "Was the 'perf record' command properly terminated?\n", | ||
2780 | session->filename); | ||
2781 | } | ||
2782 | |||
2771 | nr_attrs = f_header.attrs.size / f_header.attr_size; | 2783 | nr_attrs = f_header.attrs.size / f_header.attr_size; |
2772 | lseek(fd, f_header.attrs.offset, SEEK_SET); | 2784 | lseek(fd, f_header.attrs.offset, SEEK_SET); |
2773 | 2785 | ||
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 371476cb8ddc..c09e0a9fdf4c 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
@@ -1327,8 +1327,8 @@ int debuginfo__find_probe_point(struct debuginfo *self, unsigned long addr, | |||
1327 | struct perf_probe_point *ppt) | 1327 | struct perf_probe_point *ppt) |
1328 | { | 1328 | { |
1329 | Dwarf_Die cudie, spdie, indie; | 1329 | Dwarf_Die cudie, spdie, indie; |
1330 | Dwarf_Addr _addr, baseaddr; | 1330 | Dwarf_Addr _addr = 0, baseaddr = 0; |
1331 | const char *fname = NULL, *func = NULL, *tmp; | 1331 | const char *fname = NULL, *func = NULL, *basefunc = NULL, *tmp; |
1332 | int baseline = 0, lineno = 0, ret = 0; | 1332 | int baseline = 0, lineno = 0, ret = 0; |
1333 | 1333 | ||
1334 | /* Adjust address with bias */ | 1334 | /* Adjust address with bias */ |
@@ -1349,27 +1349,36 @@ int debuginfo__find_probe_point(struct debuginfo *self, unsigned long addr, | |||
1349 | /* Find a corresponding function (name, baseline and baseaddr) */ | 1349 | /* Find a corresponding function (name, baseline and baseaddr) */ |
1350 | if (die_find_realfunc(&cudie, (Dwarf_Addr)addr, &spdie)) { | 1350 | if (die_find_realfunc(&cudie, (Dwarf_Addr)addr, &spdie)) { |
1351 | /* Get function entry information */ | 1351 | /* Get function entry information */ |
1352 | tmp = dwarf_diename(&spdie); | 1352 | func = basefunc = dwarf_diename(&spdie); |
1353 | if (!tmp || | 1353 | if (!func || |
1354 | dwarf_entrypc(&spdie, &baseaddr) != 0 || | 1354 | dwarf_entrypc(&spdie, &baseaddr) != 0 || |
1355 | dwarf_decl_line(&spdie, &baseline) != 0) | 1355 | dwarf_decl_line(&spdie, &baseline) != 0) { |
1356 | lineno = 0; | ||
1356 | goto post; | 1357 | goto post; |
1357 | func = tmp; | 1358 | } |
1358 | 1359 | ||
1359 | if (addr == (unsigned long)baseaddr) | 1360 | if (addr == (unsigned long)baseaddr) { |
1360 | /* Function entry - Relative line number is 0 */ | 1361 | /* Function entry - Relative line number is 0 */ |
1361 | lineno = baseline; | 1362 | lineno = baseline; |
1362 | else if (die_find_inlinefunc(&spdie, (Dwarf_Addr)addr, | 1363 | fname = dwarf_decl_file(&spdie); |
1363 | &indie)) { | 1364 | goto post; |
1365 | } | ||
1366 | |||
1367 | /* Track down the inline functions step by step */ | ||
1368 | while (die_find_top_inlinefunc(&spdie, (Dwarf_Addr)addr, | ||
1369 | &indie)) { | ||
1370 | /* There is an inline function */ | ||
1364 | if (dwarf_entrypc(&indie, &_addr) == 0 && | 1371 | if (dwarf_entrypc(&indie, &_addr) == 0 && |
1365 | _addr == addr) | 1372 | _addr == addr) { |
1366 | /* | 1373 | /* |
1367 | * addr is at an inline function entry. | 1374 | * addr is at an inline function entry. |
1368 | * In this case, lineno should be the call-site | 1375 | * In this case, lineno should be the call-site |
1369 | * line number. | 1376 | * line number. (overwrite lineinfo) |
1370 | */ | 1377 | */ |
1371 | lineno = die_get_call_lineno(&indie); | 1378 | lineno = die_get_call_lineno(&indie); |
1372 | else { | 1379 | fname = die_get_call_file(&indie); |
1380 | break; | ||
1381 | } else { | ||
1373 | /* | 1382 | /* |
1374 | * addr is in an inline function body. | 1383 | * addr is in an inline function body. |
1375 | * Since lineno points one of the lines | 1384 | * Since lineno points one of the lines |
@@ -1377,19 +1386,27 @@ int debuginfo__find_probe_point(struct debuginfo *self, unsigned long addr, | |||
1377 | * be the entry line of the inline function. | 1386 | * be the entry line of the inline function. |
1378 | */ | 1387 | */ |
1379 | tmp = dwarf_diename(&indie); | 1388 | tmp = dwarf_diename(&indie); |
1380 | if (tmp && | 1389 | if (!tmp || |
1381 | dwarf_decl_line(&spdie, &baseline) == 0) | 1390 | dwarf_decl_line(&indie, &baseline) != 0) |
1382 | func = tmp; | 1391 | break; |
1392 | func = tmp; | ||
1393 | spdie = indie; | ||
1383 | } | 1394 | } |
1384 | } | 1395 | } |
1396 | /* Verify the lineno and baseline are in a same file */ | ||
1397 | tmp = dwarf_decl_file(&spdie); | ||
1398 | if (!tmp || strcmp(tmp, fname) != 0) | ||
1399 | lineno = 0; | ||
1385 | } | 1400 | } |
1386 | 1401 | ||
1387 | post: | 1402 | post: |
1388 | /* Make a relative line number or an offset */ | 1403 | /* Make a relative line number or an offset */ |
1389 | if (lineno) | 1404 | if (lineno) |
1390 | ppt->line = lineno - baseline; | 1405 | ppt->line = lineno - baseline; |
1391 | else if (func) | 1406 | else if (basefunc) { |
1392 | ppt->offset = addr - (unsigned long)baseaddr; | 1407 | ppt->offset = addr - (unsigned long)baseaddr; |
1408 | func = basefunc; | ||
1409 | } | ||
1393 | 1410 | ||
1394 | /* Duplicate strings */ | 1411 | /* Duplicate strings */ |
1395 | if (func) { | 1412 | if (func) { |
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 70ffa41518f3..568b750c01f6 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -256,6 +256,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool) | |||
256 | tool->sample = process_event_sample_stub; | 256 | tool->sample = process_event_sample_stub; |
257 | if (tool->mmap == NULL) | 257 | if (tool->mmap == NULL) |
258 | tool->mmap = process_event_stub; | 258 | tool->mmap = process_event_stub; |
259 | if (tool->mmap2 == NULL) | ||
260 | tool->mmap2 = process_event_stub; | ||
259 | if (tool->comm == NULL) | 261 | if (tool->comm == NULL) |
260 | tool->comm = process_event_stub; | 262 | tool->comm = process_event_stub; |
261 | if (tool->fork == NULL) | 263 | if (tool->fork == NULL) |
@@ -1310,7 +1312,7 @@ int __perf_session__process_events(struct perf_session *session, | |||
1310 | file_offset = page_offset; | 1312 | file_offset = page_offset; |
1311 | head = data_offset - page_offset; | 1313 | head = data_offset - page_offset; |
1312 | 1314 | ||
1313 | if (data_offset + data_size < file_size) | 1315 | if (data_size && (data_offset + data_size < file_size)) |
1314 | file_size = data_offset + data_size; | 1316 | file_size = data_offset + data_size; |
1315 | 1317 | ||
1316 | progress_next = file_size / 16; | 1318 | progress_next = file_size / 16; |