From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Michael Walle <michael@walle.cc>
Cc: Pratyush Yadav <p.yadav@ti.com>,
Tudor Ambarus <tudor.ambarus@microchip.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: spi-nor: intel-spi: Add support for second flash chip
Date: Mon, 31 May 2021 14:27:41 +0300 [thread overview]
Message-ID: <YLTILUh+bPhZ4ToR@lahna.fi.intel.com> (raw)
In-Reply-To: <20210526102810.GB291593@lahna.fi.intel.com>
Hi guys,
On Wed, May 26, 2021 at 01:28:16PM +0300, Mika Westerberg wrote:
> Hi,
>
> On Wed, May 26, 2021 at 11:31:58AM +0200, Michael Walle wrote:
> > > Oh, I see now this commit:
> > >
> > > a314f6367787 ("mtd: spi-nor: Convert cadence-quadspi to use spi-mem
> > > framework")
> > >
> > > So "SPI MEM" means generic SPI subsystem for memory mapped devices.
> > > Unfortunately Intel controller at least is not capable of running
> > > generic SPI transactions. It only supports accessing SPI-NOR flashes and
> > > for those there is small set of commands that supports. I don't think it
> > > is even possible to convert the driver to generic SPI subsystem.
> >
> > AFAIK it stands for SPI memory device (memory mapped is not a requirement).
> > Eg. spi-nxp-fspi doesn't support generic SPI devices either, but just SPI
> > flashes. So I'd guess SPI MEM is exactly what you are looking for.
>
> OK, I see that there is ->mem_ops that can be used to implement
> different higher level commands. What I'm not seeing is that how the
> child SPI flash is created using this scheme? DeviceTree and ACPI are
> supported fine but what about scanning? I mean the intel_spi driver has
> this:
>
> spi_nor_scan(&ispi->nor, NULL, &hwcaps);
>
> But if the driver is to be moved under drivers/spi/* you can't really
> call these functions anymore or can you? Or the point is to keep the
> driver under controllers/ and just call spi_nor_scan(), and in addition
> implement the new mem_ops?
>
> Thanks in advance and sorry about many questions but there does not seem
> to be a conversion guide nor any (non-DT/ACPI) examples that I can take
> a look. :-)
Can you provide some guidance here? So in order to use the generic SPI
subsystem with "SPI MEM" parts of it, I would need to be able to create
the child SPI-NOR flash device without using ACPI or DT (as these
systems do not have any ACPI/DT description), or use spi_nor_scan() but
none of the driver under drivers/spi are calling it.
Thanks!
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-05-31 11:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-25 16:03 [PATCH] mtd: spi-nor: intel-spi: Add support for second flash chip Mika Westerberg
2021-05-25 19:14 ` Pratyush Yadav
2021-05-26 9:12 ` Mika Westerberg
2021-05-26 9:24 ` Mika Westerberg
2021-05-26 9:31 ` Michael Walle
2021-05-26 10:28 ` Mika Westerberg
2021-05-31 11:27 ` Mika Westerberg [this message]
2021-06-03 11:07 ` Mika Westerberg
2021-06-03 18:08 ` Pratyush Yadav
2021-06-04 11:28 ` Mika Westerberg
2021-06-04 11:53 ` Mark Brown
2021-06-04 14:10 ` Mika Westerberg
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=YLTILUh+bPhZ4ToR@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=linux-mtd@lists.infradead.org \
--cc=michael@walle.cc \
--cc=miquel.raynal@bootlin.com \
--cc=p.yadav@ti.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@microchip.com \
--cc=vigneshr@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox