Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: "Shih-Yuan Lee (FourDollars)" <fourdollars@debian.org>
Cc: Mark Brown <broonie@kernel.org>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Lukas Wunner <lukas@wunner.de>, Daniel Mack <daniel@zonque.org>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Robert Jarzmik <robert.jarzmik@free.fr>,
	linux-arm-kernel@lists.infradead.org, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v16 6/7] spi: pxa2xx: restore LPSS private register state on S3 resume
Date: Thu, 6 Aug 2026 23:24:51 +0300	[thread overview]
Message-ID: <anTtk2ilyFLDeGLi@ashevche-desk.local> (raw)
In-Reply-To: <CAAT15mM_5t9YuEsEKN8UkJh_AoY_PPVkstVujdBM6QJpq7O0=g@mail.gmail.com>

On Sun, Jul 26, 2026 at 07:48:27PM +0800, Shih-Yuan Lee (FourDollars) wrote:

...

> > Is this series AI-assisted?

> Yes, I used an LLM assistant to help format and polish the commit messages.
> However, all hardware register analysis (such as inspecting BAR0 +
> 0x204 LPSS Private Resets), DSDT ACPI overrides, schematic
> verifications for logic board 820-00244-A, and physical S3
> suspend/resume hardware testing on MacBook8,1 were performed
> empirically on real hardware.

Check the kernel documentation if you need or may use Assisted-by tag.

...

> > This is an ugly hack.
> >
> > Saving context is done in drivers/acpi/x86/lpss.c (see #1 why this file).
> > If something wrong in the flow it has to be fixed there, not here.
> I checked drivers/acpi/x86/lpss.c and its LPSS_SAVE_CTX mechanism.
> However, on MacBook8,1, the LPSS SPI controller is instantiated as a
> PCI device (00:15.4 / 8086:9ce6) bound to spi-pxa2xx-pci.c, rather
> than an ACPI platform device handled by drivers/acpi/x86/lpss.c. As a
> result, acpi_lpss_restore_ctx() is never invoked for this PCI device.
> 
> Physical hardware S3 testing (rtcwake -m mem) confirms that across S3
> suspend, LPSS_PRIV_RESETS (BAR0 + 0x204) is reset to 0x00000000
> (functional block held in reset) by the PCH, causing all post-resume
> SPI transfers to fail  continuously with -110 timeouts (applespi
> spi-APP000D:00: SPI transfer timed out).
> 
> I understand your point about not doing context saving in spi-pxa2xx.c.
> Would moving the LPSS private register context save/restore into
> spi-pxa2xx-pci.c (the PCI glue driver) be an acceptable approach for
> PCI-enumerated devices?

I see. Can we do something similar to what drivers/pci/pci-mid.c does?
And somehow to unify the core part of the context saving, et cetera
between two ACPI and PCI cases?

-- 
With Best Regards,
Andy Shevchenko




  reply	other threads:[~2026-08-06 20:25 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20 16:21 [PATCH v16 0/7] spi: pxa2xx: Fix PM and interrupt issues on Intel LPSS SPI Shih-Yuan Lee
2026-07-20 16:21 ` [PATCH v16 1/7] spi: pxa2xx: introduce clock enable and disable helper functions Shih-Yuan Lee
2026-07-20 19:22   ` Andy Shevchenko
2026-07-26  8:15     ` Shih-Yuan Lee (FourDollars)
2026-07-20 16:21 ` [PATCH v16 2/7] spi: pxa2xx: introduce suspended flag for interrupt synchronization Shih-Yuan Lee
2026-07-20 17:18   ` Mark Brown
2026-07-26 10:35     ` Shih-Yuan Lee (FourDollars)
2026-07-20 16:21 ` [PATCH v16 3/7] spi: pxa2xx: overhaul teardown and suspend sequence using pxa2xx_spi_off Shih-Yuan Lee
2026-07-20 19:53   ` Andy Shevchenko
2026-07-26 11:12     ` Shih-Yuan Lee (FourDollars)
2026-07-20 16:21 ` [PATCH v16 4/7] spi: pxa2xx: lock out runtime autosuspend for Intel LPSS SPI in PIO mode Shih-Yuan Lee
2026-07-20 19:55   ` Andy Shevchenko
2026-07-26 11:18     ` Shih-Yuan Lee (FourDollars)
2026-07-20 16:21 ` [PATCH v16 5/7] spi: pxa2xx: disable DMA for Apple MacBook8,1 Shih-Yuan Lee
2026-07-20 19:27   ` Andy Shevchenko
2026-07-21 14:49     ` Shih-Yuan Lee (FourDollars)
2026-07-21 20:31       ` Andy Shevchenko
2026-07-21  9:00   ` Lukas Wunner
2026-07-21  9:26     ` Shih-Yuan Lee (FourDollars)
2026-07-21 14:34       ` Shih-Yuan Lee (FourDollars)
2026-07-21 15:05         ` Mark Brown
2026-07-21 15:26           ` Shih-Yuan Lee (FourDollars)
2026-07-21 16:09             ` Shih-Yuan Lee (FourDollars)
2026-07-21 20:41               ` Andy Shevchenko
2026-07-26 15:41                 ` Shih-Yuan Lee (FourDollars)
2026-07-26 16:14                   ` Lukas Wunner
2026-07-29 20:05                     ` Lukas Wunner
2026-07-29 20:21                       ` Mark Brown
2026-07-22  9:58               ` Lukas Wunner
2026-07-21 20:28             ` Andy Shevchenko
2026-07-20 16:21 ` [PATCH v16 6/7] spi: pxa2xx: restore LPSS private register state on S3 resume Shih-Yuan Lee
2026-07-20 19:59   ` Andy Shevchenko
2026-07-26 11:48     ` Shih-Yuan Lee (FourDollars)
2026-08-06 20:24       ` Andy Shevchenko [this message]
2026-07-20 16:21 ` [PATCH v16 7/7] spi: pxa2xx: rename local status variable to ret Shih-Yuan Lee
2026-07-20 19:56   ` Andy Shevchenko
2026-07-26 11:23     ` Shih-Yuan Lee (FourDollars)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=anTtk2ilyFLDeGLi@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=broonie@kernel.org \
    --cc=daniel@zonque.org \
    --cc=fourdollars@debian.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mika.westerberg@linux.intel.com \
    --cc=robert.jarzmik@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox