diff for duplicates of <1449911980.29015.7.camel@plaes.org> diff --git a/a/1.txt b/N1/1.txt index 87e70f4..65e710d 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -7,12 +7,12 @@ On Fri, 2015-12-11 at 23:45 +0100, Marcus Weseloh wrote: > --- a/Documentation/devicetree/bindings/spi/spi-sun4i.txt > +++ b/Documentation/devicetree/bindings/spi/spi-sun4i.txt > @@ -10,6 +10,10 @@ Required properties: -> - "mod": the parent module clock -> - clock-names: Must contain the clock names described just above -> +> ???- "mod": the parent module clock +> ?- clock-names: Must contain the clock names described just above +> ? > +Optional properties for slave devices: > +- sun4i,spi-word-wait-ns: hardware based delay in nanoseconds between -> + transmission of words +> + ??transmission of words Should be 'allwinner,spi-word-wait-ns' @@ -20,13 +20,13 @@ Vendor prefix do come from: Documentation/devicetree/bindings/vendor-prefixes.txt > + -> Example: -> -> spi1: spi@01c06000 { -> @@ -21,4 +25,11 @@ spi1: spi@01c06000 { -> status = "disabled"; -> #address-cells = <1>; -> #size-cells = <0>; +> ?Example: +> ? +> ?spi1: spi at 01c06000 { +> @@ -21,4 +25,11 @@ spi1: spi at 01c06000 { +> ? status = "disabled"; +> ? #address-cells = <1>; +> ? #size-cells = <0>; > + > + spi1_0 { > + compatible = "example,dummy"; @@ -34,62 +34,57 @@ Documentation/devicetree/bindings/vendor-prefixes.txt > + spi-max-frequency = <1000000>; > + sun4i,spi-word-wait-ns = <12000>; > + }; -> }; +> ?}; > diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c > index f60a6d6..8cfd96c 100644 > --- a/drivers/spi/spi-sun4i.c > +++ b/drivers/spi/spi-sun4i.c > @@ -19,6 +19,7 @@ -> #include -> #include -> #include +> ?#include +> ?#include +> ?#include > +#include -> -> #include -> +> ? +> ?#include +> ? > @@ -173,6 +174,9 @@ static int sun4i_spi_transfer_one(struct spi_master *master, -> unsigned int tx_len = 0; -> int ret = 0; -> u32 reg; +> ? unsigned int tx_len = 0; +> ? int ret = 0; +> ? u32 reg; > + u32 wait_ns = 0; > + int wait_clk = 0; > + int clk_ns = 0; -> -> /* We don't support transfer larger than the FIFO */ -> if (tfr->len > SUN4I_FIFO_DEPTH) +> ? +> ? /* We don't support transfer larger than the FIFO */ +> ? if (tfr->len > SUN4I_FIFO_DEPTH) > @@ -261,6 +265,25 @@ static int sun4i_spi_transfer_one(struct spi_master *master, -> -> sun4i_spi_write(sspi, SUN4I_CLK_CTL_REG, reg); -> +> ? +> ? sun4i_spi_write(sspi, SUN4I_CLK_CTL_REG, reg); +> ? > + /* Setup wait time beteen words */ typo > + of_property_read_u32(spi->dev.of_node, "sun4i,spi-word-wait-ns", -> + &wait_ns); +> + ?????&wait_ns); > + if (wait_ns) { > + /* The wait time is set in SPI_CLK cycles. The SPI hardware -> + * needs 3 additional cycles to setup the wait counter, so -> + * the minimum delay time is 4 cycles. -> + */ +> + ?* needs 3 additional cycles to setup the wait counter, so +> + ?* the minimum delay time is 4 cycles. +> + ?*/ > + clk_ns = DIV_ROUND_UP(1000000000, tfr->speed_hz); > + wait_clk = DIV_ROUND_UP(wait_ns, clk_ns) - 3; > + if (wait_clk < 1) { > + wait_clk = 1; > + dev_info(&spi->dev, -> + "using minimum of 4 word wait cycles (%uns)", -> + 4 * clk_ns); +> + ?"using minimum of 4 word wait cycles (%uns)", +> + ?4 * clk_ns); > + } > + } > + sun4i_spi_write(sspi, SUN4I_WAIT_REG, (u16)wait_clk); > + -> /* Setup the transfer now... */ -> if (sspi->tx_buf) -> tx_len = tfr->len; -> -- +> ? /* Setup the transfer now... */ +> ? if (sspi->tx_buf) +> ? tx_len = tfr->len; +> --? > 1.9.1 -> - --- -You received this message because you are subscribed to the Google Groups "linux-sunxi" group. -To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org -For more options, visit https://groups.google.com/d/optout. +> diff --git a/a/content_digest b/N1/content_digest index fbda75f..bc7f21e 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,22 +1,8 @@ "ref\01449873940-10167-1-git-send-email-mweseloh42@gmail.com\0" - "ref\01449873940-10167-1-git-send-email-mweseloh42-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org\0" - "From\0Priit Laes <plaes-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>\0" - "Subject\0Re: [PATCH v2] spi: dts: sun4i: Add support for inter-word wait cycles using the SPI Wait Clock Register\0" + "From\0plaes@plaes.org (Priit Laes)\0" + "Subject\0[linux-sunxi] [PATCH v2] spi: dts: sun4i: Add support for inter-word wait cycles using the SPI Wait Clock Register\0" "Date\0Sat, 12 Dec 2015 11:19:40 +0200\0" - "To\0mweseloh42-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" - " linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org\0" - "Cc\0Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>" - Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org> - Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org> - Ian Campbell <ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org> - Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> - Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> - Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> - Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> - devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org - linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org - linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org - " linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "On Fri, 2015-12-11 at 23:45 +0100, Marcus Weseloh wrote:\n" @@ -28,12 +14,12 @@ "> --- a/Documentation/devicetree/bindings/spi/spi-sun4i.txt\n" "> +++ b/Documentation/devicetree/bindings/spi/spi-sun4i.txt\n" "> @@ -10,6 +10,10 @@ Required properties:\n" - "> \302\240\302\240\302\240- \"mod\": the parent module clock\n" - "> \302\240- clock-names: Must contain the clock names described just above\n" - "> \302\240\n" + "> ???- \"mod\": the parent module clock\n" + "> ?- clock-names: Must contain the clock names described just above\n" + "> ?\n" "> +Optional properties for slave devices:\n" "> +- sun4i,spi-word-wait-ns: hardware based delay in nanoseconds between\n" - "> +\t\t\t\302\240\302\240transmission of words\n" + "> +\t\t\t??transmission of words\n" "\n" "Should be 'allwinner,spi-word-wait-ns'\n" "\n" @@ -41,13 +27,13 @@ "Documentation/devicetree/bindings/vendor-prefixes.txt\n" "\n" "> +\n" - "> \302\240Example:\n" - "> \302\240\n" - "> \302\240spi1: spi@01c06000 {\n" - "> @@ -21,4 +25,11 @@ spi1: spi@01c06000 {\n" - "> \302\240\tstatus = \"disabled\";\n" - "> \302\240\t#address-cells = <1>;\n" - "> \302\240\t#size-cells = <0>;\n" + "> ?Example:\n" + "> ?\n" + "> ?spi1: spi at 01c06000 {\n" + "> @@ -21,4 +25,11 @@ spi1: spi at 01c06000 {\n" + "> ?\tstatus = \"disabled\";\n" + "> ?\t#address-cells = <1>;\n" + "> ?\t#size-cells = <0>;\n" "> +\n" "> +\tspi1_0 {\n" "> +\t\tcompatible = \"example,dummy\";\n" @@ -55,64 +41,59 @@ "> +\t\tspi-max-frequency = <1000000>;\n" "> +\t\tsun4i,spi-word-wait-ns = <12000>;\n" "> +\t};\n" - "> \302\240};\n" + "> ?};\n" "> diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c\n" "> index f60a6d6..8cfd96c 100644\n" "> --- a/drivers/spi/spi-sun4i.c\n" "> +++ b/drivers/spi/spi-sun4i.c\n" "> @@ -19,6 +19,7 @@\n" - "> \302\240#include \n" - "> \302\240#include \n" - "> \302\240#include \n" + "> ?#include \n" + "> ?#include \n" + "> ?#include \n" "> +#include \n" - "> \302\240\n" - "> \302\240#include \n" - "> \302\240\n" + "> ?\n" + "> ?#include \n" + "> ?\n" "> @@ -173,6 +174,9 @@ static int sun4i_spi_transfer_one(struct spi_master *master,\n" - "> \302\240\tunsigned int tx_len = 0;\n" - "> \302\240\tint ret = 0;\n" - "> \302\240\tu32 reg;\n" + "> ?\tunsigned int tx_len = 0;\n" + "> ?\tint ret = 0;\n" + "> ?\tu32 reg;\n" "> +\tu32 wait_ns = 0;\n" "> +\tint wait_clk = 0;\n" "> +\tint clk_ns = 0;\n" - "> \302\240\n" - "> \302\240\t/* We don't support transfer larger than the FIFO */\n" - "> \302\240\tif (tfr->len > SUN4I_FIFO_DEPTH)\n" + "> ?\n" + "> ?\t/* We don't support transfer larger than the FIFO */\n" + "> ?\tif (tfr->len > SUN4I_FIFO_DEPTH)\n" "> @@ -261,6 +265,25 @@ static int sun4i_spi_transfer_one(struct spi_master *master,\n" - "> \302\240\n" - "> \302\240\tsun4i_spi_write(sspi, SUN4I_CLK_CTL_REG, reg);\n" - "> \302\240\n" + "> ?\n" + "> ?\tsun4i_spi_write(sspi, SUN4I_CLK_CTL_REG, reg);\n" + "> ?\n" "> +\t/* Setup wait time beteen words */\n" "typo\n" "\n" "> +\tof_property_read_u32(spi->dev.of_node, \"sun4i,spi-word-wait-ns\",\n" - "> +\t\t\t\302\240\302\240\302\240\302\240\302\240&wait_ns);\n" + "> +\t\t\t?????&wait_ns);\n" "> +\tif (wait_ns) {\n" "> +\t\t/* The wait time is set in SPI_CLK cycles. The SPI hardware\n" - "> +\t\t\302\240* needs 3 additional cycles to setup the wait counter, so\n" - "> +\t\t\302\240* the minimum delay time is 4 cycles.\n" - "> +\t\t\302\240*/\n" + "> +\t\t?* needs 3 additional cycles to setup the wait counter, so\n" + "> +\t\t?* the minimum delay time is 4 cycles.\n" + "> +\t\t?*/\n" "> +\t\tclk_ns = DIV_ROUND_UP(1000000000, tfr->speed_hz);\n" "> +\t\twait_clk = DIV_ROUND_UP(wait_ns, clk_ns) - 3;\n" "> +\t\tif (wait_clk < 1) {\n" "> +\t\t\twait_clk = 1;\n" "> +\t\t\tdev_info(&spi->dev,\n" - "> +\t\t\t\t\302\240\"using minimum of 4 word wait cycles (%uns)\",\n" - "> +\t\t\t\t\302\2404 * clk_ns);\n" + "> +\t\t\t\t?\"using minimum of 4 word wait cycles (%uns)\",\n" + "> +\t\t\t\t?4 * clk_ns);\n" "> +\t\t}\n" "> +\t}\n" "> +\tsun4i_spi_write(sspi, SUN4I_WAIT_REG, (u16)wait_clk);\n" "> +\n" - "> \302\240\t/* Setup the transfer now... */\n" - "> \302\240\tif (sspi->tx_buf)\n" - "> \302\240\t\ttx_len = tfr->len;\n" - "> --\302\240\n" + "> ?\t/* Setup the transfer now... */\n" + "> ?\tif (sspi->tx_buf)\n" + "> ?\t\ttx_len = tfr->len;\n" + "> --?\n" "> 1.9.1\n" - "> \n" - "\n" - "-- \n" - "You received this message because you are subscribed to the Google Groups \"linux-sunxi\" group.\n" - "To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org\n" - For more options, visit https://groups.google.com/d/optout. + > -32b9b26be95190f996c37bc45666d3c6e5005b4f2f771021b133614fe31ddc96 +110e59217d76d23967073bfa0289a32348f5a134a26453dd4aecccba368fe071
diff --git a/a/1.txt b/N2/1.txt index 87e70f4..535f4df 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -87,9 +87,4 @@ typo > tx_len = tfr->len; > -- > 1.9.1 -> - --- -You received this message because you are subscribed to the Google Groups "linux-sunxi" group. -To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org -For more options, visit https://groups.google.com/d/optout. +> diff --git a/a/content_digest b/N2/content_digest index fbda75f..b6629e1 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -1,22 +1,21 @@ "ref\01449873940-10167-1-git-send-email-mweseloh42@gmail.com\0" - "ref\01449873940-10167-1-git-send-email-mweseloh42-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org\0" - "From\0Priit Laes <plaes-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>\0" - "Subject\0Re: [PATCH v2] spi: dts: sun4i: Add support for inter-word wait cycles using the SPI Wait Clock Register\0" + "From\0Priit Laes <plaes@plaes.org>\0" + "Subject\0Re: [linux-sunxi] [PATCH v2] spi: dts: sun4i: Add support for inter-word wait cycles using the SPI Wait Clock Register\0" "Date\0Sat, 12 Dec 2015 11:19:40 +0200\0" - "To\0mweseloh42-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" - " linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org\0" - "Cc\0Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>" - Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org> - Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org> - Ian Campbell <ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org> - Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org> - Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> - Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org> - Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> - devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org - linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org - linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org - " linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org\0" + "To\0mweseloh42@gmail.com" + " linux-sunxi@googlegroups.com\0" + "Cc\0Rob Herring <robh+dt@kernel.org>" + Pawel Moll <pawel.moll@arm.com> + Mark Rutland <mark.rutland@arm.com> + Ian Campbell <ijc+devicetree@hellion.org.uk> + Kumar Gala <galak@codeaurora.org> + Maxime Ripard <maxime.ripard@free-electrons.com> + Chen-Yu Tsai <wens@csie.org> + Mark Brown <broonie@kernel.org> + devicetree@vger.kernel.org + linux-arm-kernel@lists.infradead.org + linux-kernel@vger.kernel.org + " linux-spi@vger.kernel.org\0" "\00:1\0" "b\0" "On Fri, 2015-12-11 at 23:45 +0100, Marcus Weseloh wrote:\n" @@ -108,11 +107,6 @@ "> \302\240\t\ttx_len = tfr->len;\n" "> --\302\240\n" "> 1.9.1\n" - "> \n" - "\n" - "-- \n" - "You received this message because you are subscribed to the Google Groups \"linux-sunxi\" group.\n" - "To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org\n" - For more options, visit https://groups.google.com/d/optout. + > -32b9b26be95190f996c37bc45666d3c6e5005b4f2f771021b133614fe31ddc96 +361d34d1026b5ebee64c1ddb659574ec20a93286255bee516f365b0b50ebfc15
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.