From patchwork Wed Mar 2 21:10:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 12766758 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 397FAC433F5 for ; Wed, 2 Mar 2022 21:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j/F1YWSXc5r/p4yC90YyIOPJKJVNuSHfe7cFkAt66Uw=; b=deK40O5SuUdY+Z 25vwe35NdXxdp+fGMJgNI71Pb2b0VBXeod692v7L/Qt52UDSeDeG2PuRL4Z5szecr0UG4eNBReQgG CyBSogjqxe0JQgPviny4k6TLZONn30iY6ktgCLoKCtGDrTeQNR76YoQPJYpX0VXC4S7BZAWagAgCD aAUdE+UdfMjjZbhvr6xTAqsRAchcfnwpTArEgu0cAM1cmK/UwWwTCMoBrIKLBZ9F3AVl5RssrRQiE jLdM00ujPz5N/TgqF72yezdJNJEBm0yMMKj5Th4peqyEf2tgB4CIIKNp7c9dUbnwlRfW9veKHvpyK x6vfoW2qo3lqSE+u0qNA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPWGd-004CB6-Hu; Wed, 02 Mar 2022 21:12:16 +0000 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPWFb-004BU0-7g for linux-arm-kernel@lists.infradead.org; Wed, 02 Mar 2022 21:11:14 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 917C11C0007; Wed, 2 Mar 2022 21:11:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1646255467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=awXHKYLutlWI1DCRzb/ig8zBY3AfY1mc3nmGyuIUbQY=; b=KC5jb/0eHDiE+UiESbAJKbofE4wMxj2wpGyLvefgPb4frgv9R644ZgOXbt7iLeqooqnazd +nUlxI4bCo5QWhCw7lWkjIHhNFbUWMw4IP/6Dp6mjLe6Fz/38poJtxPE13HgUys8w9hYyc mE5XebOAoPcIjmzGv7phwh9Xzc6gq9x0Rrl6hlBZIlxOIlXWnOTNOLZ6r8QZrhp1kKq/sM UCiau4lIXmoqQ8BEGimmZf+KZxMajFXvUakP9SxcUVjLQ7SmoVrimo6sEfl76q/t+r6dGk Ek4tSAs8dXnCEPcW5Mlo3qJ02BjFQvLVjIB5vWZQWvMtPHavTxSua1jZY9A61g== From: Paul Kocialkowski To: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Rob Herring , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Michael Turquette , Stephen Boyd , Frank Rowand , Maxime Ripard , Laurent Pinchart , Thomas Petazzoni , Paul Kocialkowski Subject: [PATCH RFC v3 1/8] of: Mark interconnects property supplier as optional Date: Wed, 2 Mar 2022 22:10:53 +0100 Message-Id: <20220302211100.65264-2-paul.kocialkowski@bootlin.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220302211100.65264-1-paul.kocialkowski@bootlin.com> References: <20220302211100.65264-1-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220302_131111_439134_24AC7525 X-CRM114-Status: GOOD ( 17.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In order to set their correct DMA address offset, some devices rely on the device-tree interconnects property which identifies an interconnect node that provides a dma-ranges property that can be used to set said offset. Since that logic is all handled by the generic openfirmware and driver code, the device-tree description could be enough to properly set the offset. However the interconnects property is currently not marked as optional, which implies that a driver for the corresponding node must be loaded as a requirement. When no such driver exists, this results in an endless EPROBE_DEFER which gets propagated to the calling driver. This ends up in the driver never loading. Marking the interconnects property as optional makes it possible to load the driver in that situation, since the EPROBE_DEFER return code will no longer be propagated to the driver. There might however be undesirable consequences with this change, which I do not fully grasp at this point. Signed-off-by: Paul Kocialkowski --- drivers/of/property.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/property.c b/drivers/of/property.c index 8e90071de6ed..ef7c56b510e8 100644 --- a/drivers/of/property.c +++ b/drivers/of/property.c @@ -1365,7 +1365,7 @@ static struct device_node *parse_interrupts(struct device_node *np, static const struct supplier_bindings of_supplier_bindings[] = { { .parse_prop = parse_clocks, }, - { .parse_prop = parse_interconnects, }, + { .parse_prop = parse_interconnects, .optional = true,}, { .parse_prop = parse_iommus, .optional = true, }, { .parse_prop = parse_iommu_maps, .optional = true, }, { .parse_prop = parse_mboxes, },