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: <20150824074605.GF2413@lukather>
Date:	Mon, 24 Aug 2015 09:46:05 +0200
From:	Maxime Ripard <maxime.ripard@...e-electrons.com>
To:	Hans de Goede <hdegoede@...hat.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Jelle van der Waa <jelle@...aa.nl>,
	linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
	linux-sunxi@...glegroups.com
Subject: Re: [PATCH] net: sun4i-emac: Claim emac sram

Hi Hans,

On Sun, Aug 23, 2015 at 08:31:38PM +0200, Hans de Goede wrote:
> Claim the emac sram ourselves, rather then relying on the bootloader
> having mapped the sram to the emac controller during boot.
> 
> Signed-off-by: Hans de Goede <hdegoede@...hat.com>
> ---
>  drivers/net/ethernet/allwinner/sun4i-emac.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/allwinner/sun4i-emac.c b/drivers/net/ethernet/allwinner/sun4i-emac.c
> index bab01c84..48ce83e 100644
> --- a/drivers/net/ethernet/allwinner/sun4i-emac.c
> +++ b/drivers/net/ethernet/allwinner/sun4i-emac.c
> @@ -28,6 +28,7 @@
>  #include <linux/of_platform.h>
>  #include <linux/platform_device.h>
>  #include <linux/phy.h>
> +#include <linux/soc/sunxi/sunxi_sram.h>
>  
>  #include "sun4i-emac.h"
>  
> @@ -857,11 +858,17 @@ static int emac_probe(struct platform_device *pdev)
>  
>  	clk_prepare_enable(db->clk);
>  
> +	ret = sunxi_sram_claim(&pdev->dev);
> +	if (ret) {
> +		dev_err(&pdev->dev, "Error couldn't map SRAM to device\n");
> +		goto out;

Shouldn't you disable you clock too?

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ