- 01 4月, 2019 3 次提交
-
-
由 Tony Lindgren 提交于
We can make sysc_write() and sysc_child_pm_domain static as noted by sparse. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
We have ti,no-idle in use in addition to ti,no-idle-on-init but we're missing handling for it in the ti-sysc interconnect target module driver. Let's also group the idle defines together and update the binding documentation for it. Cc: devicetree@vger.kernel.org Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
If we return early before ddata->clocks have been allocated we will get a NULL pointer dereference in sysc_unprepare(). Let's fix this by returning early when no clocks are allocated. Fixes: 0eecc636 ("bus: ti-sysc: Add minimal TI sysc interconnect target driver") Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 29 1月, 2019 1 次提交
-
-
由 Tony Lindgren 提交于
Commit 84badc5e ("ARM: dts: omap4: Move l4 child devices to probe them with ti-sysc") started producing a warning for pwm-omap-dmtimer: WARNING: CPU: 0 PID: 77 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x2f8/0x388 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4PER2 (Idle): Data Access in Supervisor mode during Functional access ... __pm_runtime_idle omap_dm_timer_disable pwm_omap_dmtimer_start pwm_omap_dmtimer_enable pwm_apply_state pwm_vibrator_start pwm_vibrator_play_work This is because the timer that pwm-omap-dmtimer is using is now being probed with ti-sysc interconnect target module instead of omap_device and the ti-sysc quirk for SYSC_QUIRK_LEGACY_IDLE is not fully compatible with what omap_device has been doing. We could fix this by reverting the timer changes and have the timer probe again with omap_device. Or we could add more quirk handling to ti-sysc driver. But as these options don't work nicely as longer term solutions, let's just make timers probe with ti-sysc without any quirks. To do this, all we need to do is remove quirks for timers for ti-sysc, and drop the bogus pm_runtime_irq_safe() flag for timer-ti-dm. We should not use pm_runtime_irq_safe() anyways for drivers as it will take a permanent use count on the parent device blocking the parent devices from idling and has been forcing ti-sysc driver to use a quirk flag. Note that we will move the timer data to DEBUG section later on in clean-up patches. Fixes: 84badc5e ("ARM: dts: omap4: Move l4 child devices to probe them with ti-sysc") Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: H. Nikolaus Schaller <hns@goldelico.com> Cc: Keerthy <j-keerthy@ti.com> Cc: Ladislav Michl <ladis@linux-mips.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Sebastian Reichel <sre@kernel.org> Cc: Tero Kristo <t-kristo@ti.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Reported-by: NH. Nikolaus Schaller <hns@goldelico.com> Tested-By: NAndreas Kemnade <andreas@kemnade.info> Tested-By: NH. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 11 12月, 2018 1 次提交
-
-
由 Tony Lindgren 提交于
With ti-sysc, we need to now have the device tree properties for ti,no-reset-on-init and ti,no-idle-on-init at the module level instead of the child device level. Let's check for these properties at the child device level to enable quirks, and warn about moving the properties to the module level. Otherwise am335x-evm based boards tagging gpio1 with ti,no-reset-on-init will have their DDR power disabled if wired up in such a tricky way. Note that this should not be an issue for earlier kernels as we don't rely on this until the dts files have been updated to probe with ti-sysc interconnect target driver. Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Reported-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 16 11月, 2018 3 次提交
-
-
由 Tony Lindgren 提交于
We want to see the names of detected devices when DEBUG is enabled. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
We have OPT_CLKS_NEEDED in legacy platform data, but it's missing from the ti-sysc driver for device tree based configuration. In order to pass OPT_CLKS_NEEDED quirk flag we need to update omap4 module data and add a new compatible for dra7 as the module layout is different from sysc_regbits_omap4_mcasp. Fixes: 70a65240 ("bus: ti-sysc: Add register bits for interconnect target modules") Cc: Mark Rutland <mark.rutland@arm.com> Cc: Rob Herring <robh+dt@kernel.org> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
We can have holes in clock_roles with interface clock missing for example. Currently getting an optional clock will fail if there are only a functional clock and an optional clock. Fixes: 09dfe581 ("bus: ti-sysc: Add handling for clkctrl opt clocks") Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 02 10月, 2018 1 次提交
-
-
由 Tony Lindgren 提交于
As Grygorii Strashko pointed out, the runtime PM use count of the children can be whatever at suspend and we should not use it. So let's just suspend ti-sysc at noirq level and get rid of some code. Let's also remove the PM_SLEEP ifdef and use __maybe_unused as the PM code already deals with the ifdefs. Suggested-by: NGrygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 29 9月, 2018 3 次提交
-
-
由 Tony Lindgren 提交于
We're currently warning about busy children on suspend in sysc_child_suspend_noirq() but the legacy code omap_device does not do that. Let's just make it dev_dbg() instead of dev_warn(). Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
We want to see the names of detected devices when DEBUG is enabled. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
We need to detect timer and gpio on dra7 because of the SYSC_QUIRK_LEGACY_IDLE flag for suspend and resume. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 25 9月, 2018 4 次提交
-
-
由 Tony Lindgren 提交于
When debug is enabled, we want to see what devices we're detecting to make things a bit easier for us. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
When debug is enabled, we want to see what devices we're detecting to make things a bit easier for us. Many of these devices will also be available on am335x and dra7, and some just need updating the revision register mask. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
We need to detect few new devices to tag for noirq_suspend and pm_runtime_irq_safe to avoid causing regressions compared to legacy platform data booting. Let's update i2c, gpio, uart and wdt revision masks to detect them on am437x. Note that we can remove the second wdt entry with the updated mask. Note that we also have some uarts with a different revision register. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
We don't care when we suspend but some our children do. In order to avoid tagging various modules with SYSC_QUIRK_RESOURCE_PROVIDER, let's do it automatically by tagging modules that are busy on suspend for noirq suspend. This way we can just do module detection on define DEBUG. Note that we still need to keep SYSC_QUIRK_LEGACY_IDLE flag around so the our legacy single-child devices that set pm_runtime_irq_safe() can manage the interconnect target module themselves. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 22 8月, 2018 1 次提交
-
-
由 Tony Lindgren 提交于
If no_console_suspend is set, we should keep console enabled during suspend. Lets fix this by only producing a warning if we can't idle hardware during suspend. Fixes: ef55f821 ("bus: ti-sysc: Improve suspend and resume handling") Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 17 8月, 2018 1 次提交
-
-
由 Tony Lindgren 提交于
We can have the interconnect target module control registers pretty much anywhere within the module range. The current code attempts an incomplete optimization of the ioremap size but does it wrong and it only works for registers at the beginning of the module. Let's just use the largest control register to calculate the ioremap size. The ioremapped range is for most part cached anyways so there is no need for size optimization. Let's also update the comments accordingly. Fixes: 0eecc636 ("bus: ti-sysc: Add minimal TI sysc interconnect target driver") Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 10 7月, 2018 2 次提交
-
-
由 Faiz Abbas 提交于
Add support for the software reset of a target interconnect module using its sysconfig and sysstatus registers. Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com> [tony@atomide.com: updated to check if sysconfig exists] Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Faiz Abbas 提交于
The dra76x MCAN generic interconnect module has a its own format for the bits in the control registers. Therefore add a new module type, new regbits and new capabilities specific to the MCAN module. Acked-by: NRob Herring <robh@kernel.org> CC: Tony Lindgren <tony@atomide.com> Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 02 7月, 2018 1 次提交
-
-
由 Kees Cook 提交于
This adjusts the allocator calls to use 2-factor argument call style, as done treewide already for improved defense against allocation overflows. Signed-off-by: NKees Cook <keescook@chromium.org> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 18 5月, 2018 1 次提交
-
-
由 Tony Lindgren 提交于
We should be checking ddata->clocks[i] instead of clock_names[i] for the optional clocks. Currently this just happens to work for the typical case of one fck and one optional clock. Fixes: 09dfe581 ("bus: ti-sysc: Add handling for clkctrl opt clocks") Cc: Dan Carpenter <dan.carpenter@oracle.com> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 01 5月, 2018 10 次提交
-
-
由 Tony Lindgren 提交于
Let's show module info if DEBUG is enabled to make it easier to follow what happens on the suspend and resume path. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
Looks like these two device drivers don't yet behave properly for suspend unless configured with the legacy option. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
Starting with omap4, UARTs have different revision register that we need to detect to enable SYSC_QUIRK_LEGACY_IDLE. Otherwise UARTs won't idle properly. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
Starting with omap4 some timers have different sysc registers (type2) compared to the omap2 timers (type1). We need to detect these to enable the quirk for SYSC_QUIRK_LEGACY_IDLE, otherwise these won't be idling properly. Siganed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
Some modules need to use external resets in the rstctrl bits. Typically only one of the rstctrl bits is for the interconnect target module while the others are for various child devices. For ti-sysc driver, we just need the module rstctrl bit mapped. The rest of the rstctrl bits can be directly mapped to the child devices. Cc: Suman Anna <s-anna@ti.com> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
Based on testing with more devices I noticed that some devices don't suspend or resume properly. We need to PM runtime suspend and resume devices if we have ddata->needs_resume set. Let's also improve the error handling and add few debug statements to make it easier to notice suspend and resume related issues if DEBUG is set. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
Modules that provide resources for other modules need to be suspended and resumed in the noirq calls. Tag the resource providing modules. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
There can be up to eight optional device functional gate gate clocks for each clkctrl instance in clkctrl register bits 8 to 15. Some of them are only needed for module level reset while others may always be needed during use. Let's add support for those and update the binding doc accordingly. Note that the optional clkctrl mux and divider clocks starting at bit 20 can be directly mapped to the child devices, and ti-sysc does not need to manage those. And as GPIOs need the optional clocks for reset, we can now add it with SYSC_QUIRK_OPT_CLKS_IN_RESET. Cc: Mark Rutland <mark.rutland@arm.com> Cc: Tero Kristo <t-kristo@ti.com> Cc: devicetree@vger.kernel.org Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
In order to prepare supporting clkctrl optional clocks, we need to make the current child clock handling more generic so we can use the clock role names for the optional clocks in the following patch. Cc: Tero Kristo <t-kristo@ti.com> Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
Otherwise child devices that some interconnect target module devices have won't probe using simple-bus. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 27 2月, 2018 7 次提交
-
-
由 Tony Lindgren 提交于
Now that ti-sysc can manage child devices, we must also be backwards compatible with the current omap_device code. With omap_device, we assume that the child device manages the interconnect target module directly. The drivers needing special handling are the ones that still set pm_runtime_irq_safe(). In the long run we want to update those drivers as otherwise they will cause problems with genpd as a permanent PM runtime usage count is set on the parent device. We can handle omap_device these devices by improving the ti-sysc quirk handling to detect the devices needing special handling based on register map and revision register if usable. We also need to implement dev_pm_domain for these child devices just like omap_device does. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
We want to pass the device tree configuration for interconnect target modules from ti-sysc driver to the existing platform hwmod code. This allows us to first validate the dts data against the existing platform data before we start dropping the platform data in favor of device tree data. To do this, let's add platform data callbacks for PM runtime functions to call for the interconnect target modules if platform data is available. Note that as ti-sysc driver can rebind, omap_auxdata_lookup and related functions can no longer be __init. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
We already show the status for the interconnect target module when debugging is enabled, there's no need to be more verbose about that. So let's just cut down the noise and remove the extra debug statements. Signed-off-by: NTony Lindgren <tony@atomide.coM>
-
由 Tony Lindgren 提交于
At least earlycon needs a delayed idle before the 8250 driver probes to avoid glitches in the console output. Let's handle the delayed idle for devices tagged with ti,no-reset-on-init and ti,no-idle-on-init with delayed_work. Others don't need it, and there should be no need to use runtime PM autosuspend for the interconnect target driver as it's the child device drivers that should configure it. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
If we have stdout-path specified for earlycon, we must prevent the debug console from idling until runtime PM kicks in. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
This allows us to idle the module on suspend after the children are suspended. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
由 Tony Lindgren 提交于
The functional clock is used by several child device drivers to query the rate for the child device internal configuration. The functional clock is really for the whole interconnect target module, and not just for the child device, and can also be shared across multiple children. At least the timers, i2c and mmc driver query the fck for rate. So let's just create a clock alias for the child fck if it does not yet exits. We can do this with the BUS_NOTIFY_ADD_DEVICE before the child is probed. Note that we need to now also remove the legacy mode check for getting the dts clocks in ti-sysc driver. Signed-off-by: NTony Lindgren <tony@atomide.com>
-
- 16 2月, 2018 1 次提交
-
-
由 Tony Lindgren 提交于
We are currently only checking for the first entry in the table while we should check them all. Usual no-idle-on-init is together with no-reset-on-init, so this has gone unnoticed. Fixes: 566a9b05 ("bus: ti-sysc: Handle module quirks based dts configuration") Signed-off-by: NTony Lindgren <tony@atomide.com>
-