From patchwork Mon Apr 28 00:27:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 4073131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4F09D9F169 for ; Mon, 28 Apr 2014 00:31:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 816DA20218 for ; Mon, 28 Apr 2014 00:31:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA5252020E for ; Mon, 28 Apr 2014 00:31:04 +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 1WeZQe-0000xo-Fh; Mon, 28 Apr 2014 00:28:16 +0000 Received: from mail-ig0-f178.google.com ([209.85.213.178]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WeZQa-0000wX-Tj for linux-arm-kernel@lists.infradead.org; Mon, 28 Apr 2014 00:28:13 +0000 Received: by mail-ig0-f178.google.com with SMTP id hn18so4190003igb.11 for ; Sun, 27 Apr 2014 17:27:47 -0700 (PDT) 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; bh=18hNqDeObYBdml6WHpYzlWDTq17hYYxyzngb1TUrA6I=; b=B6fXZl4PFJkecH3VUPzQRermjJM9w+UUdYCWhxd4UT+6sfLu6W58d/Txi4gHyhOdJA 6HP+GJYRJv46/S0aSQRbH+ejnATn0PAJXS1LRueNrnJt6WoqK26ceHJSqW6yPx0AIgis +nO8Nu859qftc9Y+kNYRJRLFnUnFvnjuxPLa+scMnZtFvKujPpd6CwKnkzjPPxQUlner yznilkXHruLMrXNtzjiboE61KeX76WENThKXoW324gBOXCYzwob3p/AeiSLNKHwOtUCQ ZFWpMJY0z0Vv2bob0EzVwvXZjq98MZATX01agia+uNwPj3/x4D+1+ocdLOunttsf2uwm dnrg== X-Gm-Message-State: ALoCoQlh2Ql5ZMBz/ydoV6P4pOUcVwFr1OPH9efNzCcynureJhgDUsP6vle9nyUedg/k+lx8VEAn X-Received: by 10.50.33.74 with SMTP id p10mr20121923igi.5.1398644867517; Sun, 27 Apr 2014 17:27:47 -0700 (PDT) Received: from beef.ohporter.com (cpe-98-27-254-98.neo.res.rr.com. [98.27.254.98]) by mx.google.com with ESMTPSA id sc2sm20689333igb.5.2014.04.27.17.27.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 27 Apr 2014 17:27:45 -0700 (PDT) From: Matt Porter To: Russell King , Barry Song Subject: [PATCH] ARM: l2c: prima2: only call l2x0_of_init() on matching nodes Date: Sun, 27 Apr 2014 20:27:40 -0400 Message-Id: <1398644860-22973-1-git-send-email-mporter@linaro.org> X-Mailer: git-send-email 1.8.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140427_172813_260912_B3571D41 X-CRM114-Status: GOOD ( 13.67 ) X-Spam-Score: -0.7 (/) Cc: Kevin Hilman , Linux Kernel Mailing List , Linux ARM Kernel List X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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=-2.5 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 l2x0_of_init() is executed unconditionally within the sirfsoc_l2x0_init() early initcall. In a multi v7 kernel this causes bcm281xx and bcm21664 platform to fail boot since they have their own pre l2x0 init sequence that is required. Fix this by checking that a matching OF ID is present before calling l2x0_of_init(). Reported-by: Kevin Hilman Signed-off-by: Matt Porter --- Applies against next-20140424 to fix the issue introduced in 50655e6 ARM: l2c: prima2: remove cache size override arch/arm/mach-prima2/l2x0.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-prima2/l2x0.c b/arch/arm/mach-prima2/l2x0.c index 09f68f0..1c2ed15 100644 --- a/arch/arm/mach-prima2/l2x0.c +++ b/arch/arm/mach-prima2/l2x0.c @@ -8,10 +8,24 @@ #include #include +#include #include +static const struct of_device_id sirf_l2x0_ids[] __initconst = { + { .compatible = "sirf,prima2-pl310-cache" }, + { .compatible = "sirf,marco-pl310-cache" }, + {}, +}; + static int __init sirfsoc_l2x0_init(void) { - return l2x0_of_init(0, ~0); + struct device_node *np; + int ret = -EINVAL; + + np = of_find_matching_node(NULL, sirf_l2x0_ids); + if (np) + ret = l2x0_of_init(0, ~0); + + return ret; } early_initcall(sirfsoc_l2x0_init);