From patchwork Sat Aug 20 08:44:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12949591 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 B7C69C32774 for ; Sat, 20 Aug 2022 08:46:30 +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=khk2lW3et0jHPSwABYTq0vrHxlBQmHJ9VD6GnUW86iw=; b=B7JX8deZO36aDN rTmbnREBz4MRmO/Fg46rQceRdPsKefdSXJ24lv4sxMYss84V5qGDRe4+mWF2kdGi+Rni0oIv2Josk dtpd4YXeLvTuxSHmouTU7LiMJW5udkAXsHI49EsE1tgbocAdQ6TJ4piLPg+6ynTNEDywutMpjSMz6 W1FuyIOPAzAVfvqctZPqVqlql5trmQt+ugCrWGF3z4dfyTu+XXIxfJReySU/Vd6YxBO3XdbjkR7Fq rTatdWbkrhddrG1zJJsSjpmTLngJCOuWQHZa/+iO/bDyKh72ywga7q+6UMJUbf2GkPwWSl8sDOFMM yrbuBYXhlrewQdgVejDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPK6V-005C12-9N; Sat, 20 Aug 2022 08:45:15 +0000 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPK6N-005BpS-Kt for linux-arm-kernel@lists.infradead.org; Sat, 20 Aug 2022 08:45:13 +0000 Received: by mail-ed1-x52e.google.com with SMTP id u6so3038680eda.12 for ; Sat, 20 Aug 2022 01:45:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=C3neU1AtxmqWdDSuYqkB7lF7A3shUmwSCsbgD00NRVo=; b=eThpM9uxRwJzTuhVFBRMNJ9H0vTr2TRrapx/uMb8SXuMEM0TzA5O4w/AzUVnfw8+3n 7nQ5CmprNuO1C8uBjy+7pNZiEdrlbPmrWvBNxXoT1gE7ZCj8uNcIQLC0FgtjwkVcHjYH 6Jx9/6JQFwfLzdsSVWBmswc57cxIcKa9k/qF8= 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; bh=C3neU1AtxmqWdDSuYqkB7lF7A3shUmwSCsbgD00NRVo=; b=vcE5EaFdvuRPin+HqZf6Zyk3Okx2cOjEZIIyAnFgygrU8JOFGGk995jGBgjgfaSnQi TTKsEfU/Os4KnKA3x4FPFwpLqgfIMKwRfS8Id1tQ9QCq5a96JMNAMtKt3pu6HiQCOCit 2syaiA8DH5rDMO4tthz4KaVjoafdki5tsOWMVaFPUfQOU7/3+U6b/gtzh6uLGVZ6Z/2r v3uuUF1dvhQTuf8Tbr7ul0mk7b6KKnhcC/T6jCLqQWgAqw/ziTbiCxN+LedjvxjtWBhb l/ovJyFhFZgx//xr7Z2W3MHVtsb7su173Na6YMc3pWjTXf1EJUO/KN788l32kmXZ54lD eEug== X-Gm-Message-State: ACgBeo1V2WcPaDC0LZGIA5+Ou/KUNl7Njl5Be6dvaCFwe9eHg4tsOXED mohluHsckgBZ6zqljQF0UtEUCg== X-Google-Smtp-Source: AA6agR5oabpEWO5QscsCqYPMks7b1iYiqWxeVRvCi+N5mOHWAK+GrXRSzxRY5E99PWwWo7LsPzOhxA== X-Received: by 2002:aa7:dc13:0:b0:443:3f15:8440 with SMTP id b19-20020aa7dc13000000b004433f158440mr8563131edu.274.1660985103939; Sat, 20 Aug 2022 01:45:03 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-31-31-9.retail.telecomitalia.it. [79.31.31.9]) by smtp.gmail.com with ESMTPSA id k8-20020a17090632c800b0073cd7cc2c81sm2170821ejk.181.2022.08.20.01.45.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Aug 2022 01:45:03 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Michael Trimarchi , Dario Binacchi , stable@vger.kernel.org, Fabio Estevam , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Vinod Koul , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH v5 1/2] dmaengine: mxs: use platform_driver_register Date: Sat, 20 Aug 2022 10:44:59 +0200 Message-Id: <20220820084500.689445-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220820_014507_754584_22D99FA8 X-CRM114-Status: GOOD ( 16.34 ) 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 Driver registration fails on SOC imx8mn as its supplier, the clock control module, is probed later than subsys initcall level. This driver uses platform_driver_probe which is not compatible with deferred probing and won't be probed again later if probe function fails due to clock not being available at that time. This patch replaces the use of platform_driver_probe with platform_driver_register which will allow probing the driver later again when the clock control module will be available. Fixes: a580b8c5429a ("dmaengine: mxs-dma: add dma support for i.MX23/28") Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Cc: stable@vger.kernel.org --- Changes in v5: - Update the commit message. - Add the patch "dmaengine: mxs: fix section mismatch" to remove the warning raised by this patch. Changes in v4: - Restore __init in front of mxs_dma_probe() definition. - Rename the mxs_dma_driver variable to mxs_dma_driver_probe. - Update the commit message. - Use builtin_platform_driver() instead of module_platform_driver(). Changes in v3: - Restore __init in front of mxs_dma_init() definition. Changes in v2: - Add the tag "Cc: stable@vger.kernel.org" in the sign-off area. drivers/dma/mxs-dma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 994fc4d2aca4..18f8154b859b 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -839,10 +839,6 @@ static struct platform_driver mxs_dma_driver = { .name = "mxs-dma", .of_match_table = mxs_dma_dt_ids, }, + .probe = mxs_dma_probe, }; - -static int __init mxs_dma_module_init(void) -{ - return platform_driver_probe(&mxs_dma_driver, mxs_dma_probe); -} -subsys_initcall(mxs_dma_module_init); +builtin_platform_driver(mxs_dma_driver); From patchwork Sat Aug 20 08:45:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12949592 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 B4635C25B08 for ; Sat, 20 Aug 2022 08:46:30 +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=74ZT22LZNUB6dkHvk6pMiq0MAq2OLegzXyOiesem4wA=; b=wDdKm68W5gX/5+ 3aS3BFB5QzIH5SlfwhLmT4XrSCc0iVO/3WTYf7PSZrHYaUnHFFKsToPdGXZszRutYXaWNuZD/bMH4 k+GMjnhDVLeAwjfYpCp8ySIzcXNNoOHjHsJyRKxazJWlVEvfUrcO3w/Lh3vz0gN41C9eiWdfVLrPa VUAPC2vgqbokFzBRbhGOrdpNHgfh6W3TICkOMr200ZeA/yCSY7h3HT5+xHy52vgwB0gGvT10jl7+8 8AQ2HkG3cUO/CfVGzFg5XdaGxQ8LLClmkRgZYB7iUsNXn3kNUHJBJzfuceF1w8EWJed0a/XvK70n6 J9oyB3xF69OIle7s3d0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPK6e-005CDf-4j; Sat, 20 Aug 2022 08:45:24 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oPK6P-005Brj-K3 for linux-arm-kernel@lists.infradead.org; Sat, 20 Aug 2022 08:45:15 +0000 Received: by mail-ej1-x635.google.com with SMTP id y13so12645410ejp.13 for ; Sat, 20 Aug 2022 01:45:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=NvLw5KU+55jz8ItVCImcVo81PfvmbTqj67db51rQx28=; b=PFBUJaVjPkRQdOOwLzx7iIz20v9iOaOvAdqgW4jBePTLYIdeSyUvJ2zwu3Q3o4Cq6i 5B6mfTVTYUGtqzw1bRS79u25XlaALcHR8OpDENAuIFtrJVVth3UIcTe44Y6AhfObiNld JnuKWXZtlJiWWDwpgd8DawXuhDAoPFtD+hz04= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=NvLw5KU+55jz8ItVCImcVo81PfvmbTqj67db51rQx28=; b=zaBu1I3ULD2gBonV6UD5QVO9UB46LWx3f8cgPYNkyYYa266xdkMAs2okWO42rlpKuG tisGVvlg9kLIv/Nu1ufzgSrW+hnZSuiA+W5PsqvYJmyh5V82jn4uLNI4J5RhQpLtUTSz b+IUYzjrZITw1l9UdYrzKH1jClfXFjpSusS18eM3Wi8Oe5480j+q/svXuWsaI7IKOFAt EfToifa8t5M2Inx3Un2BUMWK4y34KSPuE8oFVMPM8s6cWQkwRqcam6bd3kyL2onibttG JEiORHxwpzdV/oFvNoARfLGImMpqCm4zpUogYvdXR05yMXzhX1izKD/jj11is4jYKgUn FBvw== X-Gm-Message-State: ACgBeo3MeX1uUTUIKK+cX95OLD1z6NH24Dt4tisZet+FeG3Z9w9Q+alP Zx4ME7rR1ONVD+gdJCTE7cy4yQ== X-Google-Smtp-Source: AA6agR4umMH3H1BID5s9V1QzSQGwW8W5gM3JJE865WFSKxRHPCoGBTtY/6LUkZ+1dSAQuAbDAJBgcg== X-Received: by 2002:a17:907:7617:b0:730:e317:d0e9 with SMTP id jx23-20020a170907761700b00730e317d0e9mr7257826ejc.736.1660985105254; Sat, 20 Aug 2022 01:45:05 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-31-31-9.retail.telecomitalia.it. [79.31.31.9]) by smtp.gmail.com with ESMTPSA id k8-20020a17090632c800b0073cd7cc2c81sm2170821ejk.181.2022.08.20.01.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Aug 2022 01:45:04 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Michael Trimarchi , Dario Binacchi , stable@vger.kernel.org, Fabio Estevam , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Vinod Koul , dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH v5 2/2] dmaengine: mxs: fix section mismatch Date: Sat, 20 Aug 2022 10:45:00 +0200 Message-Id: <20220820084500.689445-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220820084500.689445-1-dario.binacchi@amarulasolutions.com> References: <20220820084500.689445-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220820_014509_694962_7DD0C3C8 X-CRM114-Status: GOOD ( 14.42 ) 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 The patch was suggested by the following modpost warning: WARNING: modpost: vmlinux.o(.data+0xa3900): Section mismatch in reference from the variable mxs_dma_driver to the function .init.text:mxs_dma_probe() The variable mxs_dma_driver references the function __init mxs_dma_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Co-developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi Cc: stable@vger.kernel.org --- (no changes since v1) drivers/dma/mxs-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 18f8154b859b..a01953e06048 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -834,7 +834,7 @@ static int __init mxs_dma_probe(struct platform_device *pdev) return 0; } -static struct platform_driver mxs_dma_driver = { +static struct platform_driver mxs_dma_driver __initdata = { .driver = { .name = "mxs-dma", .of_match_table = mxs_dma_dt_ids,