Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1581400 > unrolled thread

Re: [PATCH v9 2/3] fpga manager: Add cyclone-ps-spi driver for Altera FPGAs

Started byAnatolij Gustschin <agust@denx.de>
First post2017-02-15 16:30 +0100
Last post2017-02-16 00:10 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v9 2/3] fpga manager: Add cyclone-ps-spi driver for  Altera FPGAs Anatolij Gustschin <agust@denx.de> - 2017-02-15 16:30 +0100
    Re: [PATCH v9 2/3] fpga manager: Add cyclone-ps-spi driver for Altera FPGAs Alan Tull <delicious.quinoa@gmail.com> - 2017-02-15 18:20 +0100
      Re: [PATCH v9 2/3] fpga manager: Add cyclone-ps-spi driver for Altera  FPGAs Joshua Clayton <stillcompiling@gmail.com> - 2017-02-16 00:10 +0100

#1581400 — Re: [PATCH v9 2/3] fpga manager: Add cyclone-ps-spi driver for Altera FPGAs

FromAnatolij Gustschin <agust@denx.de>
Date2017-02-15 16:30 +0100
SubjectRe: [PATCH v9 2/3] fpga manager: Add cyclone-ps-spi driver for Altera FPGAs
Message-ID<tb9GO-1II-25@gated-at.bofh.it>
Hi Joshua,

On Tue, 24 Jan 2017 14:19:33 -0800
Joshua Clayton stillcompiling@gmail.com wrote:
...
>+static int cyclonespi_write(struct fpga_manager *mgr, const char *buf,
>+			    size_t count)
>+{
>+	struct cyclonespi_conf *conf = (struct cyclonespi_conf *)mgr->priv;
>+	const char *fw_data = buf;
>+	const char *fw_data_end = fw_data + count;
>+
>+	while (fw_data < fw_data_end) {
>+		int ret;
>+		size_t stride = min(fw_data_end - fw_data, SZ_4K);
>+
>+		rev_buf(fw_data, stride);

Can we make rev_buf() optional here? I've tested this driver with
Stratix-V FPGA using orion_spi driver. It works without swapping
the data.

Thanks,
Anatolij

[toc] | [next] | [standalone]


#1581484 — Re: [PATCH v9 2/3] fpga manager: Add cyclone-ps-spi driver for Altera FPGAs

FromAlan Tull <delicious.quinoa@gmail.com>
Date2017-02-15 18:20 +0100
SubjectRe: [PATCH v9 2/3] fpga manager: Add cyclone-ps-spi driver for Altera FPGAs
Message-ID<tbbpl-2OF-21@gated-at.bofh.it>
In reply to#1581400
On Wed, Feb 15, 2017 at 9:26 AM, Anatolij Gustschin <agust@denx.de> wrote:
> Hi Joshua,
>
> On Tue, 24 Jan 2017 14:19:33 -0800
> Joshua Clayton stillcompiling@gmail.com wrote:
> ...
>>+static int cyclonespi_write(struct fpga_manager *mgr, const char *buf,
>>+                          size_t count)
>>+{
>>+      struct cyclonespi_conf *conf = (struct cyclonespi_conf *)mgr->priv;
>>+      const char *fw_data = buf;
>>+      const char *fw_data_end = fw_data + count;
>>+
>>+      while (fw_data < fw_data_end) {
>>+              int ret;
>>+              size_t stride = min(fw_data_end - fw_data, SZ_4K);
>>+
>>+              rev_buf(fw_data, stride);
>
> Can we make rev_buf() optional here? I've tested this driver with
> Stratix-V FPGA using orion_spi driver. It works without swapping
> the data.

I replied earlier, but something in my email settings bounced.

The way to make it optional is to add a bit to the flags of the
fpga_image_info struct.

Alan

>
> Thanks,
> Anatolij

[toc] | [prev] | [next] | [standalone]


#1581776 — Re: [PATCH v9 2/3] fpga manager: Add cyclone-ps-spi driver for Altera FPGAs

FromJoshua Clayton <stillcompiling@gmail.com>
Date2017-02-16 00:10 +0100
SubjectRe: [PATCH v9 2/3] fpga manager: Add cyclone-ps-spi driver for Altera FPGAs
Message-ID<tbgRX-6hT-9@gated-at.bofh.it>
In reply to#1581484
On 02/15/2017 09:14 AM, Alan Tull wrote:
> On Wed, Feb 15, 2017 at 9:26 AM, Anatolij Gustschin <agust@denx.de> wrote:
>> Hi Joshua,
>>
>> On Tue, 24 Jan 2017 14:19:33 -0800
>> Joshua Clayton stillcompiling@gmail.com wrote:
>> ...
>>> +static int cyclonespi_write(struct fpga_manager *mgr, const char *buf,
>>> +                          size_t count)
>>> +{
>>> +      struct cyclonespi_conf *conf = (struct cyclonespi_conf *)mgr->priv;
>>> +      const char *fw_data = buf;
>>> +      const char *fw_data_end = fw_data + count;
>>> +
>>> +      while (fw_data < fw_data_end) {
>>> +              int ret;
>>> +              size_t stride = min(fw_data_end - fw_data, SZ_4K);
>>> +
>>> +              rev_buf(fw_data, stride);
>> Can we make rev_buf() optional here? I've tested this driver with
>> Stratix-V FPGA using orion_spi driver. It works without swapping
>> the data.
Thanks for testing!
I'd be happy to make it an optional feature, rather than integral.
> I replied earlier, but something in my email settings bounced.
>
> The way to make it optional is to add a bit to the flags of the
> fpga_image_info struct.
>
> Alan
OK.
>
>> Thanks,
>> Anatolij

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web