From patchwork Wed Jun 26 01:30:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 2782091 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 7B3459F245 for ; Wed, 26 Jun 2013 01:40:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A2583202BC for ; Wed, 26 Jun 2013 01:40:19 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B1B70202B9 for ; Wed, 26 Jun 2013 01:40:18 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Urea4-0005s8-Sk; Wed, 26 Jun 2013 01:31:34 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UreZU-0000uQ-Vg; Wed, 26 Jun 2013 01:30:57 +0000 Received: from mail-pb0-x22a.google.com ([2607:f8b0:400e:c01::22a]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UreZS-0000ts-9h for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2013 01:30:54 +0000 Received: by mail-pb0-f42.google.com with SMTP id un1so13469614pbc.1 for ; Tue, 25 Jun 2013 18:30:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=u4rCFIo3iUhmccgsENu9tsu9cCD+Z+lmoI84VHwWoic=; b=lXUduLzAvo8TGSTtn2EOW4vEnlYja1L8r/RsZZKCAfGF0L/qsN4wkKixf5s8Y1Rh1/ dX0rHOU5XsbyElt3ett66BlLL1Ha/ems7Obxtz9WWFMN8HtXuGMWskUX6w4Jk/xYSngf z3zXyyvh6cdpr4+dFrkl+b6EQsaC9fa2OrbjmRMYqwaf8nQpmWkgYgJdHUD211vtfBXt LbEWKScPZgKwqnRsTx5p8C3SH6s91tnfUUVRiLDnl+Q6yV5+cvXG7B8mrxBbdURvkuoK awxUPa35HAHKk5r+5PKsGK4l+B7MiKcwzYoQEz+JS9Xg1AMe/NiEyTxdhbR51QHoSIzl snZQ== X-Received: by 10.66.232.101 with SMTP id tn5mr2394725pac.132.1372210231217; Tue, 25 Jun 2013 18:30:31 -0700 (PDT) Received: from quad.lixom.net (173-13-129-225-sfba.hfc.comcastbusiness.net. [173.13.129.225]) by mx.google.com with ESMTPSA id mr3sm9894345pbb.27.2013.06.25.18.30.29 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Jun 2013 18:30:30 -0700 (PDT) From: Olof Johansson To: Linus Walleij Subject: [PATCH] ARM: ux500: check platform in ux500_l2x0_init Date: Tue, 25 Jun 2013 18:30:31 -0700 Message-Id: <1372210231-22900-1-git-send-email-olof@lixom.net> X-Mailer: git-send-email 1.8.1.192.gc4361b8 X-Gm-Message-State: ALoCoQlm552xib9zuTQUg1PztH2yfcIlzlJuvfqrjIxCqsq6CdZoHpMx61lAtu7vuxzdLv2jswBs X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130625_213054_438950_E1761328 X-CRM114-Status: GOOD ( 11.93 ) X-Spam-Score: -1.9 (-) Cc: Olof Johansson , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Add compatible checks for ux500. This should probably be moved to generic DT-based probing whenever DT is populated instead, but until then at least don't panic all non-ux500 multiplatform machines. Signed-off-by: Olof Johansson --- Linus, I'll apply this directly if you ack it, let me know. -Olof arch/arm/mach-ux500/cache-l2x0.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm/mach-ux500/cache-l2x0.c b/arch/arm/mach-ux500/cache-l2x0.c index f58615b..3facc1e 100644 --- a/arch/arm/mach-ux500/cache-l2x0.c +++ b/arch/arm/mach-ux500/cache-l2x0.c @@ -39,6 +39,15 @@ static int __init ux500_l2x0_init(void) { u32 aux_val = 0x3e000000; + /* Ick. I wish there was a single compatible value to compare for, + * but there isn't. + */ + if (!of_machine_is_compatible("st-ericsson,u8500") && + !of_machine_is_compatible("st-ericsson,u8540") && + !of_machine_is_compatible("st-ericsson,u9500") && + !of_machine_is_compatible("st-ericsson,u8540")) + return -ENODEV; + if (cpu_is_u8500_family() || cpu_is_ux540_family()) l2x0_base = __io_address(U8500_L2CC_BASE); else