linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting
@ 2011-09-06  7:58 Tomoya MORINAGA
  2011-09-06  7:58 ` [PATCH 2/5] spi-topcliff-pch: Fix SSN Control issue Tomoya MORINAGA
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Tomoya MORINAGA @ 2011-09-06  7:58 UTC (permalink / raw)
  To: Grant Likely, spi-devel-general, linux-kernel
  Cc: qi.wang, yong.y.wang, joel.clark, kok.howg.ewe, toshiharu-linux,
	Tomoya MORINAGA

Currently, in case of reading date from SPI flash,
command is sent twice.
The cause is that tx-memory clear processing is missing .
This patch adds the tx-momory clear processing.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
 drivers/spi/spi-topcliff-pch.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index 540c290..1b98b7e 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -839,6 +839,11 @@ static void pch_spi_start_transfer(struct pch_spi_data *data)
 
 	dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent,
 			    DMA_FROM_DEVICE);
+
+	dma_sync_sg_for_cpu(&data->master->dev, dma->sg_tx_p, dma->nent,
+			    DMA_FROM_DEVICE);
+	memset(data->dma.tx_buf_virt, 0, PAGE_SIZE);
+
 	async_tx_ack(dma->desc_rx);
 	async_tx_ack(dma->desc_tx);
 	kfree(dma->sg_tx_p);
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/5] spi-topcliff-pch: Fix SSN Control issue
  2011-09-06  7:58 [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting Tomoya MORINAGA
@ 2011-09-06  7:58 ` Tomoya MORINAGA
  2011-09-06  7:58 ` [PATCH 3/5] spi-topcliff-pch: Fix CPU read complete condition issue Tomoya MORINAGA
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Tomoya MORINAGA @ 2011-09-06  7:58 UTC (permalink / raw)
  To: Grant Likely, spi-devel-general, linux-kernel
  Cc: qi.wang, yong.y.wang, joel.clark, kok.howg.ewe, toshiharu-linux,
	Tomoya MORINAGA

During processing 1 command/data series,
SSN should keep LOW.
However, currently, SSN becomes HIGH.
This patch fixes the issue.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
 drivers/spi/spi-topcliff-pch.c |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index 1b98b7e..b5c681a 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -58,6 +58,7 @@
 #define PCH_SLEEP_TIME		10
 
 #define SSN_LOW			0x02U
+#define SSN_HIGH		0x03U
 #define SSN_NO_CONTROL		0x00U
 #define PCH_MAX_CS		0xFF
 #define PCI_DEVICE_ID_GE_SPI	0x8816
@@ -758,10 +759,6 @@ static void pch_spi_set_ir(struct pch_spi_data *data)
 
 	wait_event_interruptible(data->wait, data->transfer_complete);
 
-	pch_spi_writereg(data->master, PCH_SSNXCR, SSN_NO_CONTROL);
-	dev_dbg(&data->master->dev,
-		"%s:no more control over SSN-writing 0 to SSNXCR.", __func__);
-
 	/* clear all interrupts */
 	pch_spi_writereg(data->master, PCH_SPSR,
 			 pch_spi_readreg(data->master, PCH_SPSR));
@@ -850,9 +847,6 @@ static void pch_spi_start_transfer(struct pch_spi_data *data)
 	kfree(dma->sg_rx_p);
 
 	spin_lock_irqsave(&data->lock, flags);
-	pch_spi_writereg(data->master, PCH_SSNXCR, SSN_NO_CONTROL);
-	dev_dbg(&data->master->dev,
-		"%s:no more control over SSN-writing 0 to SSNXCR.", __func__);
 
 	/* clear fifo threshold, disable interrupts, disable SPI transfer */
 	pch_spi_setclr_reg(data->master, PCH_SPCR, 0,
@@ -1162,6 +1156,7 @@ static void pch_spi_process_messages(struct work_struct *pwork)
 	if (data->use_dma)
 		pch_spi_request_dma(data,
 				    data->current_msg->spi->bits_per_word);
+	pch_spi_writereg(data->master, PCH_SSNXCR, SSN_NO_CONTROL);
 	do {
 		/* If we are already processing a message get the next
 		transfer structure from the message otherwise retrieve
@@ -1220,6 +1215,7 @@ static void pch_spi_process_messages(struct work_struct *pwork)
 
 	} while (data->cur_trans != NULL);
 
+	pch_spi_writereg(data->master, PCH_SSNXCR, SSN_HIGH);
 	if (data->use_dma)
 		pch_spi_release_dma(data);
 }
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/5] spi-topcliff-pch: Fix CPU read complete condition issue
  2011-09-06  7:58 [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting Tomoya MORINAGA
  2011-09-06  7:58 ` [PATCH 2/5] spi-topcliff-pch: Fix SSN Control issue Tomoya MORINAGA
@ 2011-09-06  7:58 ` Tomoya MORINAGA
       [not found] ` <1315295914-6862-1-git-send-email-tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
  2011-10-04  9:15 ` [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting Tomoya MORINAGA
  3 siblings, 0 replies; 8+ messages in thread
From: Tomoya MORINAGA @ 2011-09-06  7:58 UTC (permalink / raw)
  To: Grant Likely, spi-devel-general, linux-kernel
  Cc: qi.wang, yong.y.wang, joel.clark, kok.howg.ewe, toshiharu-linux,
	Tomoya MORINAGA

We found Rx data sometimes drops.(with non-DMA transfer mode)
The cause is read complete condition is not true.

This patch fixes the issue.

Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
 drivers/spi/spi-topcliff-pch.c |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index b5c681a..c4d6fb9 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -320,16 +320,19 @@ static void pch_spi_handler_sub(struct pch_spi_data *data, u32 reg_spsr_val,
 
 	/* if transfer complete interrupt */
 	if (reg_spsr_val & SPSR_FI_BIT) {
-		if (tx_index < bpw_len)
+		if ((tx_index == bpw_len) && (rx_index == tx_index)) {
+			/* disable interrupts */
+			pch_spi_setclr_reg(data->master, PCH_SPCR, 0, PCH_ALL);
+
+			/* transfer is completed;
+			   inform pch_spi_process_messages */
+			data->transfer_complete = true;
+			data->transfer_active = false;
+			wake_up(&data->wait);
+		} else {
 			dev_err(&data->master->dev,
 				"%s : Transfer is not completed", __func__);
-		/* disable interrupts */
-		pch_spi_setclr_reg(data->master, PCH_SPCR, 0, PCH_ALL);
-
-		/* transfer is completed;inform pch_spi_process_messages */
-		data->transfer_complete = true;
-		data->transfer_active = false;
-		wake_up(&data->wait);
+		}
 	}
 }
 
-- 
1.7.4.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/5] spi-topcliff-pch: Add recovery processing in case FIFO overrun error occurs
       [not found] ` <1315295914-6862-1-git-send-email-tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
@ 2011-09-06  7:58   ` Tomoya MORINAGA
  2011-09-06  7:58   ` [PATCH 5/5] spi-topcliff-pch: Fix overrun issue Tomoya MORINAGA
  1 sibling, 0 replies; 8+ messages in thread
From: Tomoya MORINAGA @ 2011-09-06  7:58 UTC (permalink / raw)
  To: Grant Likely, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w, Tomoya MORINAGA,
	toshiharu-linux-ECg8zkTtlr0C6LszWs/t0g,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w

Add recovery processing in case FIFO overrun error occurs with DMA transfer mode.

Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
---
 drivers/spi/spi-topcliff-pch.c |   31 ++++++++++++++++++++++++-------
 1 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index c4d6fb9..5be1142 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -355,15 +355,25 @@ static irqreturn_t pch_spi_handler(int irq, void *dev_id)
 			"%s returning due to suspend\n", __func__);
 		return IRQ_NONE;
 	}
-	if (data->use_dma)
-		return IRQ_NONE;
 
 	io_remap_addr = data->io_remap_addr;
 	spsr = io_remap_addr + PCH_SPSR;

 	reg_spsr_val = ioread32(spsr);
 
-	if (reg_spsr_val & SPSR_ORF_BIT)
-		dev_err(&board_dat->pdev->dev, "%s Over run error", __func__);
+	if (reg_spsr_val & SPSR_ORF_BIT) {
+		dev_err(&board_dat->pdev->dev, "%s Over run error\n", __func__);
+		if (data->current_msg->complete != 0) {
+			data->transfer_complete = true;
+			data->current_msg->status = -EIO;
+			data->current_msg->complete(data->current_msg->context);
+			data->bcurrent_msg_processing = false;
+			data->current_msg = NULL;
+			data->cur_trans = NULL;
+		}
+	}
+
+	if (data->use_dma)
+		return IRQ_NONE;
 
 	/* Check if the interrupt is for SPI device */
 	if (reg_spsr_val & (SPSR_FI_BIT | SPSR_RFI_BIT)) {
@@ -817,10 +827,11 @@ static void pch_spi_copy_rx_data_for_dma(struct pch_spi_data *data, int bpw)
 	}
 }
 
-static void pch_spi_start_transfer(struct pch_spi_data *data)
+static int pch_spi_start_transfer(struct pch_spi_data *data)
 {
 	struct pch_spi_dma_ctrl *dma;
 	unsigned long flags;
+	int rtn;
 
 	dma = &data->dma;
 
@@ -835,7 +846,9 @@ static void pch_spi_start_transfer(struct pch_spi_data *data)
 				 initiating the transfer. */
 	dev_dbg(&data->master->dev,
 		"%s:waiting for transfer to get over\n", __func__);
-	wait_event_interruptible(data->wait, data->transfer_complete);
+	rtn = wait_event_interruptible_timeout(data->wait,
+					       data->transfer_complete,
+					       msecs_to_jiffies(2 * HZ));
 
 	dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent,
 			    DMA_FROM_DEVICE);
@@ -862,6 +875,8 @@ static void pch_spi_start_transfer(struct pch_spi_data *data)
 	pch_spi_clear_fifo(data->master);
 
 	spin_unlock_irqrestore(&data->lock, flags);
+
+	return rtn;
 }
 
 static void pch_dma_rx_complete(void *arg)
@@ -1182,7 +1197,8 @@ static void pch_spi_process_messages(struct work_struct *pwork)
 
 		if (data->use_dma) {
 			pch_spi_handle_dma(data, &bpw);
-			pch_spi_start_transfer(data);
+			if (!pch_spi_start_transfer(data))
+				goto out;
 			pch_spi_copy_rx_data_for_dma(data, bpw);
 		} else {
 			pch_spi_set_tx(data, &bpw);
@@ -1218,6 +1234,7 @@ static void pch_spi_process_messages(struct work_struct *pwork)
 
 	} while (data->cur_trans != NULL);
 
+out:
 	pch_spi_writereg(data->master, PCH_SSNXCR, SSN_HIGH);
 	if (data->use_dma)
 		pch_spi_release_dma(data);
-- 
1.7.4.4


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/5] spi-topcliff-pch: Fix overrun issue
       [not found] ` <1315295914-6862-1-git-send-email-tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
  2011-09-06  7:58   ` [PATCH 4/5] spi-topcliff-pch: Add recovery processing in case FIFO overrun error occurs Tomoya MORINAGA
@ 2011-09-06  7:58   ` Tomoya MORINAGA
  1 sibling, 0 replies; 8+ messages in thread
From: Tomoya MORINAGA @ 2011-09-06  7:58 UTC (permalink / raw)
  To: Grant Likely, spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w, Tomoya MORINAGA,
	toshiharu-linux-ECg8zkTtlr0C6LszWs/t0g,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w

We found that adding load, Rx data sometimes drops.(with DMA transfer mode)
The cause is that before starting Rx-DMA processing, Tx-DMA processing starts.
This causes FIFO overrun occurs.

This patch fixes the issue by modifying FIFO tx-threshold and DMA descriptor
size like below.

                      Current                   this patch
Rx-descriptor   4Byte+12Byte*341    -->    12Byte*340-4Byte-12Byte
Rx-threshold                   (Not modified)
Tx-descriptor   4Byte+12Byte*341    -->    16Byte-12Byte*340
Rx-threshold    12Byte              -->    2Byte

Signed-off-by: Tomoya MORINAGA <tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
---
 drivers/spi/spi-topcliff-pch.c |   28 +++++++++++++++++++++++-----
 1 files changed, 23 insertions(+), 5 deletions(-)

diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
index 5be1142..c02fa62 100644
--- a/drivers/spi/spi-topcliff-pch.c
+++ b/drivers/spi/spi-topcliff-pch.c
@@ -50,6 +50,8 @@
 #define PCH_RX_THOLD		7
 #define PCH_RX_THOLD_MAX	15
 
+#define PCH_TX_THOLD		2
+
 #define PCH_MAX_BAUDRATE	5000000
 #define PCH_MAX_FIFO_DEPTH	16
 
@@ -1043,8 +1045,7 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
 	/* set receive fifo threshold and transmit fifo threshold */
 	pch_spi_setclr_reg(data->master, PCH_SPCR,
 			   ((size - 1) << SPCR_RFIC_FIELD) |
-			   ((PCH_MAX_FIFO_DEPTH - PCH_DMA_TRANS_SIZE) <<
-			    SPCR_TFIC_FIELD),
+			   (PCH_TX_THOLD << SPCR_TFIC_FIELD),
 			   MASK_RFIC_SPCR_BITS | MASK_TFIC_SPCR_BITS);
 
 	spin_unlock_irqrestore(&data->lock, flags);
@@ -1055,13 +1056,20 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
 	/* offset, length setting */
 	sg = dma->sg_rx_p;
 	for (i = 0; i < num; i++, sg++) {
-		if (i == 0) {
-			sg->offset = 0;
+		if (i == (num - 2)) {
+			sg->offset = size * i;
+			sg->offset = sg->offset * (*bpw / 8);
 			sg_set_page(sg, virt_to_page(dma->rx_buf_virt), rem,
 				    sg->offset);
 			sg_dma_len(sg) = rem;
+		} else if (i == (num - 1)) {
+			sg->offset = size * (i - 1) + rem;
+			sg->offset = sg->offset * (*bpw / 8);
+			sg_set_page(sg, virt_to_page(dma->rx_buf_virt), size,
+				    sg->offset);
+			sg_dma_len(sg) = size;
 		} else {
-			sg->offset = rem + size * (i - 1);
+			sg->offset = size * i;
 			sg->offset = sg->offset * (*bpw / 8);
 			sg_set_page(sg, virt_to_page(dma->rx_buf_virt), size,
 				    sg->offset);
@@ -1085,6 +1093,16 @@ static void pch_spi_handle_dma(struct pch_spi_data *data, int *bpw)
 	dma->desc_rx = desc_rx;
 
 	/* TX */
+	if (data->bpw_len > PCH_DMA_TRANS_SIZE) {
+		num = data->bpw_len / PCH_DMA_TRANS_SIZE;
+		size = PCH_DMA_TRANS_SIZE;
+		rem = 16;
+	} else {
+		num = 1;
+		size = data->bpw_len;
+		rem = data->bpw_len;
+	}
+
 	dma->sg_tx_p = kzalloc(sizeof(struct scatterlist)*num, GFP_ATOMIC);
 	sg_init_table(dma->sg_tx_p, num); /* Initialize SG table */
 	/* offset, length setting */
-- 
1.7.4.4


------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting
  2011-09-06  7:58 [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting Tomoya MORINAGA
                   ` (2 preceding siblings ...)
       [not found] ` <1315295914-6862-1-git-send-email-tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
@ 2011-10-04  9:15 ` Tomoya MORINAGA
       [not found]   ` <4E8ACEAE.3040400-8lRStDepK8iSL1NxhRU65dBPR1lH4CV8@public.gmane.org>
  2011-10-04 16:03   ` Grant Likely
  3 siblings, 2 replies; 8+ messages in thread
From: Tomoya MORINAGA @ 2011-10-04  9:15 UTC (permalink / raw)
  To: Grant Likely
  Cc: spi-devel-general, linux-kernel, qi.wang, yong.y.wang,
	joel.clark, kok.howg.ewe, toshiharu-linux

Hi Grant,

1 month has passed. You look very busy, right ?
We've been long waiting for your accept.
Could you review these patch series ?

Thanks in advance.

(2011/09/06 16:58), Tomoya MORINAGA wrote:
> Currently, in case of reading date from SPI flash,
> command is sent twice.
> The cause is that tx-memory clear processing is missing .
> This patch adds the tx-momory clear processing.
> 
> Signed-off-by: Tomoya MORINAGA<tomoya-linux@dsn.okisemi.com>
> ---
>   drivers/spi/spi-topcliff-pch.c |    5 +++++
>   1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
> index 540c290..1b98b7e 100644
> --- a/drivers/spi/spi-topcliff-pch.c
> +++ b/drivers/spi/spi-topcliff-pch.c
> @@ -839,6 +839,11 @@ static void pch_spi_start_transfer(struct pch_spi_data *data)
> 
>   	dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent,
>   			    DMA_FROM_DEVICE);
> +
> +	dma_sync_sg_for_cpu(&data->master->dev, dma->sg_tx_p, dma->nent,
> +			    DMA_FROM_DEVICE);
> +	memset(data->dma.tx_buf_virt, 0, PAGE_SIZE);
> +
>   	async_tx_ack(dma->desc_rx);
>   	async_tx_ack(dma->desc_tx);
>   	kfree(dma->sg_tx_p);


-- 
tomoya
ROHM Co., Ltd.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting
       [not found]   ` <4E8ACEAE.3040400-8lRStDepK8iSL1NxhRU65dBPR1lH4CV8@public.gmane.org>
@ 2011-10-04 10:35     ` Alan Cox
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Cox @ 2011-10-04 10:35 UTC (permalink / raw)
  To: Tomoya MORINAGA
  Cc: qi.wang-ral2JQCrhuEAvxtiuMwx3w,
	yong.y.wang-ral2JQCrhuEAvxtiuMwx3w,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	toshiharu-linux-ECg8zkTtlr0C6LszWs/t0g,
	kok.howg.ewe-ral2JQCrhuEAvxtiuMwx3w,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	joel.clark-ral2JQCrhuEAvxtiuMwx3w

On Tue, 04 Oct 2011 18:15:26 +0900
Tomoya MORINAGA <tomoya-linux-8lRStDepK8iSL1NxhRU65dBPR1lH4CV8@public.gmane.org> wrote:

> Hi Grant,
> 
> 1 month has passed. You look very busy, right ?
> We've been long waiting for your accept.
> Could you review these patch series ?

If you've not had a response in a month for something that is a trivial
fix to a driver you maintain anyway then send it direct to Linus with a
note that Grant hasn't responded for a month. Ditto the GPIO driver.

Alan

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting
  2011-10-04  9:15 ` [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting Tomoya MORINAGA
       [not found]   ` <4E8ACEAE.3040400-8lRStDepK8iSL1NxhRU65dBPR1lH4CV8@public.gmane.org>
@ 2011-10-04 16:03   ` Grant Likely
  1 sibling, 0 replies; 8+ messages in thread
From: Grant Likely @ 2011-10-04 16:03 UTC (permalink / raw)
  To: Tomoya MORINAGA
  Cc: spi-devel-general, linux-kernel, qi.wang, yong.y.wang,
	joel.clark, kok.howg.ewe, toshiharu-linux

On Tue, Oct 04, 2011 at 06:15:26PM +0900, Tomoya MORINAGA wrote:
> Hi Grant,
> 
> 1 month has passed. You look very busy, right ?
> We've been long waiting for your accept.
> Could you review these patch series ?
> 
> Thanks in advance.

Just looked at it now.  I'm picking it up and I'll send the pull req to Linus right away

g.

> 
> (2011/09/06 16:58), Tomoya MORINAGA wrote:
> > Currently, in case of reading date from SPI flash,
> > command is sent twice.
> > The cause is that tx-memory clear processing is missing .
> > This patch adds the tx-momory clear processing.
> > 
> > Signed-off-by: Tomoya MORINAGA<tomoya-linux@dsn.okisemi.com>
> > ---
> >   drivers/spi/spi-topcliff-pch.c |    5 +++++
> >   1 files changed, 5 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/spi/spi-topcliff-pch.c b/drivers/spi/spi-topcliff-pch.c
> > index 540c290..1b98b7e 100644
> > --- a/drivers/spi/spi-topcliff-pch.c
> > +++ b/drivers/spi/spi-topcliff-pch.c
> > @@ -839,6 +839,11 @@ static void pch_spi_start_transfer(struct pch_spi_data *data)
> > 
> >   	dma_sync_sg_for_cpu(&data->master->dev, dma->sg_rx_p, dma->nent,
> >   			    DMA_FROM_DEVICE);
> > +
> > +	dma_sync_sg_for_cpu(&data->master->dev, dma->sg_tx_p, dma->nent,
> > +			    DMA_FROM_DEVICE);
> > +	memset(data->dma.tx_buf_virt, 0, PAGE_SIZE);
> > +
> >   	async_tx_ack(dma->desc_rx);
> >   	async_tx_ack(dma->desc_tx);
> >   	kfree(dma->sg_tx_p);
> 
> 
> -- 
> tomoya
> ROHM Co., Ltd.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-10-04 16:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-06  7:58 [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting Tomoya MORINAGA
2011-09-06  7:58 ` [PATCH 2/5] spi-topcliff-pch: Fix SSN Control issue Tomoya MORINAGA
2011-09-06  7:58 ` [PATCH 3/5] spi-topcliff-pch: Fix CPU read complete condition issue Tomoya MORINAGA
     [not found] ` <1315295914-6862-1-git-send-email-tomoya-linux-ECg8zkTtlr0C6LszWs/t0g@public.gmane.org>
2011-09-06  7:58   ` [PATCH 4/5] spi-topcliff-pch: Add recovery processing in case FIFO overrun error occurs Tomoya MORINAGA
2011-09-06  7:58   ` [PATCH 5/5] spi-topcliff-pch: Fix overrun issue Tomoya MORINAGA
2011-10-04  9:15 ` [PATCH 1/5] spi-topcliff-pch: add tx-memory clear after complete transmitting Tomoya MORINAGA
     [not found]   ` <4E8ACEAE.3040400-8lRStDepK8iSL1NxhRU65dBPR1lH4CV8@public.gmane.org>
2011-10-04 10:35     ` Alan Cox
2011-10-04 16:03   ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).