From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24C1F606A32D for ; Thu, 3 Dec 2026 17:44:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=FM6oGinv; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=eo+hI+l7 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=1MJVKRffHEbc+UAh88Nv1hw90HVFo+txKY2+fEs/vwg=; b=FM6oGinvKck7JxBCKIdbK0uuyV JN2kahmLYnATyc60hRSpSWHWmm9Gi5AyZUAPQXQH+LHEAjiNPgHjBxzQNnbnZjO8k/AoYOx3N7lqB N1uqony18MzjxhovKkqvvvTwmGucYaAeV1YtBUfKdRzKk/7C2ILNVkg5Vtq8BczwISIob1gHw3mAE m7qS3P+aAqfaFW4xQMuiyNo9HOrM1eJCCOM+Go6vfigRhDsLr4MzE9UbBSGw51aDM+JjPr5vgyicM rGHy+voOdmfn50/JcivpSrs8eEDN2oHCH39fmFuedFl79Mh00nZOl6wqHQAavjqYQuKZ6zPALmOEk DliFlxhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZAqm-0000000FUDu-14BP; Thu, 03 Dec 2026 17:44:09 +0000 Received: from mgamail.intel.com ([198.175.65.18]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZAqi-0000000FUDa-2Xjp for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 17:44:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796319844; x=1827855844; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=1MJVKRffHEbc+UAh88Nv1hw90HVFo+txKY2+fEs/vwg=; b=eo+hI+l7WO7biZJ/0Oo5DHzLbs4p6A3kGgePj1LLJrI/LZFt+qXvT49A S0611SnuJunVCIBNBqSaC8GNfAsIPqg2TEYVzNZTQEaKHgSvqk+8lhk3L 5eLQjBf2msJi6w8xhKCYA6mQ8Ig6xHoOud64F1VZpP1KieLxdKGJJe2ZT dvNSMyUgXpWU68PD20pLdyIJsos2yF4FpHFJSkb+DJi/BnTpkpgQmAXly jNgwiqWiHJgoFS8nMAfdCSUtrjAqDG96u4cehRJAPPY1A59dpZVRHPZlF MudA3N9TLBUV5ClY/9uGvyg48RoI2/EUulRPn5TOd6Aa3SOtcGl16ZA+E A==; X-CSE-ConnectionGUID: g4mC8LjkQqmggy1mDVmseQ== X-CSE-MsgGUID: m2rigmq7RVipzcF4nR/FRA== X-IronPort-AV: E=McAfee;i="6800,10657,11985"; a="5307719" X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="5307719" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 09:44:03 -0800 X-CSE-ConnectionGUID: IZ9hLI7GTmCFR3B60+ZWEQ== X-CSE-MsgGUID: U6TG5IZ+SHevB5AlbjURlA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.29,77,1794902400"; d="scan'208";a="13940740" Received: from inaky-mobl1.amr.corp.intel.com (HELO localhost) ([10.245.244.115]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Dec 2026 09:44:01 -0800 Date: Thu, 3 Dec 2026 19:43:58 +0200 From: Andy Shevchenko To: "Shih-Yuan Lee (FourDollars)" Cc: Mark Brown , Mika Westerberg , Lukas Wunner , Daniel Mack , Haojian Zhuang , Robert Jarzmik , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v17 5/6] spi: pxa2xx-pci: restore LPSS private register state across S3 resume Message-ID: References: <20260930160629.1822-1-fourdollars@debian.org> <20260930160629.1822-6-fourdollars@debian.org> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_094404_743480_E8E2D2DC X-CRM114-Status: GOOD ( 17.93 ) X-Spam-Score: -4.4 (----) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Wed, Dec 02, 2026 at 08:00:23PM +0800, Shih-Yuan Lee (FourDollars) wrote: > On Thu, Oct 1, 2026 at 3:20 PM Andy Shevchenko > wrote: > > On Thu, Oct 01, 2026 at 12:06:28AM +0800, Shih-Yuan Lee wrote: ... > > No, as I told earlier please find a way how to not add a code duplication. > > Agreed — I will avoid duplicating the LPSS private register save/restore > logic in v18. > > As noted in my reply to Mika, on MacBook8,1 (Wildcat Point-LP) the > controller at 00:15.4 [8086:9ce6] is enumerated as an independent PCI > function rather than via intel-lpss-pci, and drivers/acpi/x86/lpss.c > also skips its ACPI companion (\_SB_.PCI0.SPI1 / INT33C1) because it > uses PCI BAR0 on pci_bus_type. Yes, I have just read that. > For v18, I am preparing a prerequisite patch that extracts the common > LPSS private register definitions (LPSS_RESETS*, LPSS_PRV_REG_COUNT) and > helpers (lpss_deassert_reset(), lpss_save_ctx(), lpss_restore_ctx()) > from drivers/acpi/x86/lpss.c into include/linux/platform_data/x86/lpss.h, > so both drivers/acpi/x86/lpss.c and drivers/spi/spi-pxa2xx-pci.c share > the exact same implementation without duplication. At least it sounds better than v17 approach. Let's see v18 how it will look like. > Would extracting these helpers into be > acceptable, or would you prefer unifying the PCI-mode LPT/WPT LPSS > save/restore at the PCI PM layer (similar to drivers/pci/pci-mid.c)? Maybe. Let's research your v18 approach first and then we can see if further improvements are possible. > (Also, for the other patches in the series: I have dropped Patch 2 > entirely as you and Mark suggested, fixed the probe ordering in Patch 3, > and applied your style cleanups to Patch 1.) OK. -- With Best Regards, Andy Shevchenko