From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7CE3C2D0E4 for ; Tue, 24 Nov 2020 09:48:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C9BD2075A for ; Tue, 24 Nov 2020 09:48:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731466AbgKXJsZ (ORCPT ); Tue, 24 Nov 2020 04:48:25 -0500 Received: from mail-ej1-f67.google.com ([209.85.218.67]:33333 "EHLO mail-ej1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728979AbgKXJsZ (ORCPT ); Tue, 24 Nov 2020 04:48:25 -0500 Received: by mail-ej1-f67.google.com with SMTP id 7so27553154ejm.0; Tue, 24 Nov 2020 01:48:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kHg8opE9L5ssa94AdwhJs0rx8rUn9jblcvlXwtbT79s=; b=ivCyxUdqckFfsX0FvxUAMEl0RPWa8CQ5d68g2ZjtdcCnrSyPNryJFnmi7jFC5sXxHm MB4SR0u4p41l/ZJdndNEtKGP45r5Uac/7RVKymfC9mw0pHzn1c9MRoOTN1Y9padAlt1T y7RBilxzoC/CwITV82DbBwLOCwmXEFAW5X5yBrnUhXK+356SY6R/e5mThHfgjWs8Z/HA gdFfsQvJpma8DYMQQCVLn6n83qz15tvUZcNz2HpeQs1VQM3ggBevdKpdlvS3jwaCA/vw h8BS+ehgbvZgaq1ewRMx6oDXeMkau1OduAXedWuqJDdWx9abt4KAfpvSl9vwRCGcMU0A pqqg== X-Gm-Message-State: AOAM533nxciD5NkuB3aVlWilloBk9V7HYf98Kfji1VYA/MjrX1RBhicb g8yG8renyFe3LqdeMwfgqlFvQnbzw88= X-Google-Smtp-Source: ABdhPJyggbZTD/skqATfplFLBtAYVhwVXtFfpu71G0LRsxRoVgm4xAKt5ANzXDkyYTPMCNWGq2arVA== X-Received: by 2002:a17:906:eb46:: with SMTP id mc6mr3622300ejb.54.1606211303203; Tue, 24 Nov 2020 01:48:23 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id b9sm6509738ejb.0.2020.11.24.01.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 01:48:22 -0800 (PST) Date: Tue, 24 Nov 2020 10:48:20 +0100 From: Krzysztof Kozlowski To: Alice Guo Cc: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, linux-imx@nxp.com, peng.fan@nxp.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v6 4/4] soc: imx8m: change to use platform driver Message-ID: <20201124094820.GC15030@kozik-lap> References: <20201124015949.29262-1-alice.guo@nxp.com> <20201124015949.29262-4-alice.guo@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20201124015949.29262-4-alice.guo@nxp.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 24, 2020 at 09:59:49AM +0800, 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 I already reviewed it. You skipped all my review tags from v5. Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof > --- > > 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84ED8C2D0E4 for ; Tue, 24 Nov 2020 09:48:58 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0AF1F20684 for ; Tue, 24 Nov 2020 09:48:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vn+GqvVq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0AF1F20684 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=vpIim7O5E833QqCoKdl4A++mjzQqaLpsUNO+TLrS+0I=; b=vn+GqvVqbjUUMF9VSAA+ztuqZ H3nwHYUN2dbfAwOwxyQ6n7gvIwMqkBf4aWe9EDfda8XFUp8/3znaUokapCS/aNkQwiS+3+Sof8YF4 Ds1PMfh9PsVY+F1mvGV6xKat7ci0YeX9Usd21gCXVFwDpSz6rtlwwqgqEWfQR72rUHFvi1NCEjfg9 HDG5TVFCQfFdWpSl2t2tsJ4x8eC+UMeoJ7XSMHXbTsi/reTRUSDpOM20jTdWukYmBZjhGr2rHMFy/ /E6MY3EZY5eZqYTvdSaBOYlh0wJi4IADztpmZJCLAiForXECaWh+pjKN4tnUPc5co0IGwb38naAKv Mt31shSJA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1khUw1-00022k-FT; Tue, 24 Nov 2020 09:48:29 +0000 Received: from mail-ej1-f66.google.com ([209.85.218.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1khUvy-00021T-Np for linux-arm-kernel@lists.infradead.org; Tue, 24 Nov 2020 09:48:27 +0000 Received: by mail-ej1-f66.google.com with SMTP id bo9so21768108ejb.13 for ; Tue, 24 Nov 2020 01:48:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kHg8opE9L5ssa94AdwhJs0rx8rUn9jblcvlXwtbT79s=; b=YICfoA70Tlc22mT3kHH144Z0Z2aHpmTPyidnR35HLkFNhrf0SnPlQIOcidMSiR0Fdw RsuZlxXKuJfCAP/JyfTeR9RZiNMUZBmToNHEYihvxVKDWwTC8+96sFNmUOHcQ9RcdtkZ DWZOZN0C5Dmtxr58yZNTRUxot6ujxYhCIsT0l2kzefZQVgD2as603J+zdECqQmfWzrGk TbCwkOBIAqYDQlvOUwtluqBNjAzC+bkKfrgh9F3NSwXxkT3HAR/mHuW3+DNTe0F1bko8 K5wt5R64/n7wmh8XrThhTxSmp8Gje3QxaxtUtkhzYV6z+f0xzun+UFui3BmhRPJriTnE j3yw== X-Gm-Message-State: AOAM533MTb6oYCm+kPVulowWJKp4+7at4Z/4V3saROCs9eVASFyflEwU UiFkAtEssv0Pua5i3sDYbTU= X-Google-Smtp-Source: ABdhPJyggbZTD/skqATfplFLBtAYVhwVXtFfpu71G0LRsxRoVgm4xAKt5ANzXDkyYTPMCNWGq2arVA== X-Received: by 2002:a17:906:eb46:: with SMTP id mc6mr3622300ejb.54.1606211303203; Tue, 24 Nov 2020 01:48:23 -0800 (PST) Received: from kozik-lap (adsl-84-226-167-205.adslplus.ch. [84.226.167.205]) by smtp.googlemail.com with ESMTPSA id b9sm6509738ejb.0.2020.11.24.01.48.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 01:48:22 -0800 (PST) Date: Tue, 24 Nov 2020 10:48:20 +0100 From: Krzysztof Kozlowski To: Alice Guo Subject: Re: [PATCH v6 4/4] soc: imx8m: change to use platform driver Message-ID: <20201124094820.GC15030@kozik-lap> References: <20201124015949.29262-1-alice.guo@nxp.com> <20201124015949.29262-4-alice.guo@nxp.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201124015949.29262-4-alice.guo@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201124_044826_823259_D8714F8D X-CRM114-Status: GOOD ( 18.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, peng.fan@nxp.com, s.hauer@pengutronix.de, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-imx@nxp.com, shawnguo@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Nov 24, 2020 at 09:59:49AM +0800, 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 I already reviewed it. You skipped all my review tags from v5. Reviewed-by: Krzysztof Kozlowski Best regards, Krzysztof > --- > > 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel