android_kernel_google_msm/drivers/mtd
Thomas Petazzoni c27517de00 mtd: pxa3xx_nand: make the driver work on big-endian systems
commit b7e460624f upstream.

The pxa3xx_nand driver currently uses __raw_writel() and __raw_readl()
to access I/O registers. However, those functions do not do any
endianness swapping, which means that they won't work when the CPU
runs in big-endian but the I/O registers are little endian, which is
the common situation for ARM systems running big endian.

Since __raw_writel() and __raw_readl() do not include any memory
barriers and the pxa3xx_nand driver can only be compiled for ARM
platforms, the closest I/o accessors functions that do endianess
swapping are writel_relaxed() and readl_relaxed().

This patch has been verified to work on Armada XP GP: without the
patch, the NAND is not detected when the kernel runs big endian while
it is properly detected when the kernel runs little endian. With the
patch applied, the NAND is properly detected in both situations
(little and big endian).

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 10:51:20 -07:00
..
chips
devices mtd: m25p80: fix allocation size 2014-06-07 16:02:15 -07:00
lpddr
maps mtd: autcpu12-nvram: Fix compile breakage 2012-10-13 05:38:58 +09:00
nand mtd: pxa3xx_nand: make the driver work on big-endian systems 2014-07-09 10:51:20 -07:00
onenand
tests
ubi UBI: erase free PEB with bitflip in EC header 2014-06-07 16:02:06 -07:00
afs.c
ar7part.c
bcm63xxpart.c
cmdlinepart.c
ftl.c
inftlcore.c
inftlmount.c
Kconfig mtd: of_parts: fix breakage in Kconfig 2012-06-10 00:36:13 +09:00
Makefile
mtd_blkdevs.c
mtdblock.c
mtdblock_ro.c
mtdchar.c vm: convert mtdchar mmap to vm_iomap_memory() helper 2013-04-25 21:19:56 -07:00
mtdconcat.c
mtdcore.c
mtdcore.h
mtdoops.c
mtdpart.c mtd: mtdpart: break it as soon as we parse out the partitions 2012-10-13 05:38:58 +09:00
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
ofpart.c mtd: ofpart: Fix incorrect NULL check in parse_ofoldpart_partitions() 2012-12-03 11:47:06 -08:00
redboot.c
rfd_ftl.c
sm_ftl.c mtd: sm_ftl: heap corruption in sm_create_sysfs_attributes() 2014-05-13 14:11:32 +02:00
sm_ftl.h
ssfdc.c