2021-03-29 02:01:44

by Brad Larson

[permalink] [raw]
Subject: [PATCH v2 02/13] spi: cadence-quadspi: Add QSPI support for Pensando Elba SoC

Add QSPI controller support for Pensando Elba SoC

Signed-off-by: Brad Larson <[email protected]>
---
drivers/spi/spi-cadence-quadspi.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
index 52ddb3255d88..4aacb0b2dbc7 100644
--- a/drivers/spi/spi-cadence-quadspi.c
+++ b/drivers/spi/spi-cadence-quadspi.c
@@ -1353,6 +1353,7 @@ static int cqspi_request_mmap_dma(struct cqspi_st *cqspi)
cqspi->rx_chan = dma_request_chan_by_mask(&mask);
if (IS_ERR(cqspi->rx_chan)) {
int ret = PTR_ERR(cqspi->rx_chan);
+
cqspi->rx_chan = NULL;
return dev_err_probe(&cqspi->pdev->dev, ret, "No Rx DMA available\n");
}
@@ -1633,6 +1634,10 @@ static const struct cqspi_driver_platdata intel_lgm_qspi = {
.quirks = CQSPI_DISABLE_DAC_MODE,
};

+static const struct cqspi_driver_platdata pen_cdns_qspi = {
+ .quirks = CQSPI_NEEDS_WR_DELAY | CQSPI_DISABLE_DAC_MODE,
+};
+
static const struct of_device_id cqspi_dt_ids[] = {
{
.compatible = "cdns,qspi-nor",
@@ -1650,6 +1655,10 @@ static const struct of_device_id cqspi_dt_ids[] = {
.compatible = "intel,lgm-qspi",
.data = &intel_lgm_qspi,
},
+ {
+ .compatible = "pensando,cdns-qspi",
+ .data = &pen_cdns_qspi,
+ },
{ /* end of table */ }
};

--
2.17.1


2021-03-30 11:15:11

by Pratyush Yadav

[permalink] [raw]
Subject: Re: [PATCH v2 02/13] spi: cadence-quadspi: Add QSPI support for Pensando Elba SoC

On 28/03/21 06:59PM, Brad Larson wrote:
> Add QSPI controller support for Pensando Elba SoC
>
> Signed-off-by: Brad Larson <[email protected]>
> ---
> drivers/spi/spi-cadence-quadspi.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/drivers/spi/spi-cadence-quadspi.c b/drivers/spi/spi-cadence-quadspi.c
> index 52ddb3255d88..4aacb0b2dbc7 100644
> --- a/drivers/spi/spi-cadence-quadspi.c
> +++ b/drivers/spi/spi-cadence-quadspi.c
> @@ -1353,6 +1353,7 @@ static int cqspi_request_mmap_dma(struct cqspi_st *cqspi)
> cqspi->rx_chan = dma_request_chan_by_mask(&mask);
> if (IS_ERR(cqspi->rx_chan)) {
> int ret = PTR_ERR(cqspi->rx_chan);
> +

Unrelated whitespace change. Please move it into a separate cleanup
patch.

> cqspi->rx_chan = NULL;
> return dev_err_probe(&cqspi->pdev->dev, ret, "No Rx DMA available\n");
> }
> @@ -1633,6 +1634,10 @@ static const struct cqspi_driver_platdata intel_lgm_qspi = {
> .quirks = CQSPI_DISABLE_DAC_MODE,
> };
>
> +static const struct cqspi_driver_platdata pen_cdns_qspi = {
> + .quirks = CQSPI_NEEDS_WR_DELAY | CQSPI_DISABLE_DAC_MODE,
> +};
> +
> static const struct of_device_id cqspi_dt_ids[] = {
> {
> .compatible = "cdns,qspi-nor",
> @@ -1650,6 +1655,10 @@ static const struct of_device_id cqspi_dt_ids[] = {
> .compatible = "intel,lgm-qspi",
> .data = &intel_lgm_qspi,
> },
> + {
> + .compatible = "pensando,cdns-qspi",
> + .data = &pen_cdns_qspi,
> + },
> { /* end of table */ }
> };
>
> --
> 2.17.1
>

Rest of the patch looks good to me.

--
Regards,
Pratyush Yadav
Texas Instruments Inc.