summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel
Commit message (Collapse)AuthorAgeFilesLines
...
* Blackfin: make sure percpu section is aligned in XIP buildsSteven Miao2011-07-231-0/+1
| | | | | | | | The alignment is normally handled by PERCPU(), but we need to do it ourselves in the XIP build due to the custom layout. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: gptimers: use bfin read/write helpersMike Frysinger2011-07-231-20/+25
| | | | | | | Use proper helper macros for reading/writing the MMRs rather than volatile markings on the struct. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: gptimers: use register structs from common headerMike Frysinger2011-07-231-32/+16
| | | | | | | Now that asm/gptimers.h has the hardware register struct layout, there's no need to duplicate things locally. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: debug-mmrs: use new gptimer_group layout to simplify codeMike Frysinger2011-07-231-18/+34
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: debug-mmrs: prevent macro arg from expandingMike Frysinger2011-07-231-1/+1
| | | | | | | Passing a non-simple expression in as the addr arg could incorrectly apply the pointer cast resulting in misbehavior. Add proper paren. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: exec: remove redundant set_fs(USER_DS)Mathias Krause2011-07-231-1/+0
| | | | | | | | The address limit is already set in flush_old_exec() so this set_fs(USER_DS) is redundant. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: debug-mmrs: disable PERIPHERAL_MAP for IMDMA channelsMike Frysinger2011-07-231-1/+2
| | | | | | | | The documentation for the IMDMA channels appears to be incorrect. These DMA blocks don't actually have PERIPHERAL_MAP MMRs for us to access. Attempts to do so lead to system mmr hardware errors. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: debug-mmrs: fix typo in single dmac setupMike Frysinger2011-07-231-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: optimize double fault boot checkingMike Frysinger2011-07-232-7/+19
| | | | | | | | This moves the double fault data used at boot time into a single struct which can then easily be addressed with indexed loads rather than having to explicitly load multiple addresses. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: time: replace magic numbers with definesMike Frysinger2011-07-231-2/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: debug-mmrs: include RSI_PID[4567] MMRsMike Frysinger2011-05-281-0/+4
| | | | | | | | The documentation is a little iffy as to whether these are actual MMRs, but reading them on the hardware works, and the previous version of this logic (the SDH) had PID[4567]. So add it for RSI too. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: debug-mmrs: fix typos with gptimers/mdma/ppiMike Frysinger2011-05-281-18/+14
| | | | | | | | | | | | | | | | This code was mostly developed against a BF54x, so some BF537-specific issues were missed. The PPI block starts at PPI_CONTROL, not PPI_STATUS (which is the reverse of the EPPI block). The MDMA block starts at MDMA_NEXT_DESC_PTR, not MDMA_CONFIG. Seems the sim does not catch misreads here so that'll need to get fixed. The gptimer block is mostly 32bit regs, not 16bit. Use the gptimer struct to figure that out rather than hardcoding it locally. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: use new common PERCPU_INPUT defineMike Frysinger2011-05-251-7/+1
| | | | | | | The Blackfin percpu input sections are outdated, so rather than update them, drop them completely and use the new common define. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: work around anomaly 05000480Steven Miao2011-05-251-0/+5
| | | | | | | | | | | | | Anomaly 05000480 on BF537 rev 0.0, 0.1, 0.2: Multiple Simultaneous Urgent DMA Requests May Cause DMA System Instability Suggested Workaround: Program the DMA Traffic Control Period to a non-zero value. This forces the DMA block to group accesses together rather than allow arbitration for each piece of data placed on the internal DMA bus. Signed-off-by: Steven Miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: switch /proc/gpio to seq_fileAlexey Dobriyan2011-05-251-11/+20
| | | | | | | ->read_proc interface is going away, switch to seq_file. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: convert old cpumask API to new oneKOSAKI Motohiro2011-05-252-6/+6
| | | | | | | old cpu_xxx() APIs is planned to removed later. then, converted. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: don't touch task->cpus_allowed directlyKOSAKI Motohiro2011-05-251-4/+2
| | | | | | | | Every callter (except kthread_bind) should use proper set_cpus_allowed_ptr() APIs. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: initial perf_event supportMike Frysinger2011-05-252-0/+499
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: use on-chip reset func with newer partsMike Frysinger2011-05-251-34/+31
| | | | | | | | Turns out the documentation is wrong and doing "RAISE 1" does not result in a software reset, only a core reset. So when the on-chip rom has a functioning reset helper, use it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: optimize MMR reads during startup a bitMike Frysinger2011-05-251-11/+9
| | | | | | | | Since the value of these MMRs aren't changing, store the value in a local variable and work off of that. This avoids multiple MMR reads which are implicitly forced by the volatile markings. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bf537: demux port H mask A and emac rx intsMike Frysinger2011-05-251-1/+1
| | | | | | | | | | | The BF537 SIC combines the gpio port H mask A interrupts with the emac rx interrupt, so we need to demux this in software. It also combines the gpio port H mask B and the emac tx interrupts, and the watchdog and port F mask B interrupts, but since we don't support mask B yet, just add the defines for now. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: move internal irq prototypes out of global namespaceMike Frysinger2011-05-255-0/+5
| | | | | | | | These are only used in a few internal Blackfin places, so move the irq prototypes out of the global header and into the internal irq one. No functional changes other than shuffling locales. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: bf51x/bf52x: fix typo in hysteresis MMR namesMike Frysinger2011-05-251-4/+4
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: SMP: drop unused blackfin_cpudata.idle pointerMike Frysinger2011-05-251-1/+0
| | | | | | | Not sure when we stopped using this field, but nothing in the tree uses this now, so punt it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: SMP: fix cpudata cache setupMike Frysinger2011-05-251-2/+2
| | | | | | | | | | After some cache setup reordering changesets, the blackfin_cpudata init was left behind. While cpu0's data was correct, cpu1's data was not. Not that big of a deal as these are only used in the cpuinfo output, but should still be fixed. So move the setup of these fields to the common cache setup function to avoid this happening again in the future. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: clean up /proc/cpuinfo outputMike Frysinger2011-05-251-8/+8
| | | | | | | | | The smp flush lines are too long and have too many newlines, so scale them back to match the other lines. The %p modifier shows "(null)" for 0, so use %08x instead. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: first pass at debug mmr supportMike Frysinger2011-05-252-0/+1862
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Merge branch 'for-2.6.40' of ↵Linus Torvalds2011-05-241-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu * 'for-2.6.40' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: Unify input section names percpu: Avoid extra NOP in percpu_cmpxchg16b_double percpu: Cast away printk format warning percpu: Always align percpu output section to PAGE_SIZE Fix up fairly trivial conflict in arch/x86/include/asm/percpu.h as per Tejun
| * percpu: Always align percpu output section to PAGE_SIZETejun Heo2011-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Percpu allocator honors alignment request upto PAGE_SIZE and both the percpu addresses in the percpu address space and the translated kernel addresses should be aligned accordingly. The calculation of the former depends on the alignment of percpu output section in the kernel image. The linker script macros PERCPU_VADDR() and PERCPU() are used to define this output section and the latter takes @align parameter. Several architectures are using @align smaller than PAGE_SIZE breaking percpu memory alignment. This patch removes @align parameter from PERCPU(), renames it to PERCPU_SECTION() and makes it always align to PAGE_SIZE. While at it, add PCPU_SETUP_BUG_ON() checks such that alignment problems are reliably detected and remove percpu alignment comment recently added in workqueue.c as the condition would trigger BUG way before reaching there. For um, this patch raises the alignment of percpu area. As the area is in .init, there shouldn't be any noticeable difference. This problem was discovered by David Howells while debugging boot failure on mn10300. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Mike Frysinger <vapier@gentoo.org> Cc: uclinux-dist-devel@blackfin.uclinux.org Cc: David Howells <dhowells@redhat.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: user-mode-linux-devel@lists.sourceforge.net
* | Merge branch 'timers-clocksource-for-linus' of ↵Linus Torvalds2011-05-191-33/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip * 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: clocksource: convert mips to generic i8253 clocksource clocksource: convert x86 to generic i8253 clocksource clocksource: convert footbridge to generic i8253 clocksource clocksource: add common i8253 PIT clocksource blackfin: convert to clocksource_register_hz mips: convert to clocksource_register_hz/khz sparc: convert to clocksource_register_hz/khz alpha: convert to clocksource_register_hz microblaze: convert to clocksource_register_hz/khz ia64: convert to clocksource_register_hz/khz x86: Convert remaining x86 clocksources to clocksource_register_hz/khz Make clocksource name const
| * \ Merge branch 'consolidate-clksrc-i8253' of ↵Thomas Gleixner2011-05-1412-105/+137
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:~rmk/linux-2.6-arm into timers/clocksource Conflicts: arch/ia64/kernel/cyclone.c arch/mips/kernel/i8253.c arch/x86/kernel/i8253.c Reason: Resolve conflicts so further cleanups do not conflict further Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
| * | | blackfin: convert to clocksource_register_hzJohn Stultz2011-02-211-33/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This converts the blackfin clocksource to use clocksource_register_hz. CC: Mike Frysinger <vapier@gentoo.org> CC: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: John Stultz <johnstul@us.ibm.com>
* | | | PM / Blackfin: Use struct syscore_ops instead of sysdevs for PMRafael J. Wysocki2011-04-241-21/+9
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert some Blackfin architecture's code to using struct syscore_ops objects for power management instead of sysdev classes and sysdevs. This simplifies the code and reduces the kernel's memory footprint. It also is necessary for removing sysdevs from the kernel entirely in the future. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* | | Blackfin: time-ts: ack gptimer sooner to avoid missing short intsMike Frysinger2011-04-131-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | If the period of a gptimer is fairly low, we might miss an interrupt by acking it too late (we end up acking the new int as well). Reported-by: Isabelle Leonardi <i.leonardi@detracom.fr> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | Blackfin: gptimers: fix thinko when disabling timersMike Frysinger2011-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We only want to clear the run bit for this one timer, not all status bits. So don't read the whole reg and then write all the bits back out. Reported-by: Isabelle Leonardi <i.leonardi@detracom.fr> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | Fix common misspellingsLucas De Marchi2011-03-312-2/+2
| | | | | | | | | | | | | | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* | | Merge branch 'for-linus' of ↵Linus Torvalds2011-03-301-27/+18
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: Blackfin: bitops: fix include order after little endian inclusion Blackfin: defconfigs: update after misc devices defaulted to N Blackfin: use more standard pr_fmt in the module loader
| * | | Blackfin: use more standard pr_fmt in the module loaderJoe Perches2011-03-251-27/+18
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | Changed pr_fmt(fmt) to make the format arguments match the format. Changed an argument name in apply_relocate from me to mod so that the pr_err is consistent with the other uses. Added missing '\n' to a format. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | | bfin: Use proper accessors in traceThomas Gleixner2011-03-291-3/+4
| | | | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* | | bfin: Convert irq namespaceThomas Gleixner2011-03-291-1/+1
|/ / | | | | | | | | | | | | | | Convert to the new function names. Scripted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: uclinux-dist-devel@blackfin.uclinux.org
* | Blackfin/ipipe: upgrade to I-pipe mainlinePhilippe Gerum2011-03-181-45/+39
| | | | | | | | | | | | | | | | | | | | | | | | This patch introduces Blackfin-specific bits to support the current tip of the interrupt pipeline development, mainly: - 2/3-level interrupt maps (sparse IRQs) - generic virq handling - sysinfo v2 format for ipipe_get_sysinfo() Signed-off-by: Philippe Gerum <rpm@xenomai.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Blackfin: use accessor functions in show_interrupts()Thomas Gleixner2011-03-181-4/+6
| | | | | | | | | | Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Blackfin: SMP: work around anomaly 05000491Sonic Zhang2011-03-182-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to safely work around anomaly 05000491, we have to execute IFLUSH from L1 instruction sram. The trouble with multi-core systems is that all L1 sram is visible only to the active core. So we can't just place the functions into L1 and call it directly. We need to setup a jump table and place the entry point in external memory. This will call the right func based on the active core. In the process, convert from the manual relocation of a small bit of code into Core B's L1 to the more general framework we already have in place for loading arbitrary pieces of code into L1. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Blackfin: SMP: PERCPU section should be PAGE alignedsteven miao2011-03-181-1/+1
| | | | | | | | | | | | | | | | Common code checks the alignment of some of the variables and calls BUG() if they aren't page aligned. Signed-off-by: steven miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Blackfin: kgdb: drop dead KGDB_THR_PROC_SWAP for SMP systemsSonic Zhang2011-03-181-4/+0
| | | | | | | | | | | | | | Common code no longer defines this, so stop using it. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Blackfin: bf54x: add kconfig for UART2/3 DMA channel assignmentssteven miao2011-03-181-13/+19
| | | | | | | | | | | | | | | | | | | | The BF54x lacks dedicated DMA channels for the UART peripherals and need to be muxed between others. So add a kconfig option so people can select which channels the UARTs will use so they can pick between SPORTs and the less commonly used EPPI/PIXC peripherals. Signed-off-by: steven miao <realmz6@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Merge branch 'for-2.6.39' of ↵Linus Torvalds2011-03-161-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu * 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu, x86: Add arch-specific this_cpu_cmpxchg_double() support percpu: Generic support for this_cpu_cmpxchg_double() alpha: use L1_CACHE_BYTES for cacheline size in the linker script percpu: align percpu readmostly subsection to cacheline Fix up trivial conflict in arch/x86/kernel/vmlinux.lds.S due to the percpu alignment having changed ("x86: Reduce back the alignment of the per-CPU data section")
| * | percpu: align percpu readmostly subsection to cachelineTejun Heo2011-01-251-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently percpu readmostly subsection may share cachelines with other percpu subsections which may result in unnecessary cacheline bounce and performance degradation. This patch adds @cacheline parameter to PERCPU() and PERCPU_VADDR() linker macros, makes each arch linker scripts specify its cacheline size and use it to align percpu subsections. This is based on Shaohua's x86 only patch. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Shaohua Li <shaohua.li@intel.com>
* | blackfin: Switch from do_timer() to xtime_update()Torben Hohn2011-01-311-4/+2
|/ | | | | | | | | | | | | xtime_update() takes the xtime_lock itself. Signed-off-by: Torben Hohn <torbenh@gmx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: johnstul@us.ibm.com Cc: hch@infradead.org Cc: yong.zhang0@gmail.com LKML-Reference: <20110127145931.23248.33917.stgit@localhost> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* Blackfin: kgdb_test: make sure to initialize num2Vivi Li2011-01-101-0/+4
| | | | | | | We check its value at runtime, so we want to avoid garbage across runs. Signed-off-by: Vivi Li <vivi.li@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
OpenPOWER on IntegriCloud