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]
Date:	Fri, 10 Oct 2014 13:07:27 -0500
From:	Felipe Balbi <balbi@...com>
To:	Johan Hovold <johan@...nel.org>
CC:	Alessandro Zummo <a.zummo@...ertech.it>,
	Tony Lindgren <tony@...mide.com>,
	BenoƮt Cousson <bcousson@...libre.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Felipe Balbi <balbi@...com>, Lokesh Vutla <lokeshvutla@...com>,
	Guenter Roeck <linux@...ck-us.net>,
	Colin Foe-Parker <colin.foeparker@...icpd.com>,
	<nsekhar@...com>, <t-kristo@...com>, <j-keerthy@...com>,
	<linux-omap@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<devicetree@...r.kernel.org>, <rtc-linux@...glegroups.com>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 09/12] rtc: omap: add support for pmic_power_en

Hi,

On Thu, Oct 09, 2014 at 09:06:31PM +0200, Johan Hovold wrote:
> @@ -124,11 +138,18 @@
>   */
>  #define OMAP_RTC_HAS_POWER_UP_RESET	BIT(3)
>  
> +/*
> + * Some RTC IP revisions can control an external PMIC via the pmic_power_en
> + * pin.
> + */
> +#define OMAP_RTC_HAS_PMIC_MODE		BIT(4)
> +
>  static void __iomem	*rtc_base;
>  
>  #define rtc_read(addr)		readb(rtc_base + (addr))
>  #define rtc_write(val, addr)	writeb(val, rtc_base + (addr))
>  
> +#define rtc_readl(addr)		readl(rtc_base + (addr))

looks like this should be part of another patch. Or, at a minimum (since
it's so minor), it deserves a mention on commit log.

>  #define rtc_writel(val, addr)	writel(val, rtc_base + (addr))
>  
>  
> @@ -338,6 +359,61 @@ static int omap_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alm)
>  	return 0;
>  }
>  
> +static struct platform_device *omap_rtc_power_off_dev;
> +
> +/*
> + * omap_rtc_poweroff: RTC-controlled power off
> + *
> + * The RTC can be used to control an external PMIC via the pmic_power_en pin,
> + * which can be configured to transition to OFF on ALARM2 events.
> + *
> + * Notes:
> + * The two-second alarm offset is the shortest offset possible as the alarm
> + * registers must be set before the next timer update and the offset
> + * calculation is to heavy for everything to be done within a single access

s/to/too

> @@ -425,10 +505,12 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
>  		rtc_writel(KICK1_VALUE, OMAP_RTC_KICK1_REG);
>  	}
>  
> -	/* clear pending irqs, and set 1/second periodic,
> -	 * which we'll use instead of update irqs
> +	/*
> +	 * disable interrupts
> +	 *
> +	 * NOTE: ALARM2 is not cleared on AM3352 if rtc_write (writeb) is used
>  	 */
> -	rtc_write(0, OMAP_RTC_INTERRUPTS_REG);
> +	rtc_writel(0, OMAP_RTC_INTERRUPTS_REG);

bug fix, should be part of a separate patch and Cc stable :-)

-- 
balbi

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