Re: [PATCH 1/6] spi/ath79: add delay between SCK changes

2013-02-05 Thread Gabor Juhos
Hi Grant, On Thu, 27 Dec 2012 10:42:24 +0100, Gabor Juhos juh...@openwrt.org wrote: The driver uses the as fast as it can approach to drive the SCK signal. However this does not work with certain low speed SPI chips (e.g. the PCF2123 RTC chip). The patch adds per-bit slowdowns in order

Re: [PATCH 6/6] spi/ath79: add shutdown handler

2013-02-05 Thread Gabor Juhos
2013.02.05. 14:02 keltezéssel, Grant Likely írta: -static int ath79_spi_remove(struct platform_device *pdev) +static void __ath79_spi_remove(struct platform_device *pdev) { struct ath79_spi *sp = platform_get_drvdata(pdev); @@ -304,13 +304,23 @@ static int ath79_spi_remove(struct

[PATCH v2] spi/ath79: add shutdown handler

2013-02-05 Thread Gabor Juhos
in a kexec'd kernel because the SPI driver does not restore the special mode during shutdown. The patch adds a shutdown handler to fix this issue. Signed-off-by: Gabor Juhos juh...@openwrt.org --- Changes since v1: - call ath79_spi_remote(pdev) directly from ath79_spi_shutdown() --- drivers/spi

[PATCH 1/6] spi/ath79: add delay between SCK changes

2012-12-27 Thread Gabor Juhos
The driver uses the as fast as it can approach to drive the SCK signal. However this does not work with certain low speed SPI chips (e.g. the PCF2123 RTC chip). The patch adds per-bit slowdowns in order to be able to use the driver with such chips as well. Signed-off-by: Gabor Juhos juh

[PATCH 2/6] spi/ath79: add missing HIGH-LOW SCK transition

2012-12-27 Thread Gabor Juhos
The 'ath79_spi_txrx_mode0' function does not set the SCK signal to LOW at the end of a word transfer. This causes communications errors with certain devices (e.g. the PCF2123 RTC chip). The patch ensures that the SCK signal will be LOW. Signed-off-by: Gabor Juhos juh...@openwrt.org --- drivers

[PATCH 6/6] spi/ath79: add shutdown handler

2012-12-27 Thread Gabor Juhos
in a kexec'd kernel because the SPI driver does not restore the special mode during shutdown. The patch adds a shutdown handler to fix this issue. Signed-off-by: Gabor Juhos juh...@openwrt.org --- drivers/spi/spi-ath79.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff

[PATCH 4/6] spi/ath79: use gpio_request_one

2012-12-27 Thread Gabor Juhos
Use gpio_request_one() instead of multiple gpiolib calls. Signed-off-by: Gabor Juhos juh...@openwrt.org --- drivers/spi/spi-ath79.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c index a725e62

[PATCH 0/6] spi/ath79: various fixes

2012-12-27 Thread Gabor Juhos
This patch set contain various fixes for the spi-ath79 driver. Gabor Juhos (6): spi/ath79: add delay between SCK changes spi/ath79: add missing HIGH-LOW SCK transition spi/ath79: remove superfluous chip select code spi/ath79: use gpio_request_one spi/ath79: avoid multiple initialization

[PATCH 3/6] spi/ath79: remove superfluous chip select code

2012-12-27 Thread Gabor Juhos
The spi_bitbang driver calls the chipselect function of the driver from spi_bitbang_setup in order to deselect the given SPI chip, so we don't have to initialize the CS line here. Signed-off-by: Gabor Juhos juh...@openwrt.org --- drivers/spi/spi-ath79.c |6 -- 1 file changed, 6 deletions

[PATCH 5/6] spi/ath79: avoid multiple initialization of the SPI controller

2012-12-27 Thread Gabor Juhos
those from probe/response in order to avoid the mutliple initialization of the controller. Signed-off-by: Gabor Juhos juh...@openwrt.org --- drivers/spi/spi-ath79.c | 41 - 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/drivers/spi/spi

[PATCH] SPI: spi-ath79: fix compile error due to missing include

2011-11-16 Thread Gabor Juhos
/spi-ath79.c:281:1: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS' drivers/spi/spi-ath79.c:281:14: warning: function declaration isn't a prototype Signed-off-by: Gabor Juhos juh...@openwrt.org --- drivers/spi/spi-ath79.c |1 + 1 files changed, 1 insertions(+), 0 deletions

Re: [PATCH v4 09/16] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2011-01-04 Thread Gabor Juhos
2011.01.03. 18:02 keltezéssel, Grant Likely írta: On Sun, Jan 02, 2011 at 07:56:22PM +0100, Gabor Juhos wrote: The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Mostly looks okay to me. A few comments below. Do you want this one

[PATCH v5 09/16] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2011-01-04 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: David Brownell dbrown...@users.sourceforge.net Cc: spi-devel-general@lists.sourceforge.net Acked-by: Grant Likely grant.lik

[PATCH v3 09/16] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-12-28 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: David Brownell dbrown...@users.sourceforge.net Cc: spi-devel-general@lists.sourceforge.net --- Changes since RFC: - remove DRV_DESC

[PATCH v2 09/16] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-12-22 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: David Brownell dbrown...@users.sourceforge.net Cc: spi-devel-general@lists.sourceforge.net --- Changes since RFC: - remove DRV_DESC

[PATCH 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-11-23 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: Grant Likely grant.lik...@secretlab.ca Cc: David Brownell dbrown...@users.sourceforge.net Cc: spi-devel-general@lists.sourceforge.net

Re: [RFC 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-11-15 Thread Gabor Juhos
2010.11.15. 5:04 keltezéssel, Grant Likely írta: On Sun, Nov 14, 2010 at 10:03:56PM +0100, Gabor Juhos wrote: +static inline u32 ath79_spi_rr(struct ath79_spi *sp, unsigned reg) +{ + return __raw_readl(sp-base + reg); +} + +static inline void ath79_spi_wr(struct ath79_spi *sp, unsigned reg

Re: [RFC 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-11-14 Thread Gabor Juhos
Hi Grant, ... +#include asm/mach-ath79/ath79_spi_platform.h + +#define DRV_DESCSPI controller driver for Atheros AR71XX/AR724X/AR91X Used exactly once. Don't bother with a #define Ok. +#define DRV_NAMEath79-spi + +struct ath79_spi { +struct spi_bitbang bitbang; +

[RFC 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-11-12 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: David Brownell dbrown...@users.sourceforge.net Cc: spi-devel-general@lists.sourceforge.net --- .../include/asm/mach-ath79

[RFC 11/18] spi: add SPI controller driver for the Atheros AR71XX/AR724X/AR913X SoCs

2010-11-12 Thread Gabor Juhos
The Atheros AR71XX/AR724X/AR913X SoCs have a built-in SPI controller. This patch implements a driver for that. Signed-off-by: Gabor Juhos juh...@openwrt.org Cc: David Brownell dbrown...@users.sourceforge.net Cc: spi-devel-general@lists.sourceforge.net --- Sorry for sending this twice, i forgot