Messages in this thread | | | From | Arnd Bergmann <> | Date | Mon, 9 Sep 2019 11:44:13 +0200 | 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@amazon.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@amazon.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
| |