All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH 2/8] shdma: fdt: allocate and use local hwid bitmap for shdma mux
Date: Thu, 05 Jun 2014 10:47:40 +0000	[thread overview]
Message-ID: <87a99riqes.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <1401898455-31064-3-git-send-email-ben.dooks@codethink.co.uk>

Hi Ben

> Move the shdma-of.c code to allocating and using a slave bitmap for
> tracking allocation of the slave channels used by the mid-rid stored
> in the phandle for the mux.
> 
> This means that we can have multiple shdma muxes in the system without
> any issue of slave-ids clashing and all the child dma units will be
> able to properly protect against the re-use of a mid/rid pair.
> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
(snip)
> +void shdma_of_setup(struct device *dev, struct shdma_dev *shdev)
> +{
> +	struct shdma_of_state *ofs = dev_get_platdata(dev->parent);
> +
> +	shdev->slave_used = ofs->slave_used;
> +}
> +
>  static int shdma_of_probe(struct platform_device *pdev)
>  {
>  	const struct of_dev_auxdata *lookup = dev_get_platdata(&pdev->dev);
> +	struct shdma_of_state *ofs;
>  	int ret;
>  
> +	ofs = devm_kzalloc(&pdev->dev, sizeof(*ofs), GFP_KERNEL);
> +	if (!ofs)
> +		return -ENOMEM;
> +
>  	ret = of_dma_controller_register(pdev->dev.of_node,
>  					 shdma_of_xlate, pdev);
>  	if (ret < 0)
> diff --git a/include/linux/shdma-base.h b/include/linux/shdma-base.h

This ofs is created by devm_kzalloc(), but not used ??
It is missing to call dev_set_platdata() ?

  reply	other threads:[~2014-06-05 10:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 16:14 [PATCH 2/8] shdma: fdt: allocate and use local hwid bitmap for shdma mux Ben Dooks
2014-06-05 10:47 ` Kuninori Morimoto [this message]
2014-06-05 16:40 ` Ben Dooks
2014-06-05 23:50 ` Kuninori Morimoto

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=87a99riqes.wl%kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

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

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