All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>,
	vinod.koul@intel.com, nsekhar@ti.com, olof@lixom.net
Cc: devicetree@vger.kernel.org, tony@atomide.com,
	linux-kernel@vger.kernel.org, t-kristo@ti.com,
	dmaengine@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] dmaengine: edma: Add dummy driver skeleton for edma3-tptc
Date: Wed, 4 Nov 2015 10:33:27 -0600	[thread overview]
Message-ID: <87egg54td4.fsf@saruman.tx.rr.com> (raw)
In-Reply-To: <1446470500-27504-1-git-send-email-peter.ujfalusi@ti.com>


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

Peter Ujfalusi <peter.ujfalusi@ti.com> writes:

> The eDMA3 TPTC does not need any software configuration, but it is a
> separate IP block in the SoC. In order the omap hwmod core to be able to
> handle the TPTC resources correctly in regards of PM we need to have a
> driver loaded for it.
> This patch will add a dummy driver skeleton without probe or remove
> callbacks provided.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Reported-by: Olof Johansson <olof@lixom.net>

This fixes the problem I also reported on linux-omap [1]

Tested-by: Felipe Balbi <balbi@ti.com>

[1] http://marc.info/?l=linux-omap&m=144665429032014&w=2

> ---
> Hi,
>
> while it would have been possible to add the edma3-tptc compatible to be handled
> by the edma-tpcc driver (and when the device is tptc, do nothing) it would
> make the driver code a bit harder to follow.
> I think having separate structure for the tptc looks better and if we ever need
> to have separate driver for the tptc it will be cleaner for us the separate it.
>
> This patch alone w/o any hwmod flag changes will make sure that the edma-tptc is
> not powered down after the kernel is finished it's booting.
>
> Regards,
> Peter
>
>  drivers/dma/edma.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
> index 31722d436a42..6b03e4e84e6b 100644
> --- a/drivers/dma/edma.c
> +++ b/drivers/dma/edma.c
> @@ -269,6 +269,11 @@ static const struct of_device_id edma_of_ids[] = {
>  	{}
>  };
>  
> +static const struct of_device_id edma_tptc_of_ids[] = {
> +	{ .compatible = "ti,edma3-tptc", },
> +	{}
> +};
> +
>  static inline unsigned int edma_read(struct edma_cc *ecc, int offset)
>  {
>  	return (unsigned int)__raw_readl(ecc->base + offset);
> @@ -2399,6 +2404,13 @@ static struct platform_driver edma_driver = {
>  	},
>  };
>  
> +static struct platform_driver edma_tptc_driver = {
> +	.driver = {
> +		.name	= "edma3-tptc",
> +		.of_match_table = edma_tptc_of_ids,
> +	},
> +};
> +
>  bool edma_filter_fn(struct dma_chan *chan, void *param)
>  {
>  	bool match = false;
> @@ -2418,6 +2430,12 @@ EXPORT_SYMBOL(edma_filter_fn);
>  
>  static int edma_init(void)
>  {
> +	int ret;
> +
> +	ret = platform_driver_register(&edma_tptc_driver);
> +	if (ret)
> +		return ret;
> +
>  	return platform_driver_register(&edma_driver);
>  }
>  subsys_initcall(edma_init);
> @@ -2425,6 +2443,7 @@ subsys_initcall(edma_init);
>  static void __exit edma_exit(void)
>  {
>  	platform_driver_unregister(&edma_driver);
> +	platform_driver_unregister(&edma_tptc_driver);
>  }
>  module_exit(edma_exit);
>  
> -- 
> 2.6.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
balbi

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 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

WARNING: multiple messages have this Message-ID (diff)
From: balbi@ti.com (Felipe Balbi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] dmaengine: edma: Add dummy driver skeleton for edma3-tptc
Date: Wed, 4 Nov 2015 10:33:27 -0600	[thread overview]
Message-ID: <87egg54td4.fsf@saruman.tx.rr.com> (raw)
In-Reply-To: <1446470500-27504-1-git-send-email-peter.ujfalusi@ti.com>

Peter Ujfalusi <peter.ujfalusi@ti.com> writes:

> The eDMA3 TPTC does not need any software configuration, but it is a
> separate IP block in the SoC. In order the omap hwmod core to be able to
> handle the TPTC resources correctly in regards of PM we need to have a
> driver loaded for it.
> This patch will add a dummy driver skeleton without probe or remove
> callbacks provided.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Reported-by: Olof Johansson <olof@lixom.net>

This fixes the problem I also reported on linux-omap [1]

Tested-by: Felipe Balbi <balbi@ti.com>

[1] http://marc.info/?l=linux-omap&m=144665429032014&w=2

> ---
> Hi,
>
> while it would have been possible to add the edma3-tptc compatible to be handled
> by the edma-tpcc driver (and when the device is tptc, do nothing) it would
> make the driver code a bit harder to follow.
> I think having separate structure for the tptc looks better and if we ever need
> to have separate driver for the tptc it will be cleaner for us the separate it.
>
> This patch alone w/o any hwmod flag changes will make sure that the edma-tptc is
> not powered down after the kernel is finished it's booting.
>
> Regards,
> Peter
>
>  drivers/dma/edma.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
> index 31722d436a42..6b03e4e84e6b 100644
> --- a/drivers/dma/edma.c
> +++ b/drivers/dma/edma.c
> @@ -269,6 +269,11 @@ static const struct of_device_id edma_of_ids[] = {
>  	{}
>  };
>  
> +static const struct of_device_id edma_tptc_of_ids[] = {
> +	{ .compatible = "ti,edma3-tptc", },
> +	{}
> +};
> +
>  static inline unsigned int edma_read(struct edma_cc *ecc, int offset)
>  {
>  	return (unsigned int)__raw_readl(ecc->base + offset);
> @@ -2399,6 +2404,13 @@ static struct platform_driver edma_driver = {
>  	},
>  };
>  
> +static struct platform_driver edma_tptc_driver = {
> +	.driver = {
> +		.name	= "edma3-tptc",
> +		.of_match_table = edma_tptc_of_ids,
> +	},
> +};
> +
>  bool edma_filter_fn(struct dma_chan *chan, void *param)
>  {
>  	bool match = false;
> @@ -2418,6 +2430,12 @@ EXPORT_SYMBOL(edma_filter_fn);
>  
>  static int edma_init(void)
>  {
> +	int ret;
> +
> +	ret = platform_driver_register(&edma_tptc_driver);
> +	if (ret)
> +		return ret;
> +
>  	return platform_driver_register(&edma_driver);
>  }
>  subsys_initcall(edma_init);
> @@ -2425,6 +2443,7 @@ subsys_initcall(edma_init);
>  static void __exit edma_exit(void)
>  {
>  	platform_driver_unregister(&edma_driver);
> +	platform_driver_unregister(&edma_tptc_driver);
>  }
>  module_exit(edma_exit);
>  
> -- 
> 2.6.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151104/ae4493ee/attachment.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi@ti.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>, <vinod.koul@intel.com>,
	<nsekhar@ti.com>, <olof@lixom.net>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org>,
	<dmaengine@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<tony@atomide.com>, <t-kristo@ti.com>
Subject: Re: [PATCH] dmaengine: edma: Add dummy driver skeleton for edma3-tptc
Date: Wed, 4 Nov 2015 10:33:27 -0600	[thread overview]
Message-ID: <87egg54td4.fsf@saruman.tx.rr.com> (raw)
In-Reply-To: <1446470500-27504-1-git-send-email-peter.ujfalusi@ti.com>

[-- Attachment #1: Type: text/plain, Size: 3006 bytes --]

Peter Ujfalusi <peter.ujfalusi@ti.com> writes:

> The eDMA3 TPTC does not need any software configuration, but it is a
> separate IP block in the SoC. In order the omap hwmod core to be able to
> handle the TPTC resources correctly in regards of PM we need to have a
> driver loaded for it.
> This patch will add a dummy driver skeleton without probe or remove
> callbacks provided.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Reported-by: Olof Johansson <olof@lixom.net>

This fixes the problem I also reported on linux-omap [1]

Tested-by: Felipe Balbi <balbi@ti.com>

[1] http://marc.info/?l=linux-omap&m=144665429032014&w=2

> ---
> Hi,
>
> while it would have been possible to add the edma3-tptc compatible to be handled
> by the edma-tpcc driver (and when the device is tptc, do nothing) it would
> make the driver code a bit harder to follow.
> I think having separate structure for the tptc looks better and if we ever need
> to have separate driver for the tptc it will be cleaner for us the separate it.
>
> This patch alone w/o any hwmod flag changes will make sure that the edma-tptc is
> not powered down after the kernel is finished it's booting.
>
> Regards,
> Peter
>
>  drivers/dma/edma.c | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
>
> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
> index 31722d436a42..6b03e4e84e6b 100644
> --- a/drivers/dma/edma.c
> +++ b/drivers/dma/edma.c
> @@ -269,6 +269,11 @@ static const struct of_device_id edma_of_ids[] = {
>  	{}
>  };
>  
> +static const struct of_device_id edma_tptc_of_ids[] = {
> +	{ .compatible = "ti,edma3-tptc", },
> +	{}
> +};
> +
>  static inline unsigned int edma_read(struct edma_cc *ecc, int offset)
>  {
>  	return (unsigned int)__raw_readl(ecc->base + offset);
> @@ -2399,6 +2404,13 @@ static struct platform_driver edma_driver = {
>  	},
>  };
>  
> +static struct platform_driver edma_tptc_driver = {
> +	.driver = {
> +		.name	= "edma3-tptc",
> +		.of_match_table = edma_tptc_of_ids,
> +	},
> +};
> +
>  bool edma_filter_fn(struct dma_chan *chan, void *param)
>  {
>  	bool match = false;
> @@ -2418,6 +2430,12 @@ EXPORT_SYMBOL(edma_filter_fn);
>  
>  static int edma_init(void)
>  {
> +	int ret;
> +
> +	ret = platform_driver_register(&edma_tptc_driver);
> +	if (ret)
> +		return ret;
> +
>  	return platform_driver_register(&edma_driver);
>  }
>  subsys_initcall(edma_init);
> @@ -2425,6 +2443,7 @@ subsys_initcall(edma_init);
>  static void __exit edma_exit(void)
>  {
>  	platform_driver_unregister(&edma_driver);
> +	platform_driver_unregister(&edma_tptc_driver);
>  }
>  module_exit(edma_exit);
>  
> -- 
> 2.6.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
balbi

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

  reply	other threads:[~2015-11-04 16:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02 13:21 [PATCH] dmaengine: edma: Add dummy driver skeleton for edma3-tptc Peter Ujfalusi
2015-11-02 13:21 ` Peter Ujfalusi
2015-11-02 13:21 ` Peter Ujfalusi
2015-11-04 16:33 ` Felipe Balbi [this message]
2015-11-04 16:33   ` Felipe Balbi
2015-11-04 16:33   ` Felipe Balbi
2015-11-04 16:41   ` Vinod Koul
2015-11-04 16:41     ` Vinod Koul
2015-11-13 14:54     ` Tony Lindgren
2015-11-13 14:54       ` Tony Lindgren
2015-11-13 14:54       ` Tony Lindgren

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=87egg54td4.fsf@saruman.tx.rr.com \
    --to=balbi@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nsekhar@ti.com \
    --cc=olof@lixom.net \
    --cc=peter.ujfalusi@ti.com \
    --cc=t-kristo@ti.com \
    --cc=tony@atomide.com \
    --cc=vinod.koul@intel.com \
    /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 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.