From patchwork Tue Nov 8 18:11:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Frayer X-Patchwork-Id: 13036661 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 EEB02C4332F for ; Tue, 8 Nov 2022 18:13:55 +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: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:In-Reply-To:References: List-Owner; bh=b8ycTGRtUqCzC1GOYDq4m+Ihn/Z/YtaPiqh+cgMrL64=; b=1SJRoINRIO7dwO uSNzMfLJay6La1v702eM6b9Cw4ybLpV7JjJIErxawap0bXH+Ptms3LRKlrLulXL+qeSzoHiSaPmUh zqRYLh96FXIgR//N4f0iJLfWyEaeRhVPMqkKRs3uJO0jfwwixvbnMPs2rLE8Zw2lbvfDv0ruuqMdU 0PXBvFLwprxDq3oaKBjHYapXSO8gxlh+ei7ZvjQz8/2NITTFDkMT1L8C+Q/Wwpt4u+72M95nsctln nymM1j2SUmtzLWOWs9JS2gpLXwPoKZxCGBU/WAMkVI6PY4HgXI2YaohwvBaxZ2xrYbrEfWQzKpgB8 JCM8MJPBfEQ8ezpT3Frw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1osT5b-007Nc3-KM; Tue, 08 Nov 2022 18:12:47 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1osT4u-007NEi-Hz for linux-arm-kernel@lists.infradead.org; Tue, 08 Nov 2022 18:12:07 +0000 Received: by mail-wm1-x329.google.com with SMTP id a11-20020a05600c2d4b00b003cf6f5fd9f1so9607576wmg.2 for ; Tue, 08 Nov 2022 10:11:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=WLjAfgXrY6iJ/scApshW4hQNZQBkL3nMQTzPyRA/Obo=; b=wdkxgsgVnJdyizPXCxIkbwj0180QnsDpzSBH3moSDjBmmto1uZ54uGEjCnVLtq6hd+ PDPOlTNjFcRBBnBGhYHgT13X5jR27y8NixF1yl835kEjduAQaEvvtrLudrICkjNYHJvV yQ4y/zvOUNwBtKPHB2hZ+c/bmXacipZdAD0HPaSLLC162zd2Lo0i6kUGBOHAKdApjNT4 kyyFyJfP47zZPMsGHnUDz583NoEG/9mKzErUsNRU6n6Ys27kyX8iBJhTS1D/hT4jAods bT+TVFgX92+b5HTh4PD/koX0t73B9ako+lytupbYOhlzGX8E6Wlvp2kunie2mbcgvxPi KTcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=WLjAfgXrY6iJ/scApshW4hQNZQBkL3nMQTzPyRA/Obo=; b=lhwiPubptEiUVDcY6qGPrThN0DBzLbSM/xh0pjWMg06OKQwtp+hzI2wusy01xw/Rve eeR7o82sfnNm4QMxMIJaK4mX28xUbLacl56kRiRiF3YXs0KTx7zH/ZOBsJaSwDS1HJXL 6IIWXEkLrV8GWM+3Iqc+gAwT3tupPAYmfeurDx5lYre4sSjXPsYd/Ci5iVYGpXs6U1Ax fmkxl0ZrygxCu7rvpXzvN2ZVcQ3pNPOWP22AEKeSOWRRUzBB3cpjFi60owYneSATGhFT TFfmdne95VWKBrUQ94oJdtGfwQ+8FAt6UIkKtKYAsrnzlZ8/sQpQQ700D/s3wonyHc+D Zo+w== X-Gm-Message-State: ACrzQf3ThFFa14gLAMA4+OB/R3wGag52G55VdLNoa3NGetrURPBs7d99 /F+AM7nca03qsCJAeO9MH1LN6A== X-Google-Smtp-Source: AMsMyM5FqYutJUSJ6XbIxmAWRIfI8aNW03g0ydxdb/+41CbBFkbtxJ+oROmeateisOYYMIhw2B3HwA== X-Received: by 2002:a05:600c:354f:b0:3cf:4c20:584b with SMTP id i15-20020a05600c354f00b003cf4c20584bmr47536057wmq.58.1667931117025; Tue, 08 Nov 2022 10:11:57 -0800 (PST) Received: from nicolas-Precision-3551.home ([2001:861:5180:dcc0:7d10:e9e8:fd9a:2f72]) by smtp.gmail.com with ESMTPSA id q12-20020a5d61cc000000b002238ea5750csm13037109wrv.72.2022.11.08.10.11.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Nov 2022 10:11:56 -0800 (PST) From: Nicolas Frayer To: nm@ti.com, ssantosh@kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, peter.ujfalusi@gmail.com, vkoul@kernel.org, dmaengine@vger.kernel.org, grygorii.strashko@ti.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-omap@vger.kernel.org, netdev@vger.kernel.org Cc: khilman@baylibre.com, glaroque@baylibre.com, nfrayer@baylibre.com Subject: [PATCH v4 0/4] soc: ti: Add module build support to the socinfo Date: Tue, 8 Nov 2022 19:11:40 +0100 Message-Id: <20221108181144.433087-1-nfrayer@baylibre.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221108_101204_667089_5404FBA6 X-CRM114-Status: GOOD ( 13.74 ) 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 for the TI K3 SoC info driver to be built as a module, the following changes have been made: - Converted memory allocations to devm and added the remove callback - Added necessary code to build the driver as a module - UDMA: Added deferred probe when soc_device_match() fails because the socinfo driver is built as a module and hasn't probed yet - MDIO: Same as the UDMA driver, return deferred probe if soc_device_match() returns null v2->v3: dropped module conversion part of this series while other driver dependencies on socinfo are worked out. A dependency issue is introduced by changing subsys_initcall() to module_platform_driver(). Some drivers using the socinfo information probe before the socinfo driver itself and it makes their probe fail. v3->v4: reintegrated the module build support and added patches for udma and mdio drivers to allow for deferred probe if socinfo hasn't probed yet. Nicolas Frayer (4): soc: ti: Convert allocations to devm soc: ti: Add module build support dmaengine: ti: k3-udma: Deferring probe when soc_device_match() returns NULL net: ethernet: ti: davinci_mdio: Deferring probe when soc_device_match() returns NULL arch/arm64/Kconfig.platforms | 1 - drivers/dma/ti/k3-udma.c | 2 +- drivers/net/ethernet/ti/davinci_mdio.c | 4 +++ drivers/soc/ti/Kconfig | 3 +- drivers/soc/ti/k3-socinfo.c | 47 ++++++++++++++++---------- 5 files changed, 37 insertions(+), 20 deletions(-)