Re: Boot failure with 5.4-rc5, bisected to 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors")

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

 



On Tue, Nov 26, 2019 at 8:14 PM Christophe Leroy
<christophe.leroy@xxxxxx> wrote:

> > Digging a bit further, I see that devm_spi_register_master() fails in
> > spi_register_controler() because ctlr->num_chipselect is 0

Aha, I see what the problem is I think. The old code for mpc8xxx had this:

       ngpios = of_gpio_count(np);
       ngpios = max(ngpios, 0);
       if (ngpios == 0 && !spisel_boot) {
               /*
                * SPI w/o chip-select line. One SPI device is still permitted
                * though.
                */
               pdata->max_chipselect = 1;
               return 0;
       }
(...)
      master->num_chipselect = pdata->max_chipselect;

But the new code in the core has this:

    nb = gpiod_count(dev, "cs");
    ctlr->num_chipselect = max_t(int, nb, ctlr->num_chipselect);

So it relied on inspecting the device tree and set  this to 1
if it didn't find anything.

I will send a patch to test!

Yours,
Linus Walleij



[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