Received: by 2002:ab2:784b:0:b0:1fd:adc2:8405 with SMTP id m11csp268960lqp; Mon, 10 Jun 2024 03:44:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWD7UD/qkkw6v9B/JSS1oM8zKlr6qQ6IMIjPxnV0QMfXToqmhZxWlKxp7lXNSQwoA5JX2wNZjQX4AZxLTtXTPLaOlWi5DbKVCaUS9JWNQ== X-Google-Smtp-Source: AGHT+IEVaZqn5w0rScOhpvKXPzxxkr4kLdYKwfDIENhsZgMih4/Goc5i8w5HBauzNIxhI7+XpEcT X-Received: by 2002:a05:6a20:a125:b0:1b7:577c:7177 with SMTP id adf61e73a8af0-1b7577c72e0mr2822881637.16.1718016276454; Mon, 10 Jun 2024 03:44:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718016276; cv=pass; d=google.com; s=arc-20160816; b=YwZtyDKDw98vPTX+OnV07Ebhro2MRHKHLsEwA3lw2djN6z86HcLSZm4Jyk565UMh02 ywQtSVy4YWomSyrfF3QhdX8ca2zewlJ9FvLnojkk2F+CBeXbymvlU8MEjVTcM7DJCuIh OIStCnZfHXEf5Ywd7ntniP+cvH1fBC3T4oiAEODO3vtUkVEub0IVtZseULbLHUgMQuH5 nsm12meXMWWHutXB6dEr6GIJ3wzMO1AM8NbJ96Xnug+srd19sDZfHvndkEU7b3vcp80b t0O0LLp8HIJDeBH8ILe6nh52tlTXIDwT8/uIibb1eDVMThxK7xhW0xrK8B9eg/FtmoF8 NdIw== 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=DYg6tL7HTuHnmwDK8wj/mmR4QXzEn5dAlWnruAHXPi8=; fh=MZgvy/AmeHE5/588XAg1mUij55f12DiWyocFDxS19BU=; b=d64lsAqztWQUa9Z6XDeCvlIiCmSeE+jdWuD4E14H7Wtdssf7tIrmr35iwXc8rW881M xGrHwmQtMTjXVLblqwWIdpXp3nftKwtXY64bQ8kjjHPV0KtnKg+MfplBnXiRtPBgArPj ZKcOmUAppcnhQr5JyREhr5BCKqSdJ5jp0vaMqf3FnP9M6bkFQfOessc0YK3PDyiEEJZs ECYgB4lQDaa0LvJLW15kgcz4kx02VU9HUQUPv677YrbfumEROpS+LlLqjqIeQRppSyjN ZS+14Aeh2RnIzwomSKJ/AHfvnJlIXRP9zl/sVuDzJ/QZ6GwVgeTWzxFkgx0Qa81UpJa5 dNIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=HdUxmK4v; arc=pass (i=1 spf=pass spfdomain=denx.de dkim=pass dkdomain=denx.de dmarc=pass fromdomain=denx.de); spf=pass (google.com: domain of linux-kernel+bounces-208028-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208028-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d9443c01a7336-1f6bd81fbffsi65388945ad.549.2024.06.10.03.44.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 03:44:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208028-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@denx.de header.s=phobos-20191101 header.b=HdUxmK4v; arc=pass (i=1 spf=pass spfdomain=denx.de dkim=pass dkdomain=denx.de dmarc=pass fromdomain=denx.de); spf=pass (google.com: domain of linux-kernel+bounces-208028-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208028-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=denx.de 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 13D10285232 for ; Mon, 10 Jun 2024 10:44:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A1AAB7D075; Mon, 10 Jun 2024 10:44:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.b="HdUxmK4v" Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6666E78289; Mon, 10 Jun 2024 10:44:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.214.62.61 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718016255; cv=none; b=OLmzEP7xR0b8CLbzttjxoPzPgsLz5a9/DWZU121EWEC5q3sZ3HRi3GefW0V+h2I+lA31mK+E3TTwffKKs8rGOUNCW5RY9MQHxoXsP53wbkat21mwHMWn32Ze2lXlAWAaHx/VBubG7/GRDTX+mGfHxovqdAxbZJo+E0AFX0sPpDc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718016255; c=relaxed/simple; bh=Xgifc3RZYOrbnKpU3WRdjJpZwdhk0dGafsLtNHkcmIA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XchEuvbLKWWV6KhqDCVF6GzTKravi4Bq8JwP5N2bp4E07J/Khi+ZHP6SBocA+WtRAmOClwV81h5M0VLR27Obs0FIzqhkuVUHW++qG1XD9trPHYoPgvVlxMPsLKvEBddqXiDrIh1oHSHV2dDPOc+aw5mwuXMagZRle+S60pq7vzY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=denx.de; spf=pass smtp.mailfrom=denx.de; dkim=pass (2048-bit key) header.d=denx.de header.i=@denx.de header.b=HdUxmK4v; arc=none smtp.client-ip=85.214.62.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=denx.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=denx.de Received: from [127.0.0.1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id D39AB883F2; Mon, 10 Jun 2024 12:44:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1718016247; bh=DYg6tL7HTuHnmwDK8wj/mmR4QXzEn5dAlWnruAHXPi8=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=HdUxmK4v1UYivallEA9IKBrXygjcQS3ygkoyqmVx291CNwAXywRP9eCnB7J+T8BQk 4uE+ZV65FzEgxmpg8HE34onFYJEfnNa5Nms6TLUrzt8sS1xqroVSwVdJqk6zQK1gEb P7NVyj4n7EWt1V8HFSYxsYusJuSiVBRvpGTN3++sAn764fl9sp+Yf5Gp3RIXGqFkXp V2uj1ZdqGYIC4WWZGB7YDAO8niXjJVInmPEiixUXzvfUxJtPcymddHZauqDvXjuqxB 1qD94BLQR/PPaDU8rdWkn0Ah9FTU7pUjCwuFbhe8WMbzX4E65TbxQJG9xeE/M6p7Z4 w09oYPDyzc1qg== Message-ID: <20139233-4e95-4fe5-84ca-734ee866afca@denx.de> Date: Mon, 10 Jun 2024 12:39:50 +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: Christophe Roullier , "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: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240610071459.287500-1-christophe.roullier@foss.st.com> <20240610071459.287500-8-christophe.roullier@foss.st.com> Content-Language: en-US From: Marek Vasut In-Reply-To: <20240610071459.287500-8-christophe.roullier@foss.st.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean 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() ? Include the err variable in the error message, see the dev_err() above for an example. That way the log already contains useful information (the error code) that can be used to narrow down the problem.