aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/spi-coldfire-qspi.c
AgeCommit message (Collapse)AuthorFilesLines
2020-07-17spi: coldfire-qspi: Use clk_prepare_enable and clk_disable_unprepareQing Zhang1-2/+2
Convert clk_enable() to clk_prepare_enable() and clk_disable() to clk_disable_unprepare() respectively in the spi-coldfire-qspi.c. Signed-off-by: Qing Zhang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2019-09-04spi: coldfire-qspi: use devm_platform_ioremap_resource() to simplify codeYueHaibing1-3/+1
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <[email protected]> Signed-off-by: YueHaibing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2019-05-30treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157Thomas Gleixner1-10/+1
Based on 3 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version [author] [graeme] [gregory] [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i] [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema] [hk] [hemahk]@[ti] [com] this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 1105 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Richard Fontana <[email protected]> Reviewed-by: Kate Stewart <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-12spi: spi-coldfire-qspi: enable RuntimePM before registering to the coreWolfram Sang1-1/+2
The core may register clients attached to this master which may use funtionality from the master. So, RuntimePM must be enabled before, otherwise this will fail. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-12-22spi: Remove FSF mailing addressesJarkko Nikula1-5/+0
Signed-off-by: Jarkko Nikula <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-12-13spi: Replace CONFIG_PM_RUNTIME with CONFIG_PMRafael J. Wysocki1-1/+1
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. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under drivers/spi/. Signed-off-by: Rafael J. Wysocki <[email protected]> Acked-by: Mark Brown <[email protected]>
2014-03-30Merge remote-tracking branches 'spi/topic/bus-num', 'spi/topic/cleanup', ↵Mark Brown1-66/+46
'spi/topic/clps711x', 'spi/topic/coldfire', 'spi/topic/completion' and 'spi/topic/davinci' into spi-next
2014-03-25spi: coldfire-qspi: Simplify the code to set register bits for transfer speedAxel Lin1-4/+1
spi core will use spi->max_speed_hz as transfer speed if the transfer speed was not set. So we don't need to test t->speed_hz in mcfqspi_transfer_one(). Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10spi: coldfire-qspi: Prevent NULL pointer dereferenceAxel Lin1-2/+7
If pdata->cs_control is NULL, we will hit NULL pointer dereference in mcfqspi_cs_select() and mcfqspi_cs_deselect(). Thus add NULL test for pdata->cs_control in probe(). Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-10spi: coldfire-qspi: Enable clock before calling spi_master_resumeAxel Lin1-4/+5
This ensures clock has been enabled before calling spi_master_resume(). while at it, also add checking return value of spi_master_suspend and spi_master_resume because they may fail. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-05spi: coldfire-qspi: Use core message handlingAxel Lin1-47/+34
Convert to use default implementation of transfer_one_message(). Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-05spi: coldfire-qspi: Remove unused dev field from struct mcfqspiAxel Lin1-6/+2
Also remove unused *res variable in mcfqspi_remove(). Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2014-03-05spi: coldfire-qspi: Fix getting correct address for *mcfqspiAxel Lin1-2/+4
dev_get_drvdata() returns the address of master rather than mcfqspi. Fixes: af361079 (spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume functions) Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]> Cc: [email protected]
2014-02-12spi: Remove duplicate code to check chip_selectAxel Lin1-6/+0
In spi_add_device(), we have the code to validate spi->chip_select. So remove the duplicate code in various drivers. Signed-off-by: Axel Lin <[email protected]> Acked-by: Stephen Warren <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-12-09spi: coldfire-qspi: remove redundant return value check of ↵Wei Yongjun1-6/+0
platform_get_resource() Remove unneeded error handling on the result of a call to platform_get_resource() when the value is passed to devm_ioremap_resource(). Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-12-04spi: coldfire-qspi: Use devm_*() functionsJingoo Han1-33/+14
Use devm_*() functions to make cleanup paths simpler. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-09-01Merge remote-tracking branch 'spi/topic/qspi' into spi-nextMark Brown1-20/+1
2013-08-29spi: Use dev_get_drvdata at appropriate placesAxel Lin1-2/+2
Use dev_get_drvdata() instead of platform_get_drvdata(to_platform_device(dev)). Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-08-29spi: use dev_get_platdata()Jingoo Han1-1/+1
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-07-29spi/coldfire-qspi: Convert to core runtime PMMark Brown1-20/+1
Signed-off-by: Mark Brown <[email protected]>
2013-06-26Merge remote-tracking branch 'spi/topic/core' into spi-nextMark Brown1-1/+0
2013-06-26Merge remote-tracking branch 'spi/topic/coldfire-qspi' into spi-nextMark Brown1-5/+6
2013-05-29spi: convert drivers to use bits_per_word_maskStephen Warren1-9/+2
Fill in the recently added spi_master.bits_per_word_mask field in as many drivers as possible. Make related cleanups, such as removing any redundant error-checking, or empty setup callbacks. Signed-off-by: Stephen Warren <[email protected]> Acked-by: H Hartley Sweeten <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-05-16spi: coldfire-qspi: fix error return code in mcfqspi_probe()Wei Yongjun1-5/+6
If pdev->dev.platform_data is not set, mcfqspi_probe() will return 0 and release all the resources, in this case, we should return a error code instead of 0. This patch fix to return -ENOENT in this case and move the check for pdev->dev.platform_data to the begin of this function. Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-05-13spi: remove unnecessary platform_set_drvdata()Jingoo Han1-1/+0
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL. Signed-off-by: Jingoo Han <[email protected]> Acked-by: Grant Likely <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2013-02-05spi: remove check for bits_per_word on transfer from low level driverLaxman Dewangan1-2/+1
The spi core make sure that each transfer structure have the proper setting for bits_per_word before calling low level transfer APIs. Hence it is no more require to check again in low level driver for this field whether this is set correct or not. Removing such code from low level driver. The txx9 change also removes a test for bits_per_word set to 0, and forcing it to 8 in that case. This can also be removed now since spi_setup() ensures spi->bits_per_word is not zero. if (!spi->bits_per_word) spi->bits_per_word = 8; Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-12-07spi: Remove HOTPLUG section attributesGrant Likely1-3/+3
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Bill Pemberton has done most of the legwork on this series. I've used his script to purge the attributes from the drivers/gpio tree. Reported-by: Bill Pemberton <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2012-08-17spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume ↵Guenter Roeck1-2/+2
functions Suspend and resume functions call spi_master_get() without matching spi_master_put(). The extra references are unnecessary and cause subsequent module unload attempts to fail, so drop the calls. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-08-17spi: spi-coldfire-qspi: Drop extra spi_master_put in device remove functionGuenter Roeck1-1/+0
The call sequence spi_alloc_master/spi_register_master/spi_unregister_master is complete; it reduces the device reference count to zero, which and results in device memory being freed. The subsequent call to spi_master_put is unnecessary and results in an access to free memory. Drop it. Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2012-05-19spi: refactor spi-coldfire-qspi to use SPI queue framework.Steven King1-141/+114
Use the new SPI queue framework; remove use of workqueue, replace mcfqspi_transfer with mcfqspi_transfer_one_message, add mcfqspi_prepare_transfer_hw and mcfqspi_unprepare_transfer_hw, update power management routines. Signed-off-by: Steven King <[email protected]> Acked-by: Greg Ungerer <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-10-25drivercore: Add helper macro for platform_driver boilerplateGrant Likely1-12/+2
For simple modules that contain a single platform_driver without any additional setup code then ends up being a block of duplicated boilerplate. This patch adds a new macro, module_platform_driver(), which replaces the module_init()/module_exit() registrations with template functions. Signed-off-by: Grant Likely <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Reviewed-by: Magnus Damm <[email protected]> Reviewed-by: Mark Brown <[email protected]> Reviewed-by: Stephen Boyd <[email protected]>
2011-10-24spi: irq: Remove IRQF_DISABLEDYong Zhang1-1/+1
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. Signed-off-by: Yong Zhang <[email protected]> Signed-off-by: Grant Likely <[email protected]>
2011-06-06spi: reorganize driversGrant Likely1-0/+642
Sort the SPI makefile and enforce the naming convention spi_*.c for spi drivers. This change also rolls the contents of atmel_spi.h into the .c file since there is only one user of that particular include file. v2: - Use 'spi-' prefix instead of 'spi_' to match what seems to be be the predominant pattern for subsystem prefixes. - Clean up filenames in Kconfig and header comment blocks Signed-off-by: Grant Likely <[email protected]> Acked-by: Wolfram Sang <[email protected]> Acked-by: Linus Walleij <[email protected]>