Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp377208lqp; Mon, 10 Jun 2024 06:58:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmJDcTVQAzyZRRWH9t+G2/m/fYeXxahfnnZAyzGv2qNQvqwCuwvX1YwsquB3AOrQnpybwwbg3LtzDxU/KmZ8Xi+4atBdd4a8IRFSsPdg== X-Google-Smtp-Source: AGHT+IHnsZrqdKs1DUmd+bBhGrt3ULyg0jtF0ErlUsgt/ubWvfp5wR+qHYS6fuN7ZHK4S4voTHh6 X-Received: by 2002:a17:906:45a:b0:a6f:7c8:4fd6 with SMTP id a640c23a62f3a-a6f07c8518bmr395150566b.0.1718027922765; Mon, 10 Jun 2024 06:58:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718027922; cv=pass; d=google.com; s=arc-20160816; b=h/1a5Pmr6PKd2j5V+yVKzWdvCvvy1W0xL8BcgRnwKUCWgFFpz6zLRXH/aDIk1hvJ1/ XDbxmI+70AeV84c5i/kzf4PlXwK0ZLnwuQddaCfRxRdv8vby57kOF8Y/Tx3qyvU9nuI3 p/8FutiUl9L//46vman/wD0vs2n4v3bGZFVnMW8M3+gP54cT/ptnTMZ9QGMRn6dticmA V0ApsFPavMnRGJ5RvEjtBtPMqraZ6IwYhPS4RHKAIYt2z1z5QFIMM2mgcg1ujEiux/pr J6+NdP+Qtp/KwZsciy8xUbOLFlkFcSiGbIFsHaYKVmJXrYU6dxFqVL7jsab2DBLh1mpX oSsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=i7o7N5B7+jfcvWuYAHwVeh2JCgEO5HfdPITsk4LeZr0=; fh=Bc6exMLcDonbBoKqVp4y6zqv/AcfnhW0Zk7tCXphTFc=; b=iCxt52WXPkNJcA59CDy8Pqlx3BHHkeOSF5hWVZGIaZd8d+AiqlVeb1n5IlPEuHAV4i uCPMFuCd3gT7VHBgrAufVk5c7pfcWS8UbqyfrxAac5rB6oecOTFKdcbmj75BNZXnEHo4 47EdXFxKbuYuUAmsyzNKplGQJx+Pdjzp+D8lrHvXG93/djYPyEVCMG2vqwNj5X9z8mq9 K167GFyUemobvw+0TGx78QvLAFM39FLOtcBtj1KplceO8fZtIG495plUpyvTg7aAHhXf DmUeaYNGOBLumxKN6Cs0qf7n+aFuYpHF13rr5Vx6KMyfksMqLAolfMw3u9PzJS2p59Nf 3sMw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=z9bRYthr; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-208297-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f12350e8esi178514566b.734.2024.06.10.06.58.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 06:58:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208297-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=z9bRYthr; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-208297-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7CB081F277F6 for ; Mon, 10 Jun 2024 13:58:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9094313D521; Mon, 10 Jun 2024 13:51:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="z9bRYthr" Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 6FE3682D75; Mon, 10 Jun 2024 13:51:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718027507; cv=none; b=lPfEUQ7Im/haHT2LjRX/rO+Abp/SghM25WDF6YxYJASnfFfmqB9efyNHypDdaahsAfO7/MMpaVHZUocV5i9g69kei0qddi2T8Kl+Qj5BkucpEXdOfb6wU69omNYV5lqOJ0nRX+DdBuHWwbs9cJHGsQhyrDl9G1Qd+8uDwUnQ6QU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718027507; c=relaxed/simple; bh=z6q7jyPj/z6RQLVJZxM1J27Mm3BoSUPWnn1OKfGRNgQ=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=vDjLb3nDg0NomI3dlsG/Dar+kF/VDDjdB0iAnvVEKv5r3hq1xSavfS6dwSasATw6dRPQjDne/DGI7iv3uLF6ZxVnLlvIU9D0Cp2iaFU1SOnBrtnDyRfoIJTK5kDwdOzDyiGot21jD6XpQcXU2DAD07l3v+acnFFr0+9TNRJgHoA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=z9bRYthr; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45ACUjOe011470; Mon, 10 Jun 2024 15:51:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= i7o7N5B7+jfcvWuYAHwVeh2JCgEO5HfdPITsk4LeZr0=; b=z9bRYthrmDiTXApj hZJp31j8pmkI58wkwiYMwvJ6dh6cN3rCynpQ9QTFAvjM3MCCBgq8aFc+mfFihPdK EsUWEtdN5Q2ROL7KIJniKD6CHTXu6jH2oLfcgVTpLUrnvqKl/KB1x8n4z1nQlf2a kXCQAtY5+9PITZj1vmpy/9DBsZMHKC9h7aM7yk3zCpeo0OIUvrj3zw1b77hQ1+ED LyLHae/7asxFwA2ViqgzBQjVYJtuomxbYIjoUXROe+rYDVYn+0EAUSrOi+sNmK9e wJCEUcF+/upWIvYu446W/1gZCJGY5FcOHDumDCEIREoOTl2hPEA85kooQ4ICTkYp fXXc+A== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3yme6d74q3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 10 Jun 2024 15:51:19 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id DA57940046; Mon, 10 Jun 2024 15:51:13 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id D0ECB2194EE; Mon, 10 Jun 2024 15:49:59 +0200 (CEST) Received: from [10.48.86.164] (10.48.86.164) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 10 Jun 2024 15:49:58 +0200 Message-ID: <91af5c61-f23f-4f72-a8c8-f32b2c368768@foss.st.com> Date: Mon, 10 Jun 2024 15:49:58 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [net-next,PATCH v6 7/8] net: stmmac: dwmac-stm32: Mask support for PMCR configuration To: Marek Vasut , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Richard Cochran , Jose Abreu , Liam Girdwood , Mark Brown CC: , , , , References: <20240610071459.287500-1-christophe.roullier@foss.st.com> <20240610071459.287500-8-christophe.roullier@foss.st.com> <20139233-4e95-4fe5-84ca-734ee866afca@denx.de> <09105afe-1123-407a-96c3-2ea88602aad0@denx.de> Content-Language: en-US From: Christophe ROULLIER In-Reply-To: <09105afe-1123-407a-96c3-2ea88602aad0@denx.de> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-10_02,2024-06-10_01,2024-05-17_01 On 6/10/24 15:43, Marek Vasut wrote: > On 6/10/24 1:45 PM, Christophe ROULLIER wrote: >> >> On 6/10/24 12:39, Marek Vasut wrote: >>> On 6/10/24 9:14 AM, Christophe Roullier wrote: >>> >>> [...] >>> >>>>   static int stm32mp1_set_mode(struct plat_stmmacenet_data *plat_dat) >>>> @@ -303,7 +307,7 @@ static int stm32mcu_set_mode(struct >>>> plat_stmmacenet_data *plat_dat) >>>>       dev_dbg(dwmac->dev, "Mode %s", >>>> phy_modes(plat_dat->mac_interface)); >>>>         return regmap_update_bits(dwmac->regmap, reg, >>>> -                 dwmac->ops->syscfg_eth_mask, val << 23); >>>> +                 SYSCFG_MCU_ETH_MASK, val << 23); >>>>   } >>>>     static void stm32_dwmac_clk_disable(struct stm32_dwmac *dwmac, >>>> bool suspend) >>>> @@ -348,8 +352,15 @@ static int stm32_dwmac_parse_data(struct >>>> stm32_dwmac *dwmac, >>>>           return PTR_ERR(dwmac->regmap); >>>>         err = of_property_read_u32_index(np, "st,syscon", 1, >>>> &dwmac->mode_reg); >>>> -    if (err) >>>> +    if (err) { >>>>           dev_err(dev, "Can't get sysconfig mode offset (%d)\n", err); >>>> +        return err; >>>> +    } >>>> + >>>> +    dwmac->mode_mask = SYSCFG_MP1_ETH_MASK; >>>> +    err = of_property_read_u32_index(np, "st,syscon", 2, >>>> &dwmac->mode_mask); >>>> +    if (err) >>>> +        dev_dbg(dev, "Warning sysconfig register mask not set\n"); >>> >>> Isn't this an error , so dev_err() ? >> No, it is only "warning" information, for MP1 the mask is not needed >> (and for backward compatibility is not planned to put mask parameter >> mandatory) > > Should this be an error for anything newer than MP15 then ? For MP25, no need of mask, so for moment it is specific to MP13.