u-boot/drivers
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
..
bios_emulator Add abs() macro to return absolute value 2012-05-15 08:31:37 +02:00
block Merge branch 'master' of git://www.denx.de/git/u-boot-microblaze 2013-02-04 09:14:22 -05:00
bootcount Consolidate bootcount code into drivers/bootcount 2012-09-01 14:26:02 +02:00
dfu dfu:usb:fix: Read the "filesize" environment variable only when file read 2012-09-21 00:05:00 +02:00
dma mxs: dma: Fix APBH DMA driver for MX23 2013-01-28 11:43:00 +01:00
fpga FPGA: Cyclon II: Correctly reset the FPGA before configuration 2012-10-29 14:21:20 -07:00
gpio Merge u-boot/master into u-boot-ti/master 2013-03-11 12:16:13 -04:00
hwmon
i2c Tegra: I2C: Add T114 clock support to tegra_i2c driver 2013-03-14 11:06:41 -07:00
input ppc: Move mpc5xxx clocks to arch_global_data 2013-02-04 09:05:43 -05:00
misc Merge remote-tracking branch 'u-boot/master' into u-boot-arm-merged 2012-12-19 13:02:36 -08:00
mmc mmc: i.MX6: fsl_esdhc: Define maximum bus width supported by a board 2013-04-03 11:26:28 +02:00
mtd Merge u-boot/master into u-boot-ti/master 2013-03-11 12:16:13 -04:00
net Merge u-boot/master into u-boot-ti/master 2013-03-11 12:16:13 -04:00
pci powerpc/p4080ds: fix PCI-e x8 link training down failure 2012-11-27 18:28:07 -06:00
pcmcia PXA: Remove PXA PCMCIA support 2012-03-26 23:09:23 +02:00
power Merge branch 'agust@denx.de' of git://git.denx.de/u-boot-staging 2013-01-14 15:30:31 -07:00
qe ppc: Move CONFIG_QE to arch_global_data 2013-02-04 09:05:42 -05:00
rtc pmic: Extend PMIC framework to support multiple instances of PMIC devices 2012-11-14 11:21:09 +01:00
serial Merge u-boot/master into u-boot-ti/master 2013-03-11 12:16:13 -04:00
sound Sound: WM8994: Add FDT support to codec 2013-01-08 10:54:33 +09:00
spi spi: mxc_spi: Fix ECSPI reset handling 2013-04-04 10:23:09 +02:00
tpm Introduce generic TPM support in u-boot 2011-12-07 08:45:51 +01:00
twserial
usb Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master' 2013-03-15 20:50:43 +01:00
video omap3: allow dynamic selection of gfx_format 2013-03-08 16:41:13 -05:00
watchdog mx31/mx35/mx51/mx53/mx6: add watchdog 2013-01-13 11:39:57 +01:00