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: 2345 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9218F40F46 for ; Sun, 4 Sep 2022 16:10:44 +0200 (CEST) Received: by mail-pl1-f198.google.com with SMTP id q6-20020a17090311c600b0017266460b8fsf4454263plh.4 for ; Sun, 04 Sep 2022 07:10:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1662300643; cv=pass; d=google.com; s=arc-20160816; b=cqC5ijYEEyfobwZ2LLqEcqZZx+mY/XjxgsWyATFWsBuZTTXH1JYVdpxi2yTaZQxMBZ NL4UquqnMX0bNwRIncgQbI0Iqqf3RxySkzv5Ittkax79sDQzK9IvqcVaJhzO0yyKAOlS 3t8FSrDd3gzRMjFABllJdhw26Bf0o7JId10zHTGPw+qfKmhoLREr/elWcOSPyqtPDlln KoB1ytjI+VrEodMS+EKRXEWDtmvuVahsklEq74m6mG8YXGyyqp5hV+dH5L1TeuFWfCG5 HdZ7XTcRBm9j9+mY91751tNyt5KiuHYaE2JkLCtRNmSwJY5sJgs0kp588/SSNAWdFF6c LzJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=p9BUgPrxYEuAYSdCqWYHnH5Vkk9pA/5ExZ1MpE2zieY=; b=kdAYf+TWOLX1F6MQvFnE4520pL/OEGa6qKTV6ADUsdtpfCVo6iC5FHbSs9NzbHtbNL hIs1Kcfk9pUjpnv3tRTcquakLwrsRlzCIiHm/FKjlpv3v17UEE2QekiXMNf+YzsoRW5h HVu0qM8rK1QRYqBpWihX8z1yF7PoOQQY6wO3yQTW3PFgVmqLe9SW9HM2yrmyFYSwJ5xm nocayQGcRSn8Mp9Erhh4TDTXqbtILRgsM+vNMhEY9uKQDq+djrNSLIePRo+pD0UxqjIA qYh9GxnKw/kJhqgdMbLvZDiheKdwbKdCmFOaMNtRENqgSDyYTejliXvFQYXzC1IuOFFC g1Mg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="TGI1HUQ/"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date; bh=p9BUgPrxYEuAYSdCqWYHnH5Vkk9pA/5ExZ1MpE2zieY=; b=pyoIUO7YOxlvxVMuYqJ6TH0WY87q71QU0pD0lRuS9eOIBhtG9HFlNtptOrAbEFsSmg 5EDuDCoZHLOUmPzxByM44Maj9aQ0+8mjQ7EwgPUlVOuM/Va6FCq4c/klmB3xlVrxKGqM LRXlfTvWpszoH2PGmhwoi6trtuMdPbuxJNogE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=p9BUgPrxYEuAYSdCqWYHnH5Vkk9pA/5ExZ1MpE2zieY=; b=l3Ie11Y3lfNcTHHh6Ry5z69C2RK904p1Dzoh59DOiD8ZT87DK+zNSfIdEX6OWHAVvZ 3PLzlIHNBY0deC0gDfDrEDSiX+CCU3nX5SJy7BCctMZRv0VPUdDAquoibPUAH/bRG874 tzLiU9gy6dAJ8Y0uP7T43ocuF9VfiBgrc6ikg3wdalmStGoMVMqlLS5zMcKRvVmELBqS if4vUlhjiSA4oyj3xj1zQsxJLAaXIBN8JNd1aV+0oxuUJUfO2UygYeR92vnEpeuhgBQB 0WdItu6QgaAAizagsEQfqEh8Ejt2yYW8EzTLaBz2a17OrxIE2bHnZ+ZpQ9mz9CQblR73 hMgQ== X-Gm-Message-State: ACgBeo2hjxc8xhzJNhr0lfRXPdFreFV6QbifFxD1VmWm9c7RgqWitnoN BzsKYXlZW+T4+Z6Hc3VA9vDHzGQz X-Google-Smtp-Source: AA6agR4I3Cc5+EG9cpJ2T7/LgfUZB3iCGwuHnCzMMWW88iXQP8t2yP90CAVmJNeikAz5QfYLjqu8yQ== X-Received: by 2002:a17:902:b48f:b0:172:b57e:f0ff with SMTP id y15-20020a170902b48f00b00172b57ef0ffmr44890343plr.25.1662300643191; Sun, 04 Sep 2022 07:10:43 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:90c8:0:b0:429:ead7:6932 with SMTP id a191-20020a6390c8000000b00429ead76932ls4380619pge.4.-pod-prod-gmail; Sun, 04 Sep 2022 07:10:42 -0700 (PDT) X-Received: by 2002:a05:6a00:174f:b0:53a:a96b:10b0 with SMTP id j15-20020a056a00174f00b0053aa96b10b0mr23445398pfc.68.1662300642319; Sun, 04 Sep 2022 07:10:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662300642; cv=none; d=google.com; s=arc-20160816; b=pGqAhaTqON3LDuA+ff0ebmCf/VSHTlow/SWpTRgEiQora260QwoTrFria9qwwhTAdv MYsxNCoIb6OX7SqvSt4ortLJ4Fi28HYpOGlYWDk+xY8Tn1HnDYfVPt8H1XfGcg+DHwac t9ZkZfrgSMvukTrsV2XERrvwKTnPmsy2eH1rzGBQOgdVNaXX145LmC34eeZR1CCPTmRp 5Wneg0FgUhDu/Ey1PNFvlqdL1p5F5cAKjHuinc7Ft5Ll+JtgtsNMkX8AqAS79ZQuljyM UiDBmCC5TMJbBucMw1YCXEwyIGPOFaZOhrioseaCOFC/9mCJjXcPr0qPRu68Ny0RCjOy S9Gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=C3neU1AtxmqWdDSuYqkB7lF7A3shUmwSCsbgD00NRVo=; b=J/cwZms/cEBzn8hUebjazqLfYJL83yOqQhvS4sZ8JoVRf5Fwc0NZOyoOpvbhfNAYs+ Xb4GG5lLKt3ofP1n2YqXI4+2DbYoT+fOm9mWD6jCIqUr+IDLd80y00f9rkeMuetUIrx+ 1x3KBHRmWGZVGsCBCR37yzrzmfrdnOyThxOJwttZf+B3W0WdrZPVvgpFPAA5pTVCQUfH UpTaN8vDSpuQMiLib573CNerO5VJL+sryqqWkpUWksawZxMVGuTffTzIf4ZITRKb3OJ7 2FLBAbtt5w5CN8i8MjMVWoxcbPSDyIasuk37fqhrIopHseV6eipjyK+78WGcx1Khxarf uSGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="TGI1HUQ/"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id k1-20020a170902c40100b0016a39ba33ffsor2825784plk.96.2022.09.04.07.10.42 for (Google Transport Security); Sun, 04 Sep 2022 07:10:42 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; 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-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="TGI1HUQ/"; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);