From patchwork Fri Mar 4 09:48:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 8501561 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7052EC0553 for ; Fri, 4 Mar 2016 09:51:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8DB1320142 for ; Fri, 4 Mar 2016 09:51:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A98622013D for ; Fri, 4 Mar 2016 09:51:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1abmNM-0003AE-Sp; Fri, 04 Mar 2016 09:50:24 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1abmMK-0001Zi-Or for linux-arm-kernel@lists.infradead.org; Fri, 04 Mar 2016 09:49:22 +0000 Received: by mail-wm0-x233.google.com with SMTP id n186so26669417wmn.1 for ; Fri, 04 Mar 2016 01:49:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zAwxCgWcv9Txl/87RPqAOSuwxq2HEnabcjprAsQJ37c=; b=ggnD/TueKaKHMsSOVY2ijaFHLJxDfxvgLP0p/11VU67mXba3BBBWXPU/jJ2m2IzYjK zgYHZhA8z/CNb3cNCgfIDuLKG+qgDcI/HZY5pDC8X5FLC+msmZ/cVWXelT/HmZZ7g972 14DllpXiisATEydZpJhRLZqdtv8DV30KzCkhc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zAwxCgWcv9Txl/87RPqAOSuwxq2HEnabcjprAsQJ37c=; b=ZYHP8OLTbGb0J5zy1WSetDPLbGXYu2FsSfCcQ/n5QTlI6H7JF+oamUUXyi+QetryPx lvIC5npD6ac3XIvfvNDZiaRGxdmcqGhRGkGpw5AefEwh/N3TuGnBdpNdfqL4yg0pE4+W 3lj8R6VQapQXlNRN+Yb+SPcn+rjIXCNmt73dW3gdsOytLLZoBBkrd3HJdtZXpN7vOPPZ flHbyE+J/PTEGBu3IJFqPH5X33dGrgl9VMdcbQy/vgUSQGGAWhaW1Ou/rlSBrfNN/+LZ hY/ClW7pChZYxkErzhukHg6IkbMy1tm+fp3r6/xfr6derlj90uQ0kR8KI3V9s/tR8zLn dDbw== X-Gm-Message-State: AD7BkJLZTAY6O99HWBjknc1WhodP+oJU0/19a1YEPt4Xn7OjU2HIm/mDEqgU3wPnPFG48/w6 X-Received: by 10.28.10.149 with SMTP id 143mr3825717wmk.38.1457084939217; Fri, 04 Mar 2016 01:48:59 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id s206sm2426533wmf.23.2016.03.04.01.48.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 04 Mar 2016 01:48:58 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, linux-mtd@lists.infradead.org, linux@arm.linux.org.uk, dan.j.williams@intel.com Subject: [PATCH v3 2/4] mtd: pxa2xx-flash: switch back from memremap to ioremap_cached Date: Fri, 4 Mar 2016 10:48:46 +0100 Message-Id: <1457084928-21179-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1457084928-21179-1-git-send-email-ard.biesheuvel@linaro.org> References: <1457084928-21179-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160304_014921_175388_6385FD85 X-CRM114-Status: GOOD ( 12.71 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.jarzmik@free.fr, computersforpeace@gmail.com, dwmw2@infradead.org, Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This reverts commit 06968a54790d ("mtd: pxa2xx-flash: switch from ioremap_cache to memremap"), since NOR with memory semantics in array mode and RAM are not necessarily the same thing, and architectures may implement ioremap_cached() and memremap() with different memory attributes. For this reason, ioremap_cached() has been brought back from the dead on the ARM side, so switch this driver back to using it instead of memremap(). Cc: David Woodhouse Cc: Brian Norris Cc: Dan Williams Signed-off-by: Ard Biesheuvel --- drivers/mtd/maps/pxa2xx-flash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c index 7497090e9900..2cde28ed95c9 100644 --- a/drivers/mtd/maps/pxa2xx-flash.c +++ b/drivers/mtd/maps/pxa2xx-flash.c @@ -71,8 +71,8 @@ static int pxa2xx_flash_probe(struct platform_device *pdev) info->map.name); return -ENOMEM; } - info->map.cached = memremap(info->map.phys, info->map.size, - MEMREMAP_WB); + info->map.cached = + ioremap_cached(info->map.phys, info->map.size); if (!info->map.cached) printk(KERN_WARNING "Failed to ioremap cached %s\n", info->map.name); @@ -111,7 +111,7 @@ static int pxa2xx_flash_remove(struct platform_device *dev) map_destroy(info->mtd); iounmap(info->map.virt); if (info->map.cached) - memunmap(info->map.cached); + iounmap(info->map.cached); kfree(info); return 0; }