aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-09-16Blackfin: update ftrace for latest toolchainYi Li1-1/+1
The mcount support that was finally added to the Blackfin gcc port isn't exactly the same as what ftrace was developed against. Now that the final gcc version is in place, update the ftrace code to match. While updating this, fix the swapped arguments to the tracer (signature is (ip, parent_ip) while we were passing (parent_ip, ip)). Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: fix elf_fpregset_t definitionMike Frysinger1-1/+1
The elf_fpregset_t type relied on an empty struct in the asm/user.h, but the transition to asm-generic/user.h dropped that empty struct. Rather than restore this useless struct, define the only user (elf_fpregset_t) as an empty struct itself. This fixes building when ELF dump support is enabled. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: workaround anomaly 05000283Robin Getz1-4/+26
Make sure our interrupt entry code with exact hardware errors handles anomaly 05000283 (infinite stall in system MMR kill) so we don't stall while under load. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: punt dead cache locking codeMike Frysinger1-5/+0
No one uses these functions, and some are duplicate of existing C code. So just punt the whole thing. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: cleanup sync handling when enabling/disabling cplbsYi Li1-1/+45
The handling of updating the [DI]MEM_CONTROL MMRs does not follow proper sync procedures as laid out in the Blackfin programming manual. So rather than audit/fix every call location, create helper functions that do the right things in order to safely update these MMRs. Then convert all call sites to use these new helper functions. While we're fixing the code, drop the workaround for anomaly 05000125 as that anomaly applies to old versions of silicon that we do not support. Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: improve double fault debug handlingGraf Yang1-0/+6
Since the hardware only provides reporting for the last exception handled, and the values are valid only when executing the exception handler, we need to save the context for reporting at a later point. While we do this for one exception, it doesn't work properly when handling a second one as the original exception is clobbered by the double fault. So when double fault debugging is enabled, create a dedicated shadow of these values and save/restore out of there. Now the crash report properly displays the first exception as well as the second one. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: fix MPU handling of invalid memory accessesGraf Yang1-3/+3
The protect_page() function was incorrectly setting up the hardware tables based on possible access capabilities rather than the actual requested values. This means we would grant more access to mmap-ed pages than we should have. Once we fix this, we need to tweak the signal generated by such accesses to aline ourselves with other ports. This allows the LTP mmap0{5,6,7} cases to run properly. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: catch hardware errors earlier during bootingRobin Getz1-0/+22
Allow hardware errors to be caught during early portions of booting, and leave something in the shadow console that people can use to debug their system with (to be printed out by the bootloader on next reset). This enables the hardare error interrupts in head.S, allowing us to find hardware errors when they happen (well, as much as you can with a hardware error) and prints out the trace if it is enabled. This will catch errors (like booting the wrong image on a 533) which previously resulted in a infinite loop/hang, as well as random hardware errors before before setup_arch(). To disable this debug only feature - turn off EARLY_PRINTK. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: add an early shadow consoleRobin Getz1-0/+2
Add a memory based shadow console to keep a copy of the printk buffer in a location which can be found externally. This allows bootloaders to locate and utilize the log buffer in case of silent (early/resume/etc...) crashes. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: use generic name for EVT14 handlerPhilippe Gerum2-1/+1
The purpose of the EVT14 handler may depend on whether CONFIG_IPIPE is enabled, albeit its implementation can be the same in both cases. When the interrupt pipeline is enabled, EVT14 can be used to raise the core priority level for the running code; when CONFIG_IPIPE is off, EVT14 can be used to lower this level before running softirq handlers. Rename evt14_softirq to evt_evt14 to pick an identifier that fits both, which allows to reuse the same vector setup code as well. Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: fix misnomer of some I-pipe helpersPhilippe Gerum1-7/+0
__ipipe_{stall, unstall}_root_raw() identifiers may leave the reader under the impression that only the virtual state is affected by these operations, which is wrong. Pick names following the convention used throughout the interrupt pipeline code. Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: make EVT3->EVT5 lowering more robust wrt IPEND[4]Robin Getz1-0/+1
We handle many exceptions at EVT5 (hardware error level) so that we can catch exceptions in our exception handling code. Today - if the global interrupt enable bit (IPEND[4]) is set (interrupts disabled) our trap handling code goes into a infinite loop, since we need interrupts to be on to defer things to EVT5. Normal kernel code should not trigger this for any reason as IPEND[4] gets cleared early (when doing an interrupt context save) and the kernel stack there should be sane (or something much worse is happening in the system). But there have been a few times where this has happened, so this change makes sure we dump a proper crash message even when things have gone south. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-09-16Blackfin: bf537-stamp: declare SPI IRQ resourcesYi Li1-0/+1
Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-23Input: add Blackfin rotary input driverMichael Hennerich1-0/+39
This driver handles the Blackfin on-chip rotary peripheral. 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> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2009-07-16Blackfin: define HARDIRQ_BITS again for nowMike Frysinger1-0/+3
The default values of HARDIRQ_BITS and PREEMPT_BITS in common code leads to build failure: In file included from include/linux/interrupt.h:12, from include/linux/kernel_stat.h:8, from arch/blackfin/kernel/asm-offsets.c:32: include/linux/hardirq.h:66:2: error: #error PREEMPT_ACTIVE is too low! So until that gets resolved, just declare our own default value again. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-16Blackfin: drop per-cpu loops_per_jiffy trackingMichael Hennerich1-1/+0
On Blackfin SMP, a per-cpu loops_per_jiffy is pointless since both cores always run at the same CCLK. In addition, the current implementation has flaws since the main consumer for loops_per_jiffy (asm/delay.h) uses the global kernel loops_per_jiffy and not the per_cpu one. So punt all of the per-cpu handling and go back to the global shared one. Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-16Blackfin: fix handling of IPEND in interrupt context saveRobin Getz1-3/+4
The interrupt context save logic incorrectly stored the address of the IPEND register rather than its value due to a missing dereference. While we're here, also enable this code for all kernel debugging scenarios and not just when KGDB is enabled. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-16Blackfin: update handling of anomaly 364 (wrong rev id in BF527-0.1)Graf Yang1-14/+7
This anomaly only applies to the BF527-0.1, not the BF526-0.1, and not any other revision of the BF527. So make sure we don't go returning 0xffff for other cases. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-10sched: INIT_PREEMPT_COUNTPeter Zijlstra1-1/+1
Pull the initial preempt_count value into a single definition site. Maintainers for: alpha, ia64 and m68k, please have a look, your arch code is funny. The header magic is a bit odd, but similar to the KERNEL_DS one, CPP waits with expanding these macros until the INIT_THREAD_INFO macro itself is expanded, which is in arch/*/kernel/init_task.c where we've already included sched.h so we're good. Cc: tony.luck@intel.com Cc: rth@twiddle.net Cc: geert@linux-m68k.org Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-22Blackfin: fix dma-mapping build errorsFUJITA Tomonori1-0/+13
The recent deprecation of dma_sync_{sg,single} ironically broke Blackfin systems. This is because we don't define dma_sync_sg_for_cpu at all, so until the DMA asm-generic conversion/cleanup is done after the next release, simply stub out the dma_sync_sg_for_{cpu,device} functions. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: hook up new perf_counter_open syscallMike Frysinger1-1/+2
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: drop BF535-specific text for exception 0x2A (unaligned instruction)Yi Li1-3/+1
We don't support the BF535 at all, and the exception 0x2A text specific to it is pretty verbose and confusing (since the behavior is simply odd), so punt it to keep the noise down. Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: bf526-ezbrd: handle different SDRAM chipsGraf Yang1-0/+86
The BF526-EZBRD changed SDRAM chips between board revisions, so create a timing table that can accommodate both. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: fix typo in TRAS define in mem_init.h headerGraf Yang1-1/+1
We defined SDRAM_tRAS to TRAS_4, but then wrongly defined SDRAM_tRAS_num to 3. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: unify memory map headersMike Frysinger2-50/+48
Many aspects of the Blackfin memory map is exactly the same across all variants. Rather than copy and paste all of these duplicated values in each header, unify all of these into the common Blackfin memory map header file. In the process, push down BF561 SMP specific stuff to the BF561 specific header to keep the noise down. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: decouple unrelated cache settings to get exact behaviorJie Zhang3-22/+24
The current cache options don't really represent the hardware features. They end up setting different aspects of the hardware so that the end result is to turn on/off the cache. Unfortunately, when we hit cache problems with the hardware, it's difficult to test different settings to root cause the problem. The current settings also don't cleanly allow for different caching behaviors with different regions of memory. So split the configure options such that they properly reflect the settings that are applied to the hardware. Signed-off-by: Jie Zhang <jie.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: update I-pipe patch levelPhilippe Gerum1-2/+2
Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: allow CONFIG_TICKSOURCE_GPTMR0 with interrupt pipelinePhilippe Gerum1-1/+6
Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: convert interrupt pipeline to irqflagsPhilippe Gerum4-29/+176
Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-22Blackfin: unify memory region checks between kgdb and trapsMike Frysinger1-0/+22
The kgdb (in multiple places) and traps code developed pretty much identical checks for how to access different regions of the Blackfin memory map, but each wasn't 100%, so unify them to avoid duplication, bitrot, and bugs with edge cases. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert page/tlb to asm-genericMike Frysinger4-157/+4
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert types to asm-genericMike Frysinger2-81/+12
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert irq/process to asm-genericMike Frysinger3-75/+7
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert signal/mmap to asm-genericMike Frysinger2-199/+4
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert locking primitives to asm-genericMike Frysinger6-308/+25
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert termios to asm-genericMike Frysinger2-292/+2
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert simple headers to asm-genericMike Frysinger20-170/+10
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert socket/poll to asm-genericMike Frysinger3-90/+5
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert user/elf to asm-genericMike Frysinger2-90/+2
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert shm/sysv/ipc to asm-genericMike Frysinger5-134/+5
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-18Blackfin: convert asm/ioctls.h to asm-generic/ioctls.hMike Frysinger1-82/+2
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-16Merge branch 'akpm'Linus Torvalds1-16/+1
* akpm: (182 commits) fbdev: bf54x-lq043fb: use kzalloc over kmalloc/memset fbdev: *bfin*: fix __dev{init,exit} markings fbdev: *bfin*: drop unnecessary calls to memset fbdev: bfin-t350mcqb-fb: drop unused local variables fbdev: blackfin has __raw I/O accessors, so use them in fb.h fbdev: s1d13xxxfb: add accelerated bitblt functions tcx: use standard fields for framebuffer physical address and length fbdev: add support for handoff from firmware to hw framebuffers intelfb: fix a bug when changing video timing fbdev: use framebuffer_release() for freeing fb_info structures radeon: P2G2CLK_ALWAYS_ONb tested twice, should 2nd be P2G2CLK_DAC_ALWAYS_ONb? s3c-fb: CPUFREQ frequency scaling support s3c-fb: fix resource releasing on error during probing carminefb: fix possible access beyond end of carmine_modedb[] acornfb: remove fb_mmap function mb862xxfb: use CONFIG_OF instead of CONFIG_PPC_OF mb862xxfb: restrict compliation of platform driver to PPC Samsung SoC Framebuffer driver: add Alpha Channel support atmel-lcdc: fix pixclock upper bound detection offb: use framebuffer_alloc() to allocate fb_info struct ... Manually fix up conflicts due to kmemcheck in mm/slab.c
2009-06-16kmap_types: make most arches use generic header fileRandy Dunlap1-16/+1
Convert most arches to use asm-generic/kmap_types.h. Move the KM_FENCE_ macro additions into asm-generic/kmap_types.h, controlled by __WITH_KM_FENCE from each arch's kmap_types.h file. Would be nice to be able to add custom KM_types per arch, but I don't yet see a nice, clean way to do that. Built on x86_64, i386, mips, sparc, alpha(tonyb), powerpc(tonyb), and 68k(tonyb). Note: avr32 should be able to remove KM_PTE2 (since it's not used) and then just use the generic kmap_types.h file. Get avr32 maintainer approval. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: <linux-arch@vger.kernel.org> Acked-by: Mike Frysinger <vapier@gentoo.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Bryan Wu <cooloney@kernel.org> Cc: Mikael Starvik <starvik@axis.com> Cc: Hirokazu Takata <takata@linux-m32r.org> Cc: "Luck Tony" <tony.luck@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: David Howells <dhowells@redhat.com> Cc: Kyle McMartin <kyle@mcmartin.ca> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Paul Mundt <lethal@linux-sh.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-06-13Blackfin: hook up new rt_tgsigqueueinfo syscallMike Frysinger1-1/+2
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-13Blackfin: initial support for ftraceMike Frysinger1-1/+13
Just the basic ftrace support here -- mcount and the ftrace stub. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-13Blackfin: move custom sections into sections.hMike Frysinger2-10/+12
The Blackfin arch has a bunch of custom section markings for its on-chip regions, but they aren't declared in the right header. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-13Blackfin: punt unused/wrong mutex-dec.hMike Frysinger1-112/+0
Looks like the mutex-dec.h header file was incorrectly copied into the Blackfin asm path. Nothing uses it, so punt it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-13Blackfin: add support for irqflagsMike Frysinger3-264/+74
This converts the irq handling in the Blackfin arch from the old irq.h / system.h method to the new irqflags.h. A stepping stone on the way to other tracing functionality. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-13Blackfin: update aedos-ipipe code to upstream 1.10-00Yi Li1-13/+15
Signed-off-by: Yi Li <yi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-13Blackfin: fix flag storage for irq funcsMike Frysinger2-9/+10
The IRQ functions take an "unsigned long" flags variable, not any other type, so fix the places where we use "int" or "long". Signed-off-by: Mike Frysinger <vapier@gentoo.org>