From patchwork Mon Apr 4 08:31:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 64968 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1058344lbc; Mon, 4 Apr 2016 01:33:37 -0700 (PDT) X-Received: by 10.98.16.150 with SMTP id 22mr18925025pfq.128.1459758817247; Mon, 04 Apr 2016 01:33:37 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id tz5si25860036pab.239.2016.04.04.01.33.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Apr 2016 01:33:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org 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 1amzw4-0003FQ-AV; Mon, 04 Apr 2016 08:32:36 +0000 Received: from mail-lb0-x22e.google.com ([2a00:1450:4010:c04::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1amzvQ-0002I3-P8 for linux-arm-kernel@lists.infradead.org; Mon, 04 Apr 2016 08:32:04 +0000 Received: by mail-lb0-x22e.google.com with SMTP id u8so149321331lbk.0 for ; Mon, 04 Apr 2016 01:31:36 -0700 (PDT) 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=Bd4aIGMV1PdtpoO47V7AVEYhMFsxvTiBDB2G8qS3nB0=; b=Vth+lXxx0BeE0C2prcfjFBiqEtY9r1qNWU8z72unU9MxFh1lL4Ovz8yBFgYxBGzAiT QFlJIgUa/yiY7DoxBVa3osfh4DQq8oSjbhqGSfwlvr2TwU4vBJVz3WOTm498hJaDq28A y4ebqgiMez8SEcWELhbjEZOGMMo+ZpgI7BdX4= 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=Bd4aIGMV1PdtpoO47V7AVEYhMFsxvTiBDB2G8qS3nB0=; b=JFj68cqA/asjbDpc9RiuKlWILBnZEKcjy19WfEaU5Psul7TcUhkL4YIHFrZAFN4Bw3 Ppatn/OnNpzDiRHzUtZQlfvRIftdoAH3+6rD6XLrFjTNnJdBToSJLmLggbMj3dG9PK24 RcIlfv4me+QZlxhdFvgMTR33kGDJX1L+NuVdL5LbGO5SfYr/e7hNato2tBgOnuEramEn xWv0GCgfS752RKsnkEfp78uc52meyK2XgBr/YZvkQqlBcTWScnnqFvm/ChiI5CiJZUvH 3lqck5CzGBALF2w7ACpLqvGE0kv7NIJsfplr1ZgcNBo70ip8fh9fkieZ/aWgIQtb9CeM h+5A== X-Gm-Message-State: AD7BkJKxDIHTMeGpfVgvSW6f4tC+11l1wvF1rPx0xM8jLCHugUjPc7tVQ9eClz0nTcLO0QjC X-Received: by 10.28.98.137 with SMTP id w131mr10670447wmb.30.1459758694327; Mon, 04 Apr 2016 01:31:34 -0700 (PDT) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id cb2sm27838278wjc.16.2016.04.04.01.31.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Apr 2016 01:31:33 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk Subject: [PATCH v5 2/4] mtd: pxa2xx-flash: switch back from memremap to ioremap_cached Date: Mon, 4 Apr 2016 10:31:22 +0200 Message-Id: <1459758684-16191-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459758684-16191-1-git-send-email-ard.biesheuvel@linaro.org> References: <1459758684-16191-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160404_013157_568835_AD88D1B3 X-CRM114-Status: GOOD ( 12.78 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:4010:c04:0:0:0:22e listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 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: matt@codeblueprint.co.uk, dan.j.williams@intel.com, David Woodhouse , Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org 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 Acked-by: Brian Norris Acked-by: Dan Williams Signed-off-by: Ard Biesheuvel --- drivers/mtd/maps/pxa2xx-flash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel 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; }