linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: padma venkat <padma.kvr@gmail.com>
To: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Padmavathi Venna <padma.v@samsung.com>,
	kgene.kim@samsung.com, sbkim73@samsung.com,
	grant.likely@secretlab.ca,
	spi-devel-general@lists.sourceforge.net,
	linux-samsung-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] SPI: SAMSUNG: Bug fix for SPI with different FIFO level
Date: Thu, 30 Jun 2011 14:35:35 +0530	[thread overview]
Message-ID: <BANLkTimeWUbD2Ej16KKmuzwSCFz8HOhyKQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=L7QeN75ebWFXdp_V5Pw1zEc-ZtA@mail.gmail.com>

Hi,

On Thu, Jun 30, 2011 at 12:38 PM, Jassi Brar <jassisinghbrar@gmail.com> wrote:
> On Thu, Jun 30, 2011 at 6:08 PM, Padmavathi Venna <padma.v@samsung.com> wrote:
>> Fixed the bug in transmission status check for 64 bytes FIFO
>> level.
>>
>> Signed-off-by: Padmavathi Venna <padma.v@samsung.com>
>> ---
>>  drivers/spi/spi_s3c64xx.c |    4 +---
>>  1 files changed, 1 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/spi/spi_s3c64xx.c b/drivers/spi/spi_s3c64xx.hc
>> index 795828b..8945e20 100644
>> --- a/drivers/spi/spi_s3c64xx.c
>> +++ b/drivers/spi/spi_s3c64xx.c
>> @@ -116,9 +116,7 @@
>>                                        (((i)->fifo_lvl_mask + 1))) \
>>                                        ? 1 : 0)
>>
>> -#define S3C64XX_SPI_ST_TX_DONE(v, i) ((((v) >> (i)->rx_lvl_offset) & \
>> -                                       (((i)->fifo_lvl_mask + 1) << 1)) \
>> -                                       ? 1 : 0)
>> +#define S3C64XX_SPI_ST_TX_DONE(v, i) (((v) & (1 << (i)->tx_st_done)) ? 1 : 0)
>
> IIRC the macro is already designed to deduct tx-done levels from other fields.
> Could you please _explain_ with one example where it fails ? It is
> difficult to see without
> numbers.
The existing macro fails for following scenarios.
1) S5P64X0 channel 1
2) S5PV210 channel 1
3) S5PV310 channel 1 and channel 2

The FIFO data level supported in the above SoCs either 64 or 256
bytes depending on the channel. Because of this the TX_DONE
is the 25 bit in the status register.

The existing macro works for the following scenarios
1) S3C6410 all channels
2) S5PC100 all channels

The FIFO data level supported in the above SoCs 64 bytes
on all the channels. Because of this the TX_DONE is the 21 bit
in the status register.

So when we use the existing macro for the non-working SoCs
it is not anding with the TX_DONE bit but it is only anding the bits
earlier to TX_DONE bit.

>
> Thanks,
> -Jassi
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

  reply	other threads:[~2011-06-30  9:05 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30 12:38 [PATCH 1/2] ARM: SAMSUNG: Added tx_st_done variable in the platform data of SPI Padmavathi Venna
2011-06-30 12:38 ` [PATCH 2/2] SPI: SAMSUNG: Bug fix for SPI with different FIFO level Padmavathi Venna
2011-06-30  7:08   ` Jassi Brar
2011-06-30  9:05     ` padma venkat [this message]
2011-06-30  9:52       ` Jassi Brar
     [not found]         ` <BANLkTi=9c5asfr=Jg6xwjQZW_a369UO64Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-06-30 11:00           ` Tony Nadackal
2011-07-01  5:46             ` padma venkat
2011-07-01  5:52               ` Jassi Brar
2011-07-01  5:59                 ` padma venkat
2011-07-01  6:13                   ` Jassi Brar
2011-07-04  6:55                     ` Grant Likely
2011-07-04  6:58                       ` Grant Likely
2011-07-04  9:54                         ` Kukjin Kim
2011-07-04 10:04                           ` padma venkat
2011-07-04 10:08                           ` Kukjin Kim
2011-07-04 15:06                             ` Grant Likely
2011-07-05  5:51                               ` Kukjin Kim
2011-07-06  6:22                               ` Kukjin Kim
2011-07-06  6:30                                 ` Grant Likely
2011-07-06  7:17                                   ` Kukjin Kim
2011-07-06 17:30                                     ` Grant Likely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTimeWUbD2Ej16KKmuzwSCFz8HOhyKQ@mail.gmail.com \
    --to=padma.kvr@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=jassisinghbrar@gmail.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=padma.v@samsung.com \
    --cc=sbkim73@samsung.com \
    --cc=spi-devel-general@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).