summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-uniphier.c
AgeCommit message (Collapse)Author
2019-09-15Merge branch 'spi-5.4' into spi-nextMark Brown
2019-09-15Merge branch 'spi-5.3' into spi-linusMark Brown
2019-09-04spi: uniphier: use devm_platform_ioremap_resource() to simplify codeYueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20190904135918.25352-33-yuehaibing@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-09-03spi: uniphier: introduce polling modeKeiji Hayashibara
Introduce new polling mode for short size transfer. Either the estimated transfer time is estimated to exceed 200us, or polling loop actually exceeds 200us, it switches to irq mode. Signed-off-by: Keiji Hayashibara <hayashibara.keiji@socionext.com> Link: https://lore.kernel.org/r/1567488661-11428-4-git-send-email-hayashibara.keiji@socionext.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-09-03spi: uniphier: remove unnecessary codeKeiji Hayashibara
This commit removed if() because priv->is_save_param is always true. Signed-off-by: Keiji Hayashibara <hayashibara.keiji@socionext.com> Link: https://lore.kernel.org/r/1567488661-11428-3-git-send-email-hayashibara.keiji@socionext.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-09-03spi: uniphier: fix wrong register overwriteKeiji Hayashibara
When it changes the spi mode, the register is overwritten incorrectly. This commit fixes this register overwrite. Signed-off-by: Keiji Hayashibara <hayashibara.keiji@socionext.com> Link: https://lore.kernel.org/r/1567488661-11428-2-git-send-email-hayashibara.keiji@socionext.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-02spi: Remove dev_err() usage after platform_get_irq()Stephen Boyd
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Cc: Mark Brown <broonie@kernel.org> Cc: linux-spi@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20190730181557.90391-42-swboyd@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-26spi: uniphier: fix zero-length transferKeiji Hayashibara
The zero-length transfer results in timeout error because the transfer doesn't start. This commit modified to return success in this case. Signed-off-by: Keiji Hayashibara <hayashibara.keiji@socionext.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-26spi: uniphier: fix timeout errorKeiji Hayashibara
Timeout error was silently ignored. This commit adds timeout error handling and modifies return type of wait_for_completion_timeout(). Signed-off-by: Keiji Hayashibara <hayashibara.keiji@socionext.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-02spi: uniphier: remove unnecessary include headersKeiji Hayashibara
This commit removed include headers of linux/of.h and linux/of_platform.h, because they are not used. Signed-off-by: Keiji Hayashibara <hayashibara.keiji@socionext.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-08-01spi: add SPI controller driver for UniPhier SoCKeiji Hayashibara
Add SPI controller driver implemented in Socionext UniPhier SoCs. UniPhier SoCs have two types SPI controllers; SCSSI supports a single channel, and MCSSI supports multiple channels. This driver supports SCSSI only. This controller has 32bit TX/RX FIFO with depth of eight entry, and supports the SPI master mode only. This commit is implemented in PIO transfer mode, not DMA transfer. Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com> Signed-off-by: Keiji Hayashibara <hayashibara.keiji@socionext.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>