From: jszhang@marvell.com (Jisheng Zhang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RESEND 2/5] pinctrl: berlin: add a pinctrl driver for Marvell Berlin SoCs
Date: Fri, 11 Apr 2014 16:27:16 +0800 [thread overview]
Message-ID: <20140411162716.74e739e1@xhacker> (raw)
In-Reply-To: <20140411081839.GB20147@kwain>
Hi Antoine,
On Fri, 11 Apr 2014 01:18:39 -0700
Antoine T?nart <antoine.tenart@free-electrons.com> wrote:
> Hi Jisheng,
>
> On Fri, Apr 11, 2014 at 02:44:31PM +0800, Jisheng Zhang wrote:
> > On Thu, 10 Apr 2014 06:07:51 -0700
> > Antoine T?nart <antoine.tenart@free-electrons.com> wrote:
> >
> > ...
> > > +static int berlin_pinmux_enable(struct pinctrl_dev *pctrl_dev,
> > > + unsigned function,
> > > + unsigned group)
> > > +{
> > > + struct berlin_pinctrl *pctrl =
> > > pinctrl_dev_get_drvdata(pctrl_dev);
> > > + struct berlin_pinctrl_group *group_desc = pctrl->groups + group;
> > > + struct berlin_pinctrl_function *function_desc =
> > > + pctrl->functions + function;
> > > + unsigned long flags;
> > > + u32 regval;
> > > +
> > > + spin_lock_irqsave(&pctrl->lock, flags);
> > > +
> > > + regval = readl(group_desc->reg);
> > > + regval &= group_desc->mask;
> > > + regval |= function_desc->muxval << group_desc->lsb;
> > > + writel(regval, group_desc->reg);
> >
> > Could we use relaxed version instead?
>
> We could, but this is not a performance issue here at all, so I guess we can
> keep writel().
Yes it's not a performance issue here but an issue for the system which is doing
PL310 L2 cache maintenance. If pinmux operation hold the l2x0_lock due to writel()
the important video/audio process which is cleaning PL310 cache must wait, thus
cause jitter. So I'd like relaxed version if we can. Then I don't need to add this
patch to mainline kernel when we upgrade internal tree.
Thanks,
Jisheng
WARNING: multiple messages have this Message-ID (diff)
From: Jisheng Zhang <jszhang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
To: "Antoine Ténart"
<antoine.tenart-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Cc: "sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
<sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org"
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
"alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org"
<alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Jimmy Xu <zmxu-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH RESEND 2/5] pinctrl: berlin: add a pinctrl driver for Marvell Berlin SoCs
Date: Fri, 11 Apr 2014 16:27:16 +0800 [thread overview]
Message-ID: <20140411162716.74e739e1@xhacker> (raw)
In-Reply-To: <20140411081839.GB20147@kwain>
Hi Antoine,
On Fri, 11 Apr 2014 01:18:39 -0700
Antoine Ténart <antoine.tenart-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> Hi Jisheng,
>
> On Fri, Apr 11, 2014 at 02:44:31PM +0800, Jisheng Zhang wrote:
> > On Thu, 10 Apr 2014 06:07:51 -0700
> > Antoine Ténart <antoine.tenart-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> >
> > ...
> > > +static int berlin_pinmux_enable(struct pinctrl_dev *pctrl_dev,
> > > + unsigned function,
> > > + unsigned group)
> > > +{
> > > + struct berlin_pinctrl *pctrl =
> > > pinctrl_dev_get_drvdata(pctrl_dev);
> > > + struct berlin_pinctrl_group *group_desc = pctrl->groups + group;
> > > + struct berlin_pinctrl_function *function_desc =
> > > + pctrl->functions + function;
> > > + unsigned long flags;
> > > + u32 regval;
> > > +
> > > + spin_lock_irqsave(&pctrl->lock, flags);
> > > +
> > > + regval = readl(group_desc->reg);
> > > + regval &= group_desc->mask;
> > > + regval |= function_desc->muxval << group_desc->lsb;
> > > + writel(regval, group_desc->reg);
> >
> > Could we use relaxed version instead?
>
> We could, but this is not a performance issue here at all, so I guess we can
> keep writel().
Yes it's not a performance issue here but an issue for the system which is doing
PL310 L2 cache maintenance. If pinmux operation hold the l2x0_lock due to writel()
the important video/audio process which is cleaning PL310 cache must wait, thus
cause jitter. So I'd like relaxed version if we can. Then I don't need to add this
patch to mainline kernel when we upgrade internal tree.
Thanks,
Jisheng
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Jisheng Zhang <jszhang@marvell.com>
To: "Antoine Ténart" <antoine.tenart@free-electrons.com>
Cc: "sebastian.hesselbarth@gmail.com"
<sebastian.hesselbarth@gmail.com>,
"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
"alexandre.belloni@free-electrons.com"
<alexandre.belloni@free-electrons.com>,
Jimmy Xu <zmxu@marvell.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH RESEND 2/5] pinctrl: berlin: add a pinctrl driver for Marvell Berlin SoCs
Date: Fri, 11 Apr 2014 16:27:16 +0800 [thread overview]
Message-ID: <20140411162716.74e739e1@xhacker> (raw)
In-Reply-To: <20140411081839.GB20147@kwain>
Hi Antoine,
On Fri, 11 Apr 2014 01:18:39 -0700
Antoine Ténart <antoine.tenart@free-electrons.com> wrote:
> Hi Jisheng,
>
> On Fri, Apr 11, 2014 at 02:44:31PM +0800, Jisheng Zhang wrote:
> > On Thu, 10 Apr 2014 06:07:51 -0700
> > Antoine Ténart <antoine.tenart@free-electrons.com> wrote:
> >
> > ...
> > > +static int berlin_pinmux_enable(struct pinctrl_dev *pctrl_dev,
> > > + unsigned function,
> > > + unsigned group)
> > > +{
> > > + struct berlin_pinctrl *pctrl =
> > > pinctrl_dev_get_drvdata(pctrl_dev);
> > > + struct berlin_pinctrl_group *group_desc = pctrl->groups + group;
> > > + struct berlin_pinctrl_function *function_desc =
> > > + pctrl->functions + function;
> > > + unsigned long flags;
> > > + u32 regval;
> > > +
> > > + spin_lock_irqsave(&pctrl->lock, flags);
> > > +
> > > + regval = readl(group_desc->reg);
> > > + regval &= group_desc->mask;
> > > + regval |= function_desc->muxval << group_desc->lsb;
> > > + writel(regval, group_desc->reg);
> >
> > Could we use relaxed version instead?
>
> We could, but this is not a performance issue here at all, so I guess we can
> keep writel().
Yes it's not a performance issue here but an issue for the system which is doing
PL310 L2 cache maintenance. If pinmux operation hold the l2x0_lock due to writel()
the important video/audio process which is cleaning PL310 cache must wait, thus
cause jitter. So I'd like relaxed version if we can. Then I don't need to add this
patch to mainline kernel when we upgrade internal tree.
Thanks,
Jisheng
next prev parent reply other threads:[~2014-04-11 8:27 UTC|newest]
Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 13:07 [PATCH RESEND 0/5] ARM: berlin: add pinctrl support Antoine Ténart
2014-04-10 13:07 ` Antoine Ténart
2014-04-10 13:07 ` Antoine Ténart
2014-04-10 13:07 ` [PATCH RESEND 1/5] pinctrl: allows not to define the get_group_pins operation Antoine Ténart
2014-04-10 13:07 ` Antoine Ténart
2014-04-11 9:21 ` Sebastian Hesselbarth
2014-04-11 9:21 ` Sebastian Hesselbarth
2014-04-11 9:21 ` Sebastian Hesselbarth
2014-04-22 12:48 ` Linus Walleij
2014-04-22 12:48 ` Linus Walleij
2014-04-22 12:48 ` Linus Walleij
2014-04-22 15:58 ` Antoine Ténart
2014-04-22 15:58 ` Antoine Ténart
2014-04-22 15:58 ` Antoine Ténart
2014-04-10 13:07 ` [PATCH RESEND 2/5] pinctrl: berlin: add a pinctrl driver for Marvell Berlin SoCs Antoine Ténart
2014-04-10 13:07 ` Antoine Ténart
2014-04-11 6:44 ` Jisheng Zhang
2014-04-11 6:44 ` Jisheng Zhang
2014-04-11 6:44 ` Jisheng Zhang
2014-04-11 8:18 ` Antoine Ténart
2014-04-11 8:18 ` Antoine Ténart
2014-04-11 8:18 ` Antoine Ténart
2014-04-11 8:27 ` Jisheng Zhang [this message]
2014-04-11 8:27 ` Jisheng Zhang
2014-04-11 8:27 ` Jisheng Zhang
2014-04-11 9:21 ` Antoine Ténart
2014-04-11 9:21 ` Antoine Ténart
2014-04-11 9:21 ` Antoine Ténart
2014-04-11 9:03 ` Sebastian Hesselbarth
2014-04-11 9:03 ` Sebastian Hesselbarth
2014-04-11 9:03 ` Sebastian Hesselbarth
2014-04-11 12:37 ` Antoine Ténart
2014-04-11 12:37 ` Antoine Ténart
2014-04-11 13:35 ` Sebastian Hesselbarth
2014-04-11 13:35 ` Sebastian Hesselbarth
2014-04-11 13:35 ` Sebastian Hesselbarth
2014-04-22 12:52 ` Linus Walleij
2014-04-22 12:52 ` Linus Walleij
2014-04-22 15:56 ` Antoine Ténart
2014-04-22 15:56 ` Antoine Ténart
2014-04-22 15:56 ` Antoine Ténart
2014-04-23 14:05 ` Linus Walleij
2014-04-23 14:05 ` Linus Walleij
2014-04-23 14:05 ` Linus Walleij
2014-04-10 13:07 ` [PATCH RESEND 3/5] ARM: berlin: add the pinctrl dependency for the " Antoine Ténart
2014-04-10 13:07 ` Antoine Ténart
2014-04-11 9:05 ` Sebastian Hesselbarth
2014-04-11 9:05 ` Sebastian Hesselbarth
2014-04-11 9:05 ` Sebastian Hesselbarth
2014-04-17 13:13 ` Antoine Ténart
2014-04-17 13:13 ` Antoine Ténart
2014-04-17 13:13 ` Antoine Ténart
2014-04-17 13:24 ` Sebastian Hesselbarth
2014-04-17 13:24 ` Sebastian Hesselbarth
2014-04-17 13:24 ` Sebastian Hesselbarth
2014-04-10 13:07 ` [PATCH RESEND 4/5] Documentation: add the Marvell Berlin pinctrl documentation Antoine Ténart
2014-04-10 13:07 ` Antoine Ténart
2014-04-11 6:33 ` Jisheng Zhang
2014-04-11 6:33 ` Jisheng Zhang
2014-04-11 6:33 ` Jisheng Zhang
2014-04-11 8:12 ` Antoine Ténart
2014-04-11 8:12 ` Antoine Ténart
2014-04-11 8:18 ` Jisheng Zhang
2014-04-11 8:18 ` Jisheng Zhang
2014-04-11 8:18 ` Jisheng Zhang
2014-04-11 8:22 ` Andrew Lunn
2014-04-11 8:22 ` Andrew Lunn
2014-04-11 8:22 ` Andrew Lunn
2014-04-11 9:13 ` Sebastian Hesselbarth
2014-04-11 9:13 ` Sebastian Hesselbarth
2014-04-11 9:13 ` Sebastian Hesselbarth
2014-04-10 13:07 ` [PATCH RESEND 5/5] ARM: dts: berlin: add the pinctrl node and muxing setup for uarts Antoine Ténart
2014-04-10 13:07 ` Antoine Ténart
2014-04-10 13:07 ` Antoine Ténart
2014-04-11 8:18 ` Andrew Lunn
2014-04-11 8:18 ` Andrew Lunn
2014-04-11 9:09 ` Antoine Ténart
2014-04-11 9:09 ` Antoine Ténart
2014-04-11 9:09 ` Antoine Ténart
2014-04-11 9:19 ` Sebastian Hesselbarth
2014-04-11 9:19 ` Sebastian Hesselbarth
2014-04-11 9:19 ` Sebastian Hesselbarth
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=20140411162716.74e739e1@xhacker \
--to=jszhang@marvell.com \
--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 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.