u-boot-brain/drivers/spi
Dirk Behme d36b39bf0d spi: mxc_spi: Fix ECSPI reset handling
Reviewing the ECSPI reset handling shows two issues:

1. For the enable/reset bit (MXC_CSPICTRL_EN) in the control reg
   (ECSPIx_CONGREG) the i.MX6 technical reference manual states:

   -- cut --
   ECSPIx_CONREG[0]: EN: Writing zero to this bit disables the block
   and resets the internal logic with the exception of the ECSPI_CONREG.
   -- cut --

   Note the exception mentioned: The CONREG itself isn't reset.

   Fix this by manually writing the reset value 0 to the whole register.
   This sets the EN bit to zero, too (i.e. includes the old
   ~MXC_CSPICTRL_EN).

2. We want to reset the whole SPI block here. So it makes no sense
   to first read the old value of the CONREG and write it back, later.
   This will give us the old (historic/random) value of the CONREG back.
   And doesn't reset the CONREG.

   To get a clean CONREG after the reset of the block, too, don't use
   the old (historic/random) value of the CONREG while doing the reset.
   And read the clean CONREG after the reset.

This was found while working on a SPI boot device where the i.MX6 boot
ROM has already initialized the SPI block. The initialization by the
boot ROM might be different to what the U-Boot driver wants to configure.
I.e. we need a clean reset of SPI block, including the CONREG.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
CC: Stefano Babic <sbabic@denx.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
2013-04-04 10:23:09 +02:00
..
altera_spi.c altera_spi: add spi_set_speed 2011-02-08 08:29:53 -05:00
andes_spi.c andes_spi: add andes_spi interface 2011-07-25 23:40:11 +02:00
andes_spi.h andes_spi: add andes_spi interface 2011-07-25 23:40:11 +02:00
armada100_spi.c SPI: Add SPI driver support for Marvell Armada100 2011-10-27 21:56:32 +02:00
atmel_dataflash_spi.c AT91/SPI: fix atmel_dataflash_spi.c to allow building without warnings 2011-08-03 13:00:56 +02:00
atmel_spi.c spi: atmel: sam9m10g45 also support WDRBT bit 2012-12-09 22:40:13 +01:00
atmel_spi.h spi: atmel: add WDRBT bit to avoid receive overrun 2012-09-01 17:06:14 +02:00
bfin_spi.c Blackfin: bfin_spi: fix build error when DEBUG is defined 2011-10-16 14:22:19 -04:00
bfin_spi6xx.c blackfin: add bf6xx spi driver 2013-03-04 13:42:07 +08:00
cf_qspi.c ColdFire: Queued SPI driver 2012-09-20 20:39:27 +08:00
cf_spi.c add CONFIG_SPI_IDLE_VAL for cf_spi.c to allow use of spi_mmc 2011-04-13 06:35:22 -05:00
davinci_spi.c Davinci: SPI: add the missing v2 patch changes 2010-07-05 20:00:40 -04:00
davinci_spi.h TI DaVinci: Driver for the davinci SPI controller 2010-02-12 12:31:53 -06:00
exynos_spi.c SPI: EXYNOS: Add FDT support to driver. 2013-01-08 10:54:34 +09:00
fsl_espi.c powerpc/espi: remove write command length check 2012-10-22 15:52:46 -05:00
kirkwood_spi.c kirkwood: make MPP arrays static const 2013-01-09 04:12:10 +05:30
Makefile blackfin: add bf6xx spi driver 2013-03-04 13:42:07 +08:00
mpc8xxx_spi.c mpc8xxx_spi: fix SPI support on MPC8308RDB 2012-09-18 16:16:44 -05:00
mpc52xx_spi.c mpc52xx: Add SPI driver. 2009-06-14 23:01:38 +02:00
mxc_spi.c spi: mxc_spi: Fix ECSPI reset handling 2013-04-04 10:23:09 +02:00
mxs_spi.c mxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE 2013-03-07 17:22:56 +01:00
oc_tiny_spi.c spi: add new driver for OpenCores tiny_spi 2011-04-30 20:58:36 +02:00
omap3_spi.c OMAP3 SPI : Fixed bugs related to SPI transfer 2012-12-10 08:55:25 -07:00
omap3_spi.h OMAP3 SPI : Fixed bugs related to SPI transfer 2012-12-10 08:55:25 -07:00
sh_spi.c sh_spi: Add 4 chip select signals supporting 2012-03-26 10:09:31 +09:00
sh_spi.h sh_spi: Add 4 chip select signals supporting 2012-03-26 10:09:31 +09:00
soft_spi.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
tegra_slink.c tegra: add SPI SLINK driver 2013-02-11 10:35:25 -07:00
tegra_spi.c tegra: spi: add fdt support to tegra SPI SFLASH driver 2013-02-11 10:35:24 -07:00
xilinx_spi.c spi: xilinx_spi: Perform software reset during slave setup 2013-02-04 12:09:49 +01:00
xilinx_spi.h spi: xilinx_spi: Perform software reset during slave setup 2013-02-04 12:09:49 +01:00