All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] dt-bindings: Add dma-burst-sz property for spi-pxa2xx
@ 2019-02-26  9:24 ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-02-26  9:24 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, linux-arm-kernel, Mark Brown,
	linux-spi, Jarkko Nikula
  Cc: Andy Shevchenko

Add DMA burst size property to the SPI PXA2xx bindings.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 Documentation/devicetree/bindings/spi/spi-pxa2xx.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt b/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt
index e30e0c2a4bce..3b2e70ba7466 100644
--- a/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt
+++ b/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt
@@ -11,6 +11,7 @@ Required properties:
 Optional properties:
 - cs-gpios: list of GPIO chip selects. See the SPI bus bindings,
   Documentation/devicetree/bindings/spi/spi-bus.txt
+- dma-burst-sz: DMA burst size
 - spi-slave: Empty property indicating the SPI controller is used in slave mode.
 - ready-gpios: GPIO used to signal a SPI master that the FIFO is filled
   and we're ready to service a transfer. Only useful in slave mode.
-- 
2.20.1

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

* [PATCH v1 1/3] dt-bindings: Add dma-burst-sz property for spi-pxa2xx
@ 2019-02-26  9:24 ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-02-26  9:24 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, linux-arm-kernel, Mark Brown,
	linux-spi, Jarkko Nikula
  Cc: Andy Shevchenko

Add DMA burst size property to the SPI PXA2xx bindings.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 Documentation/devicetree/bindings/spi/spi-pxa2xx.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt b/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt
index e30e0c2a4bce..3b2e70ba7466 100644
--- a/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt
+++ b/Documentation/devicetree/bindings/spi/spi-pxa2xx.txt
@@ -11,6 +11,7 @@ Required properties:
 Optional properties:
 - cs-gpios: list of GPIO chip selects. See the SPI bus bindings,
   Documentation/devicetree/bindings/spi/spi-bus.txt
+- dma-burst-sz: DMA burst size
 - spi-slave: Empty property indicating the SPI controller is used in slave mode.
 - ready-gpios: GPIO used to signal a SPI master that the FIFO is filled
   and we're ready to service a transfer. Only useful in slave mode.
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
  2019-02-26  9:24 ` Andy Shevchenko
@ 2019-02-26  9:24   ` Andy Shevchenko
  -1 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-02-26  9:24 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, linux-arm-kernel, Mark Brown,
	linux-spi, Jarkko Nikula
  Cc: Andy Shevchenko

Some masters may have different DMA burst size than hard coded default.
In such case respect the value given by dma-burst-size property.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-pxa2xx-dma.c   | 4 +++-
 drivers/spi/spi-pxa2xx-pci.c   | 8 +++++++-
 drivers/spi/spi-pxa2xx.c       | 5 ++++-
 include/linux/spi/pxa2xx_spi.h | 1 +
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-pxa2xx-dma.c b/drivers/spi/spi-pxa2xx-dma.c
index 2fa7f4b43492..3343fff81c7b 100644
--- a/drivers/spi/spi-pxa2xx-dma.c
+++ b/drivers/spi/spi-pxa2xx-dma.c
@@ -239,13 +239,15 @@ int pxa2xx_spi_set_dma_burst_and_threshold(struct chip_data *chip,
 					   u32 *threshold)
 {
 	struct pxa2xx_spi_chip *chip_info = spi->controller_data;
+	struct driver_data *drv_data = spi_controller_get_devdata(spi->controller);
+	u32 dma_burst_size = drv_data->master_info->dma_burst_size;
 
 	/*
 	 * If the DMA burst size is given in chip_info we use that,
 	 * otherwise we use the default. Also we use the default FIFO
 	 * thresholds for now.
 	 */
-	*burst_code = chip_info ? chip_info->dma_burst_size : 1;
+	*burst_code = chip_info ? chip_info->dma_burst_size : dma_burst_size;
 	*threshold = SSCR1_RxTresh(RX_THRESH_DFLT)
 		   | SSCR1_TxTresh(TX_THRESH_DFLT);
 
diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
index d3de925892cb..1db1b64cfba8 100644
--- a/drivers/spi/spi-pxa2xx-pci.c
+++ b/drivers/spi/spi-pxa2xx-pci.c
@@ -5,9 +5,9 @@
  */
 #include <linux/clk-provider.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/spi/pxa2xx_spi.h>
 
 #include <linux/dmaengine.h>
@@ -200,6 +200,7 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
 	struct pxa2xx_spi_master spi_pdata;
 	struct ssp_device *ssp;
 	struct pxa_spi_info *c;
+	u32 dma_burst_sz;
 	char buf[40];
 
 	ret = pcim_enable_device(dev);
@@ -217,12 +218,17 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
 			return ret;
 	}
 
+	ret = device_property_read_u32(&dev->dev, "dma-burst-sz", &dma_burst_sz);
+	if (ret)
+		dma_burst_sz = 1;
+
 	memset(&spi_pdata, 0, sizeof(spi_pdata));
 	spi_pdata.num_chipselect = (c->num_chipselect > 0) ? c->num_chipselect : dev->devfn;
 	spi_pdata.dma_filter = c->dma_filter;
 	spi_pdata.tx_param = c->tx_param;
 	spi_pdata.rx_param = c->rx_param;
 	spi_pdata.enable_dma = c->rx_param && c->tx_param;
+	spi_pdata.dma_burst_size = dma_burst_sz;
 
 	ssp = &spi_pdata.ssp;
 	ssp->phys_base = pci_resource_start(dev, 0);
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 8dd67d722aae..393e020c757a 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/spi/pxa2xx_spi.h>
 #include <linux/spi/spi.h>
 #include <linux/delay.h>
@@ -1512,6 +1513,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
 	const struct acpi_device_id *adev_id = NULL;
 	const struct pci_device_id *pcidev_id = NULL;
 	const struct of_device_id *of_id = NULL;
+	struct device *dev = &pdev->dev;
 	enum pxa_ssp_type type;
 
 	adev = ACPI_COMPANION(&pdev->dev);
@@ -1566,9 +1568,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
 	ssp->pdev = pdev;
 	ssp->port_id = pxa2xx_spi_get_port_id(adev);
 
-	pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
+	pdata->is_slave = device_property_read_bool(dev, "spi-slave");
 	pdata->num_chipselect = 1;
 	pdata->enable_dma = true;
+	pdata->dma_burst_size = 1;
 
 	return pdata;
 }
diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h
index b0674e330ef6..154da8cd4781 100644
--- a/include/linux/spi/pxa2xx_spi.h
+++ b/include/linux/spi/pxa2xx_spi.h
@@ -25,6 +25,7 @@ struct dma_chan;
 struct pxa2xx_spi_master {
 	u16 num_chipselect;
 	u8 enable_dma;
+	u8 dma_burst_size;
 	bool is_slave;
 
 	/* DMA engine specific config */
-- 
2.20.1

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

* [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
@ 2019-02-26  9:24   ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-02-26  9:24 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, linux-arm-kernel, Mark Brown,
	linux-spi, Jarkko Nikula
  Cc: Andy Shevchenko

Some masters may have different DMA burst size than hard coded default.
In such case respect the value given by dma-burst-size property.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-pxa2xx-dma.c   | 4 +++-
 drivers/spi/spi-pxa2xx-pci.c   | 8 +++++++-
 drivers/spi/spi-pxa2xx.c       | 5 ++++-
 include/linux/spi/pxa2xx_spi.h | 1 +
 4 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-pxa2xx-dma.c b/drivers/spi/spi-pxa2xx-dma.c
index 2fa7f4b43492..3343fff81c7b 100644
--- a/drivers/spi/spi-pxa2xx-dma.c
+++ b/drivers/spi/spi-pxa2xx-dma.c
@@ -239,13 +239,15 @@ int pxa2xx_spi_set_dma_burst_and_threshold(struct chip_data *chip,
 					   u32 *threshold)
 {
 	struct pxa2xx_spi_chip *chip_info = spi->controller_data;
+	struct driver_data *drv_data = spi_controller_get_devdata(spi->controller);
+	u32 dma_burst_size = drv_data->master_info->dma_burst_size;
 
 	/*
 	 * If the DMA burst size is given in chip_info we use that,
 	 * otherwise we use the default. Also we use the default FIFO
 	 * thresholds for now.
 	 */
-	*burst_code = chip_info ? chip_info->dma_burst_size : 1;
+	*burst_code = chip_info ? chip_info->dma_burst_size : dma_burst_size;
 	*threshold = SSCR1_RxTresh(RX_THRESH_DFLT)
 		   | SSCR1_TxTresh(TX_THRESH_DFLT);
 
diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
index d3de925892cb..1db1b64cfba8 100644
--- a/drivers/spi/spi-pxa2xx-pci.c
+++ b/drivers/spi/spi-pxa2xx-pci.c
@@ -5,9 +5,9 @@
  */
 #include <linux/clk-provider.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/spi/pxa2xx_spi.h>
 
 #include <linux/dmaengine.h>
@@ -200,6 +200,7 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
 	struct pxa2xx_spi_master spi_pdata;
 	struct ssp_device *ssp;
 	struct pxa_spi_info *c;
+	u32 dma_burst_sz;
 	char buf[40];
 
 	ret = pcim_enable_device(dev);
@@ -217,12 +218,17 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
 			return ret;
 	}
 
+	ret = device_property_read_u32(&dev->dev, "dma-burst-sz", &dma_burst_sz);
+	if (ret)
+		dma_burst_sz = 1;
+
 	memset(&spi_pdata, 0, sizeof(spi_pdata));
 	spi_pdata.num_chipselect = (c->num_chipselect > 0) ? c->num_chipselect : dev->devfn;
 	spi_pdata.dma_filter = c->dma_filter;
 	spi_pdata.tx_param = c->tx_param;
 	spi_pdata.rx_param = c->rx_param;
 	spi_pdata.enable_dma = c->rx_param && c->tx_param;
+	spi_pdata.dma_burst_size = dma_burst_sz;
 
 	ssp = &spi_pdata.ssp;
 	ssp->phys_base = pci_resource_start(dev, 0);
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 8dd67d722aae..393e020c757a 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -24,6 +24,7 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/platform_device.h>
+#include <linux/property.h>
 #include <linux/spi/pxa2xx_spi.h>
 #include <linux/spi/spi.h>
 #include <linux/delay.h>
@@ -1512,6 +1513,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
 	const struct acpi_device_id *adev_id = NULL;
 	const struct pci_device_id *pcidev_id = NULL;
 	const struct of_device_id *of_id = NULL;
+	struct device *dev = &pdev->dev;
 	enum pxa_ssp_type type;
 
 	adev = ACPI_COMPANION(&pdev->dev);
@@ -1566,9 +1568,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
 	ssp->pdev = pdev;
 	ssp->port_id = pxa2xx_spi_get_port_id(adev);
 
-	pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
+	pdata->is_slave = device_property_read_bool(dev, "spi-slave");
 	pdata->num_chipselect = 1;
 	pdata->enable_dma = true;
+	pdata->dma_burst_size = 1;
 
 	return pdata;
 }
diff --git a/include/linux/spi/pxa2xx_spi.h b/include/linux/spi/pxa2xx_spi.h
index b0674e330ef6..154da8cd4781 100644
--- a/include/linux/spi/pxa2xx_spi.h
+++ b/include/linux/spi/pxa2xx_spi.h
@@ -25,6 +25,7 @@ struct dma_chan;
 struct pxa2xx_spi_master {
 	u16 num_chipselect;
 	u8 enable_dma;
+	u8 dma_burst_size;
 	bool is_slave;
 
 	/* DMA engine specific config */
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v1 3/3] spi: pxa2xx: Debug print DMA burst and threshold
  2019-02-26  9:24 ` Andy Shevchenko
@ 2019-02-26  9:24   ` Andy Shevchenko
  -1 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-02-26  9:24 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, linux-arm-kernel, Mark Brown,
	linux-spi, Jarkko Nikula
  Cc: Andy Shevchenko

It's useful during debug to see what DMA burst and threshold sizes are.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-pxa2xx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 393e020c757a..534460a29432 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1339,6 +1339,9 @@ static int setup(struct spi_device *spi)
 			dev_warn(&spi->dev,
 				 "in setup: DMA burst size reduced to match bits_per_word\n");
 		}
+		dev_dbg(&spi->dev,
+			"in setup: DMA burst and threshold set to %u, %u\n",
+			chip->dma_burst_size, chip->dma_threshold);
 	}
 
 	switch (drv_data->ssp_type) {
-- 
2.20.1

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

* [PATCH v1 3/3] spi: pxa2xx: Debug print DMA burst and threshold
@ 2019-02-26  9:24   ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-02-26  9:24 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland, devicetree, Daniel Mack,
	Haojian Zhuang, Robert Jarzmik, linux-arm-kernel, Mark Brown,
	linux-spi, Jarkko Nikula
  Cc: Andy Shevchenko

It's useful during debug to see what DMA burst and threshold sizes are.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-pxa2xx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c
index 393e020c757a..534460a29432 100644
--- a/drivers/spi/spi-pxa2xx.c
+++ b/drivers/spi/spi-pxa2xx.c
@@ -1339,6 +1339,9 @@ static int setup(struct spi_device *spi)
 			dev_warn(&spi->dev,
 				 "in setup: DMA burst size reduced to match bits_per_word\n");
 		}
+		dev_dbg(&spi->dev,
+			"in setup: DMA burst and threshold set to %u, %u\n",
+			chip->dma_burst_size, chip->dma_threshold);
 	}
 
 	switch (drv_data->ssp_type) {
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/3] dt-bindings: Add dma-burst-sz property for spi-pxa2xx
  2019-02-26  9:24 ` Andy Shevchenko
                   ` (2 preceding siblings ...)
  (?)
@ 2019-02-26 11:02 ` Mark Brown
  2019-02-26 11:33     ` Andy Shevchenko
  -1 siblings, 1 reply; 19+ messages in thread
From: Mark Brown @ 2019-02-26 11:02 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Mark Rutland, devicetree, Haojian Zhuang, linux-spi, Rob Herring,
	Jarkko Nikula, linux-arm-kernel, Robert Jarzmik, Daniel Mack


[-- Attachment #1.1: Type: text/plain, Size: 303 bytes --]

On Tue, Feb 26, 2019 at 12:24:39PM +0300, Andy Shevchenko wrote:
> Add DMA burst size property to the SPI PXA2xx bindings.

Shouldn't we be inferring this from the device specific compatible
string (or PCI identifier for x86)?  That way if there's other quirks
needed we don't need any binding changes.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 1/3] dt-bindings: Add dma-burst-sz property for spi-pxa2xx
  2019-02-26 11:02 ` [PATCH v1 1/3] dt-bindings: Add dma-burst-sz property for spi-pxa2xx Mark Brown
@ 2019-02-26 11:33     ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-02-26 11:33 UTC (permalink / raw)
  To: Mark Brown
  Cc: Mark Rutland, devicetree, Haojian Zhuang, linux-spi, Rob Herring,
	Jarkko Nikula, linux-arm-kernel, Robert Jarzmik, Daniel Mack

On Tue, Feb 26, 2019 at 11:02:38AM +0000, Mark Brown wrote:
> On Tue, Feb 26, 2019 at 12:24:39PM +0300, Andy Shevchenko wrote:
> > Add DMA burst size property to the SPI PXA2xx bindings.
> 
> Shouldn't we be inferring this from the device specific compatible
> string (or PCI identifier for x86)?  That way if there's other quirks
> needed we don't need any binding changes.

Hmm... Yes, we may use PCI ID for that.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v1 1/3] dt-bindings: Add dma-burst-sz property for spi-pxa2xx
@ 2019-02-26 11:33     ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-02-26 11:33 UTC (permalink / raw)
  To: Mark Brown
  Cc: Mark Rutland, devicetree, Haojian Zhuang, linux-spi, Rob Herring,
	Jarkko Nikula, linux-arm-kernel, Robert Jarzmik, Daniel Mack

On Tue, Feb 26, 2019 at 11:02:38AM +0000, Mark Brown wrote:
> On Tue, Feb 26, 2019 at 12:24:39PM +0300, Andy Shevchenko wrote:
> > Add DMA burst size property to the SPI PXA2xx bindings.
> 
> Shouldn't we be inferring this from the device specific compatible
> string (or PCI identifier for x86)?  That way if there's other quirks
> needed we don't need any binding changes.

Hmm... Yes, we may use PCI ID for that.

-- 
With Best Regards,
Andy Shevchenko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
  2019-02-26  9:24   ` Andy Shevchenko
@ 2019-02-26 11:46     ` Jarkko Nikula
  -1 siblings, 0 replies; 19+ messages in thread
From: Jarkko Nikula @ 2019-02-26 11:46 UTC (permalink / raw)
  To: Andy Shevchenko, Rob Herring, Mark Rutland, devicetree,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, linux-arm-kernel,
	Mark Brown, linux-spi

On 2/26/19 11:24 AM, Andy Shevchenko wrote:
> Some masters may have different DMA burst size than hard coded default.
> In such case respect the value given by dma-burst-size property.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>   drivers/spi/spi-pxa2xx-dma.c   | 4 +++-
>   drivers/spi/spi-pxa2xx-pci.c   | 8 +++++++-
>   drivers/spi/spi-pxa2xx.c       | 5 ++++-
>   include/linux/spi/pxa2xx_spi.h | 1 +
>   4 files changed, 15 insertions(+), 3 deletions(-)
...
> @@ -1566,9 +1568,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
>   	ssp->pdev = pdev;
>   	ssp->port_id = pxa2xx_spi_get_port_id(adev);
>   
> -	pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
> +	pdata->is_slave = device_property_read_bool(dev, "spi-slave");

Unrelated change. Not sure is it worth of its own patch.

-- 
Jarkko

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

* Re: [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
@ 2019-02-26 11:46     ` Jarkko Nikula
  0 siblings, 0 replies; 19+ messages in thread
From: Jarkko Nikula @ 2019-02-26 11:46 UTC (permalink / raw)
  To: Andy Shevchenko, Rob Herring, Mark Rutland, devicetree,
	Daniel Mack, Haojian Zhuang, Robert Jarzmik, linux-arm-kernel,
	Mark Brown, linux-spi

On 2/26/19 11:24 AM, Andy Shevchenko wrote:
> Some masters may have different DMA burst size than hard coded default.
> In such case respect the value given by dma-burst-size property.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>   drivers/spi/spi-pxa2xx-dma.c   | 4 +++-
>   drivers/spi/spi-pxa2xx-pci.c   | 8 +++++++-
>   drivers/spi/spi-pxa2xx.c       | 5 ++++-
>   include/linux/spi/pxa2xx_spi.h | 1 +
>   4 files changed, 15 insertions(+), 3 deletions(-)
...
> @@ -1566,9 +1568,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
>   	ssp->pdev = pdev;
>   	ssp->port_id = pxa2xx_spi_get_port_id(adev);
>   
> -	pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
> +	pdata->is_slave = device_property_read_bool(dev, "spi-slave");

Unrelated change. Not sure is it worth of its own patch.

-- 
Jarkko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
  2019-02-26 11:46     ` Jarkko Nikula
@ 2019-02-26 13:02       ` Andy Shevchenko
  -1 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-02-26 13:02 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: Mark Rutland, devicetree, Mark Brown, Haojian Zhuang, linux-spi,
	Rob Herring, linux-arm-kernel, Robert Jarzmik, Daniel Mack

On Tue, Feb 26, 2019 at 01:46:49PM +0200, Jarkko Nikula wrote:
> On 2/26/19 11:24 AM, Andy Shevchenko wrote:
> > Some masters may have different DMA burst size than hard coded default.
> > In such case respect the value given by dma-burst-size property.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >   drivers/spi/spi-pxa2xx-dma.c   | 4 +++-
> >   drivers/spi/spi-pxa2xx-pci.c   | 8 +++++++-
> >   drivers/spi/spi-pxa2xx.c       | 5 ++++-
> >   include/linux/spi/pxa2xx_spi.h | 1 +
> >   4 files changed, 15 insertions(+), 3 deletions(-)
> ...
> > @@ -1566,9 +1568,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
> >   	ssp->pdev = pdev;
> >   	ssp->port_id = pxa2xx_spi_get_port_id(adev);
> > -	pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
> > +	pdata->is_slave = device_property_read_bool(dev, "spi-slave");
> 
> Unrelated change. Not sure is it worth of its own patch.

Fixed in v2.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
@ 2019-02-26 13:02       ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-02-26 13:02 UTC (permalink / raw)
  To: Jarkko Nikula
  Cc: Mark Rutland, devicetree, Mark Brown, Haojian Zhuang, linux-spi,
	Rob Herring, linux-arm-kernel, Robert Jarzmik, Daniel Mack

On Tue, Feb 26, 2019 at 01:46:49PM +0200, Jarkko Nikula wrote:
> On 2/26/19 11:24 AM, Andy Shevchenko wrote:
> > Some masters may have different DMA burst size than hard coded default.
> > In such case respect the value given by dma-burst-size property.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >   drivers/spi/spi-pxa2xx-dma.c   | 4 +++-
> >   drivers/spi/spi-pxa2xx-pci.c   | 8 +++++++-
> >   drivers/spi/spi-pxa2xx.c       | 5 ++++-
> >   include/linux/spi/pxa2xx_spi.h | 1 +
> >   4 files changed, 15 insertions(+), 3 deletions(-)
> ...
> > @@ -1566,9 +1568,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
> >   	ssp->pdev = pdev;
> >   	ssp->port_id = pxa2xx_spi_get_port_id(adev);
> > -	pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
> > +	pdata->is_slave = device_property_read_bool(dev, "spi-slave");
> 
> Unrelated change. Not sure is it worth of its own patch.

Fixed in v2.

-- 
With Best Regards,
Andy Shevchenko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
  2019-02-26  9:24   ` Andy Shevchenko
@ 2019-03-07 19:24     ` Robert Jarzmik
  -1 siblings, 0 replies; 19+ messages in thread
From: Robert Jarzmik @ 2019-03-07 19:24 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Mark Rutland, devicetree, Mark Brown, Haojian Zhuang, linux-spi,
	Rob Herring, Jarkko Nikula, linux-arm-kernel, Daniel Mack

Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> @@ -1512,6 +1513,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
>  	const struct acpi_device_id *adev_id = NULL;
>  	const struct pci_device_id *pcidev_id = NULL;
>  	const struct of_device_id *of_id = NULL;
> +	struct device *dev = &pdev->dev;
>  	enum pxa_ssp_type type;
>  
>  	adev = ACPI_COMPANION(&pdev->dev);
> @@ -1566,9 +1568,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
>  	ssp->pdev = pdev;
>  	ssp->port_id = pxa2xx_spi_get_port_id(adev);
>  
> -	pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
> +	pdata->is_slave = device_property_read_bool(dev, "spi-slave");
Isn't this an unrelated change to the introduction of dma-burst-sz ?

Other than this :
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

-- 
Robert

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

* Re: [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
@ 2019-03-07 19:24     ` Robert Jarzmik
  0 siblings, 0 replies; 19+ messages in thread
From: Robert Jarzmik @ 2019-03-07 19:24 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Mark Rutland, devicetree, Mark Brown, Haojian Zhuang, linux-spi,
	Rob Herring, Jarkko Nikula, linux-arm-kernel, Daniel Mack

Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:

> @@ -1512,6 +1513,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
>  	const struct acpi_device_id *adev_id = NULL;
>  	const struct pci_device_id *pcidev_id = NULL;
>  	const struct of_device_id *of_id = NULL;
> +	struct device *dev = &pdev->dev;
>  	enum pxa_ssp_type type;
>  
>  	adev = ACPI_COMPANION(&pdev->dev);
> @@ -1566,9 +1568,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
>  	ssp->pdev = pdev;
>  	ssp->port_id = pxa2xx_spi_get_port_id(adev);
>  
> -	pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
> +	pdata->is_slave = device_property_read_bool(dev, "spi-slave");
Isn't this an unrelated change to the introduction of dma-burst-sz ?

Other than this :
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

-- 
Robert

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
  2019-03-07 19:24     ` Robert Jarzmik
@ 2019-03-08  7:07       ` Andy Shevchenko
  -1 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-03-08  7:07 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Mark Rutland, devicetree, Mark Brown, Haojian Zhuang, linux-spi,
	Rob Herring, Jarkko Nikula, linux-arm Mailing List,
	Andy Shevchenko, Daniel Mack

On Thu, Mar 7, 2019 at 9:25 PM Robert Jarzmik <robert.jarzmik@free.fr> wrote:
>
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
>
> > @@ -1512,6 +1513,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
> >       const struct acpi_device_id *adev_id = NULL;
> >       const struct pci_device_id *pcidev_id = NULL;
> >       const struct of_device_id *of_id = NULL;
> > +     struct device *dev = &pdev->dev;
> >       enum pxa_ssp_type type;
> >
> >       adev = ACPI_COMPANION(&pdev->dev);
> > @@ -1566,9 +1568,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
> >       ssp->pdev = pdev;
> >       ssp->port_id = pxa2xx_spi_get_port_id(adev);
> >
> > -     pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
> > +     pdata->is_slave = device_property_read_bool(dev, "spi-slave");
> Isn't this an unrelated change to the introduction of dma-burst-sz ?

Yes, Jarkko did same comment.
It's fixed in v2 which was sent several days ago.

> Other than this :
> Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>

Thanks!
Does it applies to v2?

>
> Cheers.
>
> --
> Robert



-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
@ 2019-03-08  7:07       ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-03-08  7:07 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Mark Rutland, devicetree, Mark Brown, Haojian Zhuang, linux-spi,
	Rob Herring, Jarkko Nikula, linux-arm Mailing List,
	Andy Shevchenko, Daniel Mack

On Thu, Mar 7, 2019 at 9:25 PM Robert Jarzmik <robert.jarzmik@free.fr> wrote:
>
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> writes:
>
> > @@ -1512,6 +1513,7 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
> >       const struct acpi_device_id *adev_id = NULL;
> >       const struct pci_device_id *pcidev_id = NULL;
> >       const struct of_device_id *of_id = NULL;
> > +     struct device *dev = &pdev->dev;
> >       enum pxa_ssp_type type;
> >
> >       adev = ACPI_COMPANION(&pdev->dev);
> > @@ -1566,9 +1568,10 @@ pxa2xx_spi_init_pdata(struct platform_device *pdev)
> >       ssp->pdev = pdev;
> >       ssp->port_id = pxa2xx_spi_get_port_id(adev);
> >
> > -     pdata->is_slave = of_property_read_bool(pdev->dev.of_node, "spi-slave");
> > +     pdata->is_slave = device_property_read_bool(dev, "spi-slave");
> Isn't this an unrelated change to the introduction of dma-burst-sz ?

Yes, Jarkko did same comment.
It's fixed in v2 which was sent several days ago.

> Other than this :
> Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>

Thanks!
Does it applies to v2?

>
> Cheers.
>
> --
> Robert



-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
  2019-03-08  7:07       ` Andy Shevchenko
@ 2019-03-08  7:08         ` Andy Shevchenko
  -1 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-03-08  7:08 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Mark Rutland, devicetree, Mark Brown, Haojian Zhuang, linux-spi,
	Rob Herring, Jarkko Nikula, linux-arm Mailing List,
	Andy Shevchenko, Daniel Mack

On Fri, Mar 8, 2019 at 9:07 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Thu, Mar 7, 2019 at 9:25 PM Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> > Other than this :
> > Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
>
> Thanks!
> Does it applies to v2?

https://www.spinics.net/lists/arm-kernel/msg710155.html

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support
@ 2019-03-08  7:08         ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-03-08  7:08 UTC (permalink / raw)
  To: Robert Jarzmik
  Cc: Mark Rutland, devicetree, Mark Brown, Haojian Zhuang, linux-spi,
	Rob Herring, Jarkko Nikula, linux-arm Mailing List,
	Andy Shevchenko, Daniel Mack

On Fri, Mar 8, 2019 at 9:07 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Thu, Mar 7, 2019 at 9:25 PM Robert Jarzmik <robert.jarzmik@free.fr> wrote:

> > Other than this :
> > Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>
>
> Thanks!
> Does it applies to v2?

https://www.spinics.net/lists/arm-kernel/msg710155.html

-- 
With Best Regards,
Andy Shevchenko

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-03-08  7:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-26  9:24 [PATCH v1 1/3] dt-bindings: Add dma-burst-sz property for spi-pxa2xx Andy Shevchenko
2019-02-26  9:24 ` Andy Shevchenko
2019-02-26  9:24 ` [PATCH v1 2/3] spi: pxa2xx: Introduce dma-burst-sz property support Andy Shevchenko
2019-02-26  9:24   ` Andy Shevchenko
2019-02-26 11:46   ` Jarkko Nikula
2019-02-26 11:46     ` Jarkko Nikula
2019-02-26 13:02     ` Andy Shevchenko
2019-02-26 13:02       ` Andy Shevchenko
2019-03-07 19:24   ` Robert Jarzmik
2019-03-07 19:24     ` Robert Jarzmik
2019-03-08  7:07     ` Andy Shevchenko
2019-03-08  7:07       ` Andy Shevchenko
2019-03-08  7:08       ` Andy Shevchenko
2019-03-08  7:08         ` Andy Shevchenko
2019-02-26  9:24 ` [PATCH v1 3/3] spi: pxa2xx: Debug print DMA burst and threshold Andy Shevchenko
2019-02-26  9:24   ` Andy Shevchenko
2019-02-26 11:02 ` [PATCH v1 1/3] dt-bindings: Add dma-burst-sz property for spi-pxa2xx Mark Brown
2019-02-26 11:33   ` Andy Shevchenko
2019-02-26 11:33     ` Andy Shevchenko

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.