android_kernel_xiaomi_sm8350/drivers
Gerard Kam dc329442b9 atmel_spi: fix hang due to missed interrupt
For some time my at91sam9260 board with JFFS2 on serial flash (m25p80)
would hang when accessing the serial flash and SPI bus.  Slowing the SPI
clock down to 9 MHz reduced the occurrence of the hang from "always"
during boot to a nuisance level that allowed other SW development to
continue.  Finally had to address this issue when an application stresses
the I/O to always cause a hang.

Hang seems to be caused by a missed SPI interrupt, so that the task ends
up waiting forever after calling spi_sync().  The fix has 2 parts.  First
is to halt the DMA engine before the "current" PDC registers are loaded.
This ensures that the "next" registers are loaded before the DMA operation
takes off.  The second part of the fix is a kludge that adds a
"completion" interrupt in case the ENDRX interrupt for the last segment of
the DMA chaining operation was missed.

The patch allows the SPI clock for the serial flash to be increased from 9
MHz to 15 MHz (or more?).  No hangs or SPI overruns were encountered.

Haavard: while this patch does indeed improve things, I still see overruns
and CRC errors on my NGW100 board when running the DataFlash at 10 MHz.
However, I think some improvement is better than nothing, so I'm passing
this on for inclusion in 2.6.27.

Signed-off-by: Gerard Kam <gerardk5@verizon.net>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-04 16:58:45 -07:00
..
accessibility
acpi Remove newline from the description of module parameters 2008-08-01 12:46:41 -07:00
amba
ata pata_it821x: Driver updates and reworking 2008-07-31 02:04:50 -04:00
atm atm: fix direct casts of pointers to u32 in the InterPhase driver 2008-07-30 16:33:05 -07:00
auxdisplay
base Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-08-01 11:52:39 -07:00
block Remove newline from the description of module parameters 2008-08-01 12:46:41 -07:00
bluetooth bluetooth: add quirks for a few hci_usb devices 2008-07-30 17:19:35 -07:00
cdrom sh: More header path fixups for mach dir refactoring. 2008-07-29 22:10:01 +09:00
char try harder to load tty ldisc driver 2008-08-01 12:50:15 -07:00
clocksource
connector
cpufreq cpufreq acpi: only call _PPC after cpufreq ACPI init funcs got called already 2008-07-30 09:41:43 -07:00
cpuidle ACPI/CPUIDLE: prevent setting pm_idle to NULL 2008-07-28 08:31:58 -07:00
crypto
dca
dio
dma
edac
eisa
firewire
firmware iscsi_ibft_find: fix modpost warning 2008-07-30 09:41:44 -07:00
gpio
gpu Remove newline from the description of module parameters 2008-08-01 12:46:41 -07:00
hid
hwmon Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6 2008-08-01 11:33:19 -07:00
i2c i2c: Blackfin I2C Driver: Functional power management support 2008-07-28 12:41:03 +01:00
ide ide/powermac: Fix use of uninitialized pointer on media-bay 2008-07-30 15:26:53 +10:00
ieee1394
infiniband Remove newline from the description of module parameters 2008-08-01 12:46:41 -07:00
input sh: More header path fixups for mach dir refactoring. 2008-07-29 22:10:01 +09:00
isdn hysdn: remove the packed attribute from PofTimStamp_tag 2008-07-30 16:48:05 -07:00
leds
lguest lguest: use cpu capability accessors 2008-07-29 09:58:34 +10:00
macintosh
mca
md Merge branch 'for-linus' of git://neil.brown.name/md 2008-08-01 11:56:07 -07:00
media Merge branch 'zero-len' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/misc-2.6 2008-08-01 12:47:53 -07:00
memstick
message
mfd mfd: accept pure device as a parent, not only platform_device 2008-07-29 01:30:26 +02:00
misc add reverse dependency of CONFIG_SGI_XP upon CONFIG_SGI_GRU 2008-08-01 12:26:03 -07:00
mmc au1xmmc: raise segment size limit. 2008-08-01 19:04:26 +02:00
mtd Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm 2008-08-03 10:39:02 -07:00
net Remove newline from the description of module parameters 2008-08-01 12:46:41 -07:00
nubus
of
oprofile
parisc
parport
pci PCI: add D3 power state avoidance quirk 2008-07-28 15:12:11 -07:00
pcmcia
pnp PNP: fix formatting of dbg_pnp_show_resources() output 2008-08-01 12:46:41 -07:00
power Merge branch 'master' of /home/cbou/linux-2.6 2008-07-30 02:05:23 +04:00
ps3
rapidio
regulator regulator: TI bq24022 Li-Ion Charger driver 2008-07-30 10:10:23 +01:00
rtc rtc-dev: stop periodic interrupts on device release 2008-07-30 09:41:47 -07:00
s390 [S390] qeth: avoid use of include/asm-s390 2008-08-01 16:39:36 +02:00
sbus
scsi Revert "[SCSI] extend the last_sector_bug flag to cover more sectors" 2008-08-04 16:36:20 -07:00
serial Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2008-08-01 10:53:43 -07:00
sh sh/maple: clean maple bus code 2008-07-29 22:10:56 +09:00
sn
spi atmel_spi: fix hang due to missed interrupt 2008-08-04 16:58:45 -07:00
ssb
tc
telephony
thermal
uio
usb USB: m66592-udc: Fix up dev_set_name() badness. 2008-07-30 09:41:46 -07:00
video Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6 2008-08-02 09:14:23 -07:00
virtio
w1
watchdog hpwdt: don't use static flags 2008-07-30 09:41:45 -07:00
xen
zorro
Kconfig
Makefile regulator: core kbuild files 2008-07-30 10:10:22 +01:00