aboutsummaryrefslogtreecommitdiffstats
path: root/drivers (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2009-06-12Blackfin: update gptimers APIMichael Hennerich2-24/+49
First we fix the prototypes for functions that return boolean values by using "int" rather than "uint16_t". Then we introduce a get_gptimer_run() function for checking the current run status of a timer, and then we add a disable_gptimers_sync() function which parallels disable_gptimers() with corresponding normal "_sync" behavior. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: include system/processor info in dump messagesRobin Getz1-0/+23
People often copy & paste crash messages without surrounding context, so include common useful information like system/processor stats in the crash summary. This should smooth over the report/test cycle a bit more. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: add workaround for anomaly 05000461Robin Getz1-0/+3
Returning too fast with a bad RETI can trigger false errors. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: make sure stack is accessible before dumping itRobin Getz1-0/+11
When displaying a crash dump, make sure accessing the stack is safe so we don't crash at the same time. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: make deferred hardware errors more exactRobin Getz4-21/+170
Hardware errors on the Blackfin architecture are queued by nature of the hardware design. Things that could generate a hardware level queue up at the system interface and might not process until much later, at which point the system would send a notification back to the core. As such, it is possible for user space code to do something that would trigger a hardware error, but have it delay long enough for the process context to switch. So when the hardware error does signal, we mistakenly evaluate it as a different process or as kernel context and panic (erp!). This makes it pretty difficult to find the offending context. But wait, there is good news somewhere. By forcing a SSYNC in the interrupt entry, we force all pending queues at the system level to be processed and all hardware errors to be signaled. Then we check the current interrupt state to see if the hardware error is now signaled. If so, we re-queue the current interrupt and return thus allowing the higher priority hardware error interrupt to process properly. Since we haven't done any other context processing yet, the right context will be selected and killed. There is still the possibility that the exact offending instruction will be unknown, but at least we'll have a much better idea of where to look. The downside of course is that this causes system-wide syncs at every interrupt point which results in significant performance degradation. Since this situation should not occur in any properly configured system (as hardware errors are triggered by things like bad pointers), make it a debug configuration option and disable it by default. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: add note about anomaly 05000242 being worked aroundMike Frysinger1-0/+1
Document anomaly 05000242 workaround in source code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: work around anomaly 05000220Graf Yang3-23/+43
When possible, work around anomaly 05000220 (external memory is write back cached, but L2 is not cached). If not possible, detect the conditions at build time and reject any qualifying configurations. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: rename some Blackfin driversMike Frysinger14-45/+45
Try to keep the naming conventions consistent, so: SPI_ADC_BF533 -> BFIN_SPI_ADC TWI_LCD -> BFIN_TWI_LCD Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: make sure MPU CPLB for first 1k is marked as validRobin Getz1-1/+1
This way we properly catch and kill applications that jump to a NULL ptr. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: add workaround for anomaly 05000287Graf Yang1-1/+8
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: add support for gptimer0 as a tick sourceGraf Yang14-74/+228
For systems where the core cycles are not a usable tick source (like SMP or cycles gets updated), enable gptimer0 as an alternative. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: annotate anomaly 05000120Graf Yang1-0/+4
Add some notes for anomaly 05000120 to make sure we work around it. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: BF518F-EZBRD: handle required portmuxing of async pinsGraf Yang2-1/+14
The two high address lines on the BF51x are not dedicated which means we need to handle them like any other peripheral pin if we want to access the upper 2MB of parallel flash. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: detect anomaly 05000274Sonic Zhang2-8/+4
Detect and reject operating conditions for anomaly 05000274 since the problem cannot be worked around in software. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: do not append newlines to panic() messagesMike Frysinger3-7/+7
The panic() function already handles newlines for us. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: workaround anomaly 05000227Mike Frysinger1-7/+11
Workaround anomaly 05000227 by only using the scratch pad for stack when absolutely necessary. The core code which reprograms clocks really only touches MMRs directly with constants. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: delete unused sys_getpagesize() functionMike Frysinger1-5/+0
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: work around anomaly 05000287Graf Yang1-1/+8
Make sure we work around anomaly 05000287 by configuring different port preferences for the data cache. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: punt useless GPIO init callMike Frysinger1-9/+0
This init code existed only to dump a printk(), and not even a useful one. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: annotate anomaly 05000119 in core DMA codeRobin Getz1-0/+5
Add a reminder note to avoid the DMA_DONE bit in our DMA core code. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: document anomaly 05000234 workaroundRobin Getz1-2/+2
Note the reason for using CHIPD over DSPID. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: fix early L1 relocation crashRobin Getz3-23/+111
Our early L1 relocate code may implicitly call code which lives in L1 memory. This is due to the dma_memcpy() rewrite that made the DMA code lockless and safe to be used by multiple processes. If we start the early DMA memcpy to relocate things into L1 instruction but then our DMA memcpy code calls a function that lives in L1, things fall apart. As such, create a small dedicated DMA memcpy routine that we can assume sanity at boot time. Reported-by: Filip Van Rillaer <filip.vanrillaer@oneaccess-net.com> Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: add MDMA defines to make cross-variant coding easierGraf Yang5-19/+200
Add some defines to make the BF538/BF561 look like most other Blackfin parts in that it has a MDMA0 channel available for low level init. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: fix detection of cached L2 SRAMMike Frysinger1-0/+5
Make sure our bfin_addr_dcachable() function flags cached L2 SRAM properly else memory easily goes unflushed when working with DMA. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: simplify BF561 coreb driver greatlyMike Frysinger2-378/+33
Since 90% of this driver can be handled in user space, move it to the corebld user space application. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: update defconfigsSonic Zhang21-825/+1164
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: simplify the do_flush macroMike Frysinger1-15/+15
Simplify the do_flush macro now that we don't need to take into account a second instruction being used together. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: set bf51x/bf52x to 0.0 rev by default and bf54x to 0.2Mike Frysinger1-2/+2
Update the default revs based on what we actually support (bf54x-0.[01] is too broken to use). Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: do not error if GPIO IRQ is requested already as GPIOMichael Hennerich1-9/+0
Some drivers expect to be able to request both as GPIO and GPIO IRQ, so allow that use case. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: pull updated anomaly lists from toolchainMike Frysinger7-137/+367
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: fix up PATA resource handling in bf537-stampMichael Hennerich1-6/+9
Make sure the addresses declared match reality, and make the PATA IRQ code optional. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: merge Philippe's recent ipipe patchPhilippe Gerum3-12/+8
ipipe-2.6.28.9-blackfin-git95aafe6.patch Singed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-12Blackfin: fix warnings with I/O port macrosMike Frysinger1-13/+16
The I/O port functions take ints, so we need to cast them up before passing to our read/write funcs to avoid ugly messes of warnings. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: fix parentheses balance and convert some tab/space mixingMariusz Kozlowski1-3/+3
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: fix bug found by traps test case 21Graf Yang1-1/+1
The traps test case 21 "exception 0x3f: l1_instruction_access" would make the kernel panic on BF533's because we end up calling show_stack() infinitely. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: fix data cache flushing when doing icache flushingMike Frysinger3-36/+16
Make sure we flush all data caches and their write buffers before flushing icache, otherwise random edge cases could crop up where stale data is read into icache from external memory. As fallout, punt the combined icache + dcache flush function since we cannot safely do them back to back -- the SSYNC is needed between the dcache flush and the icache flush. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: fix link failure due to CONFIG_EXCEPTION_L1_SCRATCHGraf Yang3-20/+13
Move exception stack mess from entry.S to init.c to fix link failure when CONFIG_EXCEPTION_L1_SCRATCH is in use. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: allow scheduler functions to be placed into L1Robin Getz1-0/+5
Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: Allow bf548 ATAPI to be routed to GPIOSonic Zhang2-19/+52
By default, it is routed to async memory address. In GPIO case, GPIO peripheral PINs should be requested in advance. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: bf527-ezkit: add support for mmc-spiYi Li1-0/+18
Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: add some help text to the EBIU_AMBCTL settingsMike Frysinger1-4/+17
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-12Blackfin: add comment for anomaly 05000171 to init codeMichael Hennerich1-0/+3
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bryan Wu <cooloney@kernel.org>
2009-06-11block: fix kernel-doc in recent block/ changesRandy Dunlap2-13/+14
Fix kernel-doc warnings in recently changed block/ source code. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11kvm: remove the duplicated cpumask_clearYinghai Lu1-1/+0
zalloc_cpumask_var already cleared it. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11x86: use zalloc_cpumask_var in arch_early_irq_initYinghai Lu1-2/+2
So we make sure MAXSMP gets a cleared cpumask Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11perfcounters: remove powerpc definitions of perf_counter_do_pendingStephen Rothwell2-3/+1
Commit 925d519ab82b6dd7aca9420d809ee83819c08db2 ("perf_counter: unify and fix delayed counter wakeup") added global definitions. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-11nilfs2: get rid of bd_mount_sem use from nilfsRyusuke Konishi4-9/+12
This will remove every bd_mount_sem use in nilfs. The intended exclusion control was replaced by the previous patch ("nilfs2: correct exclusion control in nilfs_remount function") for nilfs_remount(), and this patch will replace remains with a new mutex that this inserts in nilfs object. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-06-11nilfs2: correct exclusion control in nilfs_remount functionRyusuke Konishi3-31/+33
nilfs_remount() changes mount state of a superblock instance. Even though nilfs accesses other superblock instances during mount or remount, the mount state was not properly protected in nilfs_remount(). Moreover, nilfs_remount() has a lock order reversal problem; nilfs_get_sb() holds: 1. bdev->bd_mount_sem 2. sb->s_umount (sget acquires) and nilfs_remount() holds: 1. sb->s_umount (locked by the caller in vfs) 2. bdev->bd_mount_sem To avoid these problems, this patch divides a semaphore protecting super block instances from nilfs->ns_sem, and applies it to the mount state protection in nilfs_remount(). With this change, bd_mount_sem use is removed from nilfs_remount() and the lock order reversal will be resolved. And the new rw-semaphore, nilfs->ns_super_sem will properly protect the mount state except the modification from nilfs_error function. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-06-11nilfs2: simplify remaining sget() useRyusuke Konishi4-25/+75
This simplifies the test function passed on the remaining sget() callsite in nilfs. Instead of checking mount type (i.e. ro-mount/rw-mount/snapshot mount) in the test function passed to sget(), this patch first looks up the nilfs_sb_info struct which the given mount type matches, and then acquires the super block instance holding the nilfs_sb_info. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2009-06-11nilfs2: get rid of sget use for checking if current mount is presentRyusuke Konishi2-60/+35
This stops using sget() for checking if an r/w-mount or an r/o-mount exists on the device. This elimination uses a back pointer to the current mount added to nilfs object. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>