summaryrefslogtreecommitdiffstats
path: root/drivers/hsi/controllers
Commit message (Collapse)AuthorAgeFilesLines
* HSI: omap-ssi: move omap_ssi_port_update_fclkArnd Bergmann2016-05-091-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>
* HSI: omap-ssi: include pinctrl header filesArnd Bergmann2016-05-092-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>
* HSI: omap-ssi: add COMMON_CLK dependencyArnd Bergmann2016-05-091-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>
* HSI: omap-ssi: add clk change supportSebastian Reichel2016-05-023-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>
* HSI: omap_ssi: built omap_ssi and omap_ssi_port into one moduleSebastian Reichel2016-05-025-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>
* HSI: omap_ssi: fix removal of port platform deviceSebastian Reichel2016-05-021-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>
* HSI: omap_ssi: make sure probe stays availableSebastian Reichel2016-05-022-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>
* HSI: omap_ssi: fix module unloadingSebastian Reichel2016-05-021-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>
* HSI: omap_ssi_port: switch to gpiod APISebastian Reichel2016-05-023-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>
* HSI: omap_ssi_port: fix handling of_get_named_gpio resultAndrzej Hajda2016-01-071-4/+4
| | | | | | | | | | | | The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap_ssi: fix handling ida_simple_get resultAndrzej Hajda2016-01-071-4/+3
| | | | | | | | | | | | The function can return negative value. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2038576 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* hsi: controllers:remove redundant codeSanjeev Sharma2015-10-301-17/+4
| | | | | | | | | Use devm_ioremap_resource() in order to make the code simpler, and remove redundant return value check of platform_get_resource() because this value is alreadytaken care by devm_ioremap_resource() Signed-off-by: Sanjeev Sharma <sanjeev_sharma@mentor.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* hsi: omap_ssi_port: Prevent warning if cawake_gpio is not defined.Roger Quadros2015-10-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error handling path is broken as cawake_gpio was defined as unsigned integer causing the following warnings on boards that don't use SSI port and so don't have cawake_gpio defined. e.g. beagleboard C4. [ 30.094635] WARNING: CPU: 0 PID: 322 at drivers/gpio/gpiolib.c:86 gpio_to_desc+0xa4/0xb8() [ 30.103363] invalid GPIO -2 [ 30.106292] Modules linked in: omap_ssi_port(+) cpufreq_dt cfbfillrect cfbimgblt leds_gpio cfbcopyarea thermal_sys led_class hwmon gpio_keys encoder_tfp410 connector_analog_tv connector_dvi omap_hdq snd phy_i [ 30.145477] CPU: 0 PID: 322 Comm: modprobe Not tainted 4.3.0-rc4-00030-gca978c0-dirty #335 [ 30.154174] Hardware name: Generic OMAP3-GP (Flattened Device Tree) [ 30.160827] [<c0016ef4>] (unwind_backtrace) from [<c00131f4>] (show_stack+0x10/0x14) [ 30.168975] [<c00131f4>] (show_stack) from [<c033cf08>] (dump_stack+0x80/0x9c) [ 30.176635] [<c033cf08>] (dump_stack) from [<c003e920>] (warn_slowpath_common+0x7c/0xb8) [ 30.185180] [<c003e920>] (warn_slowpath_common) from [<c003e9f0>] (warn_slowpath_fmt+0x30/0x40) [ 30.194366] [<c003e9f0>] (warn_slowpath_fmt) from [<c0376314>] (gpio_to_desc+0xa4/0xb8) [ 30.202819] [<c0376314>] (gpio_to_desc) from [<c0376ac8>] (gpio_request_one+0x14/0x11c) [ 30.211273] [<c0376ac8>] (gpio_request_one) from [<c037370c>] (devm_gpio_request_one+0x3c/0x78) [ 30.220458] [<c037370c>] (devm_gpio_request_one) from [<bf184210>] (ssi_port_probe+0x118/0x504 [omap_ssi_port]) [ 30.231170] [<bf184210>] (ssi_port_probe [omap_ssi_port]) from [<c03d4cfc>] (platform_drv_probe+0x48/0xa4) [ 30.241424] [<c03d4cfc>] (platform_drv_probe) from [<c03d3678>] (driver_probe_device+0x1dc/0x2a0) [ 30.250793] [<c03d3678>] (driver_probe_device) from [<c03d37d0>] (__driver_attach+0x94/0x98) [ 30.259643] [<c03d37d0>] (__driver_attach) from [<c03d1d60>] (bus_for_each_dev+0x54/0x88) [ 30.268249] [<c03d1d60>] (bus_for_each_dev) from [<c03d2d50>] (bus_add_driver+0xe8/0x1f8) [ 30.276916] [<c03d2d50>] (bus_add_driver) from [<c03d4118>] (driver_register+0x78/0xf4) [ 30.285369] [<c03d4118>] (driver_register) from [<c03d5380>] (__platform_driver_probe+0x34/0xd8) [ 30.294647] [<c03d5380>] (__platform_driver_probe) from [<c00097e4>] (do_one_initcall+0x80/0x1d8) [ 30.303985] [<c00097e4>] (do_one_initcall) from [<c011617c>] (do_init_module+0x5c/0x1cc) [ 30.312561] [<c011617c>] (do_init_module) from [<c00c7a68>] (load_module+0x18c8/0x1f0c) [ 30.320983] [<c00c7a68>] (load_module) from [<c00c8188>] (SyS_init_module+0xdc/0x150) [ 30.329223] [<c00c8188>] (SyS_init_module) from [<c000f7e0>] (ret_fast_syscall+0x0/0x1c) Fixes: b209e047bc743 ("HSI: Introduce OMAP SSI driver") Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* drivers/hsi: include <module.h> for modular omap_ssi codePaul Gortmaker2015-06-161-0/+1
| | | | | | | | | | | | | These files are built off of a tristate Kconfig option and also contain modular function calls so they should explicitly include module.h to avoid compile breakage during header shuffles done in the future. We change the one header file wich gives us coverage on both files: drivers/hsi/controllers/omap_ssi.c drivers/hsi/controllers/omap_ssi_port.c Cc: Sebastian Reichel <sre@kernel.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* Merge tag 'hsi-for-3.19' of ↵Linus Torvalds2014-12-151-2/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI update from Sebastian Reichel: "Misc fixes in omap-ssi and nokia-modem drivers" * tag 'hsi-for-3.19' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: nokia-modem: fix error handling of irq_of_parse_and_map HSI: nokia-modem: setup default value for pm parameter HSI: omap_ssi_port: Don't print uninitialized err HSI: remove deprecated IRQF_DISABLED
| * HSI: omap_ssi_port: Don't print uninitialized errSebastian Reichel2014-10-201-2/+1
| | | | | | | | | | | | | | | | | | | | Do not print err variable, that has nothing to do with the error. This fixes a warning, that is printed at build time: drivers/hsi/controllers/omap_ssi_port.c: In function ‘ssi_port_probe’: drivers/hsi/controllers/omap_ssi_port.c:1121:10: warning: ‘err’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Sebastian Reichel <sre@kernel.org>
* | Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds2014-12-142-2/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
| * | hsi: controllers: drop owner assignment from platform_driversWolfram Sang2014-10-202-2/+0
| |/ | | | | | | | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* | hsi / OMAP / PM: Replace CONFIG_PM_RUNTIME with CONFIG_PMRafael J. Wysocki2014-12-042-2/+2
|/ | | | | | | | | | | | After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Do that for the omap_ssi driver. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-By: Sebastian Reichel <sre@kernel.org>
* HSI: omap_ssi: Fix return value check in ssi_debug_add_ctrl()Wei Yongjun2014-07-311-4/+4
| | | | | | | | | In case of error, the function debugfs_create_*() returns NULL pointer not ERR_PTR() if debugfs is enabled. The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: omap_ssi_port: Fix return value check in ssi_debug_add_port()Wei Yongjun2014-07-311-4/+4
| | | | | | | | | In case of error, the function debugfs_create_*() returns NULL pointer not ERR_PTR() if debugfs is enabled. The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* drivers/hsi/controllers/omap_ssi{,_port}.c: fix failure checksAndrey Utkin2014-07-172-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1. [linux-3.16-rc5/drivers/hsi/controllers/omap_ssi.c:357]: (style) Checking if unsigned variable 'gdd_irq' is less than zero. Source code is omap_ssi->gdd_irq = platform_get_irq_byname(pd, "gdd_mpu"); if (omap_ssi->gdd_irq < 0) { 2. [linux-3.16-rc5/drivers/hsi/controllers/omap_ssi_port.c:1017]: (style) Checking if unsigned variable 'irq' is less than zero. Source code is omap_port->irq = platform_get_irq(pd, 0); if (omap_port->irq < 0) { Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80441 Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* hsi: omap_ssi_port: use normal module refcountingArnd Bergmann2014-06-051-2/+2
| | | | | | | | | | | | | | | | | | | | | The ref_module() function is used for internal housekeeping of the module code, it's not normally used by subsystems or device drivers, and the use of ref_module in the omap_ssi_port driver causes a link build error when modules are disabled: hsi/controllers/omap_ssi_port.c: In function 'ssi_port_probe': hsi/controllers/omap_ssi_port.c:1119:2: error: implicit declaration of function 'ref_module' [-Werror=implicit-function-declaration] This changes the omap_ssi_port driver to use try_module_get() and module_put() instead, which is the normal way to ensure that the driver providing a device used in another module does not go away. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Sebastian Reichel <sre@kernel.org> Cc: Carlos Chinea <carlos.chinea@nokia.com> Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com> Signed-off-by: Sebastian Reichel <sre@kernel.org>
* HSI: Introduce OMAP SSI driverSebastian Reichel2014-05-166-0/+2386
Add OMAP SSI driver to the HSI subsystem. The Synchronous Serial Interface (SSI) is a legacy version of HSI. As in the case of HSI, it is mainly used to connect Application engines (APE) with cellular modem engines (CMT) in cellular handsets. It provides a multichannel, full-duplex, multi-core communication with no reference clock. The OMAP SSI block is capable of reaching speeds of 110 Mbit/s. Signed-off-by: Carlos Chinea <carlos.chinea@nokia.com> Signed-off-by: Sebastian Reichel <sre@kernel.org> Tested-By: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
OpenPOWER on IntegriCloud