Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp181788pxu; Tue, 24 Nov 2020 23:38:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyhH2U4saQmNAEtqtIleUvjrjBOWhLXITxdO+8MFeepuZnMWriFxpg3Osgk7aBYIwOzPrVJ X-Received: by 2002:a50:8f64:: with SMTP id 91mr2227790edy.310.1606289889543; Tue, 24 Nov 2020 23:38:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606289889; cv=none; d=google.com; s=arc-20160816; b=q5dcXMgp5YkoGg6I7+NJBkkve3TC9deVeD5kGIrVWCmxSEA10lqbhgFZluzwmeMOYt VtKTuqNQ2wZKjtGA5eS6HZ/rVddbXW046XyV68G96bFGjiQwDNSaOZ6rYpR3Jy/ZeuTZ hKkxpqpZ6bqvFA+EBrhabrzGQJ4mDG9ppW7grD7ZZiIjNzxv/ffI4yR5WUY4J84MvWSd fbRbmqsf7p1pZoZpQ6+59U22eVWYoA/pdfxnh+7q94vI7O4x5b/onICii1y1+BW8GjgG r68QIComJ2b57f93PPkKzUb7S1aLUo5fEF0/qEvcce+VTp3HzNk/bvVnRxojBCxefuY6 C3iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=9FvpxBySBFGNcqoQvyYDhYbPkevrWxuirrUYlwx+3Hs=; b=yRHTBHv4YG3x99ilqDuCM3kgi6QS+PcYj9gaZR/GJXbgws7gFNHSyGk4CBCP4OWYmS RkKeMEmLA4yqocUwSqJwPGGry/L46XgPZlvCe3FIPgmVxJQOuRAzEM8ryaAaowcjMvL5 YcNSPf0ehaZsBEdwkqhdVxylWx5RceDeTsZZf87X77Sn9rD7oLEAoKyGnqcnT90OWG0v 3t1y8jPA1W4J9IiI0QUhNXDAeF5azbzyU+VtLbSfBvKkwHLpfxXkhvc3m9XsEUkivmaJ tCcRGP/18GjLX5XTlrsYnEXEAFP8nD/J/jWoqHWlAFTjbhaIkkQxRAobPUQDROU//gEr UtRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hCkZTh02; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a4si736267ejf.460.2020.11.24.23.37.45; Tue, 24 Nov 2020 23:38:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hCkZTh02; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728036AbgKYHeC (ORCPT + 99 others); Wed, 25 Nov 2020 02:34:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:51644 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726463AbgKYHeC (ORCPT ); Wed, 25 Nov 2020 02:34:02 -0500 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0053220DD4; Wed, 25 Nov 2020 07:34:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606289641; bh=1tj/48GfzxzqmYgDCA/0eCd6TB+m5r4Xs7r8dncm/9o=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hCkZTh02xMAF0hp/U900HVhQ3ZWPZlOLIZXixsLcuvvokJRAu2syT3ZScX53XJjYG qKL41Z93GJGX7Voe+VxhIOJ764Hiyi1QKw06e3knAuGVmk494DN/XCxz3ZA9FKAtZF I6J+IKuCvyeTx9WCyCr3TMguohqZOyXANPap1jM4= Received: by mail-ej1-f47.google.com with SMTP id k9so1552761ejc.11; Tue, 24 Nov 2020 23:34:00 -0800 (PST) X-Gm-Message-State: AOAM533YZ3kpquSMbajIlGmCRDxc8CpPGanDA7wiiR1Am40oJ53X++h5 7wHbNk1V4sg7iMHNBN+nKlbLZl1oCKkM9OkMnYw= X-Received: by 2002:a17:906:7aca:: with SMTP id k10mr1907968ejo.215.1606289639405; Tue, 24 Nov 2020 23:33:59 -0800 (PST) MIME-Version: 1.0 References: <20201124015949.29262-1-alice.guo@nxp.com> <20201124015949.29262-4-alice.guo@nxp.com> In-Reply-To: From: Krzysztof Kozlowski Date: Wed, 25 Nov 2020 08:33:47 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 4/4] soc: imx8m: change to use platform driver To: Adam Ford Cc: Alice Guo , Rob Herring , Shawn Guo , Sascha Hauer , devicetree , Peng Fan , NXP Linux Team , arm-soc , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 25 Nov 2020 at 01:44, Adam Ford wrote: > > On Mon, Nov 23, 2020 at 8:04 PM Alice Guo wrote: > > > > Directly reading ocotp register depends on that bootloader enables ocotp > > clk, which is not always effective, so change to use nvmem API. Using > > nvmem API requires to support driver defer probe and thus change > > soc-imx8m.c to use platform driver. > > > > The other reason is that directly reading ocotp register causes kexec > > kernel hang because the 1st kernel running will disable unused clks > > after kernel boots up, and then ocotp clk will be disabled even if > > bootloader enables it. When kexec kernel, ocotp clk needs to be enabled > > before reading ocotp registers, and nvmem API with platform driver > > supported can accomplish this. > > > > Signed-off-by: Alice Guo > > --- > > > The patch reads V6, but the change log only shows V2. Can you > elaborate on what has changed between V2 and V6? > > adam > > > v2: remove the subject prefix "LF-2571-4" > > v3: Keep the original way which uses device_initcall to read soc unique > > ID, and add the other way which uses module_platform_driver and > > nvmem API, so that it will not break the old version DTBs. > > v4: delete "__maybe_unused" > > delete MODULE_DEVICE_TABLE(of, imx8m_soc_match); > > rename match table, "fsl,imx8mm/n/q/p" is actually a machine > > compabile and "fsl,imx8mm/n/q/p-soc" is a compabile of soc@0 > > delete "flag" and change to determine whether the pointer is NULL > > ues of_find_matching_node_and_match() > > delete of_match_ptr() > > v5: add cleanup part "of_node_put" > > add note to explain that why device_initcall still exists > > v6: none Hi Adam, It says up to v6, just in unnatural order... I was also surprised. Best regards, Krzysztof