aboutsummaryrefslogtreecommitdiff
path: root/drivers/hsi
AgeCommit message (Collapse)AuthorFilesLines
2017-10-05timer: Remove init_timer_deferrable() in favor of timer_setup()Gravatar Kees Cook 1-14/+18
This refactors the only users of init_timer_deferrable() to use the new timer_setup() and from_timer(). Removes definition of init_timer_deferrable(). Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: David S. Miller <davem@davemloft.net> # for networking parts Acked-by: Sebastian Reichel <sre@kernel.org> # for drivers/hsi parts Cc: linux-mips@linux-mips.org Cc: Petr Mladek <pmladek@suse.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Lai Jiangshan <jiangshanlai@gmail.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Kalle Valo <kvalo@qca.qualcomm.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: linux1394-devel@lists.sourceforge.net Cc: Chris Metcalf <cmetcalf@mellanox.com> Cc: linux-s390@vger.kernel.org Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Ursula Braun <ubraun@linux.vnet.ibm.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Harish Patil <harish.patil@cavium.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Manish Chopra <manish.chopra@cavium.com> Cc: Len Brown <len.brown@intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-pm@vger.kernel.org Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Tejun Heo <tj@kernel.org> Cc: Julian Wiedmann <jwi@linux.vnet.ibm.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Mark Gross <mark.gross@intel.com> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: linux-watchdog@vger.kernel.org Cc: linux-scsi@vger.kernel.org Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-wireless@vger.kernel.org Cc: Sebastian Reichel <sre@kernel.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Stefan Richter <stefanr@s5r6.in-berlin.de> Cc: Michael Reed <mdr@sgi.com> Cc: netdev@vger.kernel.org Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linuxppc-dev@lists.ozlabs.org Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Link: https://lkml.kernel.org/r/1507159627-127660-6-git-send-email-keescook@chromium.org
2017-10-01HSI: hsi_char: pr_err() strings should end with newlinesGravatar Arvind Yadav 1-2/+2
pr_err() messages should end with a new-line to avoid other messages being concatenated. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2017-10-01HSI: omap_ssi_core: fix kilo to be "k" not "K"Gravatar Pavel Machek 1-3/+3
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-07-04Merge tag 'hsi-for-4.13' of ↵Gravatar Linus Torvalds 4-20/+14
git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI updates from Sebastian Reichel: "Misc cleanups" * tag 'hsi-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: core: Use kcalloc() in two functions HSI: Use kcalloc() in hsi_register_board_info() HSI: omap_ssi: Delete an error message for a failed memory allocation in ssi_add_controller() HSI: omap_ssi: Fix a typo in a comment line HSI: omap_ssi: Use devm_kcalloc() in ssi_add_controller() HSI: nokia-modem: Add a space character for better code readability in nokia_modem_probe() HSI: nokia-modem: Delete error messages for a failed memory allocation in two functions HSI: nokia-modem: Use devm_kcalloc() in nokia_modem_gpio_probe()
2017-06-08hsi: Fix build regression due to netdev destructor fix.Gravatar David S. Miller 1-1/+1
> ../drivers/hsi/clients/ssi_protocol.c:1069:5: error: 'struct net_device' has no member named 'destructor' Reported-by: Mark Brown <broonie@kernel.org> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-08HSI: core: Use kcalloc() in two functionsGravatar Markus Elfring 1-4/+3
Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-06-08HSI: Use kcalloc() in hsi_register_board_info()Gravatar Markus Elfring 1-1/+1
A multiplication for the size determination of a memory allocation indicated that an array data structure should be processed. Thus use the corresponding function "kcalloc". This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-06-08HSI: omap_ssi: Delete an error message for a failed memory allocation in ↵Gravatar Markus Elfring 1-3/+1
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-08HSI: omap_ssi: Fix a typo in a comment lineGravatar Markus Elfring 1-1/+1
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-08HSI: omap_ssi: Use devm_kcalloc() in ssi_add_controller()Gravatar Markus Elfring 1-2/+2
* 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-08HSI: nokia-modem: Add a space character for better code readability in ↵Gravatar Markus Elfring 1-1/+1
nokia_modem_probe() The script "checkpatch.pl" pointed information out like the following. ERROR: space required before the open parenthesis '(' Thus fix the affected source code place. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
2017-06-08HSI: nokia-modem: Delete error messages for a failed memory allocation in ↵Gravatar Markus Elfring 1-6/+3
two functions The script "checkpatch.pl" pointed information out like the following. WARNING: Possible unnecessary 'out of memory' message Thus remove such statements 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-08HSI: nokia-modem: Use devm_kcalloc() in nokia_modem_gpio_probe()Gravatar Markus Elfring 1-2/+2
* 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 structure 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-04-21HSI: ssi_protocol: double free in ssip_pn_xmit()Gravatar Dan Carpenter 1-2/+3
If skb_pad() fails then it frees skb and we don't need to free it again at the end of the function. Fixes: dc7bf5d7 ("HSI: Introduce driver for SSI Protocol") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2017-03-02sched/headers: Prepare to move signal wakeup & sigpending methods from ↵Gravatar Ingo Molnar 1-1/+1
<linux/sched.h> into <linux/sched/signal.h> Fix up affected files that include this signal functionality via sched.h. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-02-24mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmfGravatar Dave Jiang 1-2/+2
->fault(), ->page_mkwrite(), and ->pfn_mkwrite() calls do not need to take a vma and vmf parameter when the vma already resides in vmf. Remove the vma parameter to simplify things. [arnd@arndb.de: fix ARM build] Link: http://lkml.kernel.org/r/20170125223558.1451224-1-arnd@arndb.de Link: http://lkml.kernel.org/r/148521301778.19116.10840599906674778980.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Theodore Ts'o <tytso@mit.edu> Cc: Darrick J. Wong <darrick.wong@oracle.com> Cc: Matthew Wilcox <mawilcox@microsoft.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.com> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-10-20net: use core MTU range checking in misc driversGravatar Jarod Wilson 1-10/+4
firewire-net: - set min/max_mtu - remove fwnet_change_mtu nes: - set max_mtu - clean up nes_netdev_change_mtu xpnet: - set min/max_mtu - remove xpnet_dev_change_mtu hippi: - set min/max_mtu - remove hippi_change_mtu batman-adv: - set max_mtu - remove batadv_interface_change_mtu - initialization is a little async, not 100% certain that max_mtu is set in the optimal place, don't have hardware to test with rionet: - set min/max_mtu - remove rionet_change_mtu slip: - set min/max_mtu - streamline sl_change_mtu um/net_kern: - remove pointless ndo_change_mtu hsi/clients/ssi_protocol: - use core MTU range checking - remove now redundant ssip_pn_set_mtu ipoib: - set a default max MTU value - Note: ipoib's actual max MTU can vary, depending on if the device is in connected mode or not, so we'll just set the max_mtu value to the max possible, and let the ndo_change_mtu function continue to validate any new MTU change requests with checks for CM or not. Note that ipoib has no min_mtu set, and thus, the network core's mtu > 0 check is the only lower bounds here. mptlan: - use net core MTU range checking - remove now redundant mpt_lan_change_mtu fddi: - min_mtu = 21, max_mtu = 4470 - remove now redundant fddi_change_mtu (including export) fjes: - min_mtu = 8192, max_mtu = 65536 - The max_mtu value is actually one over IP_MAX_MTU here, but the idea is to get past the core net MTU range checks so fjes_change_mtu can validate a new MTU against what it supports (see fjes_support_mtu in fjes_hw.c) hsr: - min_mtu = 0 (calls ether_setup, max_mtu is 1500) f_phonet: - min_mtu = 6, max_mtu = 65541 u_ether: - min_mtu = 14, max_mtu = 15412 phonet/pep-gprs: - min_mtu = 576, max_mtu = 65530 - remove redundant gprs_set_mtu CC: netdev@vger.kernel.org CC: linux-rdma@vger.kernel.org CC: Stefan Richter <stefanr@s5r6.in-berlin.de> CC: Faisal Latif <faisal.latif@intel.com> CC: linux-rdma@vger.kernel.org CC: Cliff Whickman <cpw@sgi.com> CC: Robin Holt <robinmholt@gmail.com> CC: Jes Sorensen <jes@trained-monkey.org> CC: Marek Lindner <mareklindner@neomailbox.ch> CC: Simon Wunderlich <sw@simonwunderlich.de> CC: Antonio Quartulli <a@unstable.cc> CC: Sathya Prakash <sathya.prakash@broadcom.com> CC: Chaitra P B <chaitra.basappa@broadcom.com> CC: Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com> CC: MPT-FusionLinux.pdl@broadcom.com CC: Sebastian Reichel <sre@kernel.org> CC: Felipe Balbi <balbi@kernel.org> CC: Arvid Brodin <arvid.brodin@alten.se> CC: Remi Denis-Courmont <courmisch@gmail.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2016-06-28HSI: omap_ssi: drop pm_runtime_irq_safeGravatar Sebastian Reichel 2-3/+0
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-28HSI: omap_ssi_port: use rpm autosuspend APIGravatar Sebastian Reichel 1-24/+44
Instead of immediately sending the SSI module to sleep, wait some time in case of new incoming or outgoing traffic. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: omap_ssi: call msg->complete() from process contextGravatar Sebastian Reichel 3-1/+25
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-28HSI: omap_ssi_port: ensure clocks are kept enabled during transferGravatar Sebastian Reichel 1-0/+2
ensure, that clocks remain enabled, when a transfer is started. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: omap_ssi_port: replace pm_runtime_put_sync with non-sync variantGravatar Sebastian Reichel 1-9/+9
There is no need to wait for hardware to really reach idle states, so just release runtime PM asynchronously. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: omap_ssi_port: avoid calling runtime_pm_*_sync inside spinlockGravatar Sebastian Reichel 1-4/+4
runtime_pm_*_sync can block when irq_safe flag is removed from omap-ssi driver, so it may not be called while a spinlock is held. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: omap_ssi_port: avoid pm_runtime_get_sync in ssi_start_dma and ssi_start_pioGravatar Sebastian Reichel 1-6/+24
These functions may be called from atomic context, so avoid synchronous runtime pm calls. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: omap_ssi_port: switch to threaded pio irqGravatar Sebastian Reichel 2-38/+24
Move pio interrupt handler from tasklet into thread to allow runtime_pm_get_sync calls without irq_safe being set. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: omap_ssi_core: remove pm_runtime_get_sync call from taskletGravatar Sebastian Reichel 1-1/+7
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-28HSI: omap_ssi_core: use pm_runtime_put instead of pm_runtime_put_syncGravatar Sebastian Reichel 1-5/+5
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-28HSI: omap_ssi_port: prepare start_tx/stop_tx for blocking pm_runtime callsGravatar Sebastian Reichel 2-5/+20
ssi_start_tx and ssi_stop_tx may be called from atomic context. Once pm_runtime_irq_safe() is removed for omap-ssi, this will fail, due to blocking pm_runtime_*_sync() calls. This fixes ssi_stop_tx by using non-sync API and ssi_start_tx by using a worker thread. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: core: switch port event notifier from atomic to blockingGravatar Sebastian Reichel 1-4/+4
port events should be sent from process context after irq_safe runtime pm flag is removed in omap-ssi. Signed-off-By: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: omap_ssi_port: replace wkin_cken with atomic bitmap operationsGravatar Sebastian Reichel 2-15/+7
This simplifies the code and avoids holding a spin_lock when runtime pm calls are made. Once the irq_safe flag is removed for omap_ssi's runtime pm, pm_runtime_get/put_sync can sleep, which is a no-go while holding a spin_lock. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: omap_ssi: convert cawake irq handler to threadGravatar Sebastian Reichel 3-19/+8
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-28HSI: ssi_protocol: fix ssip_xmit invocationGravatar Sebastian Reichel 1-1/+12
ssip_xmit should be called from process context, since it calls hsi_async_write. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: ssi_protocol: replace spin_lock with spin_lock_bhGravatar Sebastian Reichel 1-32/+32
To avoid setting irq_safe runtime pm flag in omap-ssi, multiple calls will be moved to process context. This also affects ssi-protocol, so use the safer spin_lock_bh instead of a simple spin_lock. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: ssi_protocol: avoid ssi_waketest call with held spinlockGravatar Sebastian Reichel 1-16/+25
This avoids calling ssi_waketest(), while a spinlock is being hold, since ssi_waketest may sleep once irq_safe runtime pm is disabled. Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-28HSI: omap_ssi: do not reset moduleGravatar Sebastian Reichel 2-20/+1
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-28HSI: omap_ssi_port: remove useless newlineGravatar Sebastian Reichel 1-4/+2
Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-by: Pavel Machek <pavel@ucw.cz>
2016-06-15hsi: Build hsi_boardinfo.c into hsi core if enabledGravatar Andrew F. Davis 2-1/+2
If the HSI core is built as a module hsi_boardinfo may still be built-in as its Kconfig type is bool, which can cause build issues. Fix this by building this code into the HSI core when enabled. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-06-10HSI: cmt_speech: Fix double spin_lockGravatar Iago Abal 1-1/+1
Release &hi->lock before calling `cs_hsi_control_read_error' to avoid deadlock. The bug was found using EBA (https://github.com/models-team/eba), which reported the following: Double lock first at drivers/hsi/clients/cmt_speech.c:443 second at drivers/hsi/clients/cmt_speech.c:447 In cs_hsi_read_on_control_complete defined at drivers/hsi/clients/cmt_speech.c:438: (!) drivers/hsi/clients/cmt_speech.c:443: spin_lock(& hi->lock); (?) drivers/hsi/clients/cmt_speech.c:445: msg->status == 4 -> true (!) drivers/hsi/clients/cmt_speech.c:447: cs_hsi_control_read_error(hi, msg); (!) drivers/hsi/clients/cmt_speech.c:407: __cs_hsi_error_pre(hi, msg, "control read", & hi->control_state); (!) drivers/hsi/clients/cmt_speech.c:382: spin_lock(& hi->lock); Signed-off-by: Iago Abal <mail@iagoabal.eu> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-29hsi: use kmemdupGravatar Muhammad Falak R Wani 1-4/+4
Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-29HSI: cmt_speech: use vma_pages().Gravatar Muhammad Falak R Wani 1-1/+1
Replace explicit computation of vma page count by a call to vma_pages() Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-09HSI: omap-ssi: move omap_ssi_port_update_fclkGravatar Arnd Bergmann 1-18/+17
After the clk change support, the ssi omap ssi core driver now calls into the port driver to change fclk. This function was previously inside of an #ifdef, because it was only used when CONFIG_PM is enabled. Now it also gets used without power management support: drivers/hsi/built-in.o: In function `ssi_clk_event': omap_ssi_port.c:(.text+0x1bf8): undefined reference to `omap_ssi_port_update_fclk' This moves the function outside of the CONFIG_PM guard. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-09HSI: omap-ssi: include pinctrl header filesGravatar Arnd Bergmann 2-0/+2
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: 4bcf7414528a ("HSI: omap-ssi: add clk change support") Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-09HSI: omap-ssi: add COMMON_CLK dependencyGravatar Arnd Bergmann 1-1/+2
Enabling the omap ssi driver without COMMON_CLK results in a build failure: drivers/hsi/controllers/omap_ssi_core.c: In function 'ssi_clk_event': drivers/hsi/controllers/omap_ssi_core.c:304:7: error: 'PRE_RATE_CHANGE' undeclared (first use in this function) This adds a Kconfig dependency to avoid the invalid configuration. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-02HSI: omap-ssi: add clk change supportGravatar Sebastian Reichel 3-0/+89
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-02HSI: omap_ssi: built omap_ssi and omap_ssi_port into one moduleGravatar Sebastian Reichel 5-23/+21
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-02HSI: omap_ssi: fix removal of port platform deviceGravatar Sebastian Reichel 1-0/+4
This avoids removal of the HSI port device when only the platform port device should be removed and clears the POPULATED bit in the DT node, so that a new platform device is created when the driver is probed again. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-02HSI: omap_ssi: make sure probe stays availableGravatar Sebastian Reichel 2-17/+19
device can be unbind/rebind, so probe should stay available. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-02HSI: omap_ssi: fix module unloadingGravatar Sebastian Reichel 1-3/+3
Removal of ssi controller debugfs directory must happen after the clients have been removed from it. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-05-02HSI: omap_ssi_port: switch to gpiod APIGravatar Sebastian Reichel 3-24/+12
Simplify driver by switching to new gpio descriptor based API. Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Sebastian Reichel <sre@kernel.org>
2016-01-28HSI: ssi-protocol: Use handshake logic from n950Gravatar Sebastian Reichel 1-11/+5
When using the ssi-protocol driver with the Nokia N950, the following error is thrown during modem powered up sequence. [13852.274993] port0: SSI error: 0x01 [13852.279205] ssi-protocol ssi-protocol: RX error detected [13852.284820] ssi-protocol ssi-protocol: Main state: 1 [13852.290069] ssi-protocol ssi-protocol: Recv state: 0 [13852.295288] ssi-protocol ssi-protocol: Send state: 0 [13852.300537] ssi-protocol ssi-protocol: CMT Offline [13852.305603] ssi-protocol ssi-protocol: Wake test 1 [13852.310638] ssi-protocol ssi-protocol: Data RX id: 0 [13852.315887] ssi-protocol ssi-protocol: Data TX id: 0 [13856.001464] ssi-protocol ssi-protocol: Watchdog trigerred [13856.007293] ssi-protocol ssi-protocol: Main state: 1 [13856.012542] ssi-protocol ssi-protocol: Recv state: 0 [13856.017761] ssi-protocol ssi-protocol: Send state: 0 [13856.023010] ssi-protocol ssi-protocol: CMT Offline [13856.028045] ssi-protocol ssi-protocol: Wake test 0 [13856.033111] ssi-protocol ssi-protocol: Data RX id: 0 [13856.038330] ssi-protocol ssi-protocol: Data TX id: 0 This patch fixes the issue by using the handshake setup from the Nokia N950 kernel. The new handshake sequence also works with the N900, so there is no need to differentiate between both modems. Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Sebastian Reichel <sre@kernel.org>