From patchwork Sun Sep 4 14:10:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12965201 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 16602ECAAD4 for ; Sun, 4 Sep 2022 14:12:02 +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=S6lsyL6Sa62in7 HuM5t66QpiW6oZm1ranc47qFv/F5VmurNaJF7dZv+SQsY3N9jj36du2z0Gqe5ztAQE/DJrZ+yyffi u3AxJBRRwHvopj4xpZGY+g4iKtDv9Fog2L59/0uak4UBr731WjHKl1PKW9ZKhBAZszYTi4LyE/Nw5 O+uxEndN5hXpFLVnQK+8aQ9hIU2VSZoxmCpoiYowQctUMCI30ISjTk7+87KwmR3cwTpH9j1tnirYs kGFY4cj7GjhL64Yh/C5qz9BhCtsNSFo84utW5HGqL4Odjifrl0V4BNLWnflrNe1dlEN1nFK5UbbcW Dqqx8HlIfiT8RG2XBaHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUqKk-006m8i-HE; Sun, 04 Sep 2022 14:10:46 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUqKi-006m4r-27 for linux-arm-kernel@lists.infradead.org; Sun, 04 Sep 2022 14:10:45 +0000 Received: by mail-pl1-x635.google.com with SMTP id m2so6256886pls.4 for ; Sun, 04 Sep 2022 07:10:42 -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:subject:date; bh=C3neU1AtxmqWdDSuYqkB7lF7A3shUmwSCsbgD00NRVo=; b=TGI1HUQ/5A3/uzMQv8C2zewVZr/OY4vypQbommNxD5sQavjSSSDRWLjlzWCal2oEhF vpr4/CDDA/nEGztaBVVD8NaVQB3OtkrtheeVpQEIIMZhAKUqH0ZFamQdtAPFCTLr0i60 iM/t1rOXa6v8pbbmsCfEfJUZk4qc3h9rDXkI4= 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; bh=C3neU1AtxmqWdDSuYqkB7lF7A3shUmwSCsbgD00NRVo=; b=uLrrveYjVU09e7ktvJ0iwUdvp6+Q5XN1ixBFXoWkKVedaGzH2x6JJ4NZyPIJkO7b9k Dfo1gpLr1LGMm8zCQz4ErJQ0H9qWY3ekDvAUO0OT2YsEUqWW/v82zWMsjsXw7tpabpA1 8AjE+FOLa0RUWH7l/Gg6ZmQpkY9xi4l/CL5ircWivFIxDxPCUEFLc9N/81O6COQjP8QI gpe104IkQtXDgZnMdi7R70Lan3EcHNExFiA2TQpfWDVNlpsccNVWvjbQPcd+0erpu2Y9 7kWjIpq3vIc5JiJLdoE9pv73ZK3YQ1g7youhq52iYOYBp7bJ8DBmK8qCyg9ZridxS2bq 8Peg== X-Gm-Message-State: ACgBeo2dy/pPNCJDN/xnHYKJUhI3B5fswtFItLA9zkEBXOl8XgdqCgdc ZhmpkEKl8IQrEtZgCUxQsTEuFA== X-Google-Smtp-Source: AA6agR7W2dAAZHLXIRcbnomqLVD5PKLOUBKC64dhk5b5GYVE46etYXIyADU10b/L0HCyE+aVCdIRsQ== X-Received: by 2002:a17:902:820f:b0:176:9654:354d with SMTP id x15-20020a170902820f00b001769654354dmr4925350pln.79.1662300641893; Sun, 04 Sep 2022 07:10:41 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-79-31-31-9.retail.telecomitalia.it. [79.31.31.9]) by smtp.gmail.com with ESMTPSA id z9-20020a17090a170900b001fe136b4930sm8606760pjd.50.2022.09.04.07.10.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Sep 2022 07:10:40 -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: Sun, 4 Sep 2022 16:10:19 +0200 Message-Id: <20220904141020.2947725-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-20220904_071044_142462_8B301D04 X-CRM114-Status: GOOD ( 16.72 ) 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 Sun Sep 4 14:10:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 12965202 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 C581CECAAD4 for ; Sun, 4 Sep 2022 14:12:07 +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=OSbZB/+Vcs/TCo gF92Q9EJ4J4wX0PMJOr2gbUlY5xq1unbCyo77a+sTNorVYFXYsHMDWl6kWmdcOjf2f1sn1PDDzYAl BHmJNfKHppIVoxYuRu1TSkTarcn/2XYKays4DXB5T70LPN6jof/Agb9w7eMTaoVqnX/4qMhGtpy1k 1XR4LQBVLgoKlNzskREf5lu+M24RRT/BnwaTiQKsfIWHA5LWrpR/6RDPe8o3qSaMi/vpza0iT0fld Od4Ki/XwwM1XsctiduJVJXWfC73eXxGY7SRXovpyzIBqlVjO3qvyrpXLvQTGDCq29+og+86aUeBYU DQs++jr9X7UoAAtVRkag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUqKt-006mEb-JX; Sun, 04 Sep 2022 14:10:55 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oUqKq-006mCO-IR for linux-arm-kernel@lists.infradead.org; Sun, 04 Sep 2022 14:10:53 +0000 Received: by mail-pf1-x430.google.com with SMTP id y29so6417834pfq.0 for ; Sun, 04 Sep 2022 07:10:52 -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:subject:date; bh=NvLw5KU+55jz8ItVCImcVo81PfvmbTqj67db51rQx28=; b=mA5YuvaEcz9geqjvbYjrvj1uTFyLPeCLOL+HNvpQHyO0Zv2nV/o1TqHc/bzTId7zL7 d9fpPVSRB7wCgOAG2faGq1j8xKPTmmpFos9w4mt4yXKJKfkJsKLzI4MTu8izMH7fHxh6 4xsmAxiEMQbDa00GtWWbsqCvS9Ca6O+7Xz5kE= 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 :subject:date; bh=NvLw5KU+55jz8ItVCImcVo81PfvmbTqj67db51rQx28=; b=2gdCmvWuQpzBw767IYMvvp+RCW+SyW/ZroyEnBT+Uup9MH07r9cYtyRwIYlN6W1N5t CLE+qtPJ43JQ9l2e8c+uNVgR3KEJD+yqOsnGrGi4HIyWflExtMGkd0IKMcrfTkp2bcOA bW4LNDzSNu6bK+qQvh61fvdgKH4+FC4RSSPQZYgQTCPoH40PaufEsVSAla6+jR9cQNrJ struFF/X+Pv5tyQSk6jRU19BKfB9exsEf2+dpM2D82xJsV9bWSvZw/8ptdcCKtd98SWy dzYV+VVMa+SzDJfNKn2Nwn3rYfYI4/oGdiIpdID9zbVocyf7E3VufcKvfrblgYGw6QmL h42A== X-Gm-Message-State: ACgBeo3j0D49oSDMMBCYi8BIIhrAQdGsnP/beWQc/cOP0Hrn2M2ou4G1 3IixvpiNfjTGhY0ERKBgK2aHhg== X-Google-Smtp-Source: AA6agR4USjcm3W8RIzfgrbED9CyUkSroEFickkr7JF56t7MZ5obBKpMtezqBj392uWfNcSMg9f4NQA== X-Received: by 2002:a63:5a50:0:b0:429:8580:fc61 with SMTP id k16-20020a635a50000000b004298580fc61mr39578533pgm.215.1662300651563; Sun, 04 Sep 2022 07:10:51 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.pdxnet.pdxeng.ch (host-79-31-31-9.retail.telecomitalia.it. [79.31.31.9]) by smtp.gmail.com with ESMTPSA id z9-20020a17090a170900b001fe136b4930sm8606760pjd.50.2022.09.04.07.10.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Sep 2022 07:10:50 -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: Sun, 4 Sep 2022 16:10:20 +0200 Message-Id: <20220904141020.2947725-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220904141020.2947725-1-dario.binacchi@amarulasolutions.com> References: <20220904141020.2947725-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-20220904_071052_647630_C5E7D552 X-CRM114-Status: GOOD ( 14.87 ) 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,