mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: kuldip dwivedi <kuldip.dwivedi@puresoftware.com>
Cc: Mark Brown <broonie@kernel.org>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	Qiang Zhao <qiang.zhao@nxp.com>,
	Pankaj Bansal <pankaj.bansal@nxp.com>,
	Varun Sethi <V.Sethi@nxp.com>,
	tanveer <tanveer.alam@puresoftware.com>
Subject: Re: [PATCH] spi: spi-fsl-dspi: Add ACPI support
Date: Sat, 22 Aug 2020 21:33:42 +0300	[thread overview]
Message-ID: <20200822183342.6sdhp6yq6i7yvdia@skbuf> (raw)
In-Reply-To: <20200821131029.11440-1-kuldip.dwivedi@puresoftware.com>

On Fri, Aug 21, 2020 at 06:40:29PM +0530, kuldip dwivedi wrote:
> Currently fsl DSPI driver has support of DT only. Adding ACPI
> support to the drive so that it can be used by UEFI firmware
> boot in ACPI mode. This driver will be probed if any firmware
> will expose HID "NXP0005" in DSDT table.
> 
> Signed-off-by: tanveer <tanveer.alam@puresoftware.com>
> Signed-off-by: kuldip dwivedi <kuldip.dwivedi@puresoftware.com>
> ---
>  drivers/spi/spi-fsl-dspi.c | 91 +++++++++++++++++++++++++++++---------
>  1 file changed, 69 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
> index 91c6affe139c..7100a8a0a30e 100644
> --- a/drivers/spi/spi-fsl-dspi.c
> +++ b/drivers/spi/spi-fsl-dspi.c
> @@ -1070,6 +1072,12 @@ static void dspi_cleanup(struct spi_device *spi)
>  	kfree(chip);
>  }
>  
> +static const struct acpi_device_id fsl_dspi_acpi_ids[] = {
> +	{ "NXP0005", .driver_data = (kernel_ulong_t)&devtype_data[LS2085A], },
> +	{},
> +};
> +MODULE_DEVICE_TABLE(acpi, fsl_dspi_acpi_ids);
> +

Just noticed this now.
So for device tree, spi-fsl-dspi supports the following compatibles:

fsl,vf610-dspi
fsl,ls1021a-v1.0-dspi
fsl,ls1012a-dspi
fsl,ls1028a-dspi
fsl,ls1043a-dspi
fsl,ls1046a-dspi
fsl,ls2080a-dspi
fsl,ls2085a-dspi
fsl,lx2160a-dspi

Depending on the compatible string, the driver knows whether to use DMA
or XSPI mode, and what the FIFO size is.

Now, of course not all of the above SoCs are going to support ACPI, but
it is reasonable to expect that more than one will. And in that case,
the driver should still be able to know on what SoC it's running,
because for example LS1043A doesn't support DMA, and LS2085A doesn't
support XSPI.

How is this dealt with in ACPI?

Thanks,
-Vladimir

  parent reply	other threads:[~2020-08-22 18:33 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-21 13:10 kuldip dwivedi
2020-08-21 14:07 ` Mark Brown
2020-08-22 14:07   ` Kuldip Dwivedi
2020-08-22 15:21     ` Vladimir Oltean
2020-08-24 11:25       ` Mark Brown
2020-08-26  8:19         ` Qiang Zhao
2020-08-26 10:19           ` Mark Brown
2020-08-26 11:10       ` Qiang Zhao
2020-08-26 11:47         ` Vladimir Oltean
2020-08-26 14:23           ` Mark Brown
2020-08-26 14:47             ` Vladimir Oltean
2020-08-26 15:13               ` Kuldip Dwivedi
2020-08-26 16:09                 ` Vladimir Oltean
2020-08-26 17:02                   ` Mark Brown
2020-08-26 18:30                     ` Vladimir Oltean
2020-08-26 18:36                       ` Mark Brown
2020-08-26 16:55               ` Mark Brown
2020-08-26 18:33                 ` Vladimir Oltean
2020-08-26 18:42                   ` Mark Brown
2020-08-21 16:49 ` kernel test robot
2020-08-22 18:33 ` Vladimir Oltean [this message]
2020-08-26 19:34   ` Andy Shevchenko
2020-08-26 19:36     ` Andy Shevchenko
2020-08-26 19:56       ` Vladimir Oltean
2020-08-26 20:41         ` Mark Brown
2020-08-26 20:41     ` Vladimir Oltean
2020-08-26 20:45       ` Mark Brown
2020-08-26 21:06         ` Vladimir Oltean
2020-08-27 11:32           ` Mark Brown

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=20200822183342.6sdhp6yq6i7yvdia@skbuf \
    --to=olteanv@gmail.com \
    --cc=V.Sethi@nxp.com \
    --cc=broonie@kernel.org \
    --cc=kuldip.dwivedi@puresoftware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=pankaj.bansal@nxp.com \
    --cc=qiang.zhao@nxp.com \
    --cc=tanveer.alam@puresoftware.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

all inboxes | Powered by JetHome®