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: 29165 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7E01620534 for ; Mon, 28 Apr 2014 00:28:03 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id at1sf5450771iec.2 for ; Sun, 27 Apr 2014 17:28:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=6nbpsGYhEdfn3SfsctgbdkLIeARo4MN1lzxXXqfCJGY=; b=C2VIvJUfZmNri51m+3y3hOstSqrNmaVJFgfUwBz+imG20VVorxASV3VEWcoC+gx2rm wwJKh/ICQg97+JabXq7R9X20nnCLK1MzW0+c/7JnRQ7Q8qcPDLs38mdN80RFKwa0XEUV Humj0qe+7p+/NIk3N5mE3Vm4CFilfyCuIt2bwGjRmKH8OmeLLiyXQgGflrCg/QpBQ+Bj snEZATO+XpQYU0JtCiguoPgc/8nDtE7Y4HR0DBhu65Z7RpqGVs7nqe3jkWPwU77Q8AT4 HsRW+eUbPFj2aF8dCkARlBgT8023fBLy9X43RcB3MpSRNcgMBI5sg6SHLDrt7xAvKdQw yVYQ== X-Gm-Message-State: ALoCoQnUIAuFU7XYTbnoUin30CAZA4kZwdxoUzUYrBf8F8h27WNWXXREycDbyXRS/Kuk0NAPa9c4 X-Received: by 10.43.139.66 with SMTP id iv2mr10835776icc.17.1398644882916; Sun, 27 Apr 2014 17:28:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.72 with SMTP id s66ls2401294qgd.11.gmail; Sun, 27 Apr 2014 17:28:02 -0700 (PDT) X-Received: by 10.52.123.39 with SMTP id lx7mr17689943vdb.22.1398644882766; Sun, 27 Apr 2014 17:28:02 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id 2si3260157vcd.203.2014.04.27.17.28.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 27 Apr 2014 17:28:02 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so7150584veb.6 for ; Sun, 27 Apr 2014 17:28:02 -0700 (PDT) X-Received: by 10.58.207.74 with SMTP id lu10mr20414486vec.15.1398644882626; Sun, 27 Apr 2014 17:28:02 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp79786vcb; Sun, 27 Apr 2014 17:28:02 -0700 (PDT) X-Received: by 10.66.148.98 with SMTP id tr2mr22161739pab.33.1398644881840; Sun, 27 Apr 2014 17:28:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hu10si9215081pbc.444.2014.04.27.17.28.01; Sun, 27 Apr 2014 17:28:01 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752233AbaD1A1t (ORCPT + 28 others); Sun, 27 Apr 2014 20:27:49 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:55328 "EHLO mail-ie0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751456AbaD1A1s (ORCPT ); Sun, 27 Apr 2014 20:27:48 -0400 Received: by mail-ie0-f169.google.com with SMTP id to1so5963927ieb.14 for ; Sun, 27 Apr 2014 17:27:47 -0700 (PDT) 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 Cc: Kevin Hilman , Linux ARM Kernel List , Linux Kernel Mailing List 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mporter@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);