From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Wed, 13 Feb 2013 15:40:29 -0700 Subject: [U-Boot] [PATCH 05/14] spi: add common fdt SPI driver interface In-Reply-To: <1360725802-5518-6-git-send-email-amartin@nvidia.com> References: <1360725802-5518-1-git-send-email-amartin@nvidia.com> <1360725802-5518-6-git-send-email-amartin@nvidia.com> Message-ID: <511C165D.50807@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 02/12/2013 08:23 PM, Allen Martin wrote: > Add a common interface to fdt based SPI drivers. Each driver is > represented by a table entry in fdt_spi_drivers[]. If there are > multiple SPI drivers in the table, the first driver to return success > from spi_init() will be registered as the SPI driver. I don't think there should be a global concept of "the" SPI driver; instances of both SPI blocks exist on Tegra20, so they should be able to co-exist, using the SFLASH driver for 1 SPI port, and the SLINK driver for the other 4 ports. How does this patch interact with any SPI-related device manager work? > +void spi_init(void) > +{ > + int i; > + int num_drivers = sizeof(fdt_spi_drivers) / > + sizeof(struct fdt_spi_driver); U-Boot doesn't have an ARSIZE/ARRAY_SIZE macro? > diff --git a/include/configs/cardhu.h b/include/configs/cardhu.h > /* SPI */ > #define CONFIG_TEGRA30_SPI > -#define CONFIG_TEGRA_SLINK_CTRLS 6 > +#define CONFIG_TEGRA30_SPI_CTRLS 6 Should that be in one of the other patches?