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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14490C4332F for ; Thu, 9 Nov 2023 22:27:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230364AbjKIWZQ (ORCPT ); Thu, 9 Nov 2023 17:25:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbjKIWZO (ORCPT ); Thu, 9 Nov 2023 17:25:14 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 967153C01 for ; Thu, 9 Nov 2023 14:25:12 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AF82C433C7; Thu, 9 Nov 2023 22:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699568712; bh=w9isLM5Dd7BL6Ud2XPJ80zIY1TA7rWT1OEsuJNBQIcs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Rw0f3o8iRiVJ5qzx1weQR7M4PRmrppZv9MJmd+ae3wt12CExCQnfqASRAxMUAI6VI iyHNZj82AoCNcMdmoE/9D1efDYc6m2MmxkDw1siAhpOfyZ13HPbxoPk5dvr8u64/Na 8AIu6ox+Fv45O79B7pggkot8usQRw+Ecbvc04My4KpHXFsMD0WG0gzgwOBAQNiKSA5 K2Hwae6HScJdgVfiDr3aCecNN8J+LN6bdVMwVGBFm04DKjWQnsHxrMOYf4/XLkVxp+ w2dGz5+gz9k2wqBdTfL/GVTkFpjbfjpb/FUQjBMRvm4O0aUSDY3In6Y4q/TN1F2Rfr 6K/BaU7Bj3N9w== Date: Thu, 9 Nov 2023 17:25:08 -0500 From: Simon Horman To: Min Li Cc: richardcochran@gmail.com, lee@kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Min Li Subject: Re: [PATCH net-next v2 1/1] ptp: clockmatrix: support 32-bit address space Message-ID: <20231109222508.GC568506@kernel.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 09, 2023 at 01:13:52PM -0500, Min Li wrote: > From: Min Li > > We used to assume 0x2010xxxx address. Now that > we need to access 0x2011xxxx address, we need > to support read/write the whole 32-bit address space. > > Signed-off-by: Min Li > --- > - Drop MAX_ABS_WRITE_PHASE_PICOSECONDS advised by Rahul ... > @@ -62,7 +62,8 @@ static int contains_full_configuration(struct idtcm *idtcm, > const struct firmware *fw) > { > struct idtcm_fwrc *rec = (struct idtcm_fwrc *)fw->data; > - u16 scratch = IDTCM_FW_REG(idtcm->fw_ver, V520, SCRATCH); > + u16 scratch = SCSR_ADDR(IDTCM_FW_REG(idtcm->fw_ver, V520, SCRATCH)); Hi Min Li, I think a similar conversion for scratch in idtcm_load_firmware() is required. As flagged by clang-16 W=1, and Smatch. ` > + u16 gpio_control = SCSR_ADDR(GPIO_USER_CONTROL); > s32 full_count; > s32 count = 0; > u16 regaddr; ...