From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B04FCC433EF for ; Mon, 9 Sep 2019 09:44:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E5B32086D for ; Mon, 9 Sep 2019 09:44:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388935AbfIIJob (ORCPT ); Mon, 9 Sep 2019 05:44:31 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:38147 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729082AbfIIJoa (ORCPT ); Mon, 9 Sep 2019 05:44:30 -0400 Received: by mail-qk1-f196.google.com with SMTP id x5so12394675qkh.5; Mon, 09 Sep 2019 02:44:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eq2XuOQub5LXmNdZQdl0dNhC7+edIsPrDvzkz2RrzVA=; b=Xf8pct8uX5HJymD1dspMXEeG5CjYPNxBUYQKgXaH1Hx2+PaaQvIfSSuB7QCKY2BvJC zrcogVeS/CsBxWi4hCg5w2hHMM5dNjp8d1lHsCr3p8nr9g5Nn1/2j8YovgTp8z0/dJWc iL0GZziutJSg9c6ipP/06GiRjtUKF9yc3e1yHSvjQOKPTH/sNADbVjKGQEqvCJmmFXzO BpJFQyHxWqpod2oEvuozL+XCyJEJcsj2rKnjsISMWymqXvC6S4qdJPd9wr/kAvdsDxm8 ePZIRZQGXMu4p0xTcj1Q9eHqaleiHr0qvms3nwu3FlN2QkefR61pEYawU+/UWe6qmxi6 C11g== X-Gm-Message-State: APjAAAVOdMXKjjqsUkts8u9eHUEybVDWi3UsBQEr8QjzPjXr2k/tZVNz IhEM9zltH+Sm9054t0LHa0kCetnu9OTuQXm4M70= X-Google-Smtp-Source: APXvYqyP9aDV8ZsrfhZ0CKBAlFvxBvCyNUWYRtQ+3kZ7PzdPLrpPHD/Bz780Tvcj7KaHZ5XR85/SF7oeG/38AAgDTQw= X-Received: by 2002:ae9:ee06:: with SMTP id i6mr1781989qkg.3.1568022269523; Mon, 09 Sep 2019 02:44:29 -0700 (PDT) MIME-Version: 1.0 References: <1568020220-7758-1-git-send-email-talel@amazon.com> <1568020220-7758-3-git-send-email-talel@amazon.com> In-Reply-To: <1568020220-7758-3-git-send-email-talel@amazon.com> From: Arnd Bergmann Date: Mon, 9 Sep 2019 11:44:13 +0200 Message-ID: Subject: Re: [PATCH 2/3] soc: amazon: al-pos: Introduce Amazon's Annapurna Labs POS driver To: Talel Shenhar Cc: Rob Herring , Mark Rutland , Mauro Carvalho Chehab , David Miller , gregkh , Nicolas Ferre , Thomas Gleixner , Patrick Venture , Linus Walleij , Olof Johansson , Maxime Ripard , Santosh Shilimkar , paul.kocialkowski@bootlin.com, mjourdan@baylibre.com, Catalin Marinas , Will Deacon , DTML , "linux-kernel@vger.kernel.org" , Linux ARM , David Woodhouse , Benjamin Herrenschmidt , hhhawa@amazon.com, ronenk@amazon.com, jonnyc@amazon.com, hanochu@amazon.com, barakw@amazon.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 9, 2019 at 11:14 AM Talel Shenhar 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH 2/3] soc: amazon: al-pos: Introduce Amazon's Annapurna Labs POS driver Date: Mon, 9 Sep 2019 11:44:13 +0200 Message-ID: References: <1568020220-7758-1-git-send-email-talel@amazon.com> <1568020220-7758-3-git-send-email-talel@amazon.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <1568020220-7758-3-git-send-email-talel@amazon.com> Sender: linux-kernel-owner@vger.kernel.org To: Talel Shenhar Cc: Rob Herring , Mark Rutland , Mauro Carvalho Chehab , David Miller , gregkh , Nicolas Ferre , Thomas Gleixner , Patrick Venture , Linus Walleij , Olof Johansson , Maxime Ripard , Santosh Shilimkar , paul.kocialkowski@bootlin.com, mjourdan@baylibre.com, Catalin Marinas , Will Deacon , DTML , "linux-kernel@vger.kernel.org" , Linux ARM David List-Id: devicetree@vger.kernel.org On Mon, Sep 9, 2019 at 11:14 AM Talel Shenhar 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 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81266C00307 for ; Mon, 9 Sep 2019 09:44:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5093E21924 for ; Mon, 9 Sep 2019 09:44:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="aU6fKJM/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5093E21924 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MnGa/BVAcpHvkslcObJRFGfRFE//GguTsu5GLLAWIy0=; b=aU6fKJM/PP3c3X ap7GI+gdrKAEkoPwCCxk5jbphipCzXsq4ACoOskWCuOJiuUtffBs1C/qmiJLU5PB1jQ33KHY64BMK p/AniNOMmx3pVgJxg4mikvNavHbN9XQpsR6/3NT0WL4rnUPipiztIF2+7HdyZmiwGzDuo/qrojGPH Edfj+l7NTAGMzRsGrLXt8G843vBWzMHertXJEMAUKUAVL+wXz6LpkQn0acZl2eQo5BQsG4dtpHFyq aQ7D0WU2ZY9btPSJbKIrles4og/zNcbE57HOVOKNZIIwAvHVYO6lTTq49DwnXO14qru3geSjt5nS4 KMeMfTSD1f+dAa56rljA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1i7GDr-0005gv-GC; Mon, 09 Sep 2019 09:44:35 +0000 Received: from mail-qk1-f195.google.com ([209.85.222.195]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7GDo-0005g9-NF for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2019 09:44:33 +0000 Received: by mail-qk1-f195.google.com with SMTP id 201so12350162qkd.13 for ; Mon, 09 Sep 2019 02:44:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=eq2XuOQub5LXmNdZQdl0dNhC7+edIsPrDvzkz2RrzVA=; b=SRWiyhpQ7EtO9HF81EeyZoTw7iJlHdFtXK7mcrVFuDCfpFcoxvO2j3da9boGHB5KLs iinqWK4V0xIeceC/spnm1xIkvYFMPT19z03FqHihUiuEJP71ExRH4sK9pJpCiu7lWwMc Dc/aVXf+hC6J4K2PXXlTNY63/MI5UO3VOQnA0P5R1P75M14ACXZMhsAq77XX5rhFHPKY PoIvmhG7dXGbG8JrDi3FAMVGqMA/WRwdD2qiwNonjf2Dt5WlI7dB82bYoQqsFzW5gViL 1qsdMgj189BC1fIclGNgtyF5QvKLUrRoDdiE5NxFFYbnpOGWVgz4ESLlnguezd3crZmv 5ecQ== X-Gm-Message-State: APjAAAXBTm4zrA3sLwl78gyulefmeFHET+hhAR+P0pVxV6GO74YR8VVu M9967pHEHAzbfCIg7ns9RsAuJivSbeC/uFBLcTI= X-Google-Smtp-Source: APXvYqyP9aDV8ZsrfhZ0CKBAlFvxBvCyNUWYRtQ+3kZ7PzdPLrpPHD/Bz780Tvcj7KaHZ5XR85/SF7oeG/38AAgDTQw= X-Received: by 2002:ae9:ee06:: with SMTP id i6mr1781989qkg.3.1568022269523; Mon, 09 Sep 2019 02:44:29 -0700 (PDT) MIME-Version: 1.0 References: <1568020220-7758-1-git-send-email-talel@amazon.com> <1568020220-7758-3-git-send-email-talel@amazon.com> In-Reply-To: <1568020220-7758-3-git-send-email-talel@amazon.com> From: Arnd Bergmann Date: Mon, 9 Sep 2019 11:44:13 +0200 Message-ID: Subject: Re: [PATCH 2/3] soc: amazon: al-pos: Introduce Amazon's Annapurna Labs POS driver To: Talel Shenhar X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190909_024432_762255_3BDADB06 X-CRM114-Status: GOOD ( 15.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , mjourdan@baylibre.com, Catalin Marinas , Linus Walleij , "linux-kernel@vger.kernel.org" , jonnyc@amazon.com, Mauro Carvalho Chehab , ronenk@amazon.com, Will Deacon , Benjamin Herrenschmidt , DTML , Maxime Ripard , Rob Herring , Santosh Shilimkar , Thomas Gleixner , hanochu@amazon.com, Linux ARM , barakw@amazon.com, hhhawa@amazon.com, gregkh , paul.kocialkowski@bootlin.com, Patrick Venture , Olof Johansson , David Miller , David Woodhouse Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 9, 2019 at 11:14 AM Talel Shenhar 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 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel