Re: [PATCH RESEND 2/5] pinctrl: berlin: add a pinctrl driver for Marvell Berlin SoCs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxxxxxxx> 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().

Thanks for the feedback !

Antoine

-- 
Antoine Ténart, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux