SUPERH platform development
 help / color / mirror / Atom feed
From: カオ ミン ヒェップ <cm-hiep@jinso.co.jp>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mark Brown <broonie@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Linux-sh list <linux-sh@vger.kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Geert Uytterhoeven <geert+renesas@linux-m68k.org>
Subject: Re: [RFC] spi: Using Trigger number to transmit/receive data
Date: Mon, 17 Mar 2014 01:11:00 +0000	[thread overview]
Message-ID: <53264BA4.3000401@jinso.co.jp> (raw)
In-Reply-To: <CAMuHMdUpm_4f7LynObRA+NDn4vqeUc0a2XZW-E=4LKL_Ro3XZw@mail.gmail.com>

On 03/13/2014 06:23 PM, Geert Uytterhoeven wrote:
> On Thu, Mar 13, 2014 at 9:29 AM, Cao Minh Hiep <cm-hiep@jinso.co.jp> wrote:
>> In order to transmit and receive data when have 32 bytes of data that
>> ready has prepared on Transmit/Receive Buffer to transmit or receive.
>> Instead transmits/receives a byte data using Transmit/Receive Buffer
>> Data Triggering Number will improve the speed of transfer data.
> Thanks for your patch, this looks like a valuable improvement!
>
> Unfortunately your patch doesn't apply against spi/for-next anymore, as
> the driver has changed a lot lately, due to the addition of RZ/A1H and
> Quad/Dual support.
>
Thanks, Do you mean this patch did not need for next and I don't mind 
about it?
>> +static void qspi_update(const struct rspi_data *rspi, u8 mask, u8 val, u8 reg)
>> +{
>> +       u8 data;
>> +
>> +       data = rspi_read8(rspi, reg);
>> +       data &= ~mask;
>> +       data |= (val & mask);
> I think this "& mask" is superfluous.
thanks, I modified it.
>> +       rspi_write8(rspi, data, reg);
>> +}
>> +static int qspi_set_send_trigger(struct rspi_data *rspi, int remain)
>> +{
>> +       int n;
>> +
>> +       n = min(remain, QSPI_BUFFER_SIZE);
>> +
>> +       if (remain >= QSPI_BUFFER_SIZE) {
>> +               /* sets triggering number to 32 bytes */
> "0 bytes"? (comment copied from qspi_set_receive_trigger())
>
>> +               qspi_update(rspi, SPBFCR_TXTRG_MASK,
>> +                            SPBFCR_TXTRG_0B, QSPI_SPBFCR);
>> +       } else {
>> +               /* sets triggering number to 1 byte */
> "31 bytes"?
thanks,
>> +               qspi_update(rspi, SPBFCR_TXTRG_MASK,
>> +                            SPBFCR_TXTRG_31B, QSPI_SPBFCR);
>> +       }
>> @@ -389,9 +443,10 @@ static int qspi_send_pio(struct rspi_data *rspi, struct spi_message *mesg,
>>   {
>>          int remain = t->len;
>>          const u8 *data = t->tx_buf;
>> +       int i, n;
>>
>>          rspi_write8(rspi, SPBFCR_TXRST, QSPI_SPBFCR);
>> -       rspi_write8(rspi, 0x00, QSPI_SPBFCR);
>> +       rspi_write8(rspi, DUMMY_DATA, QSPI_SPBFCR);
> I think this should stay "0x00", as it's not dummy data written to the
> transmit data register.
Thanks,
> Gr{oetje,eeting}s,
>
>                          Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                  -- Linus Torvalds
>
>


  reply	other threads:[~2014-03-17  1:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13  8:29 [RFC] spi: Using Trigger number to transmit/receive data Cao Minh Hiep
2014-03-13  8:29 ` Cao Minh Hiep
2014-03-13  9:23   ` Geert Uytterhoeven
2014-03-17  1:11     ` カオ ミン ヒェップ [this message]
2014-03-17  7:54       ` Geert Uytterhoeven
2014-03-17 12:01         ` カオ ミン ヒェップ
2014-03-17 19:48           ` Geert Uytterhoeven
2014-03-17 20:32             ` Mark Brown
2014-03-19  0:50             ` カオ ミン ヒェップ
2014-03-19  1:17     ` Kuninori Morimoto
2014-03-13  9:27   ` Kuninori Morimoto
2014-03-17  1:15     ` カオ ミン ヒェップ
2014-03-13 14:17 ` Mark Brown
2014-03-17  1:16   ` カオ ミン ヒェップ

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=53264BA4.3000401@jinso.co.jp \
    --to=cm-hiep@jinso.co.jp \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@linux-m68k.org \
    --cc=geert@linux-m68k.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-sh@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox