From patchwork Thu Feb 29 23:52:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Brock Zheng X-Patchwork-Id: 208565 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp753450dyb; Thu, 29 Feb 2024 15:56:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWukLBuhtCG01q64SScbCoTkMBP6Pdfhe6qL/usncetVkHeGPABtmEp1C73RkGVfBfrIET7af0NYOXck9spUCH/WEcs0w== X-Google-Smtp-Source: AGHT+IHmmcioD6vggEg3zF130+OOAsdhYK+eo7N/LrJOGiXW89djyYuC+2RdB8WWU+KsNhw40WRL X-Received: by 2002:a05:6808:1786:b0:3c1:945a:c33b with SMTP id bg6-20020a056808178600b003c1945ac33bmr190556oib.27.1709251010337; Thu, 29 Feb 2024 15:56:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709251010; cv=pass; d=google.com; s=arc-20160816; b=RJqxnDnpa3QBqCmGv6hjvFH+JPUao5os1v9FZ9j7YLJ8Y8EXCGhdrbIO75h62i/Vwy skGDSUEtN4YcRj8yfn6nkycbBAc4SXX6lQqtvKnWds/mPn3jv0qxUydvQ5LBp8TwdeId 5aYb/M5PlwxAA1vvcQXk0eOgrA5RnwuyUTsk2fAX25z1XGpmi/iUgRIRs8lEwt77fAO9 8bp5kK68T3Y4Q120XXO/yVQYpXxH0XEQajiZ7w4gvw9XySj4+g3MztH6mwB5+xhXIN3/ 4j2B1Q6PcB6RBafSrX6xUgPM+L+IE24HRkvqlDgkQ30vukGO3tH1Rp51YowX6XhxGCvY qiBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:message-id :subject:to:from:date; bh=N1qqGGPCtNKjQg0dDVNGqqy2sqEyYI/FgebfBwyLBXE=; fh=bUY6EhBlzJ/NVPT0AZrh8KtMpy5/6QPlT9qFMKF3CjE=; b=lv+H5kK/5I0K9T5TnDzxChofz0tNZ3ZKHOBojO6nQP1BKninTetBzFz+5tRkgW5raD FlLZ7JtjLMx4s6PsdsVKbDVSsuFLJxUj3rNpCIdhpLD7T6wDbEGOZZLfYOdo6vvMCNdD xl7+BjHvvZe6O9AsSelvANnCpXoqQD9M1fX4wGOYIRDDxuaI5pbALucgxeRqe1qIhXFB Gi/pj/jJmpGqBD9OWhjLNRAcLucXmKQVefVaBtP4kvfSbKPsZsjZbmRjDEeDk+iELl8/ kPJhLjkVYmOu5UsfYYo20y7US45pcAMba35qPNmaoFywErTxf/4pCSv7Mk3VrmkNypuv MYog==; 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-87711-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87711-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u11-20020a056a00124b00b006e5a6b2364asi1273674pfi.151.2024.02.29.15.56.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 15:56:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-87711-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=techyauld.com); spf=pass (google.com: domain of linux-kernel+bounces-87711-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-87711-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 0E42BB22571 for ; Thu, 29 Feb 2024 23:56:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5380713E7EC; Thu, 29 Feb 2024 23:56:09 +0000 (UTC) Received: from regular1-06.263.net (regular1-06.263.net [211.150.70.200]) (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 D0A4842A8C; Thu, 29 Feb 2024 23:56:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.150.70.200 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709250967; cv=none; b=OOaR+kDUXyqOSVApXxUqPUL0dM8k6r7i49kOtF5G23AvSUgISoUxy2W1/h1J45Eh6sdrqFM48OQxiXZJeY7LD/dYN2ifhHgaEcDJhLVyROdwoZR2/0+ZtkQP+5V4+RobyQZuhea65twVGnYRWssduuzCNmUwQnCgOf2jO75Kdag= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709250967; c=relaxed/simple; bh=XSZhwMr9M5XqRVovzbNIdrRe0Vzc/jVfQbtwR0xjlOo=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=BbkuxHE6QHUDNTR24sY/E1JBaO+Xgkgijz5cvKI2NkPrT/pHNhJg7AybbBelNRSBZqswM044pQ4tYyVUfDGr5mBGmGToLdDxTqNZYv6X9rHQYok8lHI7FDjeJQapkj5NfImfwRukzF4kufpe3eHC0QDqT2xa2PcPGiTBEmOB2fU= 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.200 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.69]) by regular1-06.263.net (Postfix) with ESMTP id F0FA31DAB; Fri, 1 Mar 2024 07:52:30 +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 P20140T140685814527744S1709250750224016_; Fri, 01 Mar 2024 07:52:30 +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: 6 X-LOCAL-RCPT-COUNT: 1 X-MUTI-DOMAIN-COUNT: 0 X-SENDER-IP: 118.193.106.122 X-ATTACHMENT-NUM: 0 X-UNIQUE-TAG: <49e5b54e442e7c9fdccf77e484b484ff> X-System-Flag: 0 Date: Fri, 1 Mar 2024 07:52:30 +0800 From: "Brock.Zheng" To: Roger Quadros , 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: <6fftq2zlkpaf7xptyff6ky63cinr76ziyvdbm5jhj2apubr5vf@l4gvbdax3l2e> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792279587536020975 X-GMAIL-MSGID: 1792279587536020975 On TI-AM335x,my FPGA under GPMC local-bus can not work on 6.x kernel. GPMC <--> FPGA <--> sub-devices.... I found that the platform sub-devices is in wrongly organized hierarchy. The grandchildren are now under the GPMC device directly, not under it's father(FPGA). Signed-off-by: Brock.Zheng 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;