diff options
author | Olof Johansson <olof@lixom.net> | 2018-09-01 21:22:19 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2018-09-01 21:22:19 -0400 |
commit | a72b44a871c218e2a0580e68affa1d3528c0587a (patch) | |
tree | 25f25ba4acf3818130bedc574be118122adc2952 | |
parent | 67e6ddb5be440a92b82e87ca0ab8f973ae31b12c (diff) | |
parent | 2d59bb602314a4b2593fde267734266b5e872dd0 (diff) |
Merge tag 'omap-for-v4.19/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
Fixes for omap variants against v4.19-rc1
These are mostly fixes related to using ti-sysc interconnect target module
driver for accessing right register offsets for sgx and cpsw and for
no_console_suspend regression.
There is also a droid4 emmc fix where emmc may not get detected for some
models, and vibrator dts mismerge fix.
And we have a file permission fix for am335x-osd3358-sm-red.dts that
just got added. And we must tag RTC as system-power-controller for
am437x for PMIC to shut down during poweroff.
* tag 'omap-for-v4.19/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: dts: omap4-droid4: Fix emmc errors seen on some devices
ARM: dts: Fix file permission for am335x-osd3358-sm-red.dts
arm: dts: am4372: setup rtc as system-power-controller
ARM: dts: omap4-droid4: fix vibrations on Droid 4
bus: ti-sysc: Fix no_console_suspend handling
bus: ti-sysc: Fix module register ioremap for larger offsets
ARM: OMAP2+: Fix module address for modules using mpu_rt_idx
ARM: OMAP2+: Fix null hwmod for ti-sysc debug
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r--[-rwxr-xr-x] | arch/arm/boot/dts/am335x-osd3358-sm-red.dts | 0 | ||||
-rw-r--r-- | arch/arm/boot/dts/am4372.dtsi | 1 | ||||
-rw-r--r-- | arch/arm/boot/dts/omap4-droid4-xt894.dts | 20 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod.c | 39 | ||||
-rw-r--r-- | drivers/bus/ti-sysc.c | 37 |
5 files changed, 66 insertions, 31 deletions
diff --git a/arch/arm/boot/dts/am335x-osd3358-sm-red.dts b/arch/arm/boot/dts/am335x-osd3358-sm-red.dts index 4d969013f99a..4d969013f99a 100755..100644 --- a/arch/arm/boot/dts/am335x-osd3358-sm-red.dts +++ b/arch/arm/boot/dts/am335x-osd3358-sm-red.dts | |||
diff --git a/arch/arm/boot/dts/am4372.dtsi b/arch/arm/boot/dts/am4372.dtsi index f0cbd86312dc..d4b7c59eec68 100644 --- a/arch/arm/boot/dts/am4372.dtsi +++ b/arch/arm/boot/dts/am4372.dtsi | |||
@@ -469,6 +469,7 @@ | |||
469 | ti,hwmods = "rtc"; | 469 | ti,hwmods = "rtc"; |
470 | clocks = <&clk_32768_ck>; | 470 | clocks = <&clk_32768_ck>; |
471 | clock-names = "int-clk"; | 471 | clock-names = "int-clk"; |
472 | system-power-controller; | ||
472 | status = "disabled"; | 473 | status = "disabled"; |
473 | }; | 474 | }; |
474 | 475 | ||
diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts index 12d6822f0057..04758a2a87f0 100644 --- a/arch/arm/boot/dts/omap4-droid4-xt894.dts +++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts | |||
@@ -354,7 +354,7 @@ | |||
354 | &mmc2 { | 354 | &mmc2 { |
355 | vmmc-supply = <&vsdio>; | 355 | vmmc-supply = <&vsdio>; |
356 | bus-width = <8>; | 356 | bus-width = <8>; |
357 | non-removable; | 357 | ti,non-removable; |
358 | }; | 358 | }; |
359 | 359 | ||
360 | &mmc3 { | 360 | &mmc3 { |
@@ -621,15 +621,6 @@ | |||
621 | OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_fsx */ | 621 | OMAP4_IOPAD(0x10c, PIN_INPUT | MUX_MODE1) /* abe_mcbsp3_fsx */ |
622 | >; | 622 | >; |
623 | }; | 623 | }; |
624 | }; | ||
625 | |||
626 | &omap4_pmx_wkup { | ||
627 | usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins { | ||
628 | /* gpio_wk0 */ | ||
629 | pinctrl-single,pins = < | ||
630 | OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3) | ||
631 | >; | ||
632 | }; | ||
633 | 624 | ||
634 | vibrator_direction_pin: pinmux_vibrator_direction_pin { | 625 | vibrator_direction_pin: pinmux_vibrator_direction_pin { |
635 | pinctrl-single,pins = < | 626 | pinctrl-single,pins = < |
@@ -644,6 +635,15 @@ | |||
644 | }; | 635 | }; |
645 | }; | 636 | }; |
646 | 637 | ||
638 | &omap4_pmx_wkup { | ||
639 | usb_gpio_mux_sel2: pinmux_usb_gpio_mux_sel2_pins { | ||
640 | /* gpio_wk0 */ | ||
641 | pinctrl-single,pins = < | ||
642 | OMAP4_IOPAD(0x040, PIN_OUTPUT_PULLDOWN | MUX_MODE3) | ||
643 | >; | ||
644 | }; | ||
645 | }; | ||
646 | |||
647 | /* | 647 | /* |
648 | * As uart1 is wired to mdm6600 with rts and cts, we can use the cts pin for | 648 | * As uart1 is wired to mdm6600 with rts and cts, we can use the cts pin for |
649 | * uart1 wakeirq. | 649 | * uart1 wakeirq. |
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index 2ceffd85dd3d..cd65ea4e9c54 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c | |||
@@ -2161,6 +2161,37 @@ static int of_dev_hwmod_lookup(struct device_node *np, | |||
2161 | } | 2161 | } |
2162 | 2162 | ||
2163 | /** | 2163 | /** |
2164 | * omap_hwmod_fix_mpu_rt_idx - fix up mpu_rt_idx register offsets | ||
2165 | * | ||
2166 | * @oh: struct omap_hwmod * | ||
2167 | * @np: struct device_node * | ||
2168 | * | ||
2169 | * Fix up module register offsets for modules with mpu_rt_idx. | ||
2170 | * Only needed for cpsw with interconnect target module defined | ||
2171 | * in device tree while still using legacy hwmod platform data | ||
2172 | * for rev, sysc and syss registers. | ||
2173 | * | ||
2174 | * Can be removed when all cpsw hwmod platform data has been | ||
2175 | * dropped. | ||
2176 | */ | ||
2177 | static void omap_hwmod_fix_mpu_rt_idx(struct omap_hwmod *oh, | ||
2178 | struct device_node *np, | ||
2179 | struct resource *res) | ||
2180 | { | ||
2181 | struct device_node *child = NULL; | ||
2182 | int error; | ||
2183 | |||
2184 | child = of_get_next_child(np, child); | ||
2185 | if (!child) | ||
2186 | return; | ||
2187 | |||
2188 | error = of_address_to_resource(child, oh->mpu_rt_idx, res); | ||
2189 | if (error) | ||
2190 | pr_err("%s: error mapping mpu_rt_idx: %i\n", | ||
2191 | __func__, error); | ||
2192 | } | ||
2193 | |||
2194 | /** | ||
2164 | * omap_hwmod_parse_module_range - map module IO range from device tree | 2195 | * omap_hwmod_parse_module_range - map module IO range from device tree |
2165 | * @oh: struct omap_hwmod * | 2196 | * @oh: struct omap_hwmod * |
2166 | * @np: struct device_node * | 2197 | * @np: struct device_node * |
@@ -2220,7 +2251,13 @@ int omap_hwmod_parse_module_range(struct omap_hwmod *oh, | |||
2220 | size = be32_to_cpup(ranges); | 2251 | size = be32_to_cpup(ranges); |
2221 | 2252 | ||
2222 | pr_debug("omap_hwmod: %s %s at 0x%llx size 0x%llx\n", | 2253 | pr_debug("omap_hwmod: %s %s at 0x%llx size 0x%llx\n", |
2223 | oh->name, np->name, base, size); | 2254 | oh ? oh->name : "", np->name, base, size); |
2255 | |||
2256 | if (oh && oh->mpu_rt_idx) { | ||
2257 | omap_hwmod_fix_mpu_rt_idx(oh, np, res); | ||
2258 | |||
2259 | return 0; | ||
2260 | } | ||
2224 | 2261 | ||
2225 | res->start = base; | 2262 | res->start = base; |
2226 | res->end = base + size - 1; | 2263 | res->end = base + size - 1; |
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index c9bac9dc4637..e4fe954e63a9 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c | |||
@@ -498,32 +498,29 @@ static int sysc_check_registers(struct sysc *ddata) | |||
498 | 498 | ||
499 | /** | 499 | /** |
500 | * syc_ioremap - ioremap register space for the interconnect target module | 500 | * syc_ioremap - ioremap register space for the interconnect target module |
501 | * @ddata: deviec driver data | 501 | * @ddata: device driver data |
502 | * | 502 | * |
503 | * Note that the interconnect target module registers can be anywhere | 503 | * Note that the interconnect target module registers can be anywhere |
504 | * within the first child device address space. For example, SGX has | 504 | * within the interconnect target module range. For example, SGX has |
505 | * them at offset 0x1fc00 in the 32MB module address space. We just | 505 | * them at offset 0x1fc00 in the 32MB module address space. And cpsw |
506 | * what we need around the interconnect target module registers. | 506 | * has them at offset 0x1200 in the CPSW_WR child. Usually the |
507 | * the interconnect target module registers are at the beginning of | ||
508 | * the module range though. | ||
507 | */ | 509 | */ |
508 | static int sysc_ioremap(struct sysc *ddata) | 510 | static int sysc_ioremap(struct sysc *ddata) |
509 | { | 511 | { |
510 | u32 size = 0; | 512 | int size; |
511 | |||
512 | if (ddata->offsets[SYSC_SYSSTATUS] >= 0) | ||
513 | size = ddata->offsets[SYSC_SYSSTATUS]; | ||
514 | else if (ddata->offsets[SYSC_SYSCONFIG] >= 0) | ||
515 | size = ddata->offsets[SYSC_SYSCONFIG]; | ||
516 | else if (ddata->offsets[SYSC_REVISION] >= 0) | ||
517 | size = ddata->offsets[SYSC_REVISION]; | ||
518 | else | ||
519 | return -EINVAL; | ||
520 | 513 | ||
521 | size &= 0xfff00; | 514 | size = max3(ddata->offsets[SYSC_REVISION], |
522 | size += SZ_256; | 515 | ddata->offsets[SYSC_SYSCONFIG], |
516 | ddata->offsets[SYSC_SYSSTATUS]); | ||
517 | |||
518 | if (size < 0 || (size + sizeof(u32)) > ddata->module_size) | ||
519 | return -EINVAL; | ||
523 | 520 | ||
524 | ddata->module_va = devm_ioremap(ddata->dev, | 521 | ddata->module_va = devm_ioremap(ddata->dev, |
525 | ddata->module_pa, | 522 | ddata->module_pa, |
526 | size); | 523 | size + sizeof(u32)); |
527 | if (!ddata->module_va) | 524 | if (!ddata->module_va) |
528 | return -EIO; | 525 | return -EIO; |
529 | 526 | ||
@@ -1224,10 +1221,10 @@ static int sysc_child_suspend_noirq(struct device *dev) | |||
1224 | if (!pm_runtime_status_suspended(dev)) { | 1221 | if (!pm_runtime_status_suspended(dev)) { |
1225 | error = pm_generic_runtime_suspend(dev); | 1222 | error = pm_generic_runtime_suspend(dev); |
1226 | if (error) { | 1223 | if (error) { |
1227 | dev_err(dev, "%s error at %i: %i\n", | 1224 | dev_warn(dev, "%s busy at %i: %i\n", |
1228 | __func__, __LINE__, error); | 1225 | __func__, __LINE__, error); |
1229 | 1226 | ||
1230 | return error; | 1227 | return 0; |
1231 | } | 1228 | } |
1232 | 1229 | ||
1233 | error = sysc_runtime_suspend(ddata->dev); | 1230 | error = sysc_runtime_suspend(ddata->dev); |