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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200513123033.in3uksakteze3y5t@mobilestation>
Date:   Wed, 13 May 2020 15:30:33 +0300
From:   Serge Semin <Sergey.Semin@...kalelectronics.ru>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
CC:     Serge Semin <fancer.lancer@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Georgy Vlasov <Georgy.Vlasov@...kalelectronics.ru>,
        Ramil Zaripov <Ramil.Zaripov@...kalelectronics.ru>,
        Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Paul Burton <paulburton@...nel.org>,
        Ralf Baechle <ralf@...ux-mips.org>,
        Arnd Bergmann <arnd@...db.de>,
        Allison Randal <allison@...utok.net>,
        Gareth Williams <gareth.williams.jx@...esas.com>,
        Rob Herring <robh+dt@...nel.org>, <linux-mips@...r.kernel.org>,
        <devicetree@...r.kernel.org>, Stephen Boyd <swboyd@...omium.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        YueHaibing <yuehaibing@...wei.com>,
        Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        <linux-spi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 13/17] spi: dw: Initialize paddr in DW SPI MMIO private
 data

On Fri, May 08, 2020 at 10:21:44PM +0300, Andy Shevchenko wrote:
> On Fri, May 08, 2020 at 04:29:38PM +0300, Serge Semin wrote:
> > This field is used only for the DW SPI DMA code initialization, that's
> > why there were no problems with it being uninitialized in Dw SPI MMIO
> > driver. Since in a further patch we are going to introduce the DW SPI DMA
> > support in the MMIO version of the driver, lets set the field with the
> > physical address of the DW SPI controller registers region.
> 
> ...
> 
> > -	dws->regs = devm_platform_ioremap_resource(pdev, 0);
> > +	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > +	dws->regs = devm_ioremap_resource(&pdev->dev, mem);
> 

> There is a helper
> 	dws->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &mem);

Oh, good point. It has been just added, in kernel v5.7. v5.6 didn't provide such
a convenient helper. Thanks for the suggestion.

-Sergey

> 
> 
> >  	if (IS_ERR(dws->regs)) {
> >  		dev_err(&pdev->dev, "SPI region map failed\n");
> >  		return PTR_ERR(dws->regs);
> >  	}
> > +	dws->paddr = mem->start;
> >  
> >  	dws->irq = platform_get_irq(pdev, 0);
> >  	if (dws->irq < 0)
> > -- 
> > 2.25.1
> > 
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ