summaryrefslogtreecommitdiff
path: root/arch/blackfin
AgeCommit message (Collapse)Author
2010-08-06Blackfin: gpio/portmux: clean up whitespace corruptionMike Frysinger
Random tabs instead of spaces, mixes of the two, and unicode spaces instead of ascii spaces. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: make sure mmiowb inserts a write barrier with SSYNCMichael Hennerich
Add SSYNC to our implementation of I/O write barrier to ensure ordering of I/O space writes. This will make sure that writes following the barrier will arrive after all previous writes. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: fix DMA/cache bug when resuming from suspend to RAMMichael Hennerich
The dma_memcpy() function takes care of flushing different caches for us. Normally this is what we want, but when resuming from mem, we don't yet have caches enabled. If these functions happen to be placed into L1 mem (which is what we're trying to relocate), then things aren't going to work. So define a non-cache dma_memcpy() variant to utilize in situations like this. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: BF51x: fix handling of PH8 (the "internal" SPI0SEL4 pin)Mike Frysinger
Even though the PH8 pin is only internal to the processor packaging, it can be controlled like any other GPIO pin. Now that we have a proper GPIO define, we can fix the SPI0 CS4 define for the internal SPI flash. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: add a GPIO_DEFAULT_BOOT_SPI_CSMike Frysinger
This is parallel to the existing P_DEFAULT_BOOT_SPI_CS, but in terms of the GPIO value so it can be used with the normal gpio API. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: fix typo in hweight asmMike Frysinger
Run ONES on the incoming value rather than random garbage. This fixes random crashes with some networking code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: BF51x: fix typo in HWAIT pin defineMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: BF54x: add ifdef protection to gpio headerMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: gpio: unify & clean up reserved map handlingMike Frysinger
The duplicated bit banging logic is getting out of hand, so unify the local API to make management a lot easier. This also makes the code a lot easier to follow. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: allow cache funcs to be in L1 for IFLUSH Anomaly 05000491Mike Frysinger
Anomaly 05000491 says that IFLUSH cannot have certain types of memory stalls triggered before it has completed in order to function correctly. One such condition is that it be in L1 instruction. So add a config option to move it there, default it to on, and throw up a warning when it is turned off and this anomaly exists. Since the anomaly should be worked around, we can drop the older method of calling IFLUSH multiple times. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
2010-08-06Blackfin: update anomaly lists to latest public infoMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: merge anomalies 475 and 220 to follow official listsMike Frysinger
Design found that these anomalies had the same root issue, so they've merged 475 into 220. We need to do the same to update to the latest anomaly sheets. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: move MPU anomaly check to common locationMike Frysinger
Keep all anomaly/arch checks in one place to keep logic simple. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: use common EXCEPTION_TABLE() in vmlinux.ldsMike Frysinger
Rather than do our own thing, use what common code provides. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: stub fpregs dumpingMike Frysinger
The Blackfin processor has no FPU, so there are no FPU regs to dump. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: new dynamic bfin read/write mmr helpersMike Frysinger
These are useful when working with C structs of MMRs as the appropriate size is selected based on the given argument. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-06Blackfin: punt NFC MMR bitsMike Frysinger
Now that the NFC driver has its own defines, scrub the ones from the global namespace to avoid ugly collisions with common code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-08-04Merge commit 'v2.6.35' into kbuild/kbuildMichal Marek
Conflicts: arch/powerpc/Makefile
2010-08-03kbuild: allow assignment to {A,C,LD}FLAGS_MODULE on the command lineSam Ravnborg
It is now possible to assign options to AS, CC and LD on the command line - which is only used when building modules. {A,C,LD}FLAGS_MODULE was all used both in the top-level Makefile in the arch makefiles, thus users had no way to specify additional options to AS, CC, LD when building modules without overriding the original value. Introduce a new set of variables KBUILD_{A,C,LD}FLAGS_MODULE that is used by arch specific files and free up {A,C,LD}FLAGS_MODULE so they can be assigned on the command line. All arch Makefiles that used the old variables has been updated. Note: Previously we had a MODFLAGS variable for both AS and CC. But in favour of consistency this was dropped. So in some cases arch Makefile has one assignmnet replaced by two assignmnets. Note2: MODFLAGS was not documented and is dropped without any notice. I do not expect much/any breakage from this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Denys Vlasenko <vda.linux@googlemail.com> Cc: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Chen Liqin <liqin.chen@sunplusct.com> Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin] Acked-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> [avr32] Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-05-27blackfin: use use asm-generic/scatterlist.hFUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-27ptrace: unify FDPIC implementationsMike Frysinger
The Blackfin/FRV/SuperH guys all have the same exact FDPIC ptrace code in their arch handlers (since they were probably copied & pasted). Since these ptrace interfaces are an arch independent aspect of the FDPIC code, unify them in the common ptrace code so new FDPIC ports don't need to copy and paste this fundamental stuff yet again. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Roland McGrath <roland@redhat.com> Acked-by: David Howells <dhowells@redhat.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-05-24Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (30 commits) Blackfin: SMP: fix continuation lines Blackfin: acvilon: fix timeout usage for I2C Blackfin: fix typo in BF537 IRQ comment Blackfin: unify duplicate MEM_MT48LC32M8A2_75 kconfig options Blackfin: set ARCH_KMALLOC_MINALIGN Blackfin: use atomic kmalloc in L1 alloc so it too can be atomic Blackfin: another year of changes (update copyright in boot log) Blackfin: optimize strncpy a bit Blackfin: isram: clean up ITEST_COMMAND macro and improve the selftests Blackfin: move string functions to normal lib/ assembly Blackfin: SIC: cut down on IAR MMR reads a bit Blackfin: bf537-minotaur: fix build errors due to header changes Blackfin: kgdb: pass up the CC register instead of a 0 stub Blackfin: handle HW errors in the new "FAULT" printing code Blackfin: show the whole accumulator in the pseudo DBG insn Blackfin: support all possible registers in the pseudo instructions Blackfin: add support for the DBG (debug output) pseudo insn Blackfin: change the BUG opcode to an unused 16-bit opcode Blackfin: allow NMI watchdog to be used w/RETN as a scratch reg Blackfin: add support for the DBGA (debug assert) pseudo insn ...
2010-05-22Blackfin: SMP: fix continuation linesJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: acvilon: fix timeout usage for I2CWolfram Sang
The timeout value is in jiffies, so it should be using HZ, not a plain number. As '10000' is ambiguous, 1HZ is used as conservative default. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Valentin Yakovenkov <yakovenkov@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: fix typo in BF537 IRQ commentMichael Hennerich
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: unify duplicate MEM_MT48LC32M8A2_75 kconfig optionsMike Frysinger
Reported-by: Christoph Egger <siccegge@cs.fau.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: set ARCH_KMALLOC_MINALIGNFUJITA Tomonori
Architectures that handle DMA-non-coherent memory need to set ARCH_KMALLOC_MINALIGN to make sure that kmalloc'ed buffer is DMA-safe: the buffer doesn't share a cache with the others. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: use atomic kmalloc in L1 alloc so it too can be atomicMike Frysinger
Some drivers allocate L1 SRAM in atomic contexts, so make sure these functions also use GFP_ATOMIC to avoid BUG()'s. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: another year of changes (update copyright in boot log)Mike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: optimize strncpy a bitRobin Getz
Add a little strncpy optimization which can easily cut boot time by 20%. When the kernel is booting with initramfs, it builds up the filesystem from a cpio archive by calling strncpy_from_user() via fs/namei.c's do_getname() on every file in the archive (which can be lots) with a length of PATH_MAX (1024). This causes the dest of the strncpy to be padded with many NUL bytes. This optimization mostly causes these NUL bytes to be padded with a call to memset() which is already optimized for filling memory quickly, but the hardware loop helps a little bit as well. Boot time measured with 'loglevel=0' so UART speed doesn't get in the way. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: isram: clean up ITEST_COMMAND macro and improve the selftestsMike Frysinger
The IADDR2DTEST() macro had some duplicated logic with bit 11 and some incorrect comments, so scrub all of that. In order to verify these aren't a problem (and won't be in the future), extend the self tests to operate on as much L1 SRAM as possible. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: move string functions to normal lib/ assemblyRobin Getz
Since 'extern inline' doesn't work correctly in the context of the Linux kernel (too many overriding defines), move the string functions to normal lib/ assembly files (like the existing mem funcs). This avoids the forced inline all over the kernel and allows us to place them constantly in L1. This also avoids some module failures when gcc inserts calls to string functions but the kernel build system doesn't fully consult the library archives. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: SIC: cut down on IAR MMR reads a bitMike Frysinger
Tweak the for loops that operate on the SIC IAR system MMRs to avoid re-reading them multiple times in a row. System MMRs are a little slower to access, so avoid the penalty when possible. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: bf537-minotaur: fix build errors due to header changesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: kgdb: pass up the CC register instead of a 0 stubMike Frysinger
While the CC pseudo register can be deduced from the ASTAT register, make sure we set its value correctly instead of always stubbing it out as 0. GDB itself looks at this pseudo register instead of ASTAT, so we have to supply the right value. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: handle HW errors in the new "FAULT" printing codeRobin Getz
Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: show the whole accumulator in the pseudo DBG insnRobin Getz
Rather than print just part of the accumulator register, show the whole 40 bits. This matches the simulator behavior better. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: support all possible registers in the pseudo instructionsRobin Getz
Rather than decoding just the common R/P registers, handle all of them. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: add support for the DBG (debug output) pseudo insnRobin Getz
Another pseudo insn used by Blackfin simulators. Also factor some now common register lookup code out of the DBGA handlers. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: change the BUG opcode to an unused 16-bit opcodeRobin Getz
The current BUG opcode includes the bit that flags the insn as a 32bit opcode, but it wasn't declaring it as 32bits. So pick an unused 16bit. URL: http://blackfin.uclinux.org/gf/tracker/5973 Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: allow NMI watchdog to be used w/RETN as a scratch regGraf Yang
NMIs are not safe to return from because many anomaly workarounds are implemented by disabling interrupts. The NMI obviously violates this assumption. Since the NMI watchdog never returns, we don't have to worry about it clobbering RETN when it is being used as a scratch register with the exception stack. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-22Blackfin: add support for the DBGA (debug assert) pseudo insnRobin Getz
A few pseudo debug insns exist to make testing of simulators easier. Since these don't actually exist in the hardware, we have to have the exception handler take care of emulating these. This allows sim test cases to be executed unmodified under Linux and thus simplify debugging greatly. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21Blackfin: SMP: add flush_tlb_kernel_range stubGraf Yang
Newer code in mm/page_alloc.c requires this function now in arches. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21Blackfin: make hardware trace output a little more usefulRobin Getz
Decode the vast majority of insns that appear in the trace buffer to get a better idea of what's going on at a glance. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21Blackfin: print out the faulting insn in the trace outputRobin Getz
Print out the faulting instruction so when people send traces as part of bug reports, we have a better idea of what is going on. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21Blackfin: remove CONFIG_DEBUG_VERBOSE from trace.cRobin Getz
Now that the split traps code has moved all the verbose output to the trace.c file, we can unify all the CONFIG_DEBUG_VERBOSE handling. This gets rid of much of the crappy ifdef forest and enables usage of normal pr_xxx functions so checkpatch stops complaining. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21Blackfin: split kernel/traps.cRobin Getz
The current kernel/traps.c file has grown a bit unwieldy as more debugging functionality has been added over time, so split it up into more logical files. There should be no functional changes here, just minor whitespace tweaking. This should make future extensions easier to manage. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21Blackfin: punt Blackfin-specific GPIO wakeup APIMichael Hennerich
This patch removes a custom GPIO wakeup API which allowed GPIOs to act as wakeup sources, which are not configured as Interrupts. This API is a leftover from the time before irq_wake was established. From now on people must use enable_irq_wake(GPIO_IRQx) and the GPIO in question needs to be configured as Interrupt. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21Blackfin: mark MUSB VRSEL as active high for appropriate boardsCliff Cai
These boards all have the GPIO VRSEL hooked up as an active high. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-05-21Blackfin: punt duplicated CAN MMRsMike Frysinger
Now that there's a common header with everything unified, drop the defines from the global namespace. Pollution sucks. Signed-off-by: Mike Frysinger <vapier@gentoo.org>