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: <5E7C2FE2AE03DF4CA6AC500032BF8F77C1762A@008-AM1MPN1-072.mgdnok.nokia.com>
Date:	Mon, 16 Jan 2012 13:11:46 +0000
From:	<ext-denis.2.karpov@...ia.com>
To:	<shubhrajyoti@...com>, <linux-mmc@...r.kernel.org>
CC:	<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH RFC] mmc : omap_hsmmc : Save and restore the sysc across
 reset

ext Shubhrajyoti D wrote onĀ 2012-01-16:
> The commit 11dd62:[omap_hsmmc: context save/restore support]
> 
> does a reset and restores AUTOIDLE settings.
> This patch saves the register does a reset and restores
> the same configuration.
...
>  	if (pdata->get_context_loss_count) {
> @@ -700,6 +700,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host
> *host)
>  		&& time_before(jiffies, timeout))
>  		;
> +	sysc = OMAP_HSMMC_READ(host->base, SYSCONFIG);
>  	/* Do software reset */
>  	OMAP_HSMMC_WRITE(host->base, SYSCONFIG, SOFTRESET);
>  	timeout = jiffies + msecs_to_jiffies(MMC_TIMEOUT_MS);
> @@ -707,8 +708,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host
> *host)
>  		&& time_before(jiffies, timeout))
>  		;
> -	OMAP_HSMMC_WRITE(host->base, SYSCONFIG,
> -			OMAP_HSMMC_READ(host->base, SYSCONFIG) | AUTOIDLE);
> +	OMAP_HSMMC_WRITE(host->base, SYSCONFIG, sysc);

The meaning of the code is to restore the register context after it was lost during transition into low power consumption state. SW reset is needed to bring all the registers in a consistent state before reconfiguring some of them. 

Saving and restoring the SYSCONFIG register across SW reset is not needed. 

Also re-configuring AUTOIDLE feature is not necessary since SYSCONFIG reset value has is 1 already, according to TRM. I guess it was done to make things more explicit.

Denis
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ