diff options
| author | Olof Johansson <olof@lixom.net> | 2016-02-24 03:05:11 -0500 |
|---|---|---|
| committer | Olof Johansson <olof@lixom.net> | 2016-02-24 03:05:11 -0500 |
| commit | e3acd74f9268a713b08d5461567cd8bfe47054f7 (patch) | |
| tree | f7caf3d1831293c436d7c2389e5f72f5ad66043c | |
| parent | 74a46ec6fbc1b410f3cbf897d3802c0bf554ea5a (diff) | |
| parent | cf26f1137333251f3515dea31f95775b99df0fd5 (diff) | |
Merge tag 'omap-for-v4.5/fixes-rc3-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
Few fixes for omaps against v4.5-rc3:
- Improve omap_device error message to tell driver writers what is
wrong after commit 5de85b9d57ab ("PM / runtime: Re-init runtime PM
states at probe error and driver unbind"). There will be also a
handful of driver related fixes also queued separately. But adding
this error message makes it easy to fix any omap_device using
drivers suffering from this issue so I think it's important to
have.
- Also related to commit 5de85b9d57ab discussion, let's fix a bug
where disabling PM runtime via sysfs will also cause the hardware
state to be different from PM runtime state.
- Fix audio clocks for beagle-x15.
- Use wakeup-source instead of gpio-key,wakeup for the new entries
that sneaked in during the merge window.
- Fix a legacy booting vs device tree based booting regression for
n900 where the legacy user space expects to have the device
revision available in /proc/atags also when booted with device
tree.
* tag 'omap-for-v4.5/fixes-rc3-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP2+: Fix omap_device for module reload on PM runtime forbid
ARM: OMAP2+: Improve omap_device error for driver writers
ARM: DTS: am57xx-beagle-x15: Select SYS_CLK2 for audio clocks
ARM: dts: am335x/am57xx: replace gpio-key,wakeup with wakeup-source property
ARM: OMAP2+: Set system_rev from ATAGS for n900
Signed-off-by: Olof Johansson <olof@lixom.net>
| -rw-r--r-- | arch/arm/boot/dts/am335x-shc.dts | 4 | ||||
| -rw-r--r-- | arch/arm/boot/dts/am57xx-beagle-x15.dts | 4 | ||||
| -rw-r--r-- | arch/arm/boot/dts/am57xx-cl-som-am57x.dts | 2 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-generic.c | 22 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/omap_device.c | 14 |
5 files changed, 41 insertions, 5 deletions
diff --git a/arch/arm/boot/dts/am335x-shc.dts b/arch/arm/boot/dts/am335x-shc.dts index 1b5b044fcd91..865de8500f1c 100644 --- a/arch/arm/boot/dts/am335x-shc.dts +++ b/arch/arm/boot/dts/am335x-shc.dts | |||
| @@ -46,7 +46,7 @@ | |||
| 46 | gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>; | 46 | gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>; |
| 47 | linux,code = <KEY_BACK>; | 47 | linux,code = <KEY_BACK>; |
| 48 | debounce-interval = <1000>; | 48 | debounce-interval = <1000>; |
| 49 | gpio-key,wakeup; | 49 | wakeup-source; |
| 50 | }; | 50 | }; |
| 51 | 51 | ||
| 52 | front_button { | 52 | front_button { |
| @@ -54,7 +54,7 @@ | |||
| 54 | gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>; | 54 | gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>; |
| 55 | linux,code = <KEY_FRONT>; | 55 | linux,code = <KEY_FRONT>; |
| 56 | debounce-interval = <1000>; | 56 | debounce-interval = <1000>; |
| 57 | gpio-key,wakeup; | 57 | wakeup-source; |
| 58 | }; | 58 | }; |
| 59 | }; | 59 | }; |
| 60 | 60 | ||
diff --git a/arch/arm/boot/dts/am57xx-beagle-x15.dts b/arch/arm/boot/dts/am57xx-beagle-x15.dts index 36c0fa6c362a..a0986c65be0c 100644 --- a/arch/arm/boot/dts/am57xx-beagle-x15.dts +++ b/arch/arm/boot/dts/am57xx-beagle-x15.dts | |||
| @@ -173,6 +173,8 @@ | |||
| 173 | 173 | ||
| 174 | sound0_master: simple-audio-card,codec { | 174 | sound0_master: simple-audio-card,codec { |
| 175 | sound-dai = <&tlv320aic3104>; | 175 | sound-dai = <&tlv320aic3104>; |
| 176 | assigned-clocks = <&clkoutmux2_clk_mux>; | ||
| 177 | assigned-clock-parents = <&sys_clk2_dclk_div>; | ||
| 176 | clocks = <&clkout2_clk>; | 178 | clocks = <&clkout2_clk>; |
| 177 | }; | 179 | }; |
| 178 | }; | 180 | }; |
| @@ -796,6 +798,8 @@ | |||
| 796 | pinctrl-names = "default", "sleep"; | 798 | pinctrl-names = "default", "sleep"; |
| 797 | pinctrl-0 = <&mcasp3_pins_default>; | 799 | pinctrl-0 = <&mcasp3_pins_default>; |
| 798 | pinctrl-1 = <&mcasp3_pins_sleep>; | 800 | pinctrl-1 = <&mcasp3_pins_sleep>; |
| 801 | assigned-clocks = <&mcasp3_ahclkx_mux>; | ||
| 802 | assigned-clock-parents = <&sys_clkin2>; | ||
| 799 | status = "okay"; | 803 | status = "okay"; |
| 800 | 804 | ||
| 801 | op-mode = <0>; /* MCASP_IIS_MODE */ | 805 | op-mode = <0>; /* MCASP_IIS_MODE */ |
diff --git a/arch/arm/boot/dts/am57xx-cl-som-am57x.dts b/arch/arm/boot/dts/am57xx-cl-som-am57x.dts index 8d93882dc8d5..1c06cb76da07 100644 --- a/arch/arm/boot/dts/am57xx-cl-som-am57x.dts +++ b/arch/arm/boot/dts/am57xx-cl-som-am57x.dts | |||
| @@ -545,7 +545,7 @@ | |||
| 545 | ti,debounce-tol = /bits/ 16 <10>; | 545 | ti,debounce-tol = /bits/ 16 <10>; |
| 546 | ti,debounce-rep = /bits/ 16 <1>; | 546 | ti,debounce-rep = /bits/ 16 <1>; |
| 547 | 547 | ||
| 548 | linux,wakeup; | 548 | wakeup-source; |
| 549 | }; | 549 | }; |
| 550 | }; | 550 | }; |
| 551 | 551 | ||
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 809827265fb3..bab814d2f37d 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
| @@ -18,6 +18,7 @@ | |||
| 18 | 18 | ||
| 19 | #include <asm/setup.h> | 19 | #include <asm/setup.h> |
| 20 | #include <asm/mach/arch.h> | 20 | #include <asm/mach/arch.h> |
| 21 | #include <asm/system_info.h> | ||
| 21 | 22 | ||
| 22 | #include "common.h" | 23 | #include "common.h" |
| 23 | 24 | ||
| @@ -77,12 +78,31 @@ static const char *const n900_boards_compat[] __initconst = { | |||
| 77 | NULL, | 78 | NULL, |
| 78 | }; | 79 | }; |
| 79 | 80 | ||
| 81 | /* Set system_rev from atags */ | ||
| 82 | static void __init rx51_set_system_rev(const struct tag *tags) | ||
| 83 | { | ||
| 84 | const struct tag *tag; | ||
| 85 | |||
| 86 | if (tags->hdr.tag != ATAG_CORE) | ||
| 87 | return; | ||
| 88 | |||
| 89 | for_each_tag(tag, tags) { | ||
| 90 | if (tag->hdr.tag == ATAG_REVISION) { | ||
| 91 | system_rev = tag->u.revision.rev; | ||
| 92 | break; | ||
| 93 | } | ||
| 94 | } | ||
| 95 | } | ||
| 96 | |||
| 80 | /* Legacy userspace on Nokia N900 needs ATAGS exported in /proc/atags, | 97 | /* Legacy userspace on Nokia N900 needs ATAGS exported in /proc/atags, |
| 81 | * save them while the data is still not overwritten | 98 | * save them while the data is still not overwritten |
| 82 | */ | 99 | */ |
| 83 | static void __init rx51_reserve(void) | 100 | static void __init rx51_reserve(void) |
| 84 | { | 101 | { |
| 85 | save_atags((const struct tag *)(PAGE_OFFSET + 0x100)); | 102 | const struct tag *tags = (const struct tag *)(PAGE_OFFSET + 0x100); |
| 103 | |||
| 104 | save_atags(tags); | ||
| 105 | rx51_set_system_rev(tags); | ||
| 86 | omap_reserve(); | 106 | omap_reserve(); |
| 87 | } | 107 | } |
| 88 | 108 | ||
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index 0437537751bc..f7ff3b9dad87 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
| @@ -191,12 +191,22 @@ static int _omap_device_notifier_call(struct notifier_block *nb, | |||
| 191 | { | 191 | { |
| 192 | struct platform_device *pdev = to_platform_device(dev); | 192 | struct platform_device *pdev = to_platform_device(dev); |
| 193 | struct omap_device *od; | 193 | struct omap_device *od; |
| 194 | int err; | ||
| 194 | 195 | ||
| 195 | switch (event) { | 196 | switch (event) { |
| 196 | case BUS_NOTIFY_DEL_DEVICE: | 197 | case BUS_NOTIFY_DEL_DEVICE: |
| 197 | if (pdev->archdata.od) | 198 | if (pdev->archdata.od) |
| 198 | omap_device_delete(pdev->archdata.od); | 199 | omap_device_delete(pdev->archdata.od); |
| 199 | break; | 200 | break; |
| 201 | case BUS_NOTIFY_UNBOUND_DRIVER: | ||
| 202 | od = to_omap_device(pdev); | ||
| 203 | if (od && (od->_state == OMAP_DEVICE_STATE_ENABLED)) { | ||
| 204 | dev_info(dev, "enabled after unload, idling\n"); | ||
| 205 | err = omap_device_idle(pdev); | ||
| 206 | if (err) | ||
| 207 | dev_err(dev, "failed to idle\n"); | ||
| 208 | } | ||
| 209 | break; | ||
| 200 | case BUS_NOTIFY_ADD_DEVICE: | 210 | case BUS_NOTIFY_ADD_DEVICE: |
| 201 | if (pdev->dev.of_node) | 211 | if (pdev->dev.of_node) |
| 202 | omap_device_build_from_dt(pdev); | 212 | omap_device_build_from_dt(pdev); |
| @@ -602,8 +612,10 @@ static int _od_runtime_resume(struct device *dev) | |||
| 602 | int ret; | 612 | int ret; |
| 603 | 613 | ||
| 604 | ret = omap_device_enable(pdev); | 614 | ret = omap_device_enable(pdev); |
| 605 | if (ret) | 615 | if (ret) { |
| 616 | dev_err(dev, "use pm_runtime_put_sync_suspend() in driver?\n"); | ||
| 606 | return ret; | 617 | return ret; |
| 618 | } | ||
| 607 | 619 | ||
| 608 | return pm_generic_runtime_resume(dev); | 620 | return pm_generic_runtime_resume(dev); |
| 609 | } | 621 | } |
