spi: fsl_qspi: Add support for single chip select
authorSuresh Gupta <suresh.gupta@nxp.com>
Tue, 21 Feb 2017 08:56:46 +0000 (14:26 +0530)
committerYork Sun <york.sun@nxp.com>
Tue, 28 Mar 2017 16:10:12 +0000 (09:10 -0700)
SOC’s like LS1012A has only one chip select signal for QSPI flash.
Avoid scanning other flash.

Signed-off-by: Suresh Gupta <suresh.gupta@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
drivers/spi/fsl_qspi.c

index b2a058380f69ea271602af6815d9cf0bba5441da..e61c67b088bc7e267f44eaec916df7628b9fa5b4 100644 (file)
@@ -1037,8 +1037,11 @@ static int fsl_qspi_probe(struct udevice *bus)
         * setting the size of these devices to 0.  This would ensure
         * that the complete memory map is assigned to only one flash device.
         */
-       qspi_write32(priv->flags, &priv->regs->sfa1ad, priv->amba_base[1]);
+       qspi_write32(priv->flags, &priv->regs->sfa1ad,
+                    priv->amba_base[0] + amba_size_per_chip);
        switch (priv->num_chipselect) {
+       case 1:
+               break;
        case 2:
                qspi_write32(priv->flags, &priv->regs->sfa2ad,
                             priv->amba_base[1]);