All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Mauro Lima <mauro.lima@eclypsium.com>
Cc: broonie@kernel.org, linux-spi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/2] intel-spi: Split hardware and software sequencing
Date: Tue, 25 Oct 2022 09:09:06 +0300	[thread overview]
Message-ID: <Y1d9glOgHsQlZe2L@black.fi.intel.com> (raw)
In-Reply-To: <20221020164508.29182-1-mauro.lima@eclypsium.com>

Hi,

On Thu, Oct 20, 2022 at 01:45:06PM -0300, Mauro Lima wrote:
> Right now the only driver for Intel's spi has a DANGEROUS tag for
> a bug in the past on certain Lenovo platforms. It was cleared out
> that the bug was caused for the spi software sequencing mechanism
> and if we only use the driver with the hardware sequencing
> capabilities will be much safer[1].
> 
> This changes will remove all the software sequencing bits from
> the driver and left only the hardware sequencing functionality.
> If the software sequencing capabilities are needed, the old driver
> can be build using the DANGEROUS option from the menu.
> 
> [1] https://lkml.org/lkml/2021/11/11/468
> 
> Mauro Lima (2):
>   spi: intel-spi: Move software sequencing logic outside the core
>   spi: intel-spi: build the driver with hardware sequencing by default

I'be been thinking about this and I believe we can do something simpler
instead.

All the modern "Core" CPUs expose this as PCI device and that only
supports hardware sequencer which should be safe so I think we can do
something like this:

1. Make spi-intel-pci.c to set the type to INTEL_SPI_CNL for all the
   controllers it supports (and double check that this is the case for
   all these controllers).

As a side effect the ispi->sregs will be set to NULL so the core driver
does not even try to use the software seguencer.

2. Update Kconfig of SPI_INTEL_PCI to remove "DANGEROUS" and mention in
   the help text that this only supports the hardware sequencer and only
   the modern core hardware.

3. Update Kconfig of SPI_INTEL_PLATFORM help text to mention that most
   of these are using software sequencer, leave "DANGEROUS" there.

Does this make sense? Let me know what you think. I can do this myself
as well (might take some while though since busy with other things
usual).

      parent reply	other threads:[~2022-10-25  6:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-20 16:45 [PATCH 0/2] intel-spi: Split hardware and software sequencing Mauro Lima
2022-10-20 16:45 ` [PATCH 1/2] spi: intel-spi: Move software sequencing logic outside the core Mauro Lima
2022-10-23  5:45   ` Mika Westerberg
2022-10-20 16:45 ` [PATCH 2/2] spi: intel-spi: build the driver with hardware sequencing by default Mauro Lima
2022-10-25  6:09 ` Mika Westerberg [this message]

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=Y1d9glOgHsQlZe2L@black.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=mauro.lima@eclypsium.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.