* [PATCH] spi_topcliff_pch: Fix data transfer issue
@ 2010-12-24 2:45 Tomoya MORINAGA
0 siblings, 0 replies; 3+ messages in thread
From: Tomoya MORINAGA @ 2010-12-24 2:45 UTC (permalink / raw)
To: David Brownell, Grant Likely, spi-devel-general, linux-kernel
Cc: qi.wang, yong.y.wang, joel.clark, kok.howg.ewe, Tomoya MORINAGA
Sorry, I forget to add "--CCs"
It seems spi_topcliff_pch of linux-2.6.37-rc6 degraded by previous patch.
In fact, data transfer fails on evaluation board testing.
I found like the following register miss-setting line.
Using this patch, I have confirmed data transfer can work well.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
drivers/spi/spi_topcliff_pch.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi_topcliff_pch.c b/drivers/spi/spi_topcliff_pch.c
index 58e187f..56b7588 100644
--- a/drivers/spi/spi_topcliff_pch.c
+++ b/drivers/spi/spi_topcliff_pch.c
@@ -267,7 +267,7 @@ static void pch_spi_handler_sub(struct pch_spi_data *data, u32 reg_spsr_val,
if (reg_spsr_val & SPSR_FI_BIT) {
/* disable FI & RFI interrupts */
pch_spi_setclr_reg(data->master, PCH_SPCR, 0,
- SPCR_FIE_BIT | SPCR_TFIE_BIT);
+ SPCR_FIE_BIT | SPCR_RFIE_BIT);
/* transfer is completed;inform pch_spi_process_messages */
data->transfer_complete = true;
@@ -679,11 +679,11 @@ static void pch_spi_set_ir(struct pch_spi_data *data)
if ((data->bpw_len) > PCH_MAX_FIFO_DEPTH) {
/* set receive threhold to PCH_RX_THOLD */
pch_spi_setclr_reg(data->master, PCH_SPCR,
- PCH_RX_THOLD << SPCR_TFIC_FIELD,
- ~MASK_TFIC_SPCR_BITS);
+ PCH_RX_THOLD << SPCR_RFIC_FIELD,
+ ~MASK_RFIC_SPCR_BITS);
/* enable FI and RFI interrupts */
pch_spi_setclr_reg(data->master, PCH_SPCR,
- SPCR_RFIE_BIT | SPCR_TFIE_BIT, 0);
+ SPCR_RFIE_BIT | SPCR_FIE_BIT, 0);
} else {
/* set receive threhold to maximum */
pch_spi_setclr_reg(data->master, PCH_SPCR,
--
1.6.0.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] spi_topcliff_pch: Fix data transfer issue
2010-12-24 2:40 Tomoya MORINAGA
@ 2010-12-24 3:31 ` Grant Likely
0 siblings, 0 replies; 3+ messages in thread
From: Grant Likely @ 2010-12-24 3:31 UTC (permalink / raw)
To: Tomoya MORINAGA; +Cc: David Brownell, spi-devel-general, linux-kernel
On Fri, Dec 24, 2010 at 11:40:50AM +0900, Tomoya MORINAGA wrote:
> It seems spi_topcliff_pch of linux-2.6.37-rc6 degraded by previous patch.
> In fact, data transfer fails on evaluation board testing.
> I found like the following register miss-setting line.
> Using this patch, I have confirmed data transfer can work well.
>
> Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Looks okay to me, but I'm not an expert on the device. I've picked
this patch up into my next-spi branch, but I can drop it if anyone has
concerns.
g.
> ---
> drivers/spi/spi_topcliff_pch.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/spi/spi_topcliff_pch.c b/drivers/spi/spi_topcliff_pch.c
> index 58e187f..56b7588 100644
> --- a/drivers/spi/spi_topcliff_pch.c
> +++ b/drivers/spi/spi_topcliff_pch.c
> @@ -267,7 +267,7 @@ static void pch_spi_handler_sub(struct pch_spi_data *data, u32 reg_spsr_val,
> if (reg_spsr_val & SPSR_FI_BIT) {
> /* disable FI & RFI interrupts */
> pch_spi_setclr_reg(data->master, PCH_SPCR, 0,
> - SPCR_FIE_BIT | SPCR_TFIE_BIT);
> + SPCR_FIE_BIT | SPCR_RFIE_BIT);
>
> /* transfer is completed;inform pch_spi_process_messages */
> data->transfer_complete = true;
> @@ -679,11 +679,11 @@ static void pch_spi_set_ir(struct pch_spi_data *data)
> if ((data->bpw_len) > PCH_MAX_FIFO_DEPTH) {
> /* set receive threhold to PCH_RX_THOLD */
> pch_spi_setclr_reg(data->master, PCH_SPCR,
> - PCH_RX_THOLD << SPCR_TFIC_FIELD,
> - ~MASK_TFIC_SPCR_BITS);
> + PCH_RX_THOLD << SPCR_RFIC_FIELD,
> + ~MASK_RFIC_SPCR_BITS);
> /* enable FI and RFI interrupts */
> pch_spi_setclr_reg(data->master, PCH_SPCR,
> - SPCR_RFIE_BIT | SPCR_TFIE_BIT, 0);
> + SPCR_RFIE_BIT | SPCR_FIE_BIT, 0);
> } else {
> /* set receive threhold to maximum */
> pch_spi_setclr_reg(data->master, PCH_SPCR,
> --
> 1.6.0.6
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] spi_topcliff_pch: Fix data transfer issue
@ 2010-12-24 2:40 Tomoya MORINAGA
2010-12-24 3:31 ` Grant Likely
0 siblings, 1 reply; 3+ messages in thread
From: Tomoya MORINAGA @ 2010-12-24 2:40 UTC (permalink / raw)
To: David Brownell, Grant Likely, spi-devel-general, linux-kernel
Cc: Tomoya MORINAGA
It seems spi_topcliff_pch of linux-2.6.37-rc6 degraded by previous patch.
In fact, data transfer fails on evaluation board testing.
I found like the following register miss-setting line.
Using this patch, I have confirmed data transfer can work well.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
---
drivers/spi/spi_topcliff_pch.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/spi/spi_topcliff_pch.c b/drivers/spi/spi_topcliff_pch.c
index 58e187f..56b7588 100644
--- a/drivers/spi/spi_topcliff_pch.c
+++ b/drivers/spi/spi_topcliff_pch.c
@@ -267,7 +267,7 @@ static void pch_spi_handler_sub(struct pch_spi_data *data, u32 reg_spsr_val,
if (reg_spsr_val & SPSR_FI_BIT) {
/* disable FI & RFI interrupts */
pch_spi_setclr_reg(data->master, PCH_SPCR, 0,
- SPCR_FIE_BIT | SPCR_TFIE_BIT);
+ SPCR_FIE_BIT | SPCR_RFIE_BIT);
/* transfer is completed;inform pch_spi_process_messages */
data->transfer_complete = true;
@@ -679,11 +679,11 @@ static void pch_spi_set_ir(struct pch_spi_data *data)
if ((data->bpw_len) > PCH_MAX_FIFO_DEPTH) {
/* set receive threhold to PCH_RX_THOLD */
pch_spi_setclr_reg(data->master, PCH_SPCR,
- PCH_RX_THOLD << SPCR_TFIC_FIELD,
- ~MASK_TFIC_SPCR_BITS);
+ PCH_RX_THOLD << SPCR_RFIC_FIELD,
+ ~MASK_RFIC_SPCR_BITS);
/* enable FI and RFI interrupts */
pch_spi_setclr_reg(data->master, PCH_SPCR,
- SPCR_RFIE_BIT | SPCR_TFIE_BIT, 0);
+ SPCR_RFIE_BIT | SPCR_FIE_BIT, 0);
} else {
/* set receive threhold to maximum */
pch_spi_setclr_reg(data->master, PCH_SPCR,
--
1.6.0.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-24 3:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-24 2:45 [PATCH] spi_topcliff_pch: Fix data transfer issue Tomoya MORINAGA
-- strict thread matches above, loose matches on Subject: below --
2010-12-24 2:40 Tomoya MORINAGA
2010-12-24 3:31 ` 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).