* [PATCH 00/31] ARM: tegra: use common reset and DMA bindings @ 2013-11-15 20:53 Stephen Warren [not found] ` <1384548866-13141-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> ` (3 more replies) 0 siblings, 4 replies; 15+ messages in thread From: Stephen Warren @ 2013-11-15 20:53 UTC (permalink / raw) To: swarren Cc: Mark Rutland, alsa-devel, linux-usb, Wolfram Sang, David Airlie, linux-pci, dri-devel, Marc Dietrich, linux-tegra, linux-i2c, ac100, devel, Stephen Warren, Alan Stern, linux-serial, linux-input, Terje Bergström, devicetree, Pawel Moll, Ian Campbell, Julian Andres Klode, Rob Herring, Mark Brown, Bjorn Helgaas, Mike Turquette From: Stephen Warren <swarren@nvidia.com> This series implements a common reset framework driver for Tegra, and updates all relevant Tegra drivers to use it. It also removes the custom DMA bindings and replaced them with the standard DMA DT bindings. Historically, the Tegra clock driver has exported a custom API for module reset. This series removes that API, and transitions DT and drivers to the new reset framework. The custom API used a "struct clk" to identify which module to reset, and consequently some DT bindings and drivers required clocks to be provided where they really needed just a reset identifier instead. Due to this known deficiency, I have always considered most Tegra bindings to be unstable. This series removes this excuse for instability, although I still consider some Tegra bindings unstable due to the need to convert to the common DMA bindings. Historically, Tegra DMA channels have been represented in DT using a custom nvidia,dma-request-selector property. Now that standard DMA DT bindings exist, convert all Tegra bindings, DTs, and drivers to use the standard instead. This series makes a DT-ABI-incompatible change to: - Require reset specifiers in DT where relevant. - Require standard DMA specifiers. - Remove clock specifiers from DT where they were only needed for reset. - Remove legacy DMA specifier properties. I anticipate merging this whole series into the Tegra and arm-soc trees as its own branch, due to internal dependencies. This branch will be stable and can then be merged into any other subsystem trees should any conflicts arise. This series depends on Peter's Tegra clock driver rework, available at git://nv-tegra.nvidia.com/user/pdeschrijver/linux tegra-clk-tegra124-0 (or whatever version of that gets included in 3.14) Cc: ac100@lists.launchpad.net Cc: Alan Stern <stern@rowland.harvard.edu> Cc: alsa-devel@alsa-project.org Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: David Airlie <airlied@linux.ie> Cc: devel@driverdev.osuosl.org Cc: devicetree@vger.kernel.org Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Dmitry Torokhov <dtor@mail.ru> Cc: dri-devel@lists.freedesktop.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Julian Andres Klode <jak@jak-linux.org> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: linux-arm-kernel@lists.infradead.org Cc: linux-i2c@vger.kernel.org Cc: linux-input@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: linux-serial@vger.kernel.org Cc: linux-spi@vger.kernel.org Cc: linux-tegra@vger.kernel.org Cc: linux-usb@vger.kernel.org Cc: Marc Dietrich <marvin24@gmx.de> Cc: Mark Brown <broonie@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mike Turquette <mturquette@linaro.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: pdeschrijver@nvidia.com Cc: Rob Herring <rob.herring@calxeda.com> Cc: Terje Bergström <tbergstrom@nvidia.com> Cc: treding@nvidia.com Cc: Wolfram Sang <wsa@the-dreams.de> Stephen Warren (31): ARM: tegra: add missing clock documentation to DT bindings ARM: tegra: document reset properties in DT bindings ARM: tegra: document use of standard DMA DT bindings ARM: tegra: update DT files to add reset properties ARM: tegra: update DT files to add DMA properties ARM: tegra: select the reset framework clk: tegra: implement a reset driver pci: tegra: use reset framework drm/tegra: use reset framework ARM: tegra: pass reset to tegra_powergate_sequence_power_up() dma: add channel request API that supports deferred probe dma: tegra: use reset framework dma: tegra: register as an OF DMA controller ASoC: dmaengine: support deferred probe for DMA channels ASoC: dmaengine: add custom DMA config to snd_dmaengine_pcm_config ASoC: tegra: use reset framework ASoC: tegra: call pm_runtime APIs around register accesses ASoC: tegra: allocate AHUB FIFO during probe() not startup() ASoC: tegra: convert to standard DMA DT bindings i2c: tegra: use reset framework staging: nvec: use reset framework spi: tegra: use reset framework spi: tegra: convert to standard DMA DT bindings serial: tegra: use reset framework serial: tegra: convert to standard DMA DT bindings Input: tegra-kbc - use reset framework USB: EHCI: tegra: use reset framework ARM: tegra: remove legacy clock entries from DT ARM: tegra: remove legacy DMA entries from DT clk: tegra: remove legacy reset APIs clk: tegra: remove bogus PCIE_XCLK .../bindings/arm/tegra/nvidia,tegra20-pmc.txt | 1 + .../bindings/clock/nvidia,tegra114-car.txt | 4 + .../bindings/clock/nvidia,tegra124-car.txt | 4 + .../bindings/clock/nvidia,tegra20-car.txt | 4 + .../bindings/clock/nvidia,tegra30-car.txt | 4 + .../devicetree/bindings/dma/tegra20-apbdma.txt | 9 ++ .../bindings/gpu/nvidia,tegra20-host1x.txt | 124 +++++++++++++++ .../devicetree/bindings/i2c/nvidia,tegra20-i2c.txt | 27 +++- .../bindings/input/nvidia,tegra20-kbc.txt | 9 ++ .../bindings/mmc/nvidia,tegra20-sdhci.txt | 9 ++ .../devicetree/bindings/nvec/nvidia,nvec.txt | 12 ++ .../bindings/pci/nvidia,tegra20-pcie.txt | 28 ++-- .../devicetree/bindings/pwm/nvidia,tegra20-pwm.txt | 9 ++ .../devicetree/bindings/rtc/nvidia,tegra20-rtc.txt | 3 + .../bindings/serial/nvidia,tegra20-hsuart.txt | 19 ++- .../bindings/sound/nvidia,tegra-audio-alc5632.txt | 7 +- .../bindings/sound/nvidia,tegra-audio-rt5640.txt | 7 +- .../bindings/sound/nvidia,tegra-audio-wm8753.txt | 7 +- .../bindings/sound/nvidia,tegra-audio-wm8903.txt | 7 +- .../bindings/sound/nvidia,tegra-audio-wm9712.txt | 7 +- .../bindings/sound/nvidia,tegra20-ac97.txt | 20 ++- .../bindings/sound/nvidia,tegra20-i2s.txt | 19 ++- .../bindings/sound/nvidia,tegra30-ahub.txt | 54 +++++-- .../bindings/sound/nvidia,tegra30-i2s.txt | 11 +- .../bindings/spi/nvidia,tegra114-spi.txt | 24 ++- .../bindings/spi/nvidia,tegra20-sflash.txt | 20 ++- .../bindings/spi/nvidia,tegra20-slink.txt | 20 ++- .../bindings/timer/nvidia,tegra20-timer.txt | 3 + .../bindings/timer/nvidia,tegra30-timer.txt | 3 + .../bindings/usb/nvidia,tegra20-ehci.txt | 7 +- arch/arm/boot/dts/tegra114.dtsi | 142 ++++++++++++++--- arch/arm/boot/dts/tegra20-paz00.dts | 2 + arch/arm/boot/dts/tegra20.dtsi | 132 ++++++++++++++-- arch/arm/boot/dts/tegra30.dtsi | 171 +++++++++++++++++---- arch/arm/mach-tegra/Kconfig | 2 + arch/arm/mach-tegra/powergate.c | 8 +- drivers/clk/tegra/clk-periph-gate.c | 22 --- drivers/clk/tegra/clk-periph.c | 40 ----- drivers/clk/tegra/clk-tegra114.c | 3 +- drivers/clk/tegra/clk-tegra124.c | 2 +- drivers/clk/tegra/clk-tegra20.c | 9 +- drivers/clk/tegra/clk-tegra30.c | 10 +- drivers/clk/tegra/clk.c | 55 ++++++- drivers/clk/tegra/clk.h | 3 +- drivers/dma/acpi-dma.c | 12 +- drivers/dma/dmaengine.c | 44 +++++- drivers/dma/of-dma.c | 12 +- drivers/dma/tegra20-apb-dma.c | 49 +++++- drivers/gpu/drm/tegra/Kconfig | 1 + drivers/gpu/drm/tegra/dc.c | 9 +- drivers/gpu/drm/tegra/drm.h | 3 + drivers/gpu/drm/tegra/gr3d.c | 22 ++- drivers/gpu/drm/tegra/hdmi.c | 14 +- drivers/i2c/busses/i2c-tegra.c | 13 +- drivers/input/keyboard/tegra-kbc.c | 13 +- drivers/pci/host/pci-tegra.c | 52 +++++-- drivers/spi/Kconfig | 3 + drivers/spi/spi-tegra114.c | 66 ++++---- drivers/spi/spi-tegra20-sflash.c | 18 ++- drivers/spi/spi-tegra20-slink.c | 66 ++++---- drivers/staging/nvec/nvec.c | 11 +- drivers/staging/nvec/nvec.h | 5 +- drivers/tty/serial/serial-tegra.c | 86 +++++------ drivers/usb/host/ehci-tegra.c | 14 +- include/dt-bindings/clock/tegra20-car.h | 2 +- include/dt-bindings/clock/tegra30-car.h | 2 +- include/linux/clk/tegra.h | 7 - include/linux/dmaengine.h | 7 + include/linux/of_dma.h | 9 +- include/linux/tegra-powergate.h | 4 +- include/sound/dmaengine_pcm.h | 6 + sound/soc/soc-generic-dmaengine-pcm.c | 82 +++++++--- sound/soc/tegra/Kconfig | 2 + sound/soc/tegra/tegra20_ac97.c | 11 -- sound/soc/tegra/tegra20_i2s.c | 20 +-- sound/soc/tegra/tegra30_ahub.c | 125 +++++++++------ sound/soc/tegra/tegra30_ahub.h | 11 +- sound/soc/tegra/tegra30_i2s.c | 97 ++++++------ sound/soc/tegra/tegra30_i2s.h | 3 + sound/soc/tegra/tegra_pcm.c | 17 +- sound/soc/tegra/tegra_pcm.h | 5 + 81 files changed, 1448 insertions(+), 558 deletions(-) -- 1.8.1.5 _______________________________________________ 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] 15+ messages in thread
[parent not found: <1384548866-13141-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* [PATCH 22/31] spi: tegra: use reset framework [not found] ` <1384548866-13141-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2013-11-15 20:54 ` Stephen Warren 2013-11-16 10:07 ` Mark Brown [not found] ` <1384548866-13141-23-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2013-11-15 20:54 ` [PATCH 23/31] spi: tegra: convert to standard DMA DT bindings Stephen Warren 1 sibling, 2 replies; 15+ messages in thread From: Stephen Warren @ 2013-11-15 20:54 UTC (permalink / raw) To: swarren-3lzwWm7+Weoh9ZMKESR00Q Cc: Stephen Warren, treding-DDmLM1+adcrQT0dZR+AlfA, pdeschrijver-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Tegra's clock driver now provides an implementation of the common reset API (include/linux/reset.h). Use this instead of the old Tegra- specific API; that will soon be removed. Cc: treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org Cc: pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- This patch is part of a series with strong internal depdendencies. I'm looking for an ack so that I can take the entire series through the Tegra and arm-soc trees. The series will be part of a stable branch that can be merged into other subsystems if needed to avoid/resolve dependencies. --- drivers/spi/Kconfig | 3 +++ drivers/spi/spi-tegra114.c | 18 +++++++++++++----- drivers/spi/spi-tegra20-sflash.c | 18 +++++++++++++----- drivers/spi/spi-tegra20-slink.c | 18 +++++++++++++----- 4 files changed, 42 insertions(+), 15 deletions(-) diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index eb1f1ef5fa2e..9fc66e83c1a7 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -448,6 +448,7 @@ config SPI_MXS config SPI_TEGRA114 tristate "NVIDIA Tegra114 SPI Controller" depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST + depends on RESET_CONTROLLER help SPI driver for NVIDIA Tegra114 SPI Controller interface. This controller is different than the older SoCs SPI controller and also register interface @@ -456,6 +457,7 @@ config SPI_TEGRA114 config SPI_TEGRA20_SFLASH tristate "Nvidia Tegra20 Serial flash Controller" depends on ARCH_TEGRA || COMPILE_TEST + depends on RESET_CONTROLLER help SPI driver for Nvidia Tegra20 Serial flash Controller interface. The main usecase of this controller is to use spi flash as boot @@ -464,6 +466,7 @@ config SPI_TEGRA20_SFLASH config SPI_TEGRA20_SLINK tristate "Nvidia Tegra20/Tegra30 SLINK Controller" depends on (ARCH_TEGRA && TEGRA20_APB_DMA) || COMPILE_TEST + depends on RESET_CONTROLLER help SPI driver for Nvidia Tegra20/Tegra30 SLINK Controller interface. diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index aaecfb3ebf58..f62e6e5e90e3 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -17,7 +17,6 @@ */ #include <linux/clk.h> -#include <linux/clk/tegra.h> #include <linux/completion.h> #include <linux/delay.h> #include <linux/dmaengine.h> @@ -34,6 +33,7 @@ #include <linux/pm_runtime.h> #include <linux/of.h> #include <linux/of_device.h> +#include <linux/reset.h> #include <linux/spi/spi.h> #define SPI_COMMAND1 0x000 @@ -174,6 +174,7 @@ struct tegra_spi_data { spinlock_t lock; struct clk *clk; + struct reset_control *rst; void __iomem *base; phys_addr_t phys; unsigned irq; @@ -918,9 +919,9 @@ static irqreturn_t handle_cpu_based_xfer(struct tegra_spi_data *tspi) tspi->status_reg); dev_err(tspi->dev, "CpuXfer 0x%08x:0x%08x\n", tspi->command1_reg, tspi->dma_control_reg); - tegra_periph_reset_assert(tspi->clk); + reset_control_assert(tspi->rst); udelay(2); - tegra_periph_reset_deassert(tspi->clk); + reset_control_deassert(tspi->rst); complete(&tspi->xfer_completion); goto exit; } @@ -990,9 +991,9 @@ static irqreturn_t handle_dma_based_xfer(struct tegra_spi_data *tspi) tspi->status_reg); dev_err(tspi->dev, "DmaXfer 0x%08x:0x%08x\n", tspi->command1_reg, tspi->dma_control_reg); - tegra_periph_reset_assert(tspi->clk); + reset_control_assert(tspi->rst); udelay(2); - tegra_periph_reset_deassert(tspi->clk); + reset_control_deassert(tspi->rst); complete(&tspi->xfer_completion); spin_unlock_irqrestore(&tspi->lock, flags); return IRQ_HANDLED; @@ -1127,6 +1128,13 @@ static int tegra_spi_probe(struct platform_device *pdev) goto exit_free_irq; } + tspi->rst = devm_reset_control_get(&pdev->dev, "spi"); + if (IS_ERR(tspi->rst)) { + dev_err(&pdev->dev, "can not get reset\n"); + ret = PTR_ERR(tspi->rst); + goto exit_free_irq; + } + tspi->max_buf_size = SPI_FIFO_DEPTH << 2; tspi->dma_buf_size = DEFAULT_SPI_DMA_BUF_LEN; diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index 4dc8e8129459..e6f382b33818 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c @@ -32,8 +32,8 @@ #include <linux/pm_runtime.h> #include <linux/of.h> #include <linux/of_device.h> +#include <linux/reset.h> #include <linux/spi/spi.h> -#include <linux/clk/tegra.h> #define SPI_COMMAND 0x000 #define SPI_GO BIT(30) @@ -118,6 +118,7 @@ struct tegra_sflash_data { spinlock_t lock; struct clk *clk; + struct reset_control *rst; void __iomem *base; unsigned irq; u32 spi_max_frequency; @@ -389,9 +390,9 @@ static irqreturn_t handle_cpu_based_xfer(struct tegra_sflash_data *tsd) dev_err(tsd->dev, "CpuXfer 0x%08x:0x%08x\n", tsd->command_reg, tsd->dma_control_reg); - tegra_periph_reset_assert(tsd->clk); + reset_control_assert(tsd->rst); udelay(2); - tegra_periph_reset_deassert(tsd->clk); + reset_control_deassert(tsd->rst); complete(&tsd->xfer_completion); goto exit; } @@ -505,6 +506,13 @@ static int tegra_sflash_probe(struct platform_device *pdev) goto exit_free_irq; } + tsd->rst = devm_reset_control_get(&pdev->dev, "spi"); + if (IS_ERR(tsd->rst)) { + dev_err(&pdev->dev, "can not get reset\n"); + ret = PTR_ERR(tsd->rst); + goto exit_free_irq; + } + init_completion(&tsd->xfer_completion); pm_runtime_enable(&pdev->dev); if (!pm_runtime_enabled(&pdev->dev)) { @@ -520,9 +528,9 @@ static int tegra_sflash_probe(struct platform_device *pdev) } /* Reset controller */ - tegra_periph_reset_assert(tsd->clk); + reset_control_assert(tsd->rst); udelay(2); - tegra_periph_reset_deassert(tsd->clk); + reset_control_deassert(tsd->rst); tsd->def_command_reg = SPI_M_S | SPI_CS_SW; tegra_sflash_writel(tsd, tsd->def_command_reg, SPI_COMMAND); diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index e66715ba37ed..1305b8f933ba 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -33,8 +33,8 @@ #include <linux/pm_runtime.h> #include <linux/of.h> #include <linux/of_device.h> +#include <linux/reset.h> #include <linux/spi/spi.h> -#include <linux/clk/tegra.h> #define SLINK_COMMAND 0x000 #define SLINK_BIT_LENGTH(x) (((x) & 0x1f) << 0) @@ -167,6 +167,7 @@ struct tegra_slink_data { spinlock_t lock; struct clk *clk; + struct reset_control *rst; void __iomem *base; phys_addr_t phys; unsigned irq; @@ -884,9 +885,9 @@ static irqreturn_t handle_cpu_based_xfer(struct tegra_slink_data *tspi) dev_err(tspi->dev, "CpuXfer 0x%08x:0x%08x:0x%08x\n", tspi->command_reg, tspi->command2_reg, tspi->dma_control_reg); - tegra_periph_reset_assert(tspi->clk); + reset_control_assert(tspi->rst); udelay(2); - tegra_periph_reset_deassert(tspi->clk); + reset_control_deassert(tspi->rst); complete(&tspi->xfer_completion); goto exit; } @@ -957,9 +958,9 @@ static irqreturn_t handle_dma_based_xfer(struct tegra_slink_data *tspi) dev_err(tspi->dev, "DmaXfer 0x%08x:0x%08x:0x%08x\n", tspi->command_reg, tspi->command2_reg, tspi->dma_control_reg); - tegra_periph_reset_assert(tspi->clk); + reset_control_assert(tspi->rst); udelay(2); - tegra_periph_reset_deassert(tspi->clk); + reset_control_assert(tspi->rst); complete(&tspi->xfer_completion); spin_unlock_irqrestore(&tspi->lock, flags); return IRQ_HANDLED; @@ -1118,6 +1119,13 @@ static int tegra_slink_probe(struct platform_device *pdev) goto exit_free_irq; } + tspi->rst = devm_reset_control_get(&pdev->dev, "spi"); + if (IS_ERR(tspi->rst)) { + dev_err(&pdev->dev, "can not get reset\n"); + ret = PTR_ERR(tspi->rst); + goto exit_free_irq; + } + tspi->max_buf_size = SLINK_FIFO_DEPTH << 2; tspi->dma_buf_size = DEFAULT_SPI_DMA_BUF_LEN; -- 1.8.1.5 -- 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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 22/31] spi: tegra: use reset framework 2013-11-15 20:54 ` [PATCH 22/31] spi: tegra: use reset framework Stephen Warren @ 2013-11-16 10:07 ` Mark Brown [not found] ` <1384548866-13141-23-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 1 sibling, 0 replies; 15+ messages in thread From: Mark Brown @ 2013-11-16 10:07 UTC (permalink / raw) To: Stephen Warren Cc: Stephen Warren, pdeschrijver, linux-spi, linux-tegra, treding, linux-arm-kernel [-- Attachment #1.1: Type: text/plain, Size: 345 bytes --] On Fri, Nov 15, 2013 at 01:54:17PM -0700, Stephen Warren wrote: > From: Stephen Warren <swarren@nvidia.com> > > Tegra's clock driver now provides an implementation of the common > reset API (include/linux/reset.h). Use this instead of the old Tegra- > specific API; that will soon be removed. Acked-by: Mark Brown <broonie@linaro.org> [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 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] 15+ messages in thread
[parent not found: <1384548866-13141-23-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [PATCH 22/31] spi: tegra: use reset framework [not found] ` <1384548866-13141-23-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2013-11-29 14:48 ` Thierry Reding 0 siblings, 0 replies; 15+ messages in thread From: Thierry Reding @ 2013-11-29 14:48 UTC (permalink / raw) To: Stephen Warren Cc: Stephen Warren, treding-DDmLM1+adcrQT0dZR+AlfA, pdeschrijver-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 1469 bytes --] On Fri, Nov 15, 2013 at 01:54:17PM -0700, Stephen Warren wrote: > From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > > Tegra's clock driver now provides an implementation of the common > reset API (include/linux/reset.h). Use this instead of the old Tegra- > specific API; that will soon be removed. > > Cc: treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org > Cc: pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org > Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> > Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > --- > This patch is part of a series with strong internal depdendencies. I'm > looking for an ack so that I can take the entire series through the Tegra > and arm-soc trees. The series will be part of a stable branch that can be > merged into other subsystems if needed to avoid/resolve dependencies. > --- > drivers/spi/Kconfig | 3 +++ > drivers/spi/spi-tegra114.c | 18 +++++++++++++----- > drivers/spi/spi-tegra20-sflash.c | 18 +++++++++++++----- > drivers/spi/spi-tegra20-slink.c | 18 +++++++++++++----- > 4 files changed, 42 insertions(+), 15 deletions(-) Reviewed-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 23/31] spi: tegra: convert to standard DMA DT bindings [not found] ` <1384548866-13141-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2013-11-15 20:54 ` [PATCH 22/31] spi: tegra: use reset framework Stephen Warren @ 2013-11-15 20:54 ` Stephen Warren [not found] ` <1384548866-13141-24-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 1 sibling, 1 reply; 15+ messages in thread From: Stephen Warren @ 2013-11-15 20:54 UTC (permalink / raw) To: swarren-3lzwWm7+Weoh9ZMKESR00Q Cc: Stephen Warren, treding-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Brown, linux-spi-u79uwXL29TY76Z2rM5mHXA From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> By using dma_request_slave_channel_or_err(), the DMA slave ID can be looked up from standard DT properties, and squirrelled away during channel allocation. Hence, there's no need to use a custom DT property to store the slave ID. Cc: treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- This patch is part of a series with strong internal depdendencies. I'm looking for an ack so that I can take the entire series through the Tegra and arm-soc trees. The series will be part of a stable branch that can be merged into other subsystems if needed to avoid/resolve dependencies. --- drivers/spi/spi-tegra114.c | 48 +++++++++++++++-------------------------- drivers/spi/spi-tegra20-slink.c | 48 +++++++++++++++-------------------------- 2 files changed, 34 insertions(+), 62 deletions(-) diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index f62e6e5e90e3..42b553b72f04 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c @@ -178,7 +178,6 @@ struct tegra_spi_data { void __iomem *base; phys_addr_t phys; unsigned irq; - int dma_req_sel; u32 spi_max_frequency; u32 cur_speed; @@ -601,15 +600,15 @@ static int tegra_spi_init_dma_param(struct tegra_spi_data *tspi, dma_addr_t dma_phys; int ret; struct dma_slave_config dma_sconfig; - dma_cap_mask_t mask; - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - dma_chan = dma_request_channel(mask, NULL, NULL); - if (!dma_chan) { - dev_err(tspi->dev, - "Dma channel is not available, will try later\n"); - return -EPROBE_DEFER; + dma_chan = dma_request_slave_channel_or_err(tspi->dev, + dma_to_memory ? "rx" : "tx"); + if (IS_ERR(dma_chan)) { + ret = PTR_ERR(dma_chan); + if (ret != -EPROBE_DEFER) + dev_err(tspi->dev, + "Dma channel is not available: %d\n", ret); + return ret; } dma_buf = dma_alloc_coherent(tspi->dev, tspi->dma_buf_size, @@ -620,7 +619,6 @@ static int tegra_spi_init_dma_param(struct tegra_spi_data *tspi, return -ENOMEM; } - dma_sconfig.slave_id = tspi->dma_req_sel; if (dma_to_memory) { dma_sconfig.src_addr = tspi->phys + SPI_RX_FIFO; dma_sconfig.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; @@ -1055,11 +1053,6 @@ static void tegra_spi_parse_dt(struct platform_device *pdev, struct tegra_spi_data *tspi) { struct device_node *np = pdev->dev.of_node; - u32 of_dma[2]; - - if (of_property_read_u32_array(np, "nvidia,dma-request-selector", - of_dma, 2) >= 0) - tspi->dma_req_sel = of_dma[1]; if (of_property_read_u32(np, "spi-max-frequency", &tspi->spi_max_frequency)) @@ -1138,22 +1131,15 @@ static int tegra_spi_probe(struct platform_device *pdev) tspi->max_buf_size = SPI_FIFO_DEPTH << 2; tspi->dma_buf_size = DEFAULT_SPI_DMA_BUF_LEN; - if (tspi->dma_req_sel) { - ret = tegra_spi_init_dma_param(tspi, true); - if (ret < 0) { - dev_err(&pdev->dev, "RxDma Init failed, err %d\n", ret); - goto exit_free_irq; - } - - ret = tegra_spi_init_dma_param(tspi, false); - if (ret < 0) { - dev_err(&pdev->dev, "TxDma Init failed, err %d\n", ret); - goto exit_rx_dma_free; - } - tspi->max_buf_size = tspi->dma_buf_size; - init_completion(&tspi->tx_dma_complete); - init_completion(&tspi->rx_dma_complete); - } + ret = tegra_spi_init_dma_param(tspi, true); + if (ret < 0) + goto exit_free_irq; + ret = tegra_spi_init_dma_param(tspi, false); + if (ret < 0) + goto exit_rx_dma_free; + tspi->max_buf_size = tspi->dma_buf_size; + init_completion(&tspi->tx_dma_complete); + init_completion(&tspi->rx_dma_complete); init_completion(&tspi->xfer_completion); diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index 1305b8f933ba..dd6f26c05947 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -171,7 +171,6 @@ struct tegra_slink_data { void __iomem *base; phys_addr_t phys; unsigned irq; - int dma_req_sel; u32 spi_max_frequency; u32 cur_speed; @@ -630,15 +629,15 @@ static int tegra_slink_init_dma_param(struct tegra_slink_data *tspi, dma_addr_t dma_phys; int ret; struct dma_slave_config dma_sconfig; - dma_cap_mask_t mask; - dma_cap_zero(mask); - dma_cap_set(DMA_SLAVE, mask); - dma_chan = dma_request_channel(mask, NULL, NULL); - if (!dma_chan) { - dev_err(tspi->dev, - "Dma channel is not available, will try later\n"); - return -EPROBE_DEFER; + dma_chan = dma_request_slave_channel(tspi->dev, + dma_to_memory ? "rx" : "tx"); + if (IS_ERR(dma_chan)) { + ret = PTR_ERR(dma_chan); + if (ret != -EPROBE_DEFER) + dev_err(tspi->dev, + "Dma channel is not available: %d\n", ret); + return ret; } dma_buf = dma_alloc_coherent(tspi->dev, tspi->dma_buf_size, @@ -649,7 +648,6 @@ static int tegra_slink_init_dma_param(struct tegra_slink_data *tspi, return -ENOMEM; } - dma_sconfig.slave_id = tspi->dma_req_sel; if (dma_to_memory) { dma_sconfig.src_addr = tspi->phys + SLINK_RX_FIFO; dma_sconfig.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES; @@ -1021,11 +1019,6 @@ static irqreturn_t tegra_slink_isr(int irq, void *context_data) static void tegra_slink_parse_dt(struct tegra_slink_data *tspi) { struct device_node *np = tspi->dev->of_node; - u32 of_dma[2]; - - if (of_property_read_u32_array(np, "nvidia,dma-request-selector", - of_dma, 2) >= 0) - tspi->dma_req_sel = of_dma[1]; if (of_property_read_u32(np, "spi-max-frequency", &tspi->spi_max_frequency)) @@ -1129,22 +1122,15 @@ static int tegra_slink_probe(struct platform_device *pdev) tspi->max_buf_size = SLINK_FIFO_DEPTH << 2; tspi->dma_buf_size = DEFAULT_SPI_DMA_BUF_LEN; - if (tspi->dma_req_sel) { - ret = tegra_slink_init_dma_param(tspi, true); - if (ret < 0) { - dev_err(&pdev->dev, "RxDma Init failed, err %d\n", ret); - goto exit_free_irq; - } - - ret = tegra_slink_init_dma_param(tspi, false); - if (ret < 0) { - dev_err(&pdev->dev, "TxDma Init failed, err %d\n", ret); - goto exit_rx_dma_free; - } - tspi->max_buf_size = tspi->dma_buf_size; - init_completion(&tspi->tx_dma_complete); - init_completion(&tspi->rx_dma_complete); - } + ret = tegra_slink_init_dma_param(tspi, true); + if (ret < 0) + goto exit_free_irq; + ret = tegra_slink_init_dma_param(tspi, false); + if (ret < 0) + goto exit_rx_dma_free; + tspi->max_buf_size = tspi->dma_buf_size; + init_completion(&tspi->tx_dma_complete); + init_completion(&tspi->rx_dma_complete); init_completion(&tspi->xfer_completion); -- 1.8.1.5 -- 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 ^ permalink raw reply related [flat|nested] 15+ messages in thread
[parent not found: <1384548866-13141-24-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [PATCH 23/31] spi: tegra: convert to standard DMA DT bindings [not found] ` <1384548866-13141-24-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2013-11-16 10:14 ` Mark Brown [not found] ` <20131116101422.GK15393-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 0 siblings, 1 reply; 15+ messages in thread From: Mark Brown @ 2013-11-16 10:14 UTC (permalink / raw) To: Stephen Warren Cc: Stephen Warren, treding-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-spi-u79uwXL29TY76Z2rM5mHXA [-- Attachment #1: Type: text/plain, Size: 706 bytes --] On Fri, Nov 15, 2013 at 01:54:18PM -0700, Stephen Warren wrote: > From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > > By using dma_request_slave_channel_or_err(), the DMA slave ID can be Acked-by: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> Is this function introduced earlier in the series? One of the things I'm looking at is trying to factor out some DMA code in the SPI framework so perhaps using this straight off would be good. But perhaps the channel request stuff will all be in the drivers and it'll just pass a handle to the framework code so there'll be no issue. Acked-by: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <20131116101422.GK15393-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>]
* Re: [PATCH 23/31] spi: tegra: convert to standard DMA DT bindings [not found] ` <20131116101422.GK15393-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> @ 2013-11-18 17:30 ` Stephen Warren 2013-11-18 18:41 ` Mark Brown 0 siblings, 1 reply; 15+ messages in thread From: Stephen Warren @ 2013-11-18 17:30 UTC (permalink / raw) To: Mark Brown Cc: Stephen Warren, treding-DDmLM1+adcrQT0dZR+AlfA, linux-tegra-u79uwXL29TY76Z2rM5mHXA, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-spi-u79uwXL29TY76Z2rM5mHXA On 11/16/2013 03:14 AM, Mark Brown wrote: > On Fri, Nov 15, 2013 at 01:54:18PM -0700, Stephen Warren wrote: >> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> >> >> By using dma_request_slave_channel_or_err(), the DMA slave ID can be > > Acked-by: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> > > Is this function introduced earlier in the series? Yes, patch 11/31 introduced this. > One of the things > I'm looking at is trying to factor out some DMA code in the SPI > framework so perhaps using this straight off would be good. But perhaps > the channel request stuff will all be in the drivers and it'll just pass > a handle to the framework code so there'll be no issue. I think I can make a "core changes" branch that contains: [PATCH 11/31] dma: add channel request API that supports deferred probe [PATCH 14/31] ASoC: dmaengine: support deferred probe for DMA channels [PATCH 15/31] ASoC: dmaengine: add custom DMA config to snd_dmaengine_pcm_config That could be merged into relevant subsystems alone, if they only depend on the core changes and not any of the Tegra driver changes. However, I suspect that the Tegra driver changes may need to be merged into any subsystem that's doing much other work on the Tegra drivers, especially any significant refactoring, so the subsystem would probably have to pick up the whole series anyway. Still, I'll make sure I re-order the branch to put the core changes first so we have as much flexibility as possible. -- 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 ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 23/31] spi: tegra: convert to standard DMA DT bindings 2013-11-18 17:30 ` Stephen Warren @ 2013-11-18 18:41 ` Mark Brown 0 siblings, 0 replies; 15+ messages in thread From: Mark Brown @ 2013-11-18 18:41 UTC (permalink / raw) To: Stephen Warren Cc: linux-tegra, treding, Stephen Warren, linux-arm-kernel, linux-spi [-- Attachment #1.1: Type: text/plain, Size: 680 bytes --] On Mon, Nov 18, 2013 at 10:30:35AM -0700, Stephen Warren wrote: > However, I suspect that the Tegra driver changes may need to be merged > into any subsystem that's doing much other work on the Tegra drivers, > especially any significant refactoring, so the subsystem would probably > have to pick up the whole series anyway. Still, I'll make sure I > re-order the branch to put the core changes first so we have as much > flexibility as possible. At least in the ASoC case my main consideration is other drivers wanting to use the core changes rather than changes being made to the Tegra drivers. Let's try to just share the core code and merge the rest over later if needed? [-- Attachment #1.2: Digital signature --] [-- Type: application/pgp-signature, Size: 836 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] 15+ messages in thread
* Re: [PATCH 00/31] ARM: tegra: use common reset and DMA bindings 2013-11-15 20:53 [PATCH 00/31] ARM: tegra: use common reset and DMA bindings Stephen Warren [not found] ` <1384548866-13141-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2013-11-18 8:24 ` Terje Bergström 2013-11-20 15:37 ` Arnd Bergmann 2013-12-12 0:11 ` Stephen Warren 3 siblings, 0 replies; 15+ messages in thread From: Terje Bergström @ 2013-11-18 8:24 UTC (permalink / raw) To: Stephen Warren Cc: Mark Rutland, alsa-devel@alsa-project.org, linux-usb@vger.kernel.org, Wolfram Sang, David Airlie, linux-pci@vger.kernel.org, dri-devel@lists.freedesktop.org, Marc Dietrich, linux-tegra@vger.kernel.org, linux-i2c@vger.kernel.org, ac100@lists.launchpad.net, devel@driverdev.osuosl.org, Stephen Warren, Alan Stern, linux-serial@vger.kernel.org, linux-input@vger.kernel.org, Thierry Reding, "devicetree@vger.kernel.org" On 15.11.2013 22:53, Stephen Warren wrote: > From: Stephen Warren <swarren@nvidia.com> > > This series implements a common reset framework driver for Tegra, and > updates all relevant Tegra drivers to use it. It also removes the custom > DMA bindings and replaced them with the standard DMA DT bindings. > > Historically, the Tegra clock driver has exported a custom API for module > reset. This series removes that API, and transitions DT and drivers to > the new reset framework. > > The custom API used a "struct clk" to identify which module to reset, and > consequently some DT bindings and drivers required clocks to be provided > where they really needed just a reset identifier instead. Due to this > known deficiency, I have always considered most Tegra bindings to be > unstable. This series removes this excuse for instability, although I > still consider some Tegra bindings unstable due to the need to convert to > the common DMA bindings. > > Historically, Tegra DMA channels have been represented in DT using a > custom nvidia,dma-request-selector property. Now that standard DMA DT > bindings exist, convert all Tegra bindings, DTs, and drivers to use the > standard instead. > > This series makes a DT-ABI-incompatible change to: > - Require reset specifiers in DT where relevant. > - Require standard DMA specifiers. > - Remove clock specifiers from DT where they were only needed for reset. > - Remove legacy DMA specifier properties. > > I anticipate merging this whole series into the Tegra and arm-soc trees > as its own branch, due to internal dependencies. This branch will be > stable and can then be merged into any other subsystem trees should any > conflicts arise. > > This series depends on Peter's Tegra clock driver rework, available at > git://nv-tegra.nvidia.com/user/pdeschrijver/linux tegra-clk-tegra124-0 > (or whatever version of that gets included in 3.14) Overall, a good change. For host1x part: Acked-By: Terje Bergstrom <tbergstrom@nvidia.com> This patch does not change the behavior, but we have in original code the problem that we don't flush the MC queue when resetting an engine. This can cause some memory writes to not hit memory. There was an earlier discussion on that, but we seem to have lost track of the issue. Terje ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 00/31] ARM: tegra: use common reset and DMA bindings 2013-11-15 20:53 [PATCH 00/31] ARM: tegra: use common reset and DMA bindings Stephen Warren [not found] ` <1384548866-13141-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2013-11-18 8:24 ` [PATCH 00/31] ARM: tegra: use common reset and DMA bindings Terje Bergström @ 2013-11-20 15:37 ` Arnd Bergmann 2013-11-20 16:45 ` Stephen Warren 2013-12-12 0:11 ` Stephen Warren 3 siblings, 1 reply; 15+ messages in thread From: Arnd Bergmann @ 2013-11-20 15:37 UTC (permalink / raw) To: linux-arm-kernel Cc: Mark Rutland, alsa-devel, Dmitry Torokhov, Wolfram Sang, David Airlie, linux-pci, dri-devel, Marc Dietrich, Bjorn Helgaas, linux-i2c, ac100, devel, Stephen Warren, Mike Turquette, Ian Campbell, Alan Stern, linux-serial, linux-input, treding, devicetree, Pawel Moll, Stephen Warren, Julian Andres Klode, Rob Herring, Mark Brown, linux-tegra On Friday 15 November 2013, Stephen Warren wrote: > This series implements a common reset framework driver for Tegra, and > updates all relevant Tegra drivers to use it. It also removes the custom > DMA bindings and replaced them with the standard DMA DT bindings. The series is rather long, so I may have missed it, but I think you need one more patch to the apbdma binding to document the use of #dma-cells, what value it has, and what the format of the dma specifiers in slave drivers needs to be. Arnd ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 00/31] ARM: tegra: use common reset and DMA bindings 2013-11-20 15:37 ` Arnd Bergmann @ 2013-11-20 16:45 ` Stephen Warren 2013-11-20 17:03 ` Arnd Bergmann 2013-11-20 19:17 ` [Ac100] " Martino Brandolini 0 siblings, 2 replies; 15+ messages in thread From: Stephen Warren @ 2013-11-20 16:45 UTC (permalink / raw) To: Arnd Bergmann, linux-arm-kernel Cc: Mark Rutland, alsa-devel, Dmitry Torokhov, Wolfram Sang, David Airlie, linux-pci, dri-devel, Marc Dietrich, Bjorn Helgaas, linux-i2c, ac100, devel, Stephen Warren, Mike Turquette, Alan Stern, linux-serial, linux-input, treding, devicetree, Pawel Moll, Ian Campbell, Julian Andres Klode, Rob Herring, Mark Brown, linux-tegra On 11/20/2013 08:37 AM, Arnd Bergmann wrote: > On Friday 15 November 2013, Stephen Warren wrote: >> This series implements a common reset framework driver for Tegra, and >> updates all relevant Tegra drivers to use it. It also removes the custom >> DMA bindings and replaced them with the standard DMA DT bindings. > > The series is rather long, so I may have missed it, but I think you need one > more patch to the apbdma binding to document the use of #dma-cells, what > value it has, and what the format of the dma specifiers in slave drivers > needs to be. Yes, you're right. I will fold the following into "ARM: tegra: document use of standard DMA DT bindings": > diff --git a/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt > index 0b1e577ab9d3..0b0f9498e265 100644 > --- a/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt > +++ b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt > @@ -11,6 +11,10 @@ Required properties: > See ../reset/reset.txt for details. > - reset-names : Must include the following entries: > - dma > +- #iommu-cells : Must be <1>. This dictates the length of DMA specifiers in > + client nodes' dmas properties. The specifier represents the DMA request > + select value for the peripheral. For more details, consult the Tegra TRM's > + documentation of the APB DMA channel control register REQ_SEL field. > > Examples: > > @@ -36,4 +40,5 @@ apbdma: dma@6000a000 { > clocks = <&tegra_car 34>; > resets = <&tegra_car 34>; > reset-names = "dma"; > + #iommu-cells = <1>; > }; ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 00/31] ARM: tegra: use common reset and DMA bindings 2013-11-20 16:45 ` Stephen Warren @ 2013-11-20 17:03 ` Arnd Bergmann 2013-11-20 17:23 ` Stephen Warren 2013-11-20 19:17 ` [Ac100] " Martino Brandolini 1 sibling, 1 reply; 15+ messages in thread From: Arnd Bergmann @ 2013-11-20 17:03 UTC (permalink / raw) To: Stephen Warren Cc: Mark Rutland, alsa-devel, Dmitry Torokhov, Wolfram Sang, David Airlie, linux-pci, dri-devel, Bjorn Helgaas, linux-i2c, ac100, devel, Stephen Warren, Mike Turquette, Alan Stern, linux-serial, linux-input, treding, devicetree, Pawel Moll, Ian Campbell, Rob Herring, Mark Brown, linux-tegra, Terje Bergström, Dan Williams, linux-arm-kernel On Wednesday 20 November 2013, Stephen Warren wrote: > > +- #iommu-cells : Must be <1>. This dictates the length of DMA specifiers in > > + client nodes' dmas properties. The specifier represents the DMA request > > + select value for the peripheral. For more details, consult the Tegra TRM's > > + documentation of the APB DMA channel control register REQ_SEL field. > > > > Examples: > > > > @@ -36,4 +40,5 @@ apbdma: dma@6000a000 { > > clocks = <&tegra_car 34>; > > resets = <&tegra_car 34>; > > reset-names = "dma"; > > + #iommu-cells = <1>; s/iommu/dma/ Otherwise looks good. The dts files are correct, so I guess it's just a typo here. Arnd ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 00/31] ARM: tegra: use common reset and DMA bindings 2013-11-20 17:03 ` Arnd Bergmann @ 2013-11-20 17:23 ` Stephen Warren 0 siblings, 0 replies; 15+ messages in thread From: Stephen Warren @ 2013-11-20 17:23 UTC (permalink / raw) To: Arnd Bergmann Cc: Mark Rutland, alsa-devel, Dmitry Torokhov, Wolfram Sang, David Airlie, linux-pci, dri-devel, Bjorn Helgaas, linux-i2c, ac100, devel, Stephen Warren, Mike Turquette, Alan Stern, linux-serial, linux-input, treding, devicetree, Pawel Moll, Ian Campbell, Rob Herring, Mark Brown, linux-tegra, Terje Bergström, Dan Williams, linux-arm-kernel On 11/20/2013 10:03 AM, Arnd Bergmann wrote: > On Wednesday 20 November 2013, Stephen Warren wrote: >>> +- #iommu-cells : Must be <1>. This dictates the length of DMA specifiers in >>> + client nodes' dmas properties. The specifier represents the DMA request >>> + select value for the peripheral. For more details, consult the Tegra TRM's >>> + documentation of the APB DMA channel control register REQ_SEL field. >>> >>> Examples: >>> >>> @@ -36,4 +40,5 @@ apbdma: dma@6000a000 { >>> clocks = <&tegra_car 34>; >>> resets = <&tegra_car 34>; >>> reset-names = "dma"; >>> + #iommu-cells = <1>; > > > s/iommu/dma/ > > Otherwise looks good. The dts files are correct, so I guess it's just > a typo here. Thanks, fixed locally. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Ac100] [PATCH 00/31] ARM: tegra: use common reset and DMA bindings 2013-11-20 16:45 ` Stephen Warren 2013-11-20 17:03 ` Arnd Bergmann @ 2013-11-20 19:17 ` Martino Brandolini 1 sibling, 0 replies; 15+ messages in thread From: Martino Brandolini @ 2013-11-20 19:17 UTC (permalink / raw) To: Stephen Warren Cc: Mark Rutland, alsa-devel, linux-usb, Wolfram Sang, linux-pci, dri-devel, linux-tegra, linux-i2c, ac100, devel, Stephen Warren, Arnd Bergmann, Terje Bergström, Alan Stern, linux-serial, linux-input, treding, devicetree, Pawel Moll, Ian Campbell, Julian Andres Klode, Rob Herring, Mark Brown, Bjorn Helgaas, Mike Turquette, Dan Williams [-- Attachment #1.1: Type: text/plain, Size: 2260 bytes --] Dear all, My ac100 screen is flickering so much. I realized I'm not using it anymore. So if anyone wants to have it for free would be for me a huge pleasure to give it away. I'm based in milan and I'll be in London for the next week. Maybe someone needs it. Martino 2013/11/20 Stephen Warren <swarren@wwwdotorg.org> > On 11/20/2013 08:37 AM, Arnd Bergmann wrote: > > On Friday 15 November 2013, Stephen Warren wrote: > >> This series implements a common reset framework driver for Tegra, and > >> updates all relevant Tegra drivers to use it. It also removes the custom > >> DMA bindings and replaced them with the standard DMA DT bindings. > > > > The series is rather long, so I may have missed it, but I think you need > one > > more patch to the apbdma binding to document the use of #dma-cells, what > > value it has, and what the format of the dma specifiers in slave drivers > > needs to be. > > Yes, you're right. I will fold the following into "ARM: tegra: document > use of standard DMA DT bindings": > > > diff --git a/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt > b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt > > index 0b1e577ab9d3..0b0f9498e265 100644 > > --- a/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt > > +++ b/Documentation/devicetree/bindings/dma/tegra20-apbdma.txt > > @@ -11,6 +11,10 @@ Required properties: > > See ../reset/reset.txt for details. > > - reset-names : Must include the following entries: > > - dma > > +- #iommu-cells : Must be <1>. This dictates the length of DMA > specifiers in > > + client nodes' dmas properties. The specifier represents the DMA > request > > + select value for the peripheral. For more details, consult the Tegra > TRM's > > + documentation of the APB DMA channel control register REQ_SEL field. > > > > Examples: > > > > @@ -36,4 +40,5 @@ apbdma: dma@6000a000 { > > clocks = <&tegra_car 34>; > > resets = <&tegra_car 34>; > > reset-names = "dma"; > > + #iommu-cells = <1>; > > }; > > > _______________________________________________ > Mailing list: https://launchpad.net/~ac100 > Post to : ac100@lists.launchpad.net > Unsubscribe : https://launchpad.net/~ac100 > More help : https://help.launchpad.net/ListHelp > [-- Attachment #1.2: Type: text/html, Size: 3121 bytes --] [-- Attachment #2: Type: text/plain, Size: 159 bytes --] _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 00/31] ARM: tegra: use common reset and DMA bindings 2013-11-15 20:53 [PATCH 00/31] ARM: tegra: use common reset and DMA bindings Stephen Warren ` (2 preceding siblings ...) 2013-11-20 15:37 ` Arnd Bergmann @ 2013-12-12 0:11 ` Stephen Warren 3 siblings, 0 replies; 15+ messages in thread From: Stephen Warren @ 2013-12-12 0:11 UTC (permalink / raw) To: swarren Cc: Mark Rutland, alsa-devel, linux-usb, Wolfram Sang, David Airlie, linux-pci, dri-devel, linux-tegra, linux-i2c, ac100, devel, Stephen Warren, Alan Stern, linux-serial, linux-input, Terje Bergström, devicetree, Pawel Moll, Ian Campbell, Rob Herring, Mark Brown, Bjorn Helgaas, Mike Turquette, Dan Williams, linux-arm-kernel, treding On 11/15/2013 01:53 PM, Stephen Warren wrote: > From: Stephen Warren <swarren@nvidia.com> > > This series implements a common reset framework driver for Tegra, and > updates all relevant Tegra drivers to use it. It also removes the custom > DMA bindings and replaced them with the standard DMA DT bindings. > > Historically, the Tegra clock driver has exported a custom API for module > reset. This series removes that API, and transitions DT and drivers to > the new reset framework. > > The custom API used a "struct clk" to identify which module to reset, and > consequently some DT bindings and drivers required clocks to be provided > where they really needed just a reset identifier instead. Due to this > known deficiency, I have always considered most Tegra bindings to be > unstable. This series removes this excuse for instability, although I > still consider some Tegra bindings unstable due to the need to convert to > the common DMA bindings. > > Historically, Tegra DMA channels have been represented in DT using a > custom nvidia,dma-request-selector property. Now that standard DMA DT > bindings exist, convert all Tegra bindings, DTs, and drivers to use the > standard instead. > > This series makes a DT-ABI-incompatible change to: > - Require reset specifiers in DT where relevant. > - Require standard DMA specifiers. > - Remove clock specifiers from DT where they were only needed for reset. > - Remove legacy DMA specifier properties. > > I anticipate merging this whole series into the Tegra and arm-soc trees > as its own branch, due to internal dependencies. This branch will be > stable and can then be merged into any other subsystem trees should any > conflicts arise. > > This series depends on Peter's Tegra clock driver rework, available at > git://nv-tegra.nvidia.com/user/pdeschrijver/linux tegra-clk-tegra124-0 > (or whatever version of that gets included in 3.14) I've applied this series (and pulled in the DMA/ASoC/clk dependencies required) to Tegra's for-3.14/dmas-resets-rework branch. ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2013-12-12 0:11 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-11-15 20:53 [PATCH 00/31] ARM: tegra: use common reset and DMA bindings Stephen Warren [not found] ` <1384548866-13141-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2013-11-15 20:54 ` [PATCH 22/31] spi: tegra: use reset framework Stephen Warren 2013-11-16 10:07 ` Mark Brown [not found] ` <1384548866-13141-23-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2013-11-29 14:48 ` Thierry Reding 2013-11-15 20:54 ` [PATCH 23/31] spi: tegra: convert to standard DMA DT bindings Stephen Warren [not found] ` <1384548866-13141-24-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2013-11-16 10:14 ` Mark Brown [not found] ` <20131116101422.GK15393-GFdadSzt00ze9xe1eoZjHA@public.gmane.org> 2013-11-18 17:30 ` Stephen Warren 2013-11-18 18:41 ` Mark Brown 2013-11-18 8:24 ` [PATCH 00/31] ARM: tegra: use common reset and DMA bindings Terje Bergström 2013-11-20 15:37 ` Arnd Bergmann 2013-11-20 16:45 ` Stephen Warren 2013-11-20 17:03 ` Arnd Bergmann 2013-11-20 17:23 ` Stephen Warren 2013-11-20 19:17 ` [Ac100] " Martino Brandolini 2013-12-12 0:11 ` Stephen Warren
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).