[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161207154716.5pkdctgnjhnuqp53@piout.net>
Date: Wed, 7 Dec 2016 16:47:16 +0100
From: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
To: Martin Kaiser <martin@...ser.cx>
Cc: Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <kernel@...gutronix.de>,
Juergen Borleis <jbe@...gutronix.de>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Fabio Estevam <fabio.estevam@....com>,
rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] rtc: imxdi: use the security violation interrupt
Hi,
On 19/11/2016 at 14:03:34 +0100, Martin Kaiser wrote :
> The DryIce chipset has a dedicated security violation interrupt that is
> triggered for security violations (if configured to do so). According to
> the publicly available imx258 reference manual, irq 56 is used for this
> interrupt.
>
> Install a handler for the security violation interrupt. Move the code
> for handling security violations from the "normal" interrupt handler
> into the security violation interrupt handler.
>
> Signed-off-by: Martin Kaiser <martin@...ser.cx>
> ---
> .../devicetree/bindings/rtc/imxdi-rtc.txt | 4 +-
> arch/arm/boot/dts/imx25.dtsi | 2 +-
This change should be in a separate patch.
> @@ -783,6 +801,9 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
> imxdi->irq = platform_get_irq(pdev, 0);
> if (imxdi->irq < 0)
> return imxdi->irq;
> + imxdi->sec_irq = platform_get_irq(pdev, 1);
> + if (imxdi->sec_irq < 0)
> + return imxdi->sec_irq;
>
> init_waitqueue_head(&imxdi->write_wait);
>
> @@ -815,6 +836,13 @@ static int __init dryice_rtc_probe(struct platform_device *pdev)
> goto err;
> }
>
> + rc = devm_request_irq(&pdev->dev, imxdi->sec_irq, dryice_sec_irq,
> + IRQF_SHARED, pdev->name, imxdi);
> + if (rc) {
> + dev_warn(&pdev->dev, "security violation interrupt not available.\n");
> + goto err;
If you make that error fatal, it means that the DT ABI changed. I would
simply issue the warning and continue anyway.
> + }
> +
> platform_set_drvdata(pdev, imxdi);
> imxdi->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
> &dryice_rtc_ops, THIS_MODULE);
> --
> 1.7.10.4
>
--
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Powered by blists - more mailing lists