- 11 10月, 2016 1 次提交
-
-
由 Thor Thayer 提交于
Some SPI masters require slave selection before the transfer can begin [1]. The SPI framework currently selects the chip using either 1) the internal CS mechanism or 2) the GPIO CS, but not both. This patch adds a new master->flags define to indicate both the GPIO CS and the internal chip select mechanism should be used. Tested On: Altera CycloneV development kit Compile tested for build errors on x86_64 (allyesconfigs) [1] DesignWare dw_apb_ssi Databook, Version 3.20a (page 39) Signed-off-by: NThor Thayer <tthayer@opensource.altera.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 30 9月, 2016 2 次提交
-
-
由 Phil Reid 提交于
To avoid warning when using i2c gpio expander change call to the cansleep variant. There should be no issue with sleeping in the drivers probe function. Signed-off-by: NPhil Reid <preid@electromag.com.au> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Mika Westerberg 提交于
Kbuild test robot reports: drivers/spi/spi-pxa2xx.c: In function ‘setup_cs’: drivers/spi/spi-pxa2xx.c:1190:20: error: implicit declaration of function ‘desc_to_gpio’ ... Reason for this is the fact that those functions are declared in linux/gpio/consumer.h which is not included in the driver. Fix this by including it. Reported-by: Nkbuild test robot <fengguang.wu@intel.com> Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 29 9月, 2016 1 次提交
-
-
由 Wei Yongjun 提交于
Fix to return error code -EINVAL if no CS GPIOs available instead of 0, as done elsewhere in this function. Fixes: f13d4e18 ("spi: imx: Gracefully handle NULL master->cs_gpios") Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Acked-by: NMarek Vasut <marex@denx.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 27 9月, 2016 2 次提交
-
-
由 Mika Westerberg 提交于
The driver uses custom chip_info coming from platform data for chip selects implemented as GPIOs. If the system lacks board files setting up the platform data, it is not possible to use GPIOs as chip selects. This adds support for GPIO descriptors so that regardless of the underlying firmware interface (DT, ACPI or platform data) the driver can request GPIOs used as chip selects and configure them accordingly. The custom chip_info GPIO support is still left there to make sure the existing systems keep working as expected. Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Marek Vasut 提交于
It is possible that master->cs_gpios is NULL after spi_bitbang_start(), this happens if the master has no CS GPIOs specified in DT. Check for this case after spi_bitbang_start() to prevent NULL pointer dereference in the subsequent for loop, which accesses the master->cs_gpios field. Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Martin Kaiser <martin@kaiser.cx> Cc: Mark Brown <broonie@kernel.org> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 25 9月, 2016 4 次提交
-
-
由 Kamal Dasu 提交于
This spi driver uses the common spi-bcm-qspi driver and implements iProc SoCs specific interrupt controller. The common driver now calls the SoC handlers when present. Adding support for both muxed l1 and unmuxed interrupt sources. Signed-off-by: NKamal Dasu <kdasu.kdev@gmail.com> Signed-off-by: NYendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
The return value of fsl_espi_probe (currently struct spi_master *) is just used for checking whether an error occurred. Change the return value type to int and simplify the code. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
Simplify of_fsl_espi_probe. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
Remove an unused variable. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 17 9月, 2016 2 次提交
-
-
由 Wei Yongjun 提交于
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: fa236a7e ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Wei Yongjun 提交于
In case of error, the function kcalloc() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: fa236a7e ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 16 9月, 2016 2 次提交
-
-
由 Arnd Bergmann 提交于
The two power management functions are define inside of an #ifdef but referenced unconditionally, which is obviously broken when CONFIG_PM_SLEEP is not set: drivers/spi/spi-bcm-qspi.c:1300:13: error: 'bcm_qspi_suspend' undeclared here (not in a function) drivers/spi/spi-bcm-qspi.c:1301:13: error: 'bcm_qspi_resume' undeclared here (not in a function) This replaces the #ifdef with a __maybe_unused annotation that lets the compiler figure out whether to drop the functions itself, and uses SIMPLE_DEV_PM_OPS() to refer to the functions. This will also fill the freeze/thaw/poweroff/restore callback pointers in addition to suspend/resume, but as far as I can tell, this is what we want. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Fixes: fa236a7e ("spi: bcm-qspi: Add Broadcom MSPI driver") Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Arnd Bergmann 提交于
The header isn't actually needed here, but including it leads to a build warning when CONFIG_MTD is disabled: include/linux/mtd/cfi.h:76:2: #warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. [-Werror=cpp] Fixes: fa236a7e (spi: bcm-qspi: Add Broadcom MSPI driver) Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 15 9月, 2016 9 次提交
-
-
由 Heiner Kallweit 提交于
Add definition of further register bits for use in upcoming driver extensions and improve current bit definitions: - use BIT macro - use bit names as in the chip spec Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
Change register access to the method used in other drivers too. - use register names as in the chip spec for constants - avoid hard to read statements like __be32 __iomem *espi_mode = ®_base->mode - get rid of old powerpc-specific functions like in_8 In addition annotate reg_base in struct mpc8xxx_spi as __iomem. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
Simplify the interrupt handler a little. In addition don't call fsl_espi_cpu_irq() if no event bit is set. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
If t is not null then the SPI core takes care that bits_per_word and speed_hz are populated. This allows to simplify fsl_espi_setup_transfer. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Martin Kaiser 提交于
imx35 and compatible chipsets support loopback mode by setting a loopback control bit in the test register. Make this setting available for data transfers, similar to what we do for imx51. Signed-off-by: NMartin Kaiser <martin@kaiser.cx> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Martin Kaiser 提交于
Modify spi_imx_clkdiv_2() to return the resulting bus clock frequency when the selected clock divider is applied. Set spi_imx->spi_bus_clk to this frequency. If spi_bus_clk is unset, spi_imx_calculate_timeout() causes a division by 0. Signed-off-by: NMartin Kaiser <martin@kaiser.cx> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kamal Dasu 提交于
This change implements BSPI driver for Broadcom BRCMSTB, NS2, NSP SoCs works in combination with the MSPI controller driver and implements flash read acceleration and implements the spi_flash_read() method. Both MSPI and BSPI controllers are needed to access spi-nor flash. Signed-off-by: NKamal Dasu <kdasu.kdev@gmail.com> Signed-off-by: NYendapally Reddy Dhananjaya Reddy <yendapally.reddy@broadcom.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kamal Dasu 提交于
Adding the settop SoC platfrom driver, this driver is compatible with the settop MSPI+BSPI and MSPI only blocks implemented on the SoCs. Driver calls the spi-bcm-qspi probe(), remove() and pm_ops. Signed-off-by: NKamal Dasu <kdasu.kdev@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Kamal Dasu 提交于
Master SPI driver for Broadcom settop, iProc SoCs. The driver is used for devices that use SPI protocol on BRCMSTB, NSP, NS2 SoCs. SoC platform driver call exported porbe(), remove() and suspend/resume pm_ops implemented in this common driver. Signed-off-by: NKamal Dasu <kdasu.kdev@gmail.com> Signed-off-by: Yendapally Reddy Dhananjaya Reddy Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 14 9月, 2016 1 次提交
-
-
由 Axel Lin 提交于
devm_* API is supposed to be used only in probe function call. The resource is allocated at 'probe' and free automatically at 'remove'. Usage of devm_* functions outside probe sometimes leads to resource leak. Thus avoid using devm_* APIs in .setup/.cleanup callbacks. Signed-off-by: NAxel Lin <axel.lin@ingics.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 13 9月, 2016 16 次提交
-
-
由 Neil Armstrong 提交于
Signed-off-by: NNeil Armstrong <narmstrong@baylibre.com> Acked-by: NKevin Hilman <khilman@baylibre.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
Merge both functions to reduce source code size and improve readability. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
Move checking for a zero-length message up in the call chain and use m->frame_length instead of re-calculating the overall length of all transfers in the message. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
Factor out copying read data to the read buffers in the original message to a new function fsl_espi_copy_from_buf. This also allows to simplify fsl_espi_copy_to_buf. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
Better structure the code by population all elements of struct spi_transfer in one place. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
Checking the message is currently done at diffrent places in the driver. Factor it out to fsl_espi_check_message. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Andy Shevchenko 提交于
Most of the devices in the supported list have PXA configuration of FIFO. In particularly Intel Medfield and Merrifield have bigger FIFO, than it's defined for CE4100. Split CE4100 in the similar way how it was done for Intel Quark, i.e. prefix definitions by CE4100 and append necessary pieces of code to switch case conditions. We are on safe side since those bits are ignored on all LPSS IPs. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jarkko Nikula 提交于
Transfer state machine in this driver does not need to set/unset pointer to chip data between queueing and finalizing message as it is not actually used as a state info itself but just pointer passing. Since this per SPI device specific chip data is already carried in ctldata use that and remove pointer to chip data from driver data. While at it, group initialized variables before uninitialized variables in pump_transfers(). Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jarkko Nikula 提交于
There is no need to carry pointer to current SPI message in driver data because cur_msg in struct spi_master holds it already when driver is using the message queueing infrastructure from the SPI core. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Jarkko Nikula 提交于
All of these variables are unconditionally set before their use. Signed-off-by: NJarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Matthias Seidel 提交于
Avoid ending up with a higher frequency than requested Signed-off-by: NMatthias Seidel <kernel@mseidel.net> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
fsl_espi_bufs and fsl_espi_cpu_bufs are very small that we can merge them. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
Return a proper status code from fsl_espi_bufs instead of returning the number of remaining words and let the caller evaluate it. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
fsl_espi_cmd_trans and fsl_espi_rw_trans share most of the code so we can merge them. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
The remaining elements of struct fsl_espi_transfer are part of struct spi_transfer anyway. So we can get rid of struct fsl_espi_transfer and use a struct spi_transfer only. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
由 Heiner Kallweit 提交于
If an error occurs during processing the message, then we don't have to populate the actual_length element of struct message. So we can get rid of element actual_length in struct fsl_espi_transfer. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-