From patchwork Fri Nov 28 14:50:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhilash Kesavan X-Patchwork-Id: 5404251 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0D3CFBEEA8 for ; Fri, 28 Nov 2014 14:52:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3EFD120166 for ; Fri, 28 Nov 2014 14:52:52 +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 741B72015E for ; Fri, 28 Nov 2014 14:52:51 +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 1XuMsn-0005bO-4g; Fri, 28 Nov 2014 14:50:53 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XuMsj-0005WO-NX for linux-arm-kernel@lists.infradead.org; Fri, 28 Nov 2014 14:50:50 +0000 Received: by mail-pa0-f53.google.com with SMTP id kq14so6947969pab.12 for ; Fri, 28 Nov 2014 06:50:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=7jkZUtq1L63STq/vBduDUaKKg+oxOYBY+srn11wQiTw=; b=j93Xmq6NjZY+Ver5BRVzyMz7W4Hy4lcYtjZeMg5VMLDyooNLIC+eNnoMLgueo8cDDE 9vXGXmcJp1sgpUDpBILU3QjLg+QvlcnQxcF2QmfU2Suoz1gfB1DkJRcEkEDpMHgHwSUA QmFQAqFbXdPkg9kZTdHCPzqoYRz+JLltviW44NWcdw67K1cWPfwveCPB0JmfzJbg92gG siJHYaikh093lroc4czHXjcdSjFeV1ABNQfxi1kNmsu1W8EeQHdZ3MfNkJcQU60wBMUH ls4ZQ2j4/4Gy0CwM/AyWnRaeSpGUbRV2ly9diOD5N87H/LaU50quuBwgOFdEmXTXgi9b PhrQ== X-Received: by 10.68.226.69 with SMTP id rq5mr24643085pbc.116.1417186227753; Fri, 28 Nov 2014 06:50:27 -0800 (PST) Received: from localhost.localdomain ([122.171.113.180]) by mx.google.com with ESMTPSA id h6sm10187437pdk.38.2014.11.28.06.50.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Nov 2014 06:50:26 -0800 (PST) From: Abhilash Kesavan To: linux-arm-kernel@lists.infradead.org, khilman@kernel.org, nicolas.pitre@linaro.org, lorenzo.pieralisi@arm.com, punit.agrawal@arm.com, will.deacon@arm.com, mark.rutland@arm.com Subject: [PATCH RFT 1/2] drivers: bus: check cci device tree node status Date: Fri, 28 Nov 2014 20:20:08 +0530 Message-Id: <1417186209-5256-1-git-send-email-a.kesavan@samsung.com> X-Mailer: git-send-email 2.1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141128_065049_786745_36E6853F X-CRM114-Status: GOOD ( 11.26 ) X-Spam-Score: -0.7 (/) Cc: k.kozlowski@samsung.com, linux-samsung-soc@vger.kernel.org, arnd@arndb.de, b.zolnierkie@samsung.com, dianders@chromium.org, kgene@kernel.org, olof@lixom.net, kgene.kim@samsung.com, kesavan.abhilash@gmail.com, javier.martinez@collabora.co.uk X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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,DKIM_SIGNED, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 The arm-cci driver completes the probe sequence even if the cci node is marked as disabled. Add a check in the driver to honour the cci status in the device tree. Signed-off-by: Abhilash Kesavan Acked-by: Sudeep Holla Acked-by: Nicolas Pitre Tested-by: Sudeep Holla Tested-by: Kevin Hilman --- drivers/bus/arm-cci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c index 860da40..0ce5e2d 100644 --- a/drivers/bus/arm-cci.c +++ b/drivers/bus/arm-cci.c @@ -1312,6 +1312,9 @@ static int cci_probe(void) if (!np) return -ENODEV; + if (!of_device_is_available(np)) + return -ENODEV; + cci_config = of_match_node(arm_cci_matches, np)->data; if (!cci_config) return -ENODEV;