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: <20200527135127.GA1634618@smile.fi.intel.com>
Date:   Wed, 27 May 2020 16:51:27 +0300
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Serge Semin <Sergey.Semin@...kalelectronics.ru>
Cc:     Jarkko Nikula <jarkko.nikula@...ux.intel.com>,
        Wolfram Sang <wsa@...-dreams.de>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Serge Semin <fancer.lancer@...il.com>,
        Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Rob Herring <robh+dt@...nel.org>, linux-mips@...r.kernel.org,
        devicetree@...r.kernel.org, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 09/11] i2c: designware: Retrieve quirk flags as early
 as possible

On Wed, May 27, 2020 at 03:01:09PM +0300, Serge Semin wrote:
> Some platforms might need to activate the driver quirks at a very early
> probe stage. For instance, Baikal-T1 System I2C doesn't need to map the
> registers space as ones belong to the system controller. Instead it will
> request the syscon regmap from the parental DT node. In order to be able
> to do so let's retrieve the model flags right after the DW I2C private
> data is created.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>

> Signed-off-by: Serge Semin <Sergey.Semin@...kalelectronics.ru>
> Cc: Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>
> Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
> Cc: Rob Herring <robh+dt@...nel.org>
> Cc: linux-mips@...r.kernel.org
> Cc: devicetree@...r.kernel.org
> 
> ---
> 
> Changelog v3:
> - This is a new patch, which has been created due to declining the
>   glue-layer approach.
> ---
>  drivers/i2c/busses/i2c-designware-platdrv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
> index ca057aa9eac4..ad292de2d260 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -124,6 +124,8 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
>  	if (!dev)
>  		return -ENOMEM;
>  
> +	dev->flags |= (uintptr_t)device_get_match_data(&pdev->dev);
> +
>  	dev->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(dev->base))
>  		return PTR_ERR(dev->base);
> @@ -146,8 +148,6 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
>  
>  	i2c_dw_acpi_adjust_bus_speed(&pdev->dev);
>  
> -	dev->flags |= (uintptr_t)device_get_match_data(&pdev->dev);
> -
>  	if (pdev->dev.of_node)
>  		dw_i2c_of_configure(pdev);
>  
> -- 
> 2.26.2
> 

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ