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.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 B31ADC433EF for ; Mon, 9 Sep 2019 11:13:24 +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 867982089F for ; Mon, 9 Sep 2019 11:13:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="LPoSBaa8"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="X/2hIaLz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 867982089F Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com 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-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tFIGWOysMoSaKMqRsPg93BsYIDhfNtGLJNRBliYHz4w=; b=LPoSBaa8ZxLHXKPBoZVCpeajK gqemtb7M9bwZgbw1Xn3+jNdDnMlNJykD8VzcXSqjRhvk/qU0w3KBqAhShxgw5muoBhPF1eDfR9FIs z8CRtnCwTqaKgbBorlpyCf0FOLHJzQHr95u7B7PNY63f3QtqTkZjwu67TqxxGjoBEi4xRo17kDr4X KQC1G1X0y4+q8oJoUtvTBHkniVF41pTDmVYa7Fda9nB75W/3AK5C3M2Kk0v23fxOVPX5dWFXO3U9t sC2C2d1fzbkomAETbYhAlahC+ceI+oBJsK06bYdcHWt3NoX9ehiEa4qBs7nnbIwHRuylO5VK3zGGM QffJJJdKg==; 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 1i7Hbj-0007QP-Ft; Mon, 09 Sep 2019 11:13:19 +0000 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i7Hbf-0007Pf-MZ for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2019 11:13:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1568027595; x=1599563595; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=F9WoBKV+oWdvDBwrEieyAZ8tIJPF4Cx6CuXAUeqFsQk=; b=X/2hIaLzDhmTmldf6pKq9X5lwnuVHi04xz1KXG7ieLBwjevCK0MFwtJ+ cDcVLg8JIXcNrr1nps6pmreNfO29kFUZoBSOVAgSVQ64pkjvzjKD9mOvb B2rczl80ydgx+1lXNha2jeIk1rHba6oZb1IzuDSy0KxDMrQRuIE6H97Pa Q=; X-IronPort-AV: E=Sophos;i="5.64,484,1559520000"; d="scan'208";a="414286943" Received: from iad6-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1d-74cf8b49.us-east-1.amazon.com) ([10.124.125.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP; 09 Sep 2019 11:13:12 +0000 Received: from EX13MTAUEA001.ant.amazon.com (iad55-ws-svc-p15-lb9-vlan2.iad.amazon.com [10.40.159.162]) by email-inbound-relay-1d-74cf8b49.us-east-1.amazon.com (Postfix) with ESMTPS id 57341C0934; Mon, 9 Sep 2019 11:13:06 +0000 (UTC) Received: from EX13D01EUB001.ant.amazon.com (10.43.166.194) by EX13MTAUEA001.ant.amazon.com (10.43.61.243) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 9 Sep 2019 11:13:05 +0000 Received: from [10.125.238.52] (10.43.161.152) by EX13D01EUB001.ant.amazon.com (10.43.166.194) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 9 Sep 2019 11:12:54 +0000 Subject: Re: [PATCH 2/3] soc: amazon: al-pos: Introduce Amazon's Annapurna Labs POS driver To: Arnd Bergmann References: <1568020220-7758-1-git-send-email-talel@amazon.com> <1568020220-7758-3-git-send-email-talel@amazon.com> From: "Shenhar, Talel" Message-ID: <98f0028e-5653-3116-fdaa-1385ecdf0289@amazon.com> Date: Mon, 9 Sep 2019 14:12:48 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Originating-IP: [10.43.161.152] X-ClientProxiedBy: EX13D16UWB001.ant.amazon.com (10.43.161.17) To EX13D01EUB001.ant.amazon.com (10.43.166.194) Precedence: Bulk X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190909_041315_873695_F54C5A2F X-CRM114-Status: GOOD ( 16.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 9/9/2019 12:44 PM, Arnd Bergmann wrote: > 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: Thanks. > >> +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. Ack, Will move them as part of v2. > >> + 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(). I don't think commenting is needed here as there is nothing special in this type of access. I don't see this is common to comment the use of the _relaxed accessors. This driver is for SoC using arm64 cpu. If one uses the non-relaxed version of readl while running on arm64, he shall cause read barrier, which is then doing dsm(ld).. This barrier is not needed here, so we spare the use of the more heavy readl in favor of the less "harmful" one. Let me know what you think. > >> + 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(). Ack, Will simplify them in v2. > >> + pos->irq = irq_of_parse_and_map(pdev->dev.of_node, 0); > And this is usually written as platform_get_irq() Ack, Will replace them with platform_get_irq() in v2. > > Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel