On Mon, Sep 9, 2019 at 11:14 AM Talel Shenhar <talel@xxxxxxxxxx> wrote:Thanks.
The Amazon's Annapurna Labs SoCs includes Point Of Serialization errorLooks ok overall, juts a few minor comments:
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@xxxxxxxxxx>
Ack, Will move them as part of v2.
+MODULE_LICENSE("GPL v2");These usually go to the end of the file.
+MODULE_AUTHOR("Talel Shenhar");
+MODULE_DESCRIPTION("Amazon's Annapurna Labs POS driver");
+ log1 = readl_relaxed(pos->mmio_base + AL_POS_ERROR_LOG_1);Why do you require _relaxed() accessors here? Please add a comment
+ 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);
explaining that, or use the regular readl()/writel().
Ack, Will simplify them in v2.
+ resource = platform_get_resource(pdev, IORESOURCE_MEM, 0);This can be simplified to devm_platform_ioremap_resource().
+ pos->mmio_base = devm_ioremap_resource(&pdev->dev, resource);
Ack, Will replace them with platform_get_irq() in v2.
+ pos->irq = irq_of_parse_and_map(pdev->dev.of_node, 0);And this is usually written as platform_get_irq()
Arnd