Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1614791rdb; Wed, 31 Jan 2024 04:16:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHj70E3ZiU12FjVJj+BdI2q4qzeoBNdpBbbiLu++mltS9UNlgTYjOeZ1muD0RCvLWREORyR X-Received: by 2002:aa7:c2cc:0:b0:55f:314:6890 with SMTP id m12-20020aa7c2cc000000b0055f03146890mr1031438edp.22.1706703383714; Wed, 31 Jan 2024 04:16:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706703383; cv=pass; d=google.com; s=arc-20160816; b=Llk8uzHfYO0CczMNMaI+OeOVj8qa12iN8mi78O3I7+rzUeQTYUZmkTjTn3UCJGbyAI 8DS3fugcpglROI2uNZfohZWkQNq46Z8Sn4Pl5xmQ6t3KEqWw3dT6imCZzQnAsZipf0FO +fBmzZsco4Ja6Ugod4YKBLLxh0hBVtkp57AB02QI306GKKuLdlpymfVW0nlKP0l8BVRy pmPD0zSkR8XP1iHCQOCFLK8oW9oNdozNCtNKonyC0XkU76mi4i/cvLvkPEAV7BmAGeIt zU37rYQ4MFf2yecner9vn5thvJiX07NanXxKgHgCODtZAlfKFRoU+oyrNig/qe5ya6Uj Gd7g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:in-reply-to:subject:cc:to:date:from :dkim-signature; bh=C8pfuTBJQ9SxlKumQBkfWtL6Z1ZmE1uNVclSX3+mcZg=; fh=TLDISUyNHd6YV/uHnTiTUrZoGrlmVlxSiktslNXMygs=; b=GcW9dD310vuNxWLmWj4k3FqUtWg1VGWK+QWUrVoyDKH+Af4rURxPtD7Fg0vLgRSV4W mzJVfhexxEi+sVcEVi7HxSlOWz6uQOlAXpg5C64d7Ao965l4fHlWzHW30c2/1yfwXPkd MVL3ZtxScXXZzWTwrnUOtxovjplbL4jduP5jI9Vv+31X4XMGyb4PMFuV0gcXDHqOjf91 3kyVFS91an6OnGTreEOK/vRaui0DEVeXmDey8F4SAobMEOvNl1ThFz3C+GLgS1Gk3OOc c1/4EIRmlqud8aA532xtRHBp4xAjTqxcnLRfAqGYbMODj2Q/b31y9Y/Jkh5ukmhMM1uw h4mQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f1YWadyW; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-46290-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46290-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCXOFqkr8mSBZN5wwGvEuz7g8H/QaiWWFyKRgJuwm2IQ/ui4hac6e6wRccRNx/aic3gVr42MSwvyMzLNRqzkfXrFCpZFnadsT9nyvM4CBw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i42-20020a0564020f2a00b0055f144e88a2si2736897eda.599.2024.01.31.04.16.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 04:16:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46290-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=@intel.com header.s=Intel header.b=f1YWadyW; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-46290-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46290-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 B49A21F2644E for ; Wed, 31 Jan 2024 11:01:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83DFA7AE74; Wed, 31 Jan 2024 10:58:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="f1YWadyW" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) (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 022AF7AE43; Wed, 31 Jan 2024 10:58:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706698730; cv=none; b=gr3W30VnrFUkzJkTJzmKD1k/ytUp6nUWHcEzG3oFb9SSR+M3jYNMPNk56wV12NizThXTkkzw0aBPIR1vQUN683UhfwDyT+auK7D/VnqrO9Wi7W8CQ6IO+yxqg0Z7AB/Qe10aPm9aIYnwM/LFWPA//DvrqGJCPgvbY4Wp55d+irQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706698730; c=relaxed/simple; bh=miXEls7aCVwLJDABniQxOKAOmoSskv8EQdi+pLuHLaQ=; h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=QwOWNTDb95YpARaEoxumWZtlXldGKKisUqeHUqJ9kodpaEU6bMNrFR9WYnRbueFgAy/McHkKuftSPlpzDF1/rvj8NbzY1obXxZYYTdsOsxAAT2Le4EColJVFteOMzUpGLH1eJwsInCsctVFD0NgUMohglsi1ASR63eLNVCnyaqU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=f1YWadyW; arc=none smtp.client-ip=192.198.163.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1706698729; x=1738234729; h=from:date:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=miXEls7aCVwLJDABniQxOKAOmoSskv8EQdi+pLuHLaQ=; b=f1YWadyW5wLSEx/hBtT+dc0UJcLQKxv1VhNXglxWmTj1Xghm1e3msDFe eCpuNZiYGc1apXqZjzBPzex1dEpFvb/al24zKwwj9H50bEzELgCuTKat2 mNkICMHhz8j+jnVxF+0tT6Qc0w/C7NDIOl6uZs8OgqEv3fPk9lxJDvHCL lu7KLTy+pJtrNC+8HC9J/fMpzXH++DHSlcUdiQejmoz6Ixb5JtBX5QJXH Mjmw7APDBNo9xx6LXFWDisiP2B4dQaFEgT7Wc6IkBbzDUlPHeKoun+mRE 5ckjWP/xwom/f/CJMJHDk1IRsRdm9jKEWVmO7Jr5V2GbFVX99/Ciauz1V Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="3407460" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="3407460" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 02:58:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10969"; a="1119583211" X-IronPort-AV: E=Sophos;i="6.05,231,1701158400"; d="scan'208";a="1119583211" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.246.35.167]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2024 02:58:37 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Wed, 31 Jan 2024 12:58:32 +0200 (EET) To: Choong Yong Liang cc: Rajneesh Bhardwaj , David E Box , Hans de Goede , Mark Gross , Alexandre Torgue , Jose Abreu , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Richard Cochran , Russell King , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Andrew Lunn , Heiner Kallweit , Philipp Zabel , Andrew Halaney , Simon Horman , Serge Semin , Netdev , LKML , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, bpf@vger.kernel.org, Voon Wei Feng , Michael Sit Wei Hong , Lai Peter Jun Ann , Abdul Rahim Faizal Subject: Re: [PATCH net-next v4 08/11] stmmac: intel: configure SerDes according to the interface mode In-Reply-To: <20240129130253.1400707-9-yong.liang.choong@linux.intel.com> Message-ID: <99d78f25-dd2a-4a52-4c2a-b0e29505a776@linux.intel.com> References: <20240129130253.1400707-1-yong.liang.choong@linux.intel.com> <20240129130253.1400707-9-yong.liang.choong@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII On Mon, 29 Jan 2024, Choong Yong Liang wrote: > From: "Tan, Tee Min" > > Intel platform will configure the SerDes through PMC api based on the > provided interface mode. > > This patch adds several new functions below:- > - intel_tsn_interface_is_available(): This new function reads FIA lane > ownership registers and common lane registers through IPC commands > to know which lane the mGbE port is assigned to. > - intel_config_serdes(): To configure the SerDes based on the assigned > lane and latest interface mode, it sends IPC command to the PMC through > PMC driver/API. The PMC acts as a proxy for R/W on behalf of the driver. > - intel_set_reg_access(): Set the register access to the available TSN > interface. > > Signed-off-by: Tan, Tee Min > Signed-off-by: Choong Yong Liang > --- > drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + > .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 113 +++++++++++++++++- > .../net/ethernet/stmicro/stmmac/dwmac-intel.h | 75 ++++++++++++ > 3 files changed, 188 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig > index 85dcda51df05..be423fb2b46c 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/Kconfig > +++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig > @@ -273,6 +273,7 @@ config DWMAC_INTEL > default X86 > depends on X86 && STMMAC_ETH && PCI > depends on COMMON_CLK > + select INTEL_PMC_IPC INTEL_PMC_IPC has depends on ACPI but selecting INTEL_PMC_IPC won't enforce it AFAIK. -- i.