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 /drivers | |
| 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>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/bus/ti-sysc.c | 37 |
1 files changed, 17 insertions, 20 deletions
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); |
