, deactivate
Moving the configuration of the SUN4I_CTL_CS_MANUAL flag from transfer_one
to set_cs removes the double activation.
Signed-off-by: Marcus Weseloh
Acked-by: Maxime Ripard
---
Changes from v1:
- Added Maximes Acked-by
---
drivers/spi/spi-sun4i.c | 6 +++---
1 file changed, 3 insertions
, deactivate
Moving the configuration of the SUN4I_CTL_CS_MANUAL flag from transfer_one
to set_cs removes the double activation.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com>
Acked-by: Maxime Ripard <maxime.rip...@free-electrons.com>
---
Changes from v1:
- Added Maximes Acked-by
-
the returned frequency removes this problem.
Signed-off-by: Marcus Weseloh
---
drivers/clk/sunxi/clk-mod0.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
index d167e1e..d03f099 100644
--- a/drivers/clk/sunxi/cl
Hi again,
2015-12-28 0:29 GMT+01:00 Marcus Weseloh :
> 2015-12-27 22:09 GMT+01:00 Maxime Ripard :
[...]
> [...]
>>> - /* Ensure that we have a parent clock fast enough */
>>> + /*
>>> + * Ensure that the parent clock is set to twice the max spe
Hi again,
2015-12-28 0:29 GMT+01:00 Marcus Weseloh <mweselo...@gmail.com>:
> 2015-12-27 22:09 GMT+01:00 Maxime Ripard <maxime.rip...@free-electrons.com>:
[...]
> [...]
>>> - /* Ensure that we have a parent clock fast enough */
>>> + /*
>>>
the returned frequency removes this problem.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com>
---
drivers/clk/sunxi/clk-mod0.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
index d167e1e..d03f099 100644
Hi,
2015-12-27 22:09 GMT+01:00 Maxime Ripard :
> On Sat, Dec 26, 2015 at 04:53:05PM +0100, Marcus Weseloh wrote:
>> This patch fixes multiple problems with the current clock calculations:
>>
>> 1. The A10/A20 datasheet contains the formula AHB_CLK / (2^(n+1)) to
>>
Hi,
2015-12-27 22:09 GMT+01:00 Maxime Ripard <maxime.rip...@free-electrons.com>:
> On Sat, Dec 26, 2015 at 04:53:05PM +0100, Marcus Weseloh wrote:
>> This patch fixes multiple problems with the current clock calculations:
>>
>> 1. The A10/A20 datasheet contains th
to unpredictable transfer speeds, depending on the order in which
transfers with different speeds where serviced by the SPI driver.
Signed-off-by: Marcus Weseloh
---
drivers/spi/spi-sun4i.c | 26 --
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/drivers/spi/spi
Modifies the sun4i SPI master driver to make use of the
"spi-word-wait-ns" property. This specific SPI controller needs 3 clock
cycles to set up the delay, which makes the minimum non-zero wait time
on this hardware 4 clock cycles.
Signed-off-by: Marcus Weseloh
---
drivers/spi/spi-su
Adds a new property "spi-word-wait-ns" to the spi-bus binding that allows
SPI slave devices to set a wait time between the transmission of words.
Signed-off-by: Marcus Weseloh
Reviewed-by: Maxime Ripard
Acked-by: Rob Herring
---
Documentation/devicetree/bindings/spi/spi-b
speed instead of tfr->speed_hz for wait time calculation
Marcus Weseloh (3):
spi: dts: Add new device property to specifcy a wait time between word
transmissions
spi: sun4i: Fix clock calculations to be predictable and never exceed
the requested rate
spi: sun4i: Add support for
Modifies the sun4i SPI master driver to make use of the
"spi-word-wait-ns" property. This specific SPI controller needs 3 clock
cycles to set up the delay, which makes the minimum non-zero wait time
on this hardware 4 clock cycles.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com&
Adds a new property "spi-word-wait-ns" to the spi-bus binding that allows
SPI slave devices to set a wait time between the transmission of words.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com>
Reviewed-by: Maxime Ripard <maxime.rip...@free-electrons.com>
Ac
to unpredictable transfer speeds, depending on the order in which
transfers with different speeds where serviced by the SPI driver.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com>
---
drivers/spi/spi-sun4i.c | 26 --
1 file changed, 16 insertions(+), 10 deletions(-)
diff
speed instead of tfr->speed_hz for wait time calculation
Marcus Weseloh (3):
spi: dts: Add new device property to specifcy a wait time between word
transmissions
spi: sun4i: Fix clock calculations to be predictable and never exceed
the requested rate
spi: sun4i: Add support for
Hi,
2015-12-18 12:16 GMT+01:00 Maxime Ripard :
>> sun4i_spi_write(sspi, SUN4I_CLK_CTL_REG, reg);
>>
>> + /*
>> + * Setup wait time between words.
>> + *
>> + * Wait time is set in SPI_CLK cycles. The SPI hardware needs 3
>> + * additional cycles to setup the wait
Hi,
2015-12-18 12:16 GMT+01:00 Maxime Ripard :
>> sun4i_spi_write(sspi, SUN4I_CLK_CTL_REG, reg);
>>
>> + /*
>> + * Setup wait time between words.
>> + *
>> + * Wait time is set in SPI_CLK cycles. The SPI hardware needs 3
>> + *
"hardware" in comments and description, as the wait
time could also be implemented in software
* read and set property value in spi core
Changes from v4:
* log with dev_dbg instead of dev_info
* split patch into two separate ones for SPI-core and sun4i parts
Marcus Weseloh (2):
spi:
Modifies the sun4i SPI master driver to make use of the
"spi-word-wait-ns" property. This specific SPI controller needs 3 clock
cycles to set up the delay, which makes the minimum non-zero wait time
on this hardware 4 clock cycles.
Signed-off-by: Marcus Weseloh
---
drivers/spi/spi-su
Adds a new property "spi-word-wait-ns" to the spi-bus binding that allows
SPI slave devices to set a wait time between the transmission of words.
Signed-off-by: Marcus Weseloh
---
Documentation/devicetree/bindings/spi/spi-bus.txt | 2 ++
drivers/spi/spi.c
Hi Maxime,
2015-12-16 11:39 GMT+01:00 Maxime Ripard :
> It looks mostly fine, however, please try to make only one thing in
> one patch.
>
> In this case, it would mean having one patch to add the DT property
> and support in the SPI core in a first one, and then add support for
> it in your
Hi Maxime,
2015-12-16 11:39 GMT+01:00 Maxime Ripard :
> It looks mostly fine, however, please try to make only one thing in
> one patch.
>
> In this case, it would mean having one patch to add the DT property
> and support in the SPI core in a first one, and then
Modifies the sun4i SPI master driver to make use of the
"spi-word-wait-ns" property. This specific SPI controller needs 3 clock
cycles to set up the delay, which makes the minimum non-zero wait time
on this hardware 4 clock cycles.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com&
Adds a new property "spi-word-wait-ns" to the spi-bus binding that allows
SPI slave devices to set a wait time between the transmission of words.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com>
---
Documentation/devicetree/bindings/spi/spi-bus.txt | 2 ++
d
"hardware" in comments and description, as the wait
time could also be implemented in software
* read and set property value in spi core
Changes from v4:
* log with dev_dbg instead of dev_info
* split patch into two separate ones for SPI-core and sun4i parts
Marcus Weseloh (2):
spi:
o make use of the new property.
This specific SPI controller needs 3 clock cycles to set up the delay,
which makes the minimum non-zero wait time on this hardware 4 clock cycles.
Signed-off-by: Marcus Weseloh
---
Changes from v1:
* renamed the property for more clarity
* wait time is set in nanosecon
2015-12-14 8:31 GMT+01:00 Marcus Weseloh :
> [...]
>>> + /* Setup wait time between words */
>>> + of_property_read_u32(spi->dev.of_node, "spi-word-wait-ns",
>>> + _ns);
>>
>> Read this in probe an
2015-12-14 8:31 GMT+01:00 Marcus Weseloh <mweselo...@gmail.com>:
> [...]
>>> + /* Setup wait time between words */
>>> + of_property_read_u32(spi->dev.of_node, "spi-word-wait-ns",
>>> + _ns);
>>
>> Rea
o make use of the new property.
This specific SPI controller needs 3 clock cycles to set up the delay,
which makes the minimum non-zero wait time on this hardware 4 clock cycles.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com>
---
Changes from v1:
* renamed the property for more clarity
*
Hi,
2015-12-14 2:29 GMT+01:00 Rob Herring :
> On Mon, Dec 14, 2015 at 12:04:11AM +0100, Marcus Weseloh wrote:
>> Adds a new property "spi-word-wait-ns" to the spi-bus binding that allows
[...]
>> diff --git a/Documentation/devicetree/bindings/spi/spi-bus.txt
>
2015-12-14 0:08 GMT+01:00 Mark Brown :
> Please don't bury patches in reply to existing serieses, it makes it
> hard to follow what's going on with regard to which versions are current
> and so on.
Thanks for the pointer, I will send patches like you ask from now on.
Should I resend the patch?
to set up the delay, which makes the minimum non-zero wait time
on this hardware 4 clock cycles.
Signed-off-by: Marcus Weseloh
---
Changes from v1:
* renamed the property for more clarity
* wait time is set in nanoseconds instead of number of clock cycles
* transparently handle the 3 setup cl
2015-12-13 22:07 GMT+01:00 Maxime Ripard :
[...]
>> There is one review comment that I didn't address: Rob Herring suggested
>> that this should be in the core-binding rather than in sun4i. I checked
>> many of the hardware manuals of other SPI drivers and it looks to me like
>> this hardware
2015-12-13 22:07 GMT+01:00 Maxime Ripard :
[...]
>> There is one review comment that I didn't address: Rob Herring suggested
>> that this should be in the core-binding rather than in sun4i. I checked
>> many of the hardware manuals of other SPI drivers and it
to set up the delay, which makes the minimum non-zero wait time
on this hardware 4 clock cycles.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com>
---
Changes from v1:
* renamed the property for more clarity
* wait time is set in nanoseconds instead of number of clock cycles
* transparen
2015-12-14 0:08 GMT+01:00 Mark Brown :
> Please don't bury patches in reply to existing serieses, it makes it
> hard to follow what's going on with regard to which versions are current
> and so on.
Thanks for the pointer, I will send patches like you ask from now on.
Should I
Hi,
2015-12-14 2:29 GMT+01:00 Rob Herring <r...@kernel.org>:
> On Mon, Dec 14, 2015 at 12:04:11AM +0100, Marcus Weseloh wrote:
>> Adds a new property "spi-word-wait-ns" to the spi-bus binding that allows
[...]
>> diff --git a/Documentation/devicetree/bindings/spi/
2015-12-12 10:19 GMT+01:00 Priit Laes :
> On Fri, 2015-12-11 at 23:45 +0100, Marcus Weseloh wrote:
> [...]
>> +- sun4i,spi-word-wait-ns: hardware based delay in nanoseconds between
>> + transmission of words
>
> Should be 'allwinner,spi-word-wait-ns'
2015-12-12 10:19 GMT+01:00 Priit Laes <pl...@plaes.org>:
> On Fri, 2015-12-11 at 23:45 +0100, Marcus Weseloh wrote:
> [...]
>> +- sun4i,spi-word-wait-ns: hardware based delay in nanoseconds between
>> + transmission of words
>
> Should be 'allwi
m non-zero wait time 4 clock cycles.
Signed-off-by: Marcus Weseloh
---
Changes from v1:
* renamed the property for more clarity
* wait time is set in nanoseconds instead of number of clock cycles
* transparently handle the 3 setup clock cycles
There is one review comment that I didn't ad
m non-zero wait time 4 clock cycles.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com>
---
Changes from v1:
* renamed the property for more clarity
* wait time is set in nanoseconds instead of number of clock cycles
* transparently handle the 3 setup clock cycles
There is one revie
2015-11-22 20:45 GMT+01:00 Maxime Ripard :
>> Julien, Rob: thanks for your comments! Ok, I will make the following changes:
>>
>> - remove "sun4i,spi-wdelay" from the sun4i binding and add the
>> property to the spi-bus.txt binding instead
>> - remove the comment about the additional 3 cycles from
2015-11-22 20:45 GMT+01:00 Maxime Ripard :
>> Julien, Rob: thanks for your comments! Ok, I will make the following changes:
>>
>> - remove "sun4i,spi-wdelay" from the sun4i binding and add the
>> property to the spi-bus.txt binding instead
>> - remove the comment
2015-11-20 17:12 GMT+01:00 Rob Herring :
> On Fri, Nov 20, 2015 at 02:56:34PM +0100, Marcus Weseloh wrote:
>> > (and the wdelay should
>> > arguably be a core-spi thing, not a sunxi thing, but that's a separate
>> > discussion)
>>
>> I've been thinking
Hi Julien,
2015-11-20 11:12 GMT+01:00 Julian Calaby :
> Having magic numbers is kind-of a drivers' job.
Yes, of course. What I meant was that I didn't feel comfortable to
include this magic number in driver code because I'm not 100% sure if
it is correct across all SPI configurations and SoCs
Hi Julian,
2015-11-19 23:59 GMT+01:00 Julian Calaby :
> Should you possibly hide the 3 clock periods from the user?
>
> I.e. they set whatever they want for the wdelay, we set it to the
> closest number we can that's greater or equal to what they ask for.
That's a good idea and much better than
Hi Julien,
2015-11-20 11:12 GMT+01:00 Julian Calaby :
> Having magic numbers is kind-of a drivers' job.
Yes, of course. What I meant was that I didn't feel comfortable to
include this magic number in driver code because I'm not 100% sure if
it is correct across all SPI
2015-11-20 17:12 GMT+01:00 Rob Herring <r...@kernel.org>:
> On Fri, Nov 20, 2015 at 02:56:34PM +0100, Marcus Weseloh wrote:
>> > (and the wdelay should
>> > arguably be a core-spi thing, not a sunxi thing, but that's a separate
>> > discussion)
>>
>&
Hi Julian,
2015-11-19 23:59 GMT+01:00 Julian Calaby :
> Should you possibly hide the 3 clock periods from the user?
>
> I.e. they set whatever they want for the wdelay, we set it to the
> closest number we can that's greater or equal to what they ask for.
That's a good
umentation. I used "example,dummy" as compatible... is this acceptable or
should I use a device/compatible that actually exists somewhere?
Oh... and should I split binding documentation and code changing patch?
Best regards,
Marcus
Marcus Weseloh (1):
spi: dts: sun4i: Add support
next word.
The constant additional 3 clock periods are not documented by the vendor
and have been determined by analyzing the generated waveforms across
many different transmission speeds.
Signed-off-by: Marcus Weseloh
---
Documentation/devicetree/bindings/spi/spi-sun4i.txt | 11 +++
drive
umentation. I used "example,dummy" as compatible... is this acceptable or
should I use a device/compatible that actually exists somewhere?
Oh... and should I split binding documentation and code changing patch?
Best regards,
Marcus
Marcus Weseloh (1):
spi: dts: sun4i: Add support
next word.
The constant additional 3 clock periods are not documented by the vendor
and have been determined by analyzing the generated waveforms across
many different transmission speeds.
Signed-off-by: Marcus Weseloh <mweselo...@gmail.com>
---
Documentation/devicetree/bindings/spi/sp
54 matches
Mail list logo