Re: [PATCH v2 03/13] spi: dw: Add support for Pensando Elba SoC SPI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 29, 2021 at 5:01 AM Brad Larson <brad@xxxxxxxxxxx> wrote:
>
> The Pensando Elba SoC uses a GPIO based chip select
> for two DW SPI busses with each bus having two
> chip selects.

...

> +static void dw_spi_elba_set_cs(struct spi_device *spi, bool enable)
> +{
> +       struct dw_spi *dws = spi_master_get_devdata(spi->master);
> +
> +       if (!enable) {

Can you use positive conditional?

> +               /*
> +                * Using a GPIO-based chip-select, the DW SPI
> +                * controller still needs its own CS bit selected
> +                * to start the serial engine.  On Elba the specific
> +                * CS doesn't matter to start the serial engine,
> +                * so using CS0.
> +                */
> +               dw_writel(dws, DW_SPI_SER, BIT(0));
> +       } else {
> +               dw_writel(dws, DW_SPI_SER, 0);
> +       }
> +}

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux