diff for duplicates of <20150511201633.GA31117@deathray> diff --git a/a/1.txt b/N1/1.txt index 100f229..06c65a8 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -94,3 +94,10 @@ If it does, I will send it upstream. > -- > Regards, > Nishanth Menon +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: omap-mcspi.patch +Type: text/x-diff +Size: 2909 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150511/b4b4d9fb/attachment.bin> diff --git a/a/2.hdr b/a/2.hdr deleted file mode 100644 index 6e01f20..0000000 --- a/a/2.hdr +++ /dev/null @@ -1,2 +0,0 @@ -Content-Type: text/x-diff; charset=us-ascii -Content-Disposition: attachment; filename="omap-mcspi.patch" diff --git a/a/2.txt b/a/2.txt deleted file mode 100644 index 4d198b8..0000000 --- a/a/2.txt +++ /dev/null @@ -1,96 +0,0 @@ -GPIO chip select patch series appears to have broken the native chip select -support. This patch pulls the manual native chip select toggling out of -the transfer_one routine and adds a set_cs routine. - -Tested natively on AM3354 with SPI serial flash on spi0cs0. - -Signed-off-by: Michael Welling <mwelling@ieee.org> ---- - drivers/spi/spi-omap2-mcspi.c | 33 +++++++++++---------------------- - 1 file changed, 11 insertions(+), 22 deletions(-) - -diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c -index 90cf7e7..a7d85c5 100644 ---- a/drivers/spi/spi-omap2-mcspi.c -+++ b/drivers/spi/spi-omap2-mcspi.c -@@ -243,17 +243,20 @@ static void omap2_mcspi_set_enable(const struct spi_device *spi, int enable) - mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHCTRL0); - } - --static void omap2_mcspi_force_cs(struct spi_device *spi, int cs_active) -+static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable) - { - u32 l; - -- l = mcspi_cached_chconf0(spi); -- if (cs_active) -- l |= OMAP2_MCSPI_CHCONF_FORCE; -- else -- l &= ~OMAP2_MCSPI_CHCONF_FORCE; -+ if (spi->controller_state) { -+ l = mcspi_cached_chconf0(spi); - -- mcspi_write_chconf0(spi, l); -+ if (enable) -+ l &= ~OMAP2_MCSPI_CHCONF_FORCE; -+ else -+ l |= OMAP2_MCSPI_CHCONF_FORCE; -+ -+ mcspi_write_chconf0(spi, l); -+ } - } - - static void omap2_mcspi_set_master_mode(struct spi_master *master) -@@ -1075,7 +1078,6 @@ static int omap2_mcspi_work_one(struct omap2_mcspi *mcspi, - - struct spi_master *master; - struct omap2_mcspi_dma *mcspi_dma; -- int cs_active = 0; - struct omap2_mcspi_cs *cs; - struct omap2_mcspi_device_config *cd; - int par_override = 0; -@@ -1118,11 +1120,6 @@ static int omap2_mcspi_work_one(struct omap2_mcspi *mcspi, - mcspi_read_cs_reg(spi, OMAP2_MCSPI_MODULCTRL); - } - -- if (!cs_active) { -- omap2_mcspi_force_cs(spi, 1); -- cs_active = 1; -- } -- - chconf = mcspi_cached_chconf0(spi); - chconf &= ~OMAP2_MCSPI_CHCONF_TRM_MASK; - chconf &= ~OMAP2_MCSPI_CHCONF_TURBO; -@@ -1169,12 +1166,6 @@ static int omap2_mcspi_work_one(struct omap2_mcspi *mcspi, - if (t->delay_usecs) - udelay(t->delay_usecs); - -- /* ignore the "leave it on after last xfer" hint */ -- if (t->cs_change) { -- omap2_mcspi_force_cs(spi, 0); -- cs_active = 0; -- } -- - omap2_mcspi_set_enable(spi, 0); - - if (mcspi->fifo_depth > 0) -@@ -1187,9 +1178,6 @@ out: - status = omap2_mcspi_setup_transfer(spi, NULL); - } - -- if (cs_active) -- omap2_mcspi_force_cs(spi, 0); -- - if (cd && cd->cs_per_word) { - chconf = mcspi->ctx.modulctrl; - chconf |= OMAP2_MCSPI_MODULCTRL_SINGLE; -@@ -1334,6 +1322,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev) - master->setup = omap2_mcspi_setup; - master->auto_runtime_pm = true; - master->transfer_one = omap2_mcspi_transfer_one; -+ master->set_cs = omap2_mcspi_set_cs; - master->cleanup = omap2_mcspi_cleanup; - master->dev.of_node = node; - master->max_speed_hz = OMAP2_MCSPI_MAX_FREQ; --- -1.7.9.5 diff --git a/a/content_digest b/N1/content_digest index 48d95ab..587a695 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -3,16 +3,11 @@ "ref\05550F47C.1030902@ti.com\0" "ref\020150511183032.GA8085@deathray\0" "ref\05550FC38.6020801@ti.com\0" - "From\0Michael Welling <mwelling@ieee.org>\0" - "Subject\0Re: next-20150511 / omap2-mcspi: regression for sdp4430 boot\0" + "From\0mwelling@ieee.org (Michael Welling)\0" + "Subject\0next-20150511 / omap2-mcspi: regression for sdp4430 boot\0" "Date\0Mon, 11 May 2015 15:16:33 -0500\0" - "To\0Nishanth Menon <nm@ti.com>\0" - "Cc\0Mark Brown <broonie@kernel.org>" - linux-omap <linux-omap@vger.kernel.org> - linux-arm-kernel@lists.infradead.org <linux-arm-kernel@lists.infradead.org> - linux-next <linux-next@vger.kernel.org> - " linux-spi@vger.kernel.org\0" - "\01:1\0" + "To\0linux-arm-kernel@lists.infradead.org\0" + "\00:1\0" "b\0" "On Mon, May 11, 2015 at 02:00:08PM -0500, Nishanth Menon wrote:\n" "> On 05/11/2015 01:30 PM, Michael Welling wrote:\n" @@ -109,105 +104,13 @@ "> \n" "> -- \n" "> Regards,\n" - > Nishanth Menon - "\01:2\0" - "fn\0omap-mcspi.patch\0" - "b\0" - "GPIO chip select patch series appears to have broken the native chip select\n" - "support. This patch pulls the manual native chip select toggling out of\n" - "the transfer_one routine and adds a set_cs routine.\n" - "\n" - "Tested natively on AM3354 with SPI serial flash on spi0cs0.\n" - "\n" - "Signed-off-by: Michael Welling <mwelling@ieee.org>\n" - "---\n" - " drivers/spi/spi-omap2-mcspi.c | 33 +++++++++++----------------------\n" - " 1 file changed, 11 insertions(+), 22 deletions(-)\n" - "\n" - "diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c\n" - "index 90cf7e7..a7d85c5 100644\n" - "--- a/drivers/spi/spi-omap2-mcspi.c\n" - "+++ b/drivers/spi/spi-omap2-mcspi.c\n" - "@@ -243,17 +243,20 @@ static void omap2_mcspi_set_enable(const struct spi_device *spi, int enable)\n" - " \tmcspi_read_cs_reg(spi, OMAP2_MCSPI_CHCTRL0);\n" - " }\n" - " \n" - "-static void omap2_mcspi_force_cs(struct spi_device *spi, int cs_active)\n" - "+static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)\n" - " {\n" - " \tu32 l;\n" - " \n" - "-\tl = mcspi_cached_chconf0(spi);\n" - "-\tif (cs_active)\n" - "-\t\tl |= OMAP2_MCSPI_CHCONF_FORCE;\n" - "-\telse\n" - "-\t\tl &= ~OMAP2_MCSPI_CHCONF_FORCE;\n" - "+\tif (spi->controller_state) {\n" - "+\t\tl = mcspi_cached_chconf0(spi);\n" - " \n" - "-\tmcspi_write_chconf0(spi, l);\n" - "+\t\tif (enable)\n" - "+\t\t\tl &= ~OMAP2_MCSPI_CHCONF_FORCE;\n" - "+\t\telse\n" - "+\t\t\tl |= OMAP2_MCSPI_CHCONF_FORCE;\n" - "+\n" - "+\t\tmcspi_write_chconf0(spi, l);\n" - "+\t}\n" - " }\n" - " \n" - " static void omap2_mcspi_set_master_mode(struct spi_master *master)\n" - "@@ -1075,7 +1078,6 @@ static int omap2_mcspi_work_one(struct omap2_mcspi *mcspi,\n" - " \n" - " \tstruct spi_master\t\t*master;\n" - " \tstruct omap2_mcspi_dma\t\t*mcspi_dma;\n" - "-\tint\t\t\t\tcs_active = 0;\n" - " \tstruct omap2_mcspi_cs\t\t*cs;\n" - " \tstruct omap2_mcspi_device_config *cd;\n" - " \tint\t\t\t\tpar_override = 0;\n" - "@@ -1118,11 +1120,6 @@ static int omap2_mcspi_work_one(struct omap2_mcspi *mcspi,\n" - " \t\t\tmcspi_read_cs_reg(spi, OMAP2_MCSPI_MODULCTRL);\n" - " \t}\n" - " \n" - "-\tif (!cs_active) {\n" - "-\t\tomap2_mcspi_force_cs(spi, 1);\n" - "-\t\tcs_active = 1;\n" - "-\t}\n" - "-\n" - " \tchconf = mcspi_cached_chconf0(spi);\n" - " \tchconf &= ~OMAP2_MCSPI_CHCONF_TRM_MASK;\n" - " \tchconf &= ~OMAP2_MCSPI_CHCONF_TURBO;\n" - "@@ -1169,12 +1166,6 @@ static int omap2_mcspi_work_one(struct omap2_mcspi *mcspi,\n" - " \tif (t->delay_usecs)\n" - " \t\tudelay(t->delay_usecs);\n" - " \n" - "-\t/* ignore the \"leave it on after last xfer\" hint */\n" - "-\tif (t->cs_change) {\n" - "-\t\tomap2_mcspi_force_cs(spi, 0);\n" - "-\t\tcs_active = 0;\n" - "-\t}\n" - "-\n" - " \tomap2_mcspi_set_enable(spi, 0);\n" - " \n" - " \tif (mcspi->fifo_depth > 0)\n" - "@@ -1187,9 +1178,6 @@ out:\n" - " \t\tstatus = omap2_mcspi_setup_transfer(spi, NULL);\n" - " \t}\n" - " \n" - "-\tif (cs_active)\n" - "-\t\tomap2_mcspi_force_cs(spi, 0);\n" - "-\n" - " \tif (cd && cd->cs_per_word) {\n" - " \t\tchconf = mcspi->ctx.modulctrl;\n" - " \t\tchconf |= OMAP2_MCSPI_MODULCTRL_SINGLE;\n" - "@@ -1334,6 +1322,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev)\n" - " \tmaster->setup = omap2_mcspi_setup;\n" - " \tmaster->auto_runtime_pm = true;\n" - " \tmaster->transfer_one = omap2_mcspi_transfer_one;\n" - "+\tmaster->set_cs = omap2_mcspi_set_cs;\n" - " \tmaster->cleanup = omap2_mcspi_cleanup;\n" - " \tmaster->dev.of_node = node;\n" - " \tmaster->max_speed_hz = OMAP2_MCSPI_MAX_FREQ;\n" - "-- \n" - 1.7.9.5 + "> Nishanth Menon\n" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: omap-mcspi.patch\n" + "Type: text/x-diff\n" + "Size: 2909 bytes\n" + "Desc: not available\n" + URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150511/b4b4d9fb/attachment.bin> -9c97549f2508817567077308a2a179ceec34d3b927ceadb0e7643125ca38b5f9 +5fe2071198a7be426e0d0babcef1c67917c54378aa6edf2d0a154ca8379dbc9c
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.