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=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 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 1DA42C433DB for ; Sat, 6 Mar 2021 17:22:22 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 99DD765017 for ; Sat, 6 Mar 2021 17:22:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99DD765017 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-ID: Subject:Cc: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=CbzuZAyEJ8exFTAS1qRn4yk8ghUs5KOyZ8nd4CjOR9A=; b=J/p5wi9l9+IpgcEmCjJDmDG6Z knGaoDin9xyVHBfMz3mQ7fjRPz39VHkuOUXTxc6wY5UlmqGdNWVOlIwQneS4erfYFn85sb9rSUyl7 jAMbampcX9AYtkJAvFlDjuglsPjeCnwcqjoo12eXh+HA4IOUnrDnMxByS319n1g1oRONwFgxUcyaV JiQb9uQk82hA/tBSpUe1DlqHwN8ebk3ZkBFjwPDEwJrzoV/CRNI73M08w52vZlrHWxKKyyn/QXZx1 PnkQo3y1YqrGjBcccHgiFl9FAe+UnDePtzGEpjk2C+KTPwyq0Z0uT/O+6dH7JlZg2vSVLQId3PFMc Sm/+ZytFA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lIabg-003ryM-7m; Sat, 06 Mar 2021 17:20:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lIabc-003rxE-1Q for linux-arm-kernel@lists.infradead.org; Sat, 06 Mar 2021 17:20:45 +0000 Received: from archlinux (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1448C65017; Sat, 6 Mar 2021 17:20:40 +0000 (UTC) Date: Sat, 6 Mar 2021 17:20:38 +0000 From: Jonathan Cameron To: Eugen Hristev Cc: , , , , , Subject: Re: [PATCH 2/4] iio: adc: at91-sama5d2: initialize hardware after clock is started Message-ID: <20210306172038.482b2b9a@archlinux> In-Reply-To: <20210301143256.16502-3-eugen.hristev@microchip.com> References: <20210301143256.16502-1-eugen.hristev@microchip.com> <20210301143256.16502-3-eugen.hristev@microchip.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210306_172044_433633_9411729C X-CRM114-Status: GOOD ( 18.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Mon, 1 Mar 2021 16:32:54 +0200 Eugen Hristev wrote: > The hw_init hardware init call must happen after the clock is prepared and > enabled. Otherwise, writing to the registers might lead to a block or > external abort. Fix for existing parts or something only needed for the new devices? If it's a fix we should be looking to back port it so please provide me with a fixes tag. If it's a fix but not super urgent then let me know and we can take it with the rest of this series (and hence keep things simple) Thanks, Jonathan > > Signed-off-by: Eugen Hristev > --- > drivers/iio/adc/at91-sama5d2_adc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c > index a7826f097b95..63325f037f09 100644 > --- a/drivers/iio/adc/at91-sama5d2_adc.c > +++ b/drivers/iio/adc/at91-sama5d2_adc.c > @@ -1832,12 +1832,12 @@ static int at91_adc_probe(struct platform_device *pdev) > goto vref_disable; > } > > - at91_adc_hw_init(indio_dev); > - > ret = clk_prepare_enable(st->per_clk); > if (ret) > goto vref_disable; > > + at91_adc_hw_init(indio_dev); > + > platform_set_drvdata(pdev, indio_dev); > > ret = at91_adc_buffer_and_trigger_init(&pdev->dev, indio_dev); _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel