linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] ARM: sunxi: spi: use proper errno when message is too long.
       [not found] <cover.1430034797.git.hramrach@gmail.com>
@ 2015-04-25 19:21 ` Michal Suchanek
  2015-04-26  8:42   ` Maxime Ripard
  2015-04-26  8:15 ` [PATCH 1/3] ARM: dts: sunxi: A10s Olinuxino add missing SPI and simplefb Michal Suchanek
  1 sibling, 1 reply; 8+ messages in thread
From: Michal Suchanek @ 2015-04-25 19:21 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
---
 drivers/spi/spi-sun4i.c | 2 +-
 drivers/spi/spi-sun6i.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index fbb0a4d..8238b4e 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -176,7 +176,7 @@ static int sun4i_spi_transfer_one(struct spi_master *master,
 
 	/* We don't support transfer larger than the FIFO */
 	if (tfr->len > SUN4I_FIFO_DEPTH)
-		return -EINVAL;
+		return -EMSGSIZE;
 
 	reinit_completion(&sspi->done);
 	sspi->tx_buf = tfr->tx_buf;
diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
index ac48f59..0f5dd91 100644
--- a/drivers/spi/spi-sun6i.c
+++ b/drivers/spi/spi-sun6i.c
@@ -166,7 +166,7 @@ static int sun6i_spi_transfer_one(struct spi_master *master,
 
 	/* We don't support transfer larger than the FIFO */
 	if (tfr->len > SUN6I_FIFO_DEPTH)
-		return -EINVAL;
+		return -EMSGSIZE;
 
 	reinit_completion(&sspi->done);
 	sspi->tx_buf = tfr->tx_buf;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 1/3] ARM: dts: sunxi: A10s Olinuxino add missing SPI and simplefb.
       [not found] <cover.1430034797.git.hramrach@gmail.com>
  2015-04-25 19:21 ` [PATCH 3/3] ARM: sunxi: spi: use proper errno when message is too long Michal Suchanek
@ 2015-04-26  8:15 ` Michal Suchanek
  2015-04-26  8:39   ` Maxime Ripard
  1 sibling, 1 reply; 8+ messages in thread
From: Michal Suchanek @ 2015-04-26  8:15 UTC (permalink / raw)
  To: linux-arm-kernel

Signed-off-by: Michal Suchanek <hramrach@gmail.com>
---
 arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 12 ++++++++++
 arch/arm/boot/dts/sun5i-a10s.dtsi                | 28 ++++++++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
index aa88ee8..e546b3f 100644
--- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
+++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
@@ -59,6 +59,12 @@
 	model = "Olimex A10s-Olinuxino Micro";
 	compatible = "olimex,a10s-olinuxino-micro", "allwinner,sun5i-a10s";
 
+	chosen {
+		framebuffer at 0 {
+			status = "okay";
+		};
+	};
+
 	aliases {
 		serial0 = &uart0;
 		serial1 = &uart2;
@@ -182,6 +188,12 @@
 	status = "okay";
 };
 
+&spi2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi2_pins_a>;
+	status = "okay";
+};
+
 &ohci0 {
 	status = "okay";
 };
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index a78c95d..438eba1 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -154,6 +154,20 @@
 			clocks = <&apb1_gates 18>;
 			status = "disabled";
 		};
+
+		spi2: spi at 01c17000 {
+			compatible = "allwinner,sun4i-a10-spi";
+			reg = <0x01c17000 0x1000>;
+			interrupts = <12>;
+			clocks = <&ahb_gates 22>, <&spi2_clk>;
+			clock-names = "ahb", "mod";
+			dmas = <&dma SUN4I_DMA_DEDICATED 29>,
+			       <&dma SUN4I_DMA_DEDICATED 28>;
+			dma-names = "rx", "tx";
+			status = "disabled";
+			#address-cells = <1>;
+			#size-cells = <0>;
+		};
 	};
 };
 
@@ -198,4 +212,18 @@
 		allwinner,drive = <SUN4I_PINCTRL_30_MA>;
 		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
 	};
+
+	spi2_pins_a: spi2 at 0 {
+		allwinner,pins = "PB11", "PB12", "PB13", "PB14";
+		allwinner,function = "spi2";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
+
+	spi2_pins_b: spi2 at 1 {
+		allwinner,pins = "PE00", "PE01", "PE02", "PE03";
+		allwinner,function = "spi2";
+		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+	};
 };
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 1/3] ARM: dts: sunxi: A10s Olinuxino add missing SPI and simplefb.
  2015-04-26  8:15 ` [PATCH 1/3] ARM: dts: sunxi: A10s Olinuxino add missing SPI and simplefb Michal Suchanek
@ 2015-04-26  8:39   ` Maxime Ripard
  2015-04-26  9:21     ` Michal Suchanek
  0 siblings, 1 reply; 8+ messages in thread
From: Maxime Ripard @ 2015-04-26  8:39 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Mon, Mar 23, 2015 at 03:00:31PM +0100, Michal Suchanek wrote:
> Signed-off-by: Michal Suchanek <hramrach@gmail.com>

Commit log, please.

> ---
>  arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts | 12 ++++++++++
>  arch/arm/boot/dts/sun5i-a10s.dtsi                | 28 ++++++++++++++++++++++++
>  2 files changed, 40 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
> index aa88ee8..e546b3f 100644
> --- a/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
> +++ b/arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts
> @@ -59,6 +59,12 @@
>  	model = "Olimex A10s-Olinuxino Micro";
>  	compatible = "olimex,a10s-olinuxino-micro", "allwinner,sun5i-a10s";
>  
> +	chosen {
> +		framebuffer at 0 {
> +			status = "okay";
> +		};
> +	};
> +

This is wrong.

If the bootloader has set a simplefb node, it will enable the right
one, if not it means that it's not meant to be used.

>  	aliases {
>  		serial0 = &uart0;
>  		serial1 = &uart2;
> @@ -182,6 +188,12 @@
>  	status = "okay";
>  };
>  
> +&spi2 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spi2_pins_a>;
> +	status = "okay";
> +};
> +

This should be in a separate patch, and the node are to be ordered
alphabetically.

>  &ohci0 {
>  	status = "okay";
>  };
> diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
> index a78c95d..438eba1 100644
> --- a/arch/arm/boot/dts/sun5i-a10s.dtsi
> +++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
> @@ -154,6 +154,20 @@
>  			clocks = <&apb1_gates 18>;
>  			status = "disabled";
>  		};
> +
> +		spi2: spi at 01c17000 {
> +			compatible = "allwinner,sun4i-a10-spi";
> +			reg = <0x01c17000 0x1000>;
> +			interrupts = <12>;
> +			clocks = <&ahb_gates 22>, <&spi2_clk>;
> +			clock-names = "ahb", "mod";
> +			dmas = <&dma SUN4I_DMA_DEDICATED 29>,
> +			       <&dma SUN4I_DMA_DEDICATED 28>;
> +			dma-names = "rx", "tx";
> +			status = "disabled";
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +		};
>  	};
>  };

This should be in sun5i.dtsi (and in a separate patch).

> @@ -198,4 +212,18 @@
>  		allwinner,drive = <SUN4I_PINCTRL_30_MA>;
>  		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>  	};
> +
> +	spi2_pins_a: spi2 at 0 {
> +		allwinner,pins = "PB11", "PB12", "PB13", "PB14";
> +		allwinner,function = "spi2";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +	};
> +
> +	spi2_pins_b: spi2 at 1 {
> +		allwinner,pins = "PE00", "PE01", "PE02", "PE03";
> +		allwinner,function = "spi2";
> +		allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> +		allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> +	};
>  };

Ditto.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150426/b5c13222/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/3] ARM: sunxi: spi: use proper errno when message is too long.
  2015-04-25 19:21 ` [PATCH 3/3] ARM: sunxi: spi: use proper errno when message is too long Michal Suchanek
@ 2015-04-26  8:42   ` Maxime Ripard
  2015-04-26 11:42     ` Michal Suchanek
  0 siblings, 1 reply; 8+ messages in thread
From: Maxime Ripard @ 2015-04-26  8:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Apr 25, 2015 at 09:21:07PM +0200, Michal Suchanek wrote:
> Signed-off-by: Michal Suchanek <hramrach@gmail.com>

No commit log?

> ---
>  drivers/spi/spi-sun4i.c | 2 +-
>  drivers/spi/spi-sun6i.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
> index fbb0a4d..8238b4e 100644
> --- a/drivers/spi/spi-sun4i.c
> +++ b/drivers/spi/spi-sun4i.c
> @@ -176,7 +176,7 @@ static int sun4i_spi_transfer_one(struct spi_master *master,
>  
>  	/* We don't support transfer larger than the FIFO */
>  	if (tfr->len > SUN4I_FIFO_DEPTH)
> -		return -EINVAL;
> +		return -EMSGSIZE;

Is it still a thing? The patch to remove such limit hasn't been merged
yet?

>  	reinit_completion(&sspi->done);
>  	sspi->tx_buf = tfr->tx_buf;
> diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
> index ac48f59..0f5dd91 100644
> --- a/drivers/spi/spi-sun6i.c
> +++ b/drivers/spi/spi-sun6i.c
> @@ -166,7 +166,7 @@ static int sun6i_spi_transfer_one(struct spi_master *master,
>  
>  	/* We don't support transfer larger than the FIFO */
>  	if (tfr->len > SUN6I_FIFO_DEPTH)
> -		return -EINVAL;
> +		return -EMSGSIZE;

Eventually, we should move to using DMA for these messages longer than
the FIFO.

I should post these patches.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150426/334041e8/attachment.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] ARM: dts: sunxi: A10s Olinuxino add missing SPI and simplefb.
  2015-04-26  8:39   ` Maxime Ripard
@ 2015-04-26  9:21     ` Michal Suchanek
  2015-04-26 12:52       ` Maxime Ripard
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Suchanek @ 2015-04-26  9:21 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

On 26 April 2015 at 10:39, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Mon, Mar 23, 2015 at 03:00:31PM +0100, Michal Suchanek wrote:
>> Signed-off-by: Michal Suchanek <hramrach@gmail.com>

>>  &ohci0 {
>>       status = "okay";
>>  };
>> diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
>> index a78c95d..438eba1 100644
>> --- a/arch/arm/boot/dts/sun5i-a10s.dtsi
>> +++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
>> @@ -154,6 +154,20 @@
>>                       clocks = <&apb1_gates 18>;
>>                       status = "disabled";
>>               };
>> +
>> +             spi2: spi at 01c17000 {
>> +                     compatible = "allwinner,sun4i-a10-spi";
>> +                     reg = <0x01c17000 0x1000>;
>> +                     interrupts = <12>;
>> +                     clocks = <&ahb_gates 22>, <&spi2_clk>;
>> +                     clock-names = "ahb", "mod";
>> +                     dmas = <&dma SUN4I_DMA_DEDICATED 29>,
>> +                            <&dma SUN4I_DMA_DEDICATED 28>;
>> +                     dma-names = "rx", "tx";
>> +                     status = "disabled";
>> +                     #address-cells = <1>;
>> +                     #size-cells = <0>;
>> +             };
>>       };
>>  };
>
> This should be in sun5i.dtsi (and in a separate patch).
>
>> @@ -198,4 +212,18 @@
>>               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
>>               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>>       };
>> +
>> +     spi2_pins_a: spi2 at 0 {
>> +             allwinner,pins = "PB11", "PB12", "PB13", "PB14";
>> +             allwinner,function = "spi2";
>> +             allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +             allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>> +     };
>> +
>> +     spi2_pins_b: spi2 at 1 {
>> +             allwinner,pins = "PE00", "PE01", "PE02", "PE03";
>> +             allwinner,function = "spi2";
>> +             allwinner,drive = <SUN4I_PINCTRL_10_MA>;
>> +             allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
>> +     };
>>  };
>
> Ditto.
>

A13 does not have these pins so maybe not?

Thanks

Michal

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/3] ARM: sunxi: spi: use proper errno when message is too long.
  2015-04-26  8:42   ` Maxime Ripard
@ 2015-04-26 11:42     ` Michal Suchanek
  2015-04-26 12:54       ` Maxime Ripard
  0 siblings, 1 reply; 8+ messages in thread
From: Michal Suchanek @ 2015-04-26 11:42 UTC (permalink / raw)
  To: linux-arm-kernel

On 26 April 2015 at 10:42, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Sat, Apr 25, 2015 at 09:21:07PM +0200, Michal Suchanek wrote:
>> Signed-off-by: Michal Suchanek <hramrach@gmail.com>
>
> No commit log?
>
>> ---
>>  drivers/spi/spi-sun4i.c | 2 +-
>>  drivers/spi/spi-sun6i.c | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
>> index fbb0a4d..8238b4e 100644
>> --- a/drivers/spi/spi-sun4i.c
>> +++ b/drivers/spi/spi-sun4i.c
>> @@ -176,7 +176,7 @@ static int sun4i_spi_transfer_one(struct spi_master *master,
>>
>>       /* We don't support transfer larger than the FIFO */
>>       if (tfr->len > SUN4I_FIFO_DEPTH)
>> -             return -EINVAL;
>> +             return -EMSGSIZE;
>
> Is it still a thing? The patch to remove such limit hasn't been merged
> yet?

Yes, seems so unless the patches are queued somewhere but not merged yet.

>
>>       reinit_completion(&sspi->done);
>>       sspi->tx_buf = tfr->tx_buf;
>> diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
>> index ac48f59..0f5dd91 100644
>> --- a/drivers/spi/spi-sun6i.c
>> +++ b/drivers/spi/spi-sun6i.c
>> @@ -166,7 +166,7 @@ static int sun6i_spi_transfer_one(struct spi_master *master,
>>
>>       /* We don't support transfer larger than the FIFO */
>>       if (tfr->len > SUN6I_FIFO_DEPTH)
>> -             return -EINVAL;
>> +             return -EMSGSIZE;
>
> Eventually, we should move to using DMA for these messages longer than
> the FIFO.
>
> I should post these patches.
>

Do you have those in a branch somewhere?

Thanks

Michal

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] ARM: dts: sunxi: A10s Olinuxino add missing SPI and simplefb.
  2015-04-26  9:21     ` Michal Suchanek
@ 2015-04-26 12:52       ` Maxime Ripard
  0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2015-04-26 12:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 26, 2015 at 11:21:34AM +0200, Michal Suchanek wrote:
> Hello,
> 
> On 26 April 2015 at 10:39, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > Hi,
> >
> > On Mon, Mar 23, 2015 at 03:00:31PM +0100, Michal Suchanek wrote:
> >> Signed-off-by: Michal Suchanek <hramrach@gmail.com>
> 
> >>  &ohci0 {
> >>       status = "okay";
> >>  };
> >> diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
> >> index a78c95d..438eba1 100644
> >> --- a/arch/arm/boot/dts/sun5i-a10s.dtsi
> >> +++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
> >> @@ -154,6 +154,20 @@
> >>                       clocks = <&apb1_gates 18>;
> >>                       status = "disabled";
> >>               };
> >> +
> >> +             spi2: spi at 01c17000 {
> >> +                     compatible = "allwinner,sun4i-a10-spi";
> >> +                     reg = <0x01c17000 0x1000>;
> >> +                     interrupts = <12>;
> >> +                     clocks = <&ahb_gates 22>, <&spi2_clk>;
> >> +                     clock-names = "ahb", "mod";
> >> +                     dmas = <&dma SUN4I_DMA_DEDICATED 29>,
> >> +                            <&dma SUN4I_DMA_DEDICATED 28>;
> >> +                     dma-names = "rx", "tx";
> >> +                     status = "disabled";
> >> +                     #address-cells = <1>;
> >> +                     #size-cells = <0>;
> >> +             };
> >>       };
> >>  };
> >
> > This should be in sun5i.dtsi (and in a separate patch).
> >
> >> @@ -198,4 +212,18 @@
> >>               allwinner,drive = <SUN4I_PINCTRL_30_MA>;
> >>               allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> >>       };
> >> +
> >> +     spi2_pins_a: spi2 at 0 {
> >> +             allwinner,pins = "PB11", "PB12", "PB13", "PB14";
> >> +             allwinner,function = "spi2";
> >> +             allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> >> +             allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> >> +     };
> >> +
> >> +     spi2_pins_b: spi2 at 1 {
> >> +             allwinner,pins = "PE00", "PE01", "PE02", "PE03";
> >> +             allwinner,function = "spi2";
> >> +             allwinner,drive = <SUN4I_PINCTRL_10_MA>;
> >> +             allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
> >> +     };
> >>  };
> >
> > Ditto.
> >
> 
> A13 does not have these pins so maybe not?

A13 has the PE* pins, but yeah, that's true for the first group.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150426/62f0eeab/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/3] ARM: sunxi: spi: use proper errno when message is too long.
  2015-04-26 11:42     ` Michal Suchanek
@ 2015-04-26 12:54       ` Maxime Ripard
  0 siblings, 0 replies; 8+ messages in thread
From: Maxime Ripard @ 2015-04-26 12:54 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Apr 26, 2015 at 01:42:51PM +0200, Michal Suchanek wrote:
> On 26 April 2015 at 10:42, Maxime Ripard
> <maxime.ripard@free-electrons.com> wrote:
> > On Sat, Apr 25, 2015 at 09:21:07PM +0200, Michal Suchanek wrote:
> >> Signed-off-by: Michal Suchanek <hramrach@gmail.com>
> >
> > No commit log?
> >
> >> ---
> >>  drivers/spi/spi-sun4i.c | 2 +-
> >>  drivers/spi/spi-sun6i.c | 2 +-
> >>  2 files changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
> >> index fbb0a4d..8238b4e 100644
> >> --- a/drivers/spi/spi-sun4i.c
> >> +++ b/drivers/spi/spi-sun4i.c
> >> @@ -176,7 +176,7 @@ static int sun4i_spi_transfer_one(struct spi_master *master,
> >>
> >>       /* We don't support transfer larger than the FIFO */
> >>       if (tfr->len > SUN4I_FIFO_DEPTH)
> >> -             return -EINVAL;
> >> +             return -EMSGSIZE;
> >
> > Is it still a thing? The patch to remove such limit hasn't been merged
> > yet?
> 
> Yes, seems so unless the patches are queued somewhere but not merged yet.
> 
> >
> >>       reinit_completion(&sspi->done);
> >>       sspi->tx_buf = tfr->tx_buf;
> >> diff --git a/drivers/spi/spi-sun6i.c b/drivers/spi/spi-sun6i.c
> >> index ac48f59..0f5dd91 100644
> >> --- a/drivers/spi/spi-sun6i.c
> >> +++ b/drivers/spi/spi-sun6i.c
> >> @@ -166,7 +166,7 @@ static int sun6i_spi_transfer_one(struct spi_master *master,
> >>
> >>       /* We don't support transfer larger than the FIFO */
> >>       if (tfr->len > SUN6I_FIFO_DEPTH)
> >> -             return -EINVAL;
> >> +             return -EMSGSIZE;
> >
> > Eventually, we should move to using DMA for these messages longer than
> > the FIFO.
> >
> > I should post these patches.
> >
> 
> Do you have those in a branch somewhere?

Not in a good shape, or at least, in a shape that have any chance to
be merged.

At the time I tried, I couldn't make the generic DMA work, so I had to
bypass that for my tests.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150426/061f786d/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-04-26 12:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cover.1430034797.git.hramrach@gmail.com>
2015-04-25 19:21 ` [PATCH 3/3] ARM: sunxi: spi: use proper errno when message is too long Michal Suchanek
2015-04-26  8:42   ` Maxime Ripard
2015-04-26 11:42     ` Michal Suchanek
2015-04-26 12:54       ` Maxime Ripard
2015-04-26  8:15 ` [PATCH 1/3] ARM: dts: sunxi: A10s Olinuxino add missing SPI and simplefb Michal Suchanek
2015-04-26  8:39   ` Maxime Ripard
2015-04-26  9:21     ` Michal Suchanek
2015-04-26 12:52       ` Maxime Ripard

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).