Commit Graph

13 Commits

Author SHA1 Message Date
Pavel Machek 3210b4fca6 HSI: omap_ssi_core: fix kilo to be "k" not "K"
Kilo should be "k" not "K", fix it it comments and messages.

Signed-off-by: Pavel Machek <pavel@ucw.cz>

index 88e48b3..41a09f5 100644

Signed-off-by: Sebastian Reichel <sre@kernel.org>
2017-10-01 17:19:50 +02:00
Markus Elfring 0fbad7c8e2 HSI: omap_ssi: Delete an error message for a failed memory allocation in ssi_add_controller()
The script "checkpatch.pl" pointed information out like the following.

WARNING: Possible unnecessary 'out of memory' message

Thus remove such a statement here.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-06-08 13:21:43 +02:00
Markus Elfring 8621e620c1 HSI: omap_ssi: Fix a typo in a comment line
Add a missing character in this description for a function call.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-06-08 13:21:43 +02:00
Markus Elfring 4a8557de7f HSI: omap_ssi: Use devm_kcalloc() in ssi_add_controller()
* A multiplication for the size determination of a memory allocation
  indicated that an array data structure should be processed.
  Thus use the corresponding function "devm_kcalloc".

  This issue was detected by using the Coccinelle software.

* Replace the specification of a data type by a pointer dereference
  to make the corresponding size determination a bit safer according to
  the Linux coding style convention.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-06-08 13:21:43 +02:00
Sebastian Reichel 9c99e5e519 HSI: omap_ssi: drop pm_runtime_irq_safe
pm_runtime_irq_safe increases the parents runtime usage
counter effectively keeping the OMAP SoC from idling.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28 00:40:08 +02:00
Sebastian Reichel 4e552310cd HSI: omap_ssi: call msg->complete() from process context
msg->complete() should always be called from process context once
irq_safe runtime pm flag is no longer set for omap-ssi.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28 00:40:00 +02:00
Sebastian Reichel 927d3f8f73 HSI: omap_ssi_core: remove pm_runtime_get_sync call from tasklet
We may not call pm_runtime_get_sync() from tasklet, since
it can block once pm_runtime_irq_safe is removed for omap-ssi.

Since irq can should only be created for a running device,
we assume, that the device is already running and use non-
synchronous API instead.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28 00:39:26 +02:00
Sebastian Reichel ea88f717cd HSI: omap_ssi_core: use pm_runtime_put instead of pm_runtime_put_sync
There is no need to disable the device synchronously, so
don't do it.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28 00:39:21 +02:00
Sebastian Reichel cb70e4c1bc HSI: omap_ssi: convert cawake irq handler to thread
Convert cawake interrupt handler from tasklet to
threaded interrupt handler in preparation of
blocking runtime_pm calls.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28 00:38:43 +02:00
Sebastian Reichel b6616be324 HSI: omap_ssi: do not reset module
module reset and power management rule setup
is already done by hwmod. Remove this cruft,
which predates hwmod.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28 00:37:43 +02:00
Arnd Bergmann ac8e3ff3a0 HSI: omap-ssi: include pinctrl header files
The driver now uses some pinctrl functions, but fails
to build if PINCTRL is disabled because the respective
header files are only included indirectly:

drivers/hsi/controllers/omap_ssi_core.c: In function 'ssi_clk_event':
drivers/hsi/controllers/omap_ssi_core.c:317:4: error: implicit declaration of function 'pinctrl_pm_select_idle_state' [-Werror=implicit-function-declaration]
drivers/hsi/controllers/omap_ssi_core.c:339:4: error: implicit declaration of function 'pinctrl_pm_select_default_state' [-Werror=implicit-function-declaration]
drivers/hsi/controllers/omap_ssi_port.c: In function 'ssi_flush':
drivers/hsi/controllers/omap_ssi_port.c:520:2: error: implicit declaration of function 'pinctrl_pm_select_idle_state' [-Werror=implicit-function-declaration]

This includes the headers from the files that call the functions,
which works even if pinctrl is turned off.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 4bcf741452 ("HSI: omap-ssi: add clk change support")
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-09 22:45:18 +02:00
Sebastian Reichel 4bcf741452 HSI: omap-ssi: add clk change support
This adds support for frequency changes of the SSI
functional clock, which may occur due to DVFS.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-By: Sebastian Reichel <sre@kernel.org>
2016-05-02 21:56:25 +02:00
Sebastian Reichel 0fae198988 HSI: omap_ssi: built omap_ssi and omap_ssi_port into one module
Merge omap_ssi and omap_ssi_port into one module. This
fixes problems with module cycle dependencies introduced
by future patches.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-02 21:56:21 +02:00