From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6F31C1095C for ; Wed, 6 Sep 2023 17:39:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91714C433C7; Wed, 6 Sep 2023 17:39:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1694021989; bh=woGQ3GBTdrvaqUWY294SsWX6BIxtB6DjopSTav8HuTs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rAmRXM1HkdREq/ViK+DGlAO09uz3GkksK3AX3TN9DIPeYudb+hm0PIOzprHI6Gcb8 u70lT0NW439n3+WdmU7z+tiJixkLjFjysEhDhz+uP0t8l9iaoe9D5T4mgBkPwsCeBc Lzxp79blVpSk11xaqe51AouZ5yt8JVkjdjHxjQ6E3WzOoZGeo7/VHmQGMahRFV8I52 gQ7IRwYdfwP7k/w9JkOWnE2GOUBWmqUlirC5akBAgsvKW9ZNSRue64pohPeocdtWVD DUOlOCYxNp5sxJNkiHigrmp5THOQd+BH7MuwQoCV7B1Pgeyx+dZfnOV41GYEAWq19q wwDnEHRyMczvg== Date: Wed, 6 Sep 2023 19:39:46 +0200 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 1/1] ptp: clockmatrix: support 32-bit address space Message-ID: <20230906173946.GD270386@kernel.org> References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Sep 06, 2023 at 12:54:05PM -0400, Min Li wrote: > From: Min Li Hi Min Li, A patch description should go here, describing the motivation for the change. It does seem to me that this is an enhancement rather than a bug fix. And as such is more appropriate for 'net-next' rather than 'net'. i.e. Subject: [PATCH net-next] ... If the patch is for net-next then it will need to be resubmitted, as per the form letter below. If, on the other hand it is for net, a Fixes tag is most likely warranted. ## Form letter - net-next-closed The merge window for v6.6 has begun and therefore net-next is closed for new drivers, features, code refactoring and optimizations. We are currently accepting bug fixes only. Please repost when net-next reopens after Sept 11th. RFC patches sent for review only are obviously welcome at any time. See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle > > Signed-off-by: Min Li > --- > drivers/ptp/ptp_clockmatrix.c | 72 ++-- > drivers/ptp/ptp_clockmatrix.h | 33 +- > include/linux/mfd/idt8a340_reg.h | 542 ++++++++++++++++--------------- > 3 files changed, 340 insertions(+), 307 deletions(-) > > diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c > index f6f9d4adce04..875841892842 100644 > --- a/drivers/ptp/ptp_clockmatrix.c > +++ b/drivers/ptp/ptp_clockmatrix.c > @@ -41,7 +41,7 @@ module_param(firmware, charp, 0); > static int _idtcm_adjfine(struct idtcm_channel *channel, long scaled_ppm); > > static inline int idtcm_read(struct idtcm *idtcm, > - u16 module, > + u32 module, > u16 regaddr, > u8 *buf, > u16 count) > @@ -50,7 +50,7 @@ static inline int idtcm_read(struct idtcm *idtcm, > } > > static inline int idtcm_write(struct idtcm *idtcm, > - u16 module, > + u32 module, > u16 regaddr, > u8 *buf, > u16 count) > @@ -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)); I think you also need a similar change in idtcm_load_firmware(). diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c index 875841892842..69c170133a25 100644 --- a/drivers/ptp/ptp_clockmatrix.c +++ b/drivers/ptp/ptp_clockmatrix.c @@ -1254,7 +1254,7 @@ static void display_pll_and_masks(struct idtcm *idtcm) static int idtcm_load_firmware(struct idtcm *idtcm, struct device *dev) { - u16 scratch = IDTCM_FW_REG(idtcm->fw_ver, V520, SCRATCH); + u16 scratch = SCSR_ADDR(IDTCM_FW_REG(idtcm->fw_ver, V520, SCRATCH)); char fname[128] = FW_FILENAME; const struct firmware *fw; struct idtcm_fwrc *rec; As flagged by Smatch and clang-16 W=1. > + u16 gpio_control = SCSR_ADDR(GPIO_USER_CONTROL); > s32 full_count; > s32 count = 0; > u16 regaddr; ... -- pw-bot: defer