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: <D958900912E20642BCBC71664EFECE3E6E17CF0A07@BGMAIL02.nvidia.com>
Date:	Thu, 29 Nov 2012 14:37:37 +0530
From:	Venu Byravarasu <vbyravarasu@...dia.com>
To:	"Kim, Milo" <Milo.Kim@...com>,
	Andrew Morton <akpm@...ux-foundation.org>
CC:	Samuel Ortiz <sameo@...ux.intel.com>,
	"a.zummo@...ertech.it" <a.zummo@...ertech.it>,
	"swarren@...dotorg.org" <swarren@...dotorg.org>,
	Sivaram Nair <sivaramn@...dia.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 2/2] rtc-tps65910: enable RTC power domain on
 initialization

> -----Original Message-----
> From: Kim, Milo [mailto:Milo.Kim@...com]
> Sent: Thursday, November 29, 2012 2:18 PM
> To: Andrew Morton
> Cc: Samuel Ortiz; a.zummo@...ertech.it; swarren@...dotorg.org; Venu
> Byravarasu; Sivaram Nair; linux-kernel@...r.kernel.org
> Subject: [PATCH 2/2] rtc-tps65910: enable RTC power domain on initialization
> 
>  Enabling RTC HW block depends on the default value of TPS65910 register.
>  In some mode, RTC block is disabled by default.(eg. AM3517 Craneboard)
>  In this case, RTC_PWDN(RTC power down) bit should be cleared to enable
>  the RTC HW block.

>From the description of RTC_PWDN bit of DEVCTRL_REG in TPS65910 data sheet
it is very evident that the default value of RTC_PWDN is 0.

Probably on "AM3517 Craneboard", some code is running prior to the RTC driver
which might be writing 1 on to this bit. IMO you must disable that write operation
instead of just writing default value into a register.

> 
>  This patch also works in case that RTC block is active by default,
>  because there is no side effect even if the bit is updated again.
> 
>  Tested on AM3517 Craneboard.
> 
> Signed-off-by: Milo(Woogyom) Kim <milo.kim@...com>
> ---
>  drivers/rtc/rtc-tps65910.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
> index e8d44bc..b4d9f02 100644
> --- a/drivers/rtc/rtc-tps65910.c
> +++ b/drivers/rtc/rtc-tps65910.c
> @@ -247,6 +247,13 @@ static int __devinit tps65910_rtc_probe(struct
> platform_device *pdev)
>  		return ret;
> 
>  	dev_dbg(&pdev->dev, "Enabling rtc-tps65910.\n");
> +
> +	/* Enable RTC digital power domain */
> +	ret = regmap_update_bits(tps65910->regmap, TPS65910_DEVCTRL,
> +		DEVCTRL_RTC_PWDN_MASK, 0 <<
> DEVCTRL_RTC_PWDN_SHIFT);
> +	if (ret < 0)
> +		return ret;
> +
>  	rtc_reg = TPS65910_RTC_CTRL_STOP_RTC;
>  	ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL,
> rtc_reg);
>  	if (ret < 0)
> --
> 1.7.9.5
> 
> 
> Best Regards,
> Milo
> 

--
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