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:	Thu, 20 Nov 2014 13:09:16 +0000
From:	Dmitry Lavnikevich <D.Lavnikevich@...-solutions.com>
To:	"Opensource [Steve Twiss]" <stwiss.opensource@...semi.com>
CC:	Support Opensource <Support.Opensource@...semi.com>,
	"a.zummo@...ertech.it" <a.zummo@...ertech.it>,
	"rtc-linux@...glegroups.com" <rtc-linux@...glegroups.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rtc: da9063: Fix ALARM interrupt registration.


> On 20Nov, 2014, at 12:23, Opensource [Steve Twiss] <stwiss.opensource@...semi.com> wrote:
> 
> On 20 November 2014 09:55 Dmitry Lavnikevich wrote:
> 
>> Call platform_get_irq_byname() returns local IRQ number. Use
>> regmap_irq_get_virq() to get VIRQ instead.
>> This fixes rtc initialization error:
>> da9063-rtc da9063-rtc: Failed to request ALARM IRQ 1: -22
>> 
>> Signed-off-by: Dmitry Lavnikevich <d.lavnikevich@...-solutions.com>
> 
> Hi Dmitry,
> 
> Please refer to the previous patch :
> http://patchwork.ozlabs.org/patch/329051/

Yes, I’ve seen this patch for da9055.
I have no hardware with da9055 to test it but as I understood from
da9055-core.c sources the difference is in regmap_add_irq_chip()
call. Looks like passing irq_base = -1 to it dynamically allocates
irq_base so call regmap_irq_chip_get_base() then returns base for
virtual IRQ.

In case of da9063 there is no use of
regmap_add_irq_chip/regmap_irq_chip_get_base and because of that
da9063-core registeres IRQ using irq_base=0 and therefore is local
instead of virtual.

>> ---
>> drivers/rtc/rtc-da9063.c | 1 +
>> 1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c
>> index 731ed1a..04743a6 100644
>> --- a/drivers/rtc/rtc-da9063.c
>> +++ b/drivers/rtc/rtc-da9063.c
>> @@ -315,6 +315,7 @@ static int da9063_rtc_probe(struct platform_device
>> *pdev)
>> 	platform_set_drvdata(pdev, rtc);
>> 
>> 	irq_alarm = platform_get_irq_byname(pdev, "ALARM");
>> +	irq_alarm = regmap_irq_get_virq(da9063->regmap_irq, irq_alarm);
>> 	ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL,
>> 					da9063_alarm_event,
>> 					IRQF_TRIGGER_LOW |
>> IRQF_ONESHOT,
>> --
>> 2.1.3
> 
> This patch above gives the following error when running on the DA9063:
> 
> da9063-rtc da9063-rtc: Failed to request ALARM IRQ -22: -22
> da9063-rtc: probe of da9063-rtc failed with error -22

I have tested this patch on pfla02 board and it was ok. On which
board this fail occured?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ