From: jason <jason77.wang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org
Cc: david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] spi/omap2_mcspi: disable and enable chan between each SPI transfer
Date: Fri, 25 Jun 2010 20:05:53 +0800 [thread overview]
Message-ID: <4C249BA1.8010808@gmail.com> (raw)
In-Reply-To: <E1C7579D1379824DAE67858071C810382DD83846FB-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org wrote:
>
>
>
[snip]
>> -----Original Message-----
>>
>> }
>> c = 0;
>> - } else if (c == 0 && tx == NULL) {
>> - omap2_mcspi_set_enable(spi, 0);
>> }
>>
>> *rx++ = __raw_readl(rx_reg);
>>
>
> Why do you do this?
> Reading the last word from the shift register buffer leads to
> the receiving new data to the buffer.
> The channel needs to be disabled before the last word reading.
>
>
>
Yes, you are right. If this patch can be accepted, i will remove those
changes in the V2 patch.
Please see my email replying grant likely's questions.
Thanks,
Jason.
>
>> @@ -646,7 +641,7 @@ omap2_mcspi_txrx_pio(struct spi_device
>> *spi, struct spi_transfer *xfer)
>> dev_err(&spi->dev, "EOT timed out\n");
>> }
>> out:
>> - omap2_mcspi_set_enable(spi, 1);
>> + omap2_mcspi_set_enable(spi, 0);
>> return count - c;
>> }
>>
>> @@ -894,7 +889,6 @@ static void omap2_mcspi_work(struct
>> work_struct *work)
>> cs = spi->controller_state;
>> cd = spi->controller_data;
>>
>> - omap2_mcspi_set_enable(spi, 1);
>> list_for_each_entry(t, &m->transfers, transfer_list) {
>> if (t->tx_buf == NULL && t->rx_buf ==
>> NULL && t->len) {
>> status = -EINVAL;
>> @@ -931,6 +925,8 @@ static void omap2_mcspi_work(struct
>> work_struct *work)
>>
>> mcspi_write_chconf0(spi, chconf);
>>
>> + omap2_mcspi_set_enable(spi, 1);
>> +
>> if (t->len) {
>> unsigned count;
>>
>> --
>> 1.5.6.5
>>
>>
>>
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
WARNING: multiple messages have this Message-ID (diff)
From: jason77.wang@gmail.com (jason)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] spi/omap2_mcspi: disable and enable chan between each SPI transfer
Date: Fri, 25 Jun 2010 20:05:53 +0800 [thread overview]
Message-ID: <4C249BA1.8010808@gmail.com> (raw)
In-Reply-To: <E1C7579D1379824DAE67858071C810382DD83846FB@NOK-EUMSG-02.mgdnok.nokia.com>
roman.tereshonkov at nokia.com wrote:
>
>
>
[snip]
>> -----Original Message-----
>>
>> }
>> c = 0;
>> - } else if (c == 0 && tx == NULL) {
>> - omap2_mcspi_set_enable(spi, 0);
>> }
>>
>> *rx++ = __raw_readl(rx_reg);
>>
>
> Why do you do this?
> Reading the last word from the shift register buffer leads to
> the receiving new data to the buffer.
> The channel needs to be disabled before the last word reading.
>
>
>
Yes, you are right. If this patch can be accepted, i will remove those
changes in the V2 patch.
Please see my email replying grant likely's questions.
Thanks,
Jason.
>
>> @@ -646,7 +641,7 @@ omap2_mcspi_txrx_pio(struct spi_device
>> *spi, struct spi_transfer *xfer)
>> dev_err(&spi->dev, "EOT timed out\n");
>> }
>> out:
>> - omap2_mcspi_set_enable(spi, 1);
>> + omap2_mcspi_set_enable(spi, 0);
>> return count - c;
>> }
>>
>> @@ -894,7 +889,6 @@ static void omap2_mcspi_work(struct
>> work_struct *work)
>> cs = spi->controller_state;
>> cd = spi->controller_data;
>>
>> - omap2_mcspi_set_enable(spi, 1);
>> list_for_each_entry(t, &m->transfers, transfer_list) {
>> if (t->tx_buf == NULL && t->rx_buf ==
>> NULL && t->len) {
>> status = -EINVAL;
>> @@ -931,6 +925,8 @@ static void omap2_mcspi_work(struct
>> work_struct *work)
>>
>> mcspi_write_chconf0(spi, chconf);
>>
>> + omap2_mcspi_set_enable(spi, 1);
>> +
>> if (t->len) {
>> unsigned count;
>>
>> --
>> 1.5.6.5
>>
>>
>>
next prev parent reply other threads:[~2010-06-25 12:05 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-24 12:12 [PATCH] spi/omap2_mcspi: disable and enable chan between each SPI transfer Jason Wang
2010-06-24 12:12 ` Jason Wang
[not found] ` <1277381565-6305-1-git-send-email-jason77.wang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-06-24 14:32 ` roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w
2010-06-24 14:32 ` roman.tereshonkov at nokia.com
[not found] ` <E1C7579D1379824DAE67858071C810382DD83846FB-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
2010-06-25 12:05 ` jason [this message]
2010-06-25 12:05 ` jason
2010-06-27 6:08 ` Grant Likely
2010-06-27 6:08 ` Grant Likely
[not found] ` <AANLkTinO3kndb9bIAGlz4-h2TW64NGthHBRcVlE3gqun-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-27 13:12 ` jason
2010-06-27 13:12 ` jason
2010-06-24 15:12 ` Grant Likely
2010-06-24 15:12 ` Grant Likely
2010-06-25 12:30 ` jason
2010-06-25 12:30 ` jason
[not found] ` <4C24A182.4060009-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-06-28 9:12 ` roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w
2010-06-28 9:12 ` roman.tereshonkov at nokia.com
[not found] ` <E1C7579D1379824DAE67858071C810382DD8495B26-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
2010-06-28 12:59 ` jason
2010-06-28 12:59 ` jason
2010-06-29 10:20 ` roman.tereshonkov
2010-06-29 10:20 ` roman.tereshonkov at nokia.com
[not found] ` <E1C7579D1379824DAE67858071C810382DD84963BC-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
2010-06-29 13:17 ` jason
2010-06-29 13:17 ` jason
2010-07-01 11:58 ` jason
2010-07-01 11:58 ` jason
[not found] ` <4C2C82E9.2010103-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-07-01 13:57 ` roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w
2010-07-01 13:57 ` roman.tereshonkov at nokia.com
[not found] ` <E1C7579D1379824DAE67858071C810382DD859571A-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
2010-07-01 23:35 ` jason
2010-07-01 23:35 ` jason
2010-07-03 11:21 ` jason
2010-07-03 11:21 ` jason
2010-07-13 13:26 ` jason
2010-07-13 13:26 ` jason
[not found] ` <4C3C6971.5010004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-07-13 18:09 ` roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w
2010-07-13 18:09 ` roman.tereshonkov at nokia.com
[not found] ` <E1C7579D1379824DAE67858071C810382DD8772AB3-xJW1crHCIS+8kqYwC468Frtp2NbXvJi8gfoxzgwHRXE@public.gmane.org>
2010-07-13 23:48 ` jason
2010-07-13 23:48 ` jason
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=4C249BA1.8010808@gmail.com \
--to=jason77.wang-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=roman.tereshonkov-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.