[U-Boot] [PATCH 2/3] drivers: ti_qspi: use syscon to get the address ctrl_mod_mmap register

Vignesh R vigneshr at ti.com
Mon Feb 13 07:36:05 UTC 2017



On Tuesday 07 February 2017 09:15 PM, Jean-Jacques Hiblot wrote:
> We used to get the address of the optionnal ctrl_mod_mmap register as the
> third memory range of the "reg" property. the linux driver moved to use a
> syscon instead. In order to keep the DTS as close as possible to that of
> linux, we move to using a syscon as well.
> 
> If CONFIG_SYSCON is no set, the driver reverts to the old way of getting
> the address from the 3rd memory range
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
> ---
>  drivers/spi/ti_qspi.c | 47 ++++++++++++++++++++++++++++++++++++++++++-----
>  1 file changed, 42 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/spi/ti_qspi.c b/drivers/spi/ti_qspi.c
> index 6f9f983..d964b50 100644
> --- a/drivers/spi/ti_qspi.c
> +++ b/drivers/spi/ti_qspi.c
> @@ -17,6 +17,8 @@
>  #include <asm/omap_common.h>
>  #include <asm/ti-common/ti-edma3.h>
>  #include <linux/kernel.h>
> +#include <regmap.h>
> +#include <syscon.h>
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> @@ -549,21 +551,56 @@ static int ti_qspi_probe(struct udevice *bus)
>  	return 0;
>  }
>  
> +static void *map_syscon_chipselects(struct udevice *bus)
> +{
> +#if defined(CONFIG_SYSCON) && !defined(CONFIG_SPL_BUILD)


Please change this to #if CONFIG_IS_ENABLED(SYSCON)



-- 
Regards
Vignesh


More information about the U-Boot mailing list