From patchwork Thu Jul 20 00:29:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 791310 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="hfmIwnCx"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xCZXR22FCz9t36 for ; Thu, 20 Jul 2017 10:29:27 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753917AbdGTA3Z (ORCPT ); Wed, 19 Jul 2017 20:29:25 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:50896 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753720AbdGTA3Z (ORCPT ); Wed, 19 Jul 2017 20:29:25 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id B4F5B326; Thu, 20 Jul 2017 02:29:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1500510563; bh=GVpkBBNzceRRNG1bEahI6gXqIGn48Q+sj6KOCFHZSYs=; h=Date:In-Reply-To:References:From:Subject:To:From; b=hfmIwnCxmZMThmDnNGYH8Md+nsv6TqQTi59df6qawtjpmAC2Af+sZU24FceaLQKfq HOimzAymFL85rVrJjBNBUsAifo0gUaykPQNOZuYkFJc6y8tjxd86V45LJ8Mh1HQS49 9o9NEie9Ipo9cMsmTYGWKOTK4L4gwKTbzW3ns4dgBAQJ3tdn95G1XEcBQgH/Wutx46 +v17aLvsBkjDqfXb3a/irZsgcFl6JoLN2QQC5C3Jngm221zND2x0hiNd5i7HfxCOuY UiBXYhTt4y9XltzJ6nIvlZKTfRkdESvUgIoBB+Lzpb9UMFWxb5pg+HRuY4Lyw7s9S7 4K5XZXaHn11Hg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at rere Date: Thu, 20 Jul 2017 02:29:23 +0200 Message-Id: In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH 2/9] arm: cache-l2x0: remove duplicate warning MIME-Version: 1.0 To: linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Warning abound changing of AUX register in l2x0_of_init() is later repeated in __l2c_init(). Move whole thing over to __l2c_init(). Signed-off-by: Michał Mirosław --- arch/arm/mm/cache-l2x0.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 808efbb89b88..ea1e70ff4568 100644 --- a/arch/arm/mm/cache-l2x0.c +++ b/arch/arm/mm/cache-l2x0.c @@ -819,6 +819,8 @@ static int __init __l2c_init(const struct l2c_init_data *data, if (old_aux != aux) pr_warn("L2C: DT/platform modifies aux control register: 0x%08x -> 0x%08x\n", old_aux, aux); + else if (aux_mask != ~0U && aux_val != 0) + pr_alert("L2C: platform provided aux values match the hardware, so have no effect. Please remove them.\n"); /* Determine the number of ways */ switch (cache_id & L2X0_CACHE_ID_PART_MASK) { @@ -1755,7 +1757,7 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask) const struct l2c_init_data *data; struct device_node *np; struct resource res; - u32 cache_id, old_aux; + u32 cache_id; u32 cache_level = 2; bool nosync = false; @@ -1778,14 +1780,6 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask) of_property_read_bool(np, "arm,io-coherent")) data = &of_l2c310_coherent_data; - old_aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL); - if (old_aux != ((old_aux & aux_mask) | aux_val)) { - pr_warn("L2C: platform modifies aux control register: 0x%08x -> 0x%08x\n", - old_aux, (old_aux & aux_mask) | aux_val); - } else if (aux_mask != ~0U && aux_val != 0) { - pr_alert("L2C: platform provided aux values match the hardware, so have no effect. Please remove them.\n"); - } - /* All L2 caches are unified, so this property should be specified */ if (!of_property_read_bool(np, "cache-unified")) pr_err("L2C: device tree omits to specify unified cache\n");