linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Jarkko Nikula
	<jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Applied "spi: pxa2xx: Remove cr0 variable from struct chip_data" to the spi tree
Date: Thu, 17 Sep 2015 18:37:04 +0100	[thread overview]
Message-ID: <E1Zcd7I-0006TZ-CD@finisterre> (raw)
In-Reply-To: <1442323588-29642-16-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

The patch

   spi: pxa2xx: Remove cr0 variable from struct chip_data

has been applied to the spi tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From b69d42b5c44bcfc1c73fe185d4644487f1bd3193 Mon Sep 17 00:00:00 2001
From: Jarkko Nikula <jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Date: Tue, 15 Sep 2015 16:26:28 +0300
Subject: [PATCH] spi: pxa2xx: Remove cr0 variable from struct chip_data

There hasn't been need to carry chip->cr0 after SPI core started to
validate speed_hz and bits_per_word transfer parameters. That effectively
caused that pump_transfers() always recalculated it and practically
chip->cr0 is used locally in setup() for debug prints only.

Signed-off-by: Jarkko Nikula <jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/spi/spi-pxa2xx.c | 10 ++++------
 drivers/spi/spi-pxa2xx.h |  1 -
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index ebafd53..a25bc1d 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1101,6 +1101,7 @@ static int setup(struct spi_device *spi)
 	struct driver_data *drv_data = spi_master_get_devdata(spi->master);
 	unsigned int clk_div;
 	uint tx_thres, tx_hi_thres, rx_thres;
+	u32 cr0;
 
 	switch (drv_data->ssp_type) {
 	case QUARK_X1000_SSP:
@@ -1193,8 +1194,6 @@ static int setup(struct spi_device *spi)
 
 	clk_div = pxa2xx_ssp_get_clk_div(drv_data, chip, spi->max_speed_hz);
 
-	chip->cr0 = pxa2xx_configure_sscr0(drv_data, clk_div,
-					   spi->bits_per_word);
 	switch (drv_data->ssp_type) {
 	case QUARK_X1000_SSP:
 		chip->threshold = (QUARK_X1000_SSCR1_RxTresh(rx_thres)
@@ -1216,15 +1215,16 @@ static int setup(struct spi_device *spi)
 		chip->cr1 |= SSCR1_LBM;
 
 	/* NOTE:  PXA25x_SSP _could_ use external clocking ... */
+	cr0 = pxa2xx_configure_sscr0(drv_data, clk_div, spi->bits_per_word);
 	if (!pxa25x_ssp_comp(drv_data))
 		dev_dbg(&spi->dev, "%ld Hz actual, %s\n",
 			drv_data->max_clk_rate
-				/ (1 + ((chip->cr0 & SSCR0_SCR(0xfff)) >> 8)),
+				/ (1 + ((cr0 & SSCR0_SCR(0xfff)) >> 8)),
 			chip->enable_dma ? "DMA" : "PIO");
 	else
 		dev_dbg(&spi->dev, "%ld Hz actual, %s\n",
 			drv_data->max_clk_rate / 2
-				/ (1 + ((chip->cr0 & SSCR0_SCR(0x0ff)) >> 8)),
+				/ (1 + ((cr0 & SSCR0_SCR(0x0ff)) >> 8)),
 			chip->enable_dma ? "DMA" : "PIO");
 
 	if (spi->bits_per_word <= 8) {
@@ -1236,8 +1236,6 @@ static int setup(struct spi_device *spi)
 		chip->read = u16_reader;
 		chip->write = u16_writer;
 	} else if (spi->bits_per_word <= 32) {
-		if (!is_quark_x1000_ssp(drv_data))
-			chip->cr0 |= SSCR0_EDSS;
 		chip->n_bytes = 4;
 		chip->read = u32_reader;
 		chip->write = u32_writer;
diff --git a/drivers/spi/spi-pxa2xx.h b/drivers/spi/spi-pxa2xx.h
index 0875e98..b91bda2 100644
--- a/drivers/spi/spi-pxa2xx.h
+++ b/drivers/spi/spi-pxa2xx.h
@@ -86,7 +86,6 @@ struct driver_data {
 };
 
 struct chip_data {
-	u32 cr0;
 	u32 cr1;
 	u32 dds_rate;
 	u32 psp;
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-09-17 17:37 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-15 13:26 [PATCH 01/16] spi: txx9: Use transfer speed unconditionally Jarkko Nikula
     [not found] ` <1442323588-29642-1-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-15 13:26   ` [PATCH 02/16] spi: s3c64xx: " Jarkko Nikula
     [not found]     ` <1442323588-29642-2-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-16 20:02       ` Applied "spi: s3c64xx: Use transfer speed unconditionally" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 03/16] spi: octeon: Use transfer speed unconditionally Jarkko Nikula
     [not found]     ` <1442323588-29642-3-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-16 20:02       ` Applied "spi: octeon: Use transfer speed unconditionally" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 04/16] spi: bfin-sport: Calculate transfer speed unconditionally Jarkko Nikula
     [not found]     ` <1442323588-29642-4-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-16 20:02       ` Applied "spi: bfin-sport: Calculate transfer speed unconditionally" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 05/16] spi: spi-bfin5xx: Calculate transfer speed unconditionally Jarkko Nikula
     [not found]     ` <1442323588-29642-5-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-16 20:02       ` Applied "spi: spi-bfin5xx: Calculate transfer speed unconditionally" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 06/16] spi: au1550: Simplify au1550_spi_setupxfer() Jarkko Nikula
     [not found]     ` <1442323588-29642-6-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-16 20:02       ` Applied "spi: au1550: Simplify au1550_spi_setupxfer()" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 07/16] spi: mpc512x: Call mpc512x_psc_spi_transfer_setup() unconditionally Jarkko Nikula
     [not found]     ` <1442323588-29642-7-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-17 17:37       ` Applied "spi: mpc512x: Call mpc512x_psc_spi_transfer_setup() unconditionally" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 08/16] spi: omap-uwire: Remove needless bits_per_word and speed_hz tests Jarkko Nikula
     [not found]     ` <1442323588-29642-8-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-17 17:37       ` Applied "spi: omap-uwire: Remove needless bits_per_word and speed_hz tests" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 09/16] spi: omap-100k: Rely on validations done by spi core Jarkko Nikula
     [not found]     ` <1442323588-29642-9-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-17 17:37       ` Applied "spi: omap-100k: Rely on validations done by spi core" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 10/16] spi: atmel: Remove needless bits_per_word and speed_hz tests Jarkko Nikula
     [not found]     ` <1442323588-29642-10-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-15 13:54       ` Nicolas Ferre
2015-09-25 18:09       ` Applied "spi: atmel: Remove needless bits_per_word and speed_hz tests" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 11/16] spi: dw: Remove needless if statements Jarkko Nikula
     [not found]     ` <1442323588-29642-11-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-17 17:37       ` Applied "spi: dw: Remove needless if statements" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 12/16] spi: dw: Remove test for non-zero spi->max_speed_hz Jarkko Nikula
     [not found]     ` <1442323588-29642-12-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-17 17:37       ` Applied "spi: dw: Remove test for non-zero spi->max_speed_hz" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 13/16] spi: spi-fsl-dspi: Remove duplicated register write Jarkko Nikula
     [not found]     ` <1442323588-29642-13-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-17 17:37       ` Applied "spi: spi-fsl-dspi: Remove duplicated register write" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 14/16] spi: pxa2xx: Remove two variables from struct chip_data Jarkko Nikula
     [not found]     ` <1442323588-29642-14-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-17 17:37       ` Applied "spi: pxa2xx: Remove two variables from struct chip_data" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 15/16] spi: pxa2xx: Remove if statement that is always true in pump_transfers() Jarkko Nikula
     [not found]     ` <1442323588-29642-15-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-17 17:37       ` Applied "spi: pxa2xx: Remove if statement that is always true in pump_transfers()" to the spi tree Mark Brown
2015-09-15 13:26   ` [PATCH 16/16] spi: pxa2xx: Remove cr0 variable from struct chip_data Jarkko Nikula
     [not found]     ` <1442323588-29642-16-git-send-email-jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2015-09-17 17:37       ` Mark Brown [this message]
2015-09-16 19:52   ` [PATCH 01/16] spi: txx9: Use transfer speed unconditionally Mark Brown
2015-09-16 20:02   ` Applied "spi: txx9: Use transfer speed unconditionally" to the spi tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Zcd7I-0006TZ-CD@finisterre \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=jarkko.nikula-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).