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=-4.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 54DF2C4320A for ; Wed, 11 Aug 2021 08:37:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 36F1D60F55 for ; Wed, 11 Aug 2021 08:37:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236150AbhHKIhZ (ORCPT ); Wed, 11 Aug 2021 04:37:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233112AbhHKIhY (ORCPT ); Wed, 11 Aug 2021 04:37:24 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09872C061765; Wed, 11 Aug 2021 01:37:01 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 203-20020a1c00d40000b02902e6a4e244e4so1374173wma.4; Wed, 11 Aug 2021 01:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=r2N2lJNtd9ZVoClfrfgh876Vfdtyeq7ZHkyk/68V1gA=; b=dSYtxaXDCl25xHC0RUhzvW1jjtWK0C461gFRD7NdUbEikkzJ0Fq2JFdLgvgeZTSYPt vGbHkLazdljjkjZgnlAOEJPz90n7dwcNji7tOWR2r0zV8KjMQiNCMQeZiHbhafyPm4e2 HbdN7bYSWTwGCaLzlZAjivjzq536vg0oBvWAeflq9zyo7rzP9ZliT8rW5e1rAh+jI+y0 qm1Z3ltM8zkefRQ9DwenwuOH+arhQ526i2rxdWGu5ooK7ns/Ov5Vmd/xUp06ZurBOKcK HyTVfTQvaae4haJmjC8Mt65Ha7htxJoCWH4ZIJ6dY4e0ytXFv70jJC2XLg9BqvWLvxJ/ ROBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=r2N2lJNtd9ZVoClfrfgh876Vfdtyeq7ZHkyk/68V1gA=; b=Cmytka3+Zyi/vuO+Ra4yYnd3C782al4JvHephR/AbnXnUsCGOPaDkKYdsg4h7et/9y AX+7m6a1N96ljBCQNRnJ6yugWyPk1ygWEG7+8TAkFkdlgDNV8Q3h7Y7B7lzuKsuNLDWK TpwuBSinOSXgGAIHxoAgKq2GitP/zX+hzH9b1p607+6KBcyzg5X3xqz2Qsjw9reoLvEr 03SSJHVIAs+J/WfoB9K6SoeT42371wrzk0wk8pavOuAWm/5cuXt2MHYhxIhbzVHcZyPq c8+BMnCqqPwmUbkyAA/P9NWZWmc66jpk0zud/SJfj6kafNrmRSGdONyBCMIkoz1SkaUq Fqjg== X-Gm-Message-State: AOAM530/a8cnvULKsDvnkoLL1BHXVOkO+ZWE8DZFQvYBi0PuHxwRzxFF a/Cjdk0PKKcDeEr+lLBjuiNq7hUkkSkXdw== X-Google-Smtp-Source: ABdhPJx+Bhx60Go2TR/I/ARqxGl4Pjqxf0dXF/m8YuYGiTNSgcVyZOkKXRwpDNnxmKXEbaUEtP7BXA== X-Received: by 2002:a1c:ed03:: with SMTP id l3mr25447530wmh.56.1628671019135; Wed, 11 Aug 2021 01:36:59 -0700 (PDT) Received: from ?IPv6:2a01:cb05:8192:e700:90a4:fe44:d3d1:f079? (2a01cb058192e70090a4fe44d3d1f079.ipv6.abo.wanadoo.fr. [2a01:cb05:8192:e700:90a4:fe44:d3d1:f079]) by smtp.gmail.com with ESMTPSA id u6sm11308532wrp.83.2021.08.11.01.36.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Aug 2021 01:36:58 -0700 (PDT) Subject: Re: [PATCH net-next 1/2] net: pcs: xpcs: enable skip xPCS soft reset To: Wong Vee Khee , Andrew Lunn Cc: Vivien Didelot , "David S . Miller" , Jakub Kicinski , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Heiner Kallweit , Russell King , Voon Weifeng , Michael Sit Wei Hong , Vladimir Oltean , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210809102229.933748-1-vee.khee.wong@linux.intel.com> <20210809102229.933748-2-vee.khee.wong@linux.intel.com> <20210810235529.GB30818@linux.intel.com> From: Florian Fainelli Message-ID: Date: Wed, 11 Aug 2021 01:36:56 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210810235529.GB30818@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/10/2021 4:55 PM, Wong Vee Khee wrote: > Hi Andrew, > On Mon, Aug 09, 2021 at 03:35:09PM +0200, Andrew Lunn wrote: >> On Mon, Aug 09, 2021 at 06:22:28PM +0800, Wong Vee Khee wrote: >>> From: Michael Sit Wei Hong >>> >>> Unlike any other platforms, Intel AlderLake-S uses Synopsys SerDes where >>> all the SerDes PLL configurations are controlled by the xPCS at the BIOS >>> level. If the driver perform a xPCS soft reset on initialization, these >>> settings will be switched back to the power on reset values. >>> >>> This changes the xpcs_create function to take in an additional argument >>> to check if the platform request to skip xPCS soft reset during device >>> initialization. >> >> Why not just call into the BIOS and ask it to configure the SERDES? >> Isn't that what ACPI is all about, hiding the details from the OS? Or >> did the BIOS writers not add a control method to do this? >> >> Andrew > > BIOS does configured the SerDes. The problem here is that all the > configurations done by BIOS are being reset at xpcs_create(). > > We would want user of the pcs-xpcs module (stmmac, sja1105) to have > control whether or not we need to perform to the soft reset in the > xpcs_create() call. I understood Andrew's response as suggesting to introduce the ability for xpcs_create() to make a BIOS call which would configure the SerDes after xpcs_soft_reset(). That way the current xpcs_create() signature would remain the same, but you could easily hook any post-reset initialization by making an appropriate BIOS call. -- Florian 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=-2.2 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,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 AB0A4C4338F for ; Wed, 11 Aug 2021 08:39:09 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E87A60F41 for ; Wed, 11 Aug 2021 08:39:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4E87A60F41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qksdYGNqrGctrVN9tTuTA/8Vf70h4DG1+m6g7kZ+n5I=; b=RuWkU1fDEwGRVbZpfWKbDsyCl7 ztvkmzczbrUi0PO20InAuIcA3xMO/B7fc2YndL0sCF5wCxW0tmVht6rt2ojHHv2lj58gKdOtrGDtz IN8Lsz2g00ooQ0/TCugYAUyXWdh0nfMJGyV21/GaZfGWlO4Vv2CLxJUwoRnfeH9QvDllQWF4AtOWJ 2T0wl+W9JYd3jo1nm17wqkx4tF8AgLh5gM+xcEc9Hvbj9zPjepxjBIlcUeRG6yV5a4zEdpdv4CR5Z N25O7H6m2I+OxtRJ4aaq3WpL74h/Dil16VDg/GqGdLNbFTRZmg/9lfKl9pvpxTVPkkcnt9TFWYXAN GzUksfJA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDjjU-0062XA-EF; Wed, 11 Aug 2021 08:37:04 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mDjjR-0062Wm-AU for linux-arm-kernel@lists.infradead.org; Wed, 11 Aug 2021 08:37:02 +0000 Received: by mail-wm1-x330.google.com with SMTP id 6so1347422wme.5 for ; Wed, 11 Aug 2021 01:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=r2N2lJNtd9ZVoClfrfgh876Vfdtyeq7ZHkyk/68V1gA=; b=dSYtxaXDCl25xHC0RUhzvW1jjtWK0C461gFRD7NdUbEikkzJ0Fq2JFdLgvgeZTSYPt vGbHkLazdljjkjZgnlAOEJPz90n7dwcNji7tOWR2r0zV8KjMQiNCMQeZiHbhafyPm4e2 HbdN7bYSWTwGCaLzlZAjivjzq536vg0oBvWAeflq9zyo7rzP9ZliT8rW5e1rAh+jI+y0 qm1Z3ltM8zkefRQ9DwenwuOH+arhQ526i2rxdWGu5ooK7ns/Ov5Vmd/xUp06ZurBOKcK HyTVfTQvaae4haJmjC8Mt65Ha7htxJoCWH4ZIJ6dY4e0ytXFv70jJC2XLg9BqvWLvxJ/ ROBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=r2N2lJNtd9ZVoClfrfgh876Vfdtyeq7ZHkyk/68V1gA=; b=GKlHeJeLM0dMUEaIRLlFNFPYQNw3O875vneHhYOkRN/RQA7dLi4jMT1aa//a67L3en VR2wlB43cQG8Wa4CXxGLuHb4ycqJB44pdbB+LdKPuYay3ktjqO6I/+CHHHPJWXM/zEz5 1o/0hpTBF4fFwpGEBhHQqhQLBCGZdElg6QydJqX69hwwAPvZoaf/ecDeKxydqTdx07S7 iGAFeE2wX54YbLcts7Eh8TkRcX3SdnX1DGzl22jjVKr5e0Xjrt4E1NYndhk6F0YGI64Q v9Z89tLNr5IgMch1sCribmEas9NYS1mJjAv3vz3xKwmVxIGCci348oltfl6STE/KOSof otgg== X-Gm-Message-State: AOAM530VewAmNs18uiMGAx+hV7QzpLyHFTHKHDXDndWYw+pgpy9s1uP6 khTQUmABqwfBKbQw/BNMU3E= X-Google-Smtp-Source: ABdhPJx+Bhx60Go2TR/I/ARqxGl4Pjqxf0dXF/m8YuYGiTNSgcVyZOkKXRwpDNnxmKXEbaUEtP7BXA== X-Received: by 2002:a1c:ed03:: with SMTP id l3mr25447530wmh.56.1628671019135; Wed, 11 Aug 2021 01:36:59 -0700 (PDT) Received: from ?IPv6:2a01:cb05:8192:e700:90a4:fe44:d3d1:f079? (2a01cb058192e70090a4fe44d3d1f079.ipv6.abo.wanadoo.fr. [2a01:cb05:8192:e700:90a4:fe44:d3d1:f079]) by smtp.gmail.com with ESMTPSA id u6sm11308532wrp.83.2021.08.11.01.36.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 11 Aug 2021 01:36:58 -0700 (PDT) Subject: Re: [PATCH net-next 1/2] net: pcs: xpcs: enable skip xPCS soft reset To: Wong Vee Khee , Andrew Lunn Cc: Vivien Didelot , "David S . Miller" , Jakub Kicinski , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Heiner Kallweit , Russell King , Voon Weifeng , Michael Sit Wei Hong , Vladimir Oltean , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210809102229.933748-1-vee.khee.wong@linux.intel.com> <20210809102229.933748-2-vee.khee.wong@linux.intel.com> <20210810235529.GB30818@linux.intel.com> From: Florian Fainelli Message-ID: Date: Wed, 11 Aug 2021 01:36:56 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210810235529.GB30818@linux.intel.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210811_013701_421825_1A8E2D1D X-CRM114-Status: GOOD ( 20.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 8/10/2021 4:55 PM, Wong Vee Khee wrote: > Hi Andrew, > On Mon, Aug 09, 2021 at 03:35:09PM +0200, Andrew Lunn wrote: >> On Mon, Aug 09, 2021 at 06:22:28PM +0800, Wong Vee Khee wrote: >>> From: Michael Sit Wei Hong >>> >>> Unlike any other platforms, Intel AlderLake-S uses Synopsys SerDes where >>> all the SerDes PLL configurations are controlled by the xPCS at the BIOS >>> level. If the driver perform a xPCS soft reset on initialization, these >>> settings will be switched back to the power on reset values. >>> >>> This changes the xpcs_create function to take in an additional argument >>> to check if the platform request to skip xPCS soft reset during device >>> initialization. >> >> Why not just call into the BIOS and ask it to configure the SERDES? >> Isn't that what ACPI is all about, hiding the details from the OS? Or >> did the BIOS writers not add a control method to do this? >> >> Andrew > > BIOS does configured the SerDes. The problem here is that all the > configurations done by BIOS are being reset at xpcs_create(). > > We would want user of the pcs-xpcs module (stmmac, sja1105) to have > control whether or not we need to perform to the soft reset in the > xpcs_create() call. I understood Andrew's response as suggesting to introduce the ability for xpcs_create() to make a BIOS call which would configure the SerDes after xpcs_soft_reset(). That way the current xpcs_create() signature would remain the same, but you could easily hook any post-reset initialization by making an appropriate BIOS call. -- Florian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel