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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 983ECC433E2 for ; Wed, 16 Sep 2020 21:09:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4DC44206D4 for ; Wed, 16 Sep 2020 21:09:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728307AbgIPVJj (ORCPT ); Wed, 16 Sep 2020 17:09:39 -0400 Received: from mga05.intel.com ([192.55.52.43]:9428 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726222AbgIPPzc (ORCPT ); Wed, 16 Sep 2020 11:55:32 -0400 IronPort-SDR: zrpRAA5xIi9lUSpLBuv95lvOFORi9oeYGFLlwxIHGJBwzt3A5euCM7bcI5QkIfznnsQpW4//ag l9jZCU8aJmOw== X-IronPort-AV: E=McAfee;i="6000,8403,9745"; a="244294860" X-IronPort-AV: E=Sophos;i="5.76,432,1592895600"; d="scan'208";a="244294860" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 06:20:07 -0700 IronPort-SDR: aNmDpg3D6dXOBkv8AOEPQ7Eo0OR4v49dvSZKbbKqki7iDt0H6/qz2nGujWkIt447J/1WN8tda+ HnS7s6zRbiEg== X-IronPort-AV: E=Sophos;i="5.76,432,1592895600"; d="scan'208";a="507165115" Received: from gopikapa-mobl.amr.corp.intel.com (HELO [10.209.66.210]) ([10.209.66.210]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 06:20:07 -0700 Subject: Re: [PATCH v2 1/3] soundwire: qcom: clear BIT FIELDs before value set. To: Vinod Koul , Srinivas Kandagatla Cc: yung-chuan.liao@linux.intel.com, sanyog.r.kale@intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org References: <20200916092125.30898-1-srinivas.kandagatla@linaro.org> <20200916092125.30898-2-srinivas.kandagatla@linaro.org> <20200916124634.GM2968@vkoul-mobl> From: Pierre-Louis Bossart Message-ID: <24401c7c-b12c-0924-9d8f-fde633d15918@linux.intel.com> Date: Wed, 16 Sep 2020 08:18:26 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200916124634.GM2968@vkoul-mobl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> According to usage (bitfields.h) of REG_FIELDS, >> Modify is: >> reg &= ~REG_FIELD_C; >> reg |= FIELD_PREP(REG_FIELD_C, c); if this is indeed the case, all the code in cadence_master.c is also broken, e.g: dpn_config = cdns_readl(cdns, dpn_config_off); dpn_config |= FIELD_PREP(CDNS_DPN_CONFIG_WL, (p_params->bps - 1)); dpn_config |= FIELD_PREP(CDNS_DPN_CONFIG_PORT_FLOW, p_params->flow_mode); dpn_config |= FIELD_PREP(CDNS_DPN_CONFIG_PORT_DAT, p_params->data_mode); Gah.