From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jagan Teki Date: Fri, 23 Sep 2016 20:14:17 +0530 Subject: [U-Boot] [PATCH 02/15 v3] spi: Add driver for Marvell Armada 3700 SoC In-Reply-To: <20160923142846.26904-1-sr@denx.de> References: <20160916130947.11367-2-sr@denx.de> <20160923142846.26904-1-sr@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Fri, Sep 23, 2016 at 7:58 PM, Stefan Roese wrote: > The SPI IP core in the Marvell Armada 3700 is similar to the one in the > other Armada SoCs. But the differences are big enough that it makes > sense to introduce a new driver instead of cluttering the old > kirkwood driver with #ifdef's. > > Signed-off-by: Stefan Roese > Cc: Nadav Haklai > Cc: Kostya Porotchkin > Cc: Wilson Ding > Cc: Victor Gu > Cc: Hua Jing > Cc: Terry Zhou > Cc: Hanna Hawa > Cc: Haim Boot > Cc: Jagan Teki > --- > v3: > - Really use hz now in equation > - Add comment that the DT property for the input clock is deprecated > and the clock infrastructure should be used, once available for > mvebu in U-Boot > > v2: > - Evaluated hz and used values provided by the DT in mvebu_spi_set_speed() > as suggested by Jagan > > drivers/spi/Kconfig | 7 + > drivers/spi/Makefile | 1 + > drivers/spi/mvebu_a3700_spi.c | 297 ++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 305 insertions(+) > create mode 100644 drivers/spi/mvebu_a3700_spi.c > > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig > index 5da66a6..8724f87 100644 > --- a/drivers/spi/Kconfig > +++ b/drivers/spi/Kconfig > @@ -68,6 +68,13 @@ config ICH_SPI > access the SPI NOR flash on platforms embedding this Intel > ICH IP core. > > +config MVEBU_A3700_SPI > + bool "Marvell Armada 3700 SPI driver" > + help > + Enable the Marvell Armada 3700 SPI driver. This driver can be > + used to access the SPI NOR flash on platforms embedding this > + Marvell IP core. > + > config PIC32_SPI > bool "Microchip PIC32 SPI driver" > depends on MACH_PIC32 > diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile > index b1d9e20..247c5f6 100644 > --- a/drivers/spi/Makefile > +++ b/drivers/spi/Makefile > @@ -37,6 +37,7 @@ obj-$(CONFIG_KIRKWOOD_SPI) += kirkwood_spi.o > obj-$(CONFIG_LPC32XX_SSP) += lpc32xx_ssp.o > obj-$(CONFIG_MPC52XX_SPI) += mpc52xx_spi.o > obj-$(CONFIG_MPC8XXX_SPI) += mpc8xxx_spi.o > +obj-$(CONFIG_MVEBU_A3700_SPI) += mvebu_a3700_spi.o > obj-$(CONFIG_MXC_SPI) += mxc_spi.o > obj-$(CONFIG_MXS_SPI) += mxs_spi.o > obj-$(CONFIG_OMAP3_SPI) += omap3_spi.o > diff --git a/drivers/spi/mvebu_a3700_spi.c b/drivers/spi/mvebu_a3700_spi.c > new file mode 100644 > index 0000000..0a55f3f > --- /dev/null > +++ b/drivers/spi/mvebu_a3700_spi.c > @@ -0,0 +1,297 @@ > +/* > + * Copyright (C) 2015 Marvell International Ltd. > + * > + * Copyright (C) 2016 Stefan Roese > + * > + * SPDX-License-Identifier: GPL-2.0+ > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +DECLARE_GLOBAL_DATA_PTR; > + > +#define SPI_TIMEOUT 10000 Can you remove this - sorry, never looked previously. Reviewed-by: Jagan Teki thanks! -- Jagan Teki Free Software Engineer | www.openedev.com U-Boot, Linux | Upstream Maintainer Hyderabad, India.