linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] ARM: tegra: Add SMMU enabler in AHB
Date: Tue, 24 Apr 2012 20:59:02 +0100	[thread overview]
Message-ID: <20120424195901.GC3628@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1335269116-9578-2-git-send-email-hdoyu@nvidia.com>

On Tue, Apr 24, 2012 at 03:05:15PM +0300, Hiroshi DOYU wrote:
> +#define AHB_ARBITRATION_XBAR_CTRL_SMMU_INIT_DONE_DONE	1
> +#define AHB_ARBITRATION_XBAR_CTRL_SMMU_INIT_DONE_SHIFT	17
> +
>  struct __tegra_ahb {
>  	void __iomem	*regs;
>  	struct device	*dev;
> @@ -95,6 +98,21 @@ static inline void gizmo_writel(unsigned long value, unsigned long offset)
>  	writel(value, tegra_ahb->regs + offset);
>  }
>  
> +#ifdef CONFIG_ARCH_TEGRA_3x_SOC
> +
> +void tegra_ahb_enable_smmu(void)
> +{
> +	unsigned long val;
> +
> +	val = gizmo_readl(AHB_ARBITRATION_XBAR_CTRL);
> +	val |= AHB_ARBITRATION_XBAR_CTRL_SMMU_INIT_DONE_DONE <<
> +		AHB_ARBITRATION_XBAR_CTRL_SMMU_INIT_DONE_SHIFT;

In addition to what Felipe said...

Why do you need two constants where you have only one use point?
What's wrong with having just a single definition which gives you
the right bitmask?

  parent reply	other threads:[~2012-04-24 19:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-24 12:05 [PATCH v2 1/3] ARM: tegra: Add AHB driver Hiroshi DOYU
2012-04-24 12:05 ` [PATCH v2 2/3] ARM: tegra: Add SMMU enabler in AHB Hiroshi DOYU
2012-04-24 12:32   ` Felipe Balbi
2012-04-24 12:39     ` Hiroshi Doyu
2012-04-24 12:41       ` Felipe Balbi
2012-04-24 13:03         ` Hiroshi Doyu
2012-04-24 13:25           ` Felipe Balbi
2012-04-24 19:59   ` Russell King - ARM Linux [this message]
2012-04-24 12:16 ` [PATCH v2 1/3] ARM: tegra: Add AHB driver Felipe Balbi
2012-04-24 19:49   ` Stephen Warren
2012-04-24 20:31     ` Felipe Balbi
2012-04-24 19:56 ` Russell King - ARM Linux
2012-04-25  5:37   ` Hiroshi Doyu
2012-04-25  7:46     ` Felipe Balbi
2012-04-25 12:15       ` Arnd Bergmann
2012-04-25 15:59         ` Stephen Warren
2012-04-26  5:49           ` Hiroshi Doyu
2012-04-26  8:14           ` Peter De Schrijver

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=20120424195901.GC3628@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 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).