[U-Boot] [PATCH v2 1/2] spi: fsl_qspi: Add support for one chip select

york sun york.sun at nxp.com
Sat Mar 25 16:29:16 UTC 2017


On 02/21/2017 12:55 AM, Suresh Gupta wrote:
> SOC’s like LS1012A has only one chip select signal
> out to connect with flash. So at one time only one
> flash is active and it is not possible to scan other
> flash at run time.
>
> Signed-off-by: Suresh Gupta <suresh.gupta at nxp.com>
> ---
>  drivers/spi/fsl_qspi.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/spi/fsl_qspi.c b/drivers/spi/fsl_qspi.c
> index b2a0583..e61c67b 100644
> --- a/drivers/spi/fsl_qspi.c
> +++ b/drivers/spi/fsl_qspi.c
> @@ -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]);
>

Jagan, this patch looks OK to me. Ack?

York


More information about the U-Boot mailing list