From patchwork Sun Mar 3 08:18:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brock Zheng X-Patchwork-Id: 209285 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:fa17:b0:10a:f01:a869 with SMTP id ju23csp821164dyc; Sun, 3 Mar 2024 00:22:24 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVjKzqabxezNtzIvJwyN1RwwOXCKwh2JDhxtCRHcKkkI8q5b/gDOI9IEC9ipX/zTZJvSEh6g92+Zfo/D/oZCxmw26WRrw== X-Google-Smtp-Source: AGHT+IHC54v6/YwPgQHImx6eKHHd73C7aFzxoiGdqwuXT/fwp80sc1vOudYlI2W77JRVygAheZbd X-Received: by 2002:ac8:5c4a:0:b0:42e:9745:376d with SMTP id j10-20020ac85c4a000000b0042e9745376dmr7832413qtj.19.1709454143869; Sun, 03 Mar 2024 00:22:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709454143; cv=pass; d=google.com; s=arc-20160816; b=Km4No4qEzMV/M2ML4pygrBuXcFmXTAB0Xke1UjkjK4kTtpf6ij0c107pFUAgfhqf2J 98VK/nu63K/QpF2jWX85qj3+4zvkZo71+YFlrw8YxCozlWX+14kzabsZUY+VmRRA8RD7 81+2yKo/u4TAjDqDxTjaNt2dDWOiCmM6+FpWDQ1M5HgNIyPlTc0BXD1GIR+oZ5jHO3IV ya9Dnpvx41XrYLZWSKI5WUOCVLF5Tv3009SQxLrAZbJ0PFwfaLq9/G202Qo8fdObW4DE kaayJf98hiAfL2RQvWZnH9ttkcraz3YCN5k02i5vh3QxGzbEuwfAcFs7UNkj96ARoUs7 ReEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=F6cXBcXVG9tAH2Iezefck3MK/5h6fpThIUgk8RlIbxk=; fh=zyXDjohbf/l9kx++5upmTqgIHHzvy7/aodS6LqiAwPU=; b=xJrulCfcMmQBkmdsnhqcRvhbFBY6zvqjIkQiLbYN63S0ycH3qs2+ikcAFxcLMUByRD e0wOG1u5hxBKCWNpy2Ec4hmUhhWh2GBxCo5581t3TPh7bnv+p7k4rcJVXV/8S31tqCc/ GXO9f3UgjjWSl58G8PFB6bXzmwByQSjELC6AcOkSXWpLeoZIUoj5Rv8nlaVLGo7xMQuV QVC+EOxsjsw7wiLr+9O9HYojmKf+mhHfWxLGY6JdYZJAf1Tc/lh9izl75NmlWuKZfkgJ keVHDQaWvXr7RMFkOiV1Ul/w5x0HRIh0FYY2ENhq4kAC9VRVgWmIIQAUcoO2HR8KxQBf QMkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=techyauld.com); spf=pass (google.com: domain of linux-kernel+bounces-89671-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89671-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 14-20020a0562140cce00b0068f315f52a1si7235460qvx.320.2024.03.03.00.22.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Mar 2024 00:22:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-89671-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=techyauld.com); spf=pass (google.com: domain of linux-kernel+bounces-89671-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-89671-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A73611C20FB8 for ; Sun, 3 Mar 2024 08:22:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 23B99B654; Sun, 3 Mar 2024 08:22:11 +0000 (UTC) Received: from regular1-03.263.net (regular1-03.263.net [211.150.70.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C205D945A; Sun, 3 Mar 2024 08:22:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.150.70.197 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709454129; cv=none; b=Iq8M0GBDBDQaTSkfI5FAxWef4kWJ+128K/1+55J4Z+YD2CHi/BR/wvYjn0T70cazTOvANaJ81QJtTCIsKIyyjM8rdLaCuswxYWtyNmVPCw7davVnDVSf37PA84U2RM9vZf5X2MSbKP2o6wqjJMISVe/b9CUWJgREMvHJYklBmck= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709454129; c=relaxed/simple; bh=qO9SV8llceR6KpdDQN8ljn/YpWs1GR0zI28k4g9IsJE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NxolZPSjPndlYLumwhs6cBMWiw37mhkqwpJo9CBFhAZ+mqg37WH0pzy3ansfE+QZaWIrcgQU6FgTIFB+PG7Q924ybYxhRNe3a39DwJsb1OdEE0zw1IvW6SHTZqEseRjgzlz/L9PYVMXwPjSo4qXAj5G1O6KHpnzcA5cpl7sR1To= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=techyauld.com; spf=pass smtp.mailfrom=techyauld.com; arc=none smtp.client-ip=211.150.70.197 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=techyauld.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=techyauld.com Received: from localhost (unknown [192.168.167.32]) by regular1-03.263.net (Postfix) with ESMTP id BA0F01BCA; Sun, 3 Mar 2024 16:18:17 +0800 (CST) X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-ADDR-CHECKED4: 1 X-SKE-CHECKED: 1 X-ABS-CHECKED: 1 X-ANTISPAM-LEVEL: 2 Received: from localhost (unknown [118.193.106.122]) by smtp.263.net (postfix) whith ESMTP id P6063T140435683841792S1709453896918313_; Sun, 03 Mar 2024 16:18:17 +0800 (CST) X-IP-DOMAINF: 1 X-RL-SENDER: yzheng@techyauld.com X-SENDER: yzheng@techyauld.com X-LOGIN-NAME: yzheng@techyauld.com X-FST-TO: rogerq@kernel.org X-RCPT-COUNT: 7 X-LOCAL-RCPT-COUNT: 1 X-MUTI-DOMAIN-COUNT: 0 X-SENDER-IP: 118.193.106.122 X-ATTACHMENT-NUM: 0 X-UNIQUE-TAG: X-System-Flag: 0 Date: Sun, 3 Mar 2024 16:18:17 +0800 From: Brock Zheng To: Roger Quadros Cc: Andreas Kemnade , Tony Lindgren , Krzysztof Kozlowski , linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] memory: omap-gpmc: fixup wrongly hierarchy of the sub-devices Message-ID: References: <6fftq2zlkpaf7xptyff6ky63cinr76ziyvdbm5jhj2apubr5vf@l4gvbdax3l2e> <20240301133809.0d26865e@aktux> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792279587536020975 X-GMAIL-MSGID: 1792492588197515610 On TI-AM335x,FPGA under GPMC local-bus can not work on 6.x kernel. GPMC <--> FPGA <--> sub-devices.... I found that the platform sub-devices are in wrongly organized hierarchy. The grandchildren are now under the GPMC device directly, not under it's father(FPGA). Signed-off-by: Brock.Zheng --- drivers/memory/omap-gpmc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index 80d038884207..1f2568e43086 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -2175,6 +2175,7 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, int ret, cs; u32 val; struct gpmc_device *gpmc = platform_get_drvdata(pdev); + struct platform_device *child_pdev = NULL; if (of_property_read_u32(child, "reg", &cs) < 0) { dev_err(&pdev->dev, "%pOF has no 'reg' property\n", @@ -2330,11 +2331,12 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, no_timings: /* create platform device, NULL on error or when disabled */ - if (!of_platform_device_create(child, NULL, &pdev->dev)) + child_pdev = of_platform_device_create(child, NULL, &pdev->dev); + if (!child_pdev) goto err_child_fail; /* create children and other common bus children */ - if (of_platform_default_populate(child, NULL, &pdev->dev)) + if (of_platform_default_populate(child, NULL, &child_pdev->dev)) goto err_child_fail; return 0;