[U-Boot] [PATCH] Tegra: T1x4: SPI: Use a common name (t1x4) for SPI driver

Tom Warren twarren.nvidia at gmail.com
Tue Oct 8 18:03:05 CEST 2013


Jagan,


On Mon, Oct 7, 2013 at 11:23 PM, Jagan Teki <jagannadh.teki at gmail.com>wrote:

> On Tue, Oct 8, 2013 at 2:50 AM, Tom Warren <twarren.nvidia at gmail.com>
> wrote:
> > Tegra124 is compatible w/T114 SPI, so try to commonize as
> > much as possible.
> >
> > TEST=built all T1x4 boards, tested on Venice1 & 2 OK.
> > There's no real binary change here, just names/includes.
> >
> > Signed-off-by: Tom Warren <twarren at nvidia.com>
> > ---
> >  .../tegra114_spi.h => arch-tegra/tegra1x4_spi.h}   |  6 +++---
> >  drivers/spi/Makefile                               |  2 +-
> >  drivers/spi/fdt_spi.c                              | 22
> ++++------------------
> >  drivers/spi/{tegra114_spi.c => tegra1x4_spi.c}     | 22
> ++++------------------
> >  4 files changed, 12 insertions(+), 40 deletions(-)
> >  rename arch/arm/include/asm/{arch-tegra114/tegra114_spi.h =>
> arch-tegra/tegra1x4_spi.h} (94%)
> >  rename drivers/spi/{tegra114_spi.c => tegra1x4_spi.c} (92%)
> >
> > diff --git a/arch/arm/include/asm/arch-tegra114/tegra114_spi.h
> b/arch/arm/include/asm/arch-tegra/tegra1x4_spi.h
> > similarity index 94%
> > rename from arch/arm/include/asm/arch-tegra114/tegra114_spi.h
> > rename to arch/arm/include/asm/arch-tegra/tegra1x4_spi.h
> > index 48197bc..93aa9ac 100644
> > --- a/arch/arm/include/asm/arch-tegra114/tegra114_spi.h
> > +++ b/arch/arm/include/asm/arch-tegra/tegra1x4_spi.h
> > @@ -22,8 +22,8 @@
> >   * MA 02111-1307 USA
> >   */
> >
> > -#ifndef _TEGRA114_SPI_H_
> > -#define _TEGRA114_SPI_H_
> > +#ifndef _TEGRA1x4_SPI_H_
> > +#define _TEGRA1x4_SPI_H_
> >
> >  #include <asm/types.h>
> >
> > @@ -38,4 +38,4 @@ void tegra114_spi_cs_deactivate(struct spi_slave
> *slave);
> >  int tegra114_spi_xfer(struct spi_slave *slave, unsigned int bitlen,
> >                      const void *data_out, void *data_in, unsigned long
> flags);
> >
> > -#endif /* _TEGRA114_SPI_H_ */
> > +#endif /* _TEGRA1x4_SPI_H_ */
> > diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
> > index 91d24ce..8b72cf9 100644
> > --- a/drivers/spi/Makefile
> > +++ b/drivers/spi/Makefile
> > @@ -37,7 +37,7 @@ COBJS-$(CONFIG_FSL_ESPI) += fsl_espi.o
> >  COBJS-$(CONFIG_FDT_SPI) += fdt_spi.o
> >  COBJS-$(CONFIG_TEGRA20_SFLASH) += tegra20_sflash.o
> >  COBJS-$(CONFIG_TEGRA20_SLINK) += tegra20_slink.o
> > -COBJS-$(CONFIG_TEGRA114_SPI) += tegra114_spi.o
> > +COBJS-$(CONFIG_TEGRA114_SPI) += tegra1x4_spi.o
> >  COBJS-$(CONFIG_XILINX_SPI) += xilinx_spi.o
> >  COBJS-$(CONFIG_ZYNQ_SPI) += zynq_spi.o
> >
> > diff --git a/drivers/spi/fdt_spi.c b/drivers/spi/fdt_spi.c
> > index 58f139a..ee1b9f7 100644
> > --- a/drivers/spi/fdt_spi.c
> > +++ b/drivers/spi/fdt_spi.c
> > @@ -1,24 +1,10 @@
> >  /*
> >   * Common fdt based SPI driver front end
> >   *
> > - * Copyright (c) 2013 NVIDIA Corporation
> > + * (C) Copyright 2013
> > + * NVIDIA Corporation <www.nvidia.com>
> >   *
> > - * See file CREDITS for list of people who contributed to this
> > - * project.
> > - *
> > - * This software is licensed under the terms of the GNU General Public
> > - * License version 2, as published by the Free Software Foundation, and
> > - * may be copied, distributed, and modified under those terms.
> > - *
> > - * This program is distributed in the hope that it will be useful,
> > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > - * GNU General Public License for more details.
> > - *
> > - * You should have received a copy of the GNU General Public License
> > - * along with this program; if not, write to the Free Software
> > - * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> > - * MA 02111-1307 USA
> > + * SPDX-License-Identifier:     GPL-2.0+
> >   */
> >
> >  #include <common.h>
> > @@ -29,7 +15,7 @@
> >  #include <asm/arch-tegra/clk_rst.h>
> >  #include <asm/arch-tegra20/tegra20_sflash.h>
> >  #include <asm/arch-tegra20/tegra20_slink.h>
> > -#include <asm/arch-tegra114/tegra114_spi.h>
> > +#include <asm/arch-tegra/tegra1x4_spi.h>
> >  #include <spi.h>
> >  #include <fdtdec.h>
> >
> > diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra1x4_spi.c
> > similarity index 92%
> > rename from drivers/spi/tegra114_spi.c
> > rename to drivers/spi/tegra1x4_spi.c
> > index 4d2af48..2742443 100644
> > --- a/drivers/spi/tegra114_spi.c
> > +++ b/drivers/spi/tegra1x4_spi.c
> > @@ -1,24 +1,10 @@
> >  /*
> >   * NVIDIA Tegra SPI controller (T114 and later)
> >   *
> > - * Copyright (c) 2010-2013 NVIDIA Corporation
> > + * (C) Copyright 2010-2013
> > + * NVIDIA Corporation <www.nvidia.com>
> >   *
> > - * See file CREDITS for list of people who contributed to this
> > - * project.
> > - *
> > - * This software is licensed under the terms of the GNU General Public
> > - * License version 2, as published by the Free Software Foundation, and
> > - * may be copied, distributed, and modified under those terms.
> > - *
> > - * This program is distributed in the hope that it will be useful,
> > - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > - * GNU General Public License for more details.
> > - *
> > - * You should have received a copy of the GNU General Public License
> > - * along with this program; if not, write to the Free Software
> > - * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
> > - * MA 02111-1307 USA
> > + * SPDX-License-Identifier:     GPL-2.0+
> >   */
> >
> >  #include <common.h>
> > @@ -27,7 +13,7 @@
> >  #include <asm/gpio.h>
> >  #include <asm/arch/clock.h>
> >  #include <asm/arch-tegra/clk_rst.h>
> > -#include <asm/arch-tegra114/tegra114_spi.h>
> > +#include <asm/arch-tegra/tegra1x4_spi.h>
> >  #include <spi.h>
> >  #include <fdtdec.h>
> >
> > --
> > 1.8.1.5
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > http://lists.denx.de/mailman/listinfo/u-boot
>
> Is it part of tegra.git?
>
I'm not sure what you are asking here. This code will go in to
u-boot-tegra/next when it's Acked, if that's what you mean. It only affects
Tegra SPI, so it doesn't need to go thru the SPI repo (no functional
change, just a rename for future SoCs).

Tom

>
> --
> Thanks,
> Jagan.
> --------
> Jagannadha Sutradharudu Teki,
> E: jagannadh.teki at gmail.com, P: +91-9676773388
> Engineer - System Software Hacker
> U-boot - SPI Custodian and Zynq APSOC
> Ln: http://www.linkedin.com/in/jaganteki
>


More information about the U-Boot mailing list