lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180620104750.unr2xryqszbv33mo@fsr-ub1664-175>
Date:   Wed, 20 Jun 2018 10:47:51 +0000
From:   Abel Vesa <abel.vesa@....com>
To:     Lucas Stach <l.stach@...gutronix.de>
CC:     "A.s. Dong" <aisheng.dong@....com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>,
        Shawn Guo <shawnguo@...nel.org>,
        Pengutronix Kernel Team <kernel@...gutronix.de>,
        Linus Walleij <linus.walleij@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Abel Vesa <abelvesa@...ux.com>
Subject: Re: [PATCH v3 2/3] pinctrl: imx: allow to configure SION with generic
 pinconf

On Wed, Jun 20, 2018 at 10:16:42AM +0200, Lucas Stach wrote:
> Hi Abel,
> 
> as this series switches back to using the raw padcfg values in DT
> instead of generic pinconf (which I think is the right move), we can
> drop this patch from the series.
> 

Cool, will drop it in the next version.

Thanks,
Abel

> Regards,
> Lucas
> 
> Am Mittwoch, den 20.06.2018, 10:24 +0300 schrieb Abel Vesa:
> > > From: Lucas Stach <l.stach@...gutronix.de>
> > 
> > The SION bit force enables the input buffer, overriding the configuration
> > driven by the muxed module. It is not located in the pad config register,
> > but in the mux register and thus needs special handling.
> > 
> > > Signed-off-by: Lucas Stach <l.stach@...gutronix.de>
> > > Signed-off-by: Abel Vesa <abel.vesa@....com>
> > ---
> >  drivers/pinctrl/freescale/pinctrl-imx.c | 19 +++++++------------
> >  drivers/pinctrl/freescale/pinctrl-imx.h |  4 ++++
> >  2 files changed, 11 insertions(+), 12 deletions(-)
> > 
> > diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
> > index 1c6bb15..335edc9 100644
> > --- a/drivers/pinctrl/freescale/pinctrl-imx.c
> > +++ b/drivers/pinctrl/freescale/pinctrl-imx.c
> > @@ -26,10 +26,6 @@
> >  #include "../pinmux.h"
> >  #include "pinctrl-imx.h"
> >  
> > -/* The bits in CONFIG cell defined in binding doc*/
> > > > -#define IMX_NO_PAD_CTL	0x80000000	/* no pin config need */
> > > -#define IMX_PAD_SION 0x40000000		/* set SION */
> > -
> >  static inline const struct group_desc *imx_pinctrl_find_group_by_name(
> > >  				struct pinctrl_dev *pctldev,
> > >  				const char *name)
> > @@ -514,18 +510,17 @@ static int imx_pinctrl_parse_groups(struct device_node *np,
> > >  		pin->mux_mode = be32_to_cpu(*list++);
> > >  		pin->input_val = be32_to_cpu(*list++);
> >  
> > > -		if (info->generic_pinconf) {
> > > +		if (info->generic_pinconf)
> > >  			/* generic pin config decoded */
> > >  			pin->config = config;
> > > -		} else {
> > > +		else
> > >  			/* legacy pin config read from devicetree */
> > > -			config = be32_to_cpu(*list++);
> > > +			pin->config = be32_to_cpu(*list++);
> >  
> > > -			/* SION bit is in mux register */
> > > -			if (config & IMX_PAD_SION)
> > > -				pin->mux_mode |= IOMUXC_CONFIG_SION;
> > > -			pin->config = config & ~IMX_PAD_SION;
> > > -		}
> > > +		/* SION bit is in mux register */
> > > +		if (pin->config & IMX_PAD_SION)
> > > +			pin->mux_mode |= IOMUXC_CONFIG_SION;
> > > +		pin->config = pin->config & ~IMX_PAD_SION;
> >  
> > >  		dev_dbg(ipctl->dev, "%s: 0x%x 0x%08lx", info->pins[pin_id].name,
> > >  				pin->mux_mode, pin->config);
> > diff --git a/drivers/pinctrl/freescale/pinctrl-imx.h b/drivers/pinctrl/freescale/pinctrl-imx.h
> > index 4b8225c..44567a6 100644
> > --- a/drivers/pinctrl/freescale/pinctrl-imx.h
> > +++ b/drivers/pinctrl/freescale/pinctrl-imx.h
> > @@ -14,6 +14,10 @@
> >  #include <linux/pinctrl/pinconf-generic.h>
> >  #include <linux/pinctrl/pinmux.h>
> >  
> > +/* The bits in CONFIG cell defined in binding doc*/
> > > > +#define IMX_NO_PAD_CTL	0x80000000	/* no pin config need */
> > > +#define IMX_PAD_SION 0x40000000		/* set SION */
> > +
> >  struct platform_device;
> >  
> >  extern struct pinmux_ops imx_pmx_ops;

-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ