[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170918075732.wptp75sh3ovhdukp@flea.lan>
Date: Mon, 18 Sep 2017 09:57:32 +0200
From: Maxime Ripard <maxime.ripard@...e-electrons.com>
To: Stefan Brüns <stefan.bruens@...h-aachen.de>
Cc: linux-sunxi@...glegroups.com, devicetree@...r.kernel.org,
dmaengine@...r.kernel.org, Vinod Koul <vinod.koul@...el.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Chen-Yu Tsai <wens@...e.org>, Rob Herring <robh+dt@...nel.org>,
Code Kipper <codekipper@...il.com>,
Andre Przywara <andre.przywara@....com>
Subject: Re: [PATCH v2 01/10] dmaengine: sun6i: Correct setting of clock
autogating register for A83T/H3
Hi,
On Sun, Sep 17, 2017 at 05:19:47AM +0200, Stefan Brüns wrote:
> The H83T uses a compatible string different from the A23, but requires
> the same clock autogating register setting.
>
> The H3 also requires setting the clock autogating register, but has
> the register at a different offset.
>
> Add three suitable callbacks for the existing controller generations
> and set it in the controller config structure.
>
> Signed-off-by: Stefan Brüns <stefan.bruens@...h-aachen.de>
> ---
> drivers/dma/sun6i-dma.c | 31 ++++++++++++++++++++++++++-----
> 1 file changed, 26 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
> index bcd496edc70f..45bcd5271d94 100644
> --- a/drivers/dma/sun6i-dma.c
> +++ b/drivers/dma/sun6i-dma.c
> @@ -48,6 +48,9 @@
> #define SUN8I_DMA_GATE 0x20
> #define SUN8I_DMA_GATE_ENABLE 0x4
>
> +#define SUNXI_H3_SECURE_REG 0x20
> +#define SUNXI_H3_DMA_GATE 0x28
> +#define SUNXI_H3_DMA_GATE_ENABLE 0x4
> /*
> * Channels specific registers
> */
> @@ -111,7 +114,7 @@ struct sun6i_dma_config {
> * however these SoCs really have and need this bit, as seen in the
> * BSP kernel source code.
> */
> - bool gate_needed;
> + void (*clock_autogate_enable)();
> };
>
> /*
> @@ -267,6 +270,20 @@ static inline s8 convert_buswidth(enum dma_slave_buswidth addr_width)
> return addr_width >> 1;
> }
>
> +static void sun6i_enable_clock_autogate_noop(struct sun6i_dma_dev *sdev)
> +{
> +}
I guess instead of that one, we could just test for the pointer and
not call the function if it's NULL?
Looks good otherwise, once fixed, you have
Acked-by: Maxime Ripard <maxime.ripard@...e-electrons.com>
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Download attachment "signature.asc" of type "application/pgp-signature" (802 bytes)
Powered by blists - more mailing lists