[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 9 Sep 2019 11:44:13 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Talel Shenhar <talel@...zon.com>
Cc: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
David Miller <davem@...emloft.net>,
gregkh <gregkh@...uxfoundation.org>,
Nicolas Ferre <nicolas.ferre@...rochip.com>,
Thomas Gleixner <tglx@...utronix.de>,
Patrick Venture <venture@...gle.com>,
Linus Walleij <linus.walleij@...aro.org>,
Olof Johansson <olof@...om.net>,
Maxime Ripard <mripard@...nel.org>,
Santosh Shilimkar <ssantosh@...nel.org>,
paul.kocialkowski@...tlin.com, mjourdan@...libre.com,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
DTML <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
David Woodhouse <dwmw@...zon.co.uk>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
hhhawa@...zon.com, ronenk@...zon.com, jonnyc@...zon.com,
hanochu@...zon.com, barakw@...zon.com
Subject: Re: [PATCH 2/3] soc: amazon: al-pos: Introduce Amazon's Annapurna
Labs POS driver
On Mon, Sep 9, 2019 at 11:14 AM Talel Shenhar <talel@...zon.com> wrote:
>
> The Amazon's Annapurna Labs SoCs includes Point Of Serialization error
> logging unit that reports an error in case write error (e.g. attempt to
> write to a read only register).
> This patch introduces the support for this unit.
>
> Signed-off-by: Talel Shenhar <talel@...zon.com>
Looks ok overall, juts a few minor comments:
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Talel Shenhar");
> +MODULE_DESCRIPTION("Amazon's Annapurna Labs POS driver");
These usually go to the end of the file.
> + log1 = readl_relaxed(pos->mmio_base + AL_POS_ERROR_LOG_1);
> + if (!FIELD_GET(AL_POS_ERROR_LOG_1_VALID, log1))
> + return IRQ_NONE;
> +
> + log0 = readl_relaxed(pos->mmio_base + AL_POS_ERROR_LOG_0);
> + writel_relaxed(0, pos->mmio_base + AL_POS_ERROR_LOG_1);
Why do you require _relaxed() accessors here? Please add a comment
explaining that, or use the regular readl()/writel().
> + resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + pos->mmio_base = devm_ioremap_resource(&pdev->dev, resource);
This can be simplified to devm_platform_ioremap_resource().
> + pos->irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
And this is usually written as platform_get_irq()
Arnd
Powered by blists - more mailing lists