]> git.karo-electronics.de Git - karo-tx-uboot.git/commit
i2c: mvtwsi: Eliminate twsi_control_flags
authorChris Packham <judge.packham@gmail.com>
Fri, 13 May 2016 03:19:31 +0000 (15:19 +1200)
committerHeiko Schocher <hs@denx.de>
Tue, 17 May 2016 06:32:02 +0000 (08:32 +0200)
commitd6b7757e41d22e08f21f58d3fe9183a150582f61
treeb476033fedb3cdd1be2b8facfa49b189ead172b3
parent3a3705280d1d06e4d9a62fbe895dbe03939ad00e
i2c: mvtwsi: Eliminate twsi_control_flags

In a system where the initial u-boot location is genuinely NOR flash (as
opposed to RAM or a cache-line setup by a pre-bootloader) writes to the
data section are problematic. At best these writes have no effect, at
worst they put the flash memory into a status mode which changes the
executable code underneath us.

Pass around a stack variable from the top of the twsi i2c driver to
avoid writing to global data.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
drivers/i2c/mvtwsi.c