Commit Graph

74 Commits (337d390b3a9c1ce92a12bdb77b9ae6ded6273b12)

Author SHA1 Message Date
Robin Getz 337d390b3a Blackfin arch: Print out debug info, as early as possible
Print out debug info, as early as possible - even before the
kernel initializes the interrupt vectors. Now we can print out debug
messages almost anytime during the boot process.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-09 17:31:46 +08:00
Robin Getz ce3afa1c04 Blackfin arch: Enable earlyprintk earlier - so any error after our interrupt tables are set up will print out
Also ensure that the traps_c code doesn't cause a double fault, by
sending a signal to a faulting kernel before the memory subsystem
is fully initialized, by printing out the error message before sending
the signal.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-09 17:28:36 +08:00
Robin Getz 2ebcade590 Blackfin arch: fix endless loop bug when a double fault happens
Today when a double fault happens (exception during an exception
handling event), we go into an endless loop, with nothing comming out
the UART. With this patch, we actually see that we have commited a
double fault event

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-09 17:24:30 +08:00
Robin Getz 0ae53640b5 Blackfin arch: Initial patch to add earlyprintk support
This allows debugging of problems which happen eary in the kernel
boot process (after bootargs are parsed, but before serial subsystem
is fully initialized)

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-09 17:24:49 +08:00
Bryan Wu b7b2d344e7 Blackfin arch: modify the insX/outsX and dma_insX/dma_outsX to be compatible with other archs
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-09 15:09:49 +08:00
Mike Frysinger c11b5776bf Blackfin arch: add more common defines for output sections
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-11 00:12:41 +08:00
Bryan Wu fb282a72f1 Blackfin arch: cleanup IO and DMA_IO API function definitions according to other arches
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-09-12 17:48:25 +08:00
Mike Frysinger b5c0e2e806 Blackfin arch: fix typo pointed out by David Rowe (Mhz -> MHz)
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-09-12 17:31:59 +08:00
Michael Hennerich 2714d9a6d1 Blackfin arch: Workaround reboot bug, issue SSYNC at the start of bfin_reset
reboot failes on BF533
http://blackfin.uclinux.org/gf/project/uclinux-dist/tracker/?action=TrackerItemEdit&tracker_item_id=3500

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-11 00:29:49 +08:00
Michael Hennerich 2acde90230 Blackfin arch: a few things still use bfin_read_PORT_FER()
- Update gpio_request to allow multiple request with the same signature (label)
 - Use generic GPIO API where applicable
 - Update generic board support form stamp board

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-11 00:24:40 +08:00
Robin Getz 02f13f9d5c Blackfin arch: Remove cruft - CONFIG_DEBUG_SERIAL_EARLY_INIT didn't work that well with DEBUG_KERNEL_START
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-27 17:38:40 +08:00
Michael Hennerich d2b11a468a Blackfin arch: Merge GPIO/Peripheral Resource Allocation back into a single file
Signed-off-by: Michael Hennerich <michale.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-28 16:47:46 +08:00
Michael Hennerich 4d5f4ed3fb Blackfin arch: extract gpio number from PIN function
Singed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-27 16:46:17 +08:00
Mike Frysinger 168f1212c0 Blackfin arch: rewrite our reboot code in C
rewrite our reboot code in C rather than assembly to be like
other architectures and to allow board maintainers to define
custom behavior

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-11 00:22:35 +08:00
Mike Frysinger 27d875f2c1 Blackfin arch: vmlinux.lds.S, break up our .init into separate sections
Break up our .init into separate section like all other ports do and
so that we dont mix text and data (causes disassembly headaches as
pointed out by Robin)

Cc: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-27 16:08:53 +08:00
Mike Frysinger fbeb7370b6 Blackfin arch: parse input sections properly when using -ffunction-sections/-fdata-sections
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-27 15:02:20 +08:00
Mike Frysinger 1ffe6646ba Blackfin arch: add an exception request/free api
add an exception request/free api similar to the interrupt request/fre
api so people can utilize the free software based exceptions for their
own purposes

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-05 17:14:04 +08:00
Mike Frysinger f0b5d12f2b Blackfin arch: allow people to select the feature that is unavailable to the kernel
- allow people to select the feature that is unavailable to the kernel: NMI, JTAG, or CYCLES.
 - change default NMI handler to simply dump hardware trace buffer.
 - remove default NMI handler completely as calling into kernel code is not safe
   move example handler to wiki so people dont haphazardly copy and paste this stuff thinking its safe

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-05 17:03:59 +08:00
Jie Zhang 2615639758 Blackfin arch: Allow ptrace access the fixed code.
Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-05 16:25:23 +08:00
Sonic Zhang 8a26ac7043 Blackfin arch: Add DMA API to set curr descriptor address
This API is necessary for DMA descriptor array mode.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-05 16:14:58 +08:00
Mike Frysinger b4055d733d Blackfin arch: remove spurious KERN_EMERG log level in output
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-05 14:00:11 +08:00
Robin Getz 3bebca2d20 Blackfin arch: to do some consolidation of common code and common name spaces
now all BLKFIN should be BFIN, should be no functional changes.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-10 23:55:26 +08:00
Michael Hennerich a924db7c00 Blackfin arch: Add option to priorize DMA over Core
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-03 17:43:29 +08:00
Roy Huang 1d945e2b3e Blackfin arch: add set_dma_curr_addr DMA API to support sound driver recording function
Signed-off-by: Roy Huang <roy.huang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-10 23:31:19 +08:00
Robin Getz 518039bc24 Blackfin arch: Add ability to expend the hardware trace buffer
Add ability to expend the hardware trace buffer via a configurable
software buffer - so you can have lots of history when a crash occurs.

The interesting way we do printk in the traps.c confusese the checking
script

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-25 11:03:28 +08:00
Michael Hennerich 8c61362377 Blackfin arch: Some cosmetics based on LKML feedback from Joe Perches
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-08-03 17:48:09 +08:00
Michael Hennerich 314c98d589 Blackfin arch: add missing gpio error handling to make sure we roll back requests in case one fails
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-24 18:03:45 +08:00
Mike Frysinger 1aafd90912 Blackfin arch: revise anomaly handling by basing things on the compiler not the kconfig defines
revise anomaly handling by basing things on the compiler not the kconfig defines,
so the header is stable and usable outside of the kernel. This also allows us to
move some code from preprocessing to compiling (gcc culls dead code)
which should help with code quality (readability, catch minor bugs, etc...).

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-25 11:19:14 +08:00
Michael Hennerich cda6a20b68 Blackfin arch: fix PORT_J BUG for BF537/6 EMAC driver reported by Kalle Pokki <kalle.pokki@iki.fi>
Cc: Kalle Pokki <kalle.pokki@iki.fi>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-04 00:36:18 +08:00
Michael Hennerich c58c2140f0 Blackfin arch: gpio pinmux and resource allocation API required by BF537 on chip ethernet mac driver
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-10-04 00:35:05 +08:00
Bryan Wu d31c5ab147 Blackfin arch: after removing fs.h from mm.h, fix the broken on Blackfin arch
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-11 15:47:39 -07:00
Bernd Schmidt 8be80ed3f7 Blackfin arch: Initialize the exception vectors early in the boot process
Initialize the exception vectors early in the boot process, so that CPLB faults
can be handled when memory protection is enabled.

Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-25 14:44:49 +08:00
Bryan Wu d6e274ddb5 Blackfin arch: fix a compiling warning about dma-mapping
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-24 15:38:16 +08:00
Bernd Schmidt 0fa63ad7d1 Blackfin arch: fix bug which unaligns the init thread's stack and causes the current macro to fail.
switch to using proper defines this time (THREAD_SIZE and PAGE_SIZE)
instead of just PAGE_SIZE everywhere

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-25 10:19:59 +08:00
Sonic Zhang 64c5cb8608 Blackfin arch: fix KGDB bug, dont forget last parameter.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-25 10:46:45 +08:00
Mike Frysinger e5b6bd61f2 Blackfin arch: use bfin_read_SWRST() now that BF561 provides it
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-24 16:59:37 +08:00
Mike Frysinger 520473b077 Blackfin arch: use PAGE_SIZE when doing aligns rather than hardcoded values
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-12 12:20:20 +08:00
Sonic Zhang b07af760c9 Blackfin arch: fix bug set dma_address properly in dma_map_sg
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-12 12:18:08 +08:00
Mike Frysinger 9401e618c8 Blackfin arch: scrub dead code
we converted to using a system call for userspace spinlocks
rather than a dedicated exception long ago

Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-12 11:50:43 +08:00
Michael Hennerich 34e0fc89bd Blackfin arch: Enable BF54x PIN/GPIO interrupts
Signed-off-bu: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-12 16:17:18 +08:00
Mike Frysinger 1f83b8f148 Blackfin arch: cleanup warnings from checkpatch -- no functional changes
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-12 22:58:21 +08:00
Robin Getz 669b792c77 Blackfin arch: Clean up trace buffer handling, No major functional changes.
Turns on trace earlier, so crashes at kernel start should print out a
trace, making things easier to debug.

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-21 16:34:08 +08:00
Bernd Schmidt 29440a2b4c Blackfin arch: Start untangling the CPLB handling code.
- Move cache initialization to C from assembly.
 - Move anomaly workaround for writing [ID]MEM_CONTROL to assembly, so
   that we don't have to mess around with .align directives in C source.
 - Fix a bug where bfin_write_DMEM_CONTROL would write to IMEM_CONTROL
 - Break out CPLB related code from kernel/setup.c into their own file.
 - Don't define variables in header files, only declare them.

Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-12 16:25:29 +08:00
Sonic Zhang 474f1a667d Blackfin arch: kgdb specific code
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-29 16:35:17 +08:00
Bernd Schmidt 7adfb58fbd Blackfin arch: defines and provides entry points for certain user space functions at fixed addresses
This patch defines (and provides) entry points for certain user space functions
at fixed addresses.  The Blackfin has no usable atomic instructions, but we can
ensure that these code sequences appear atomic from a user space point of view
by detecting when we're in the process of executing them during the interrupt
handler return path.  This allows much more efficient pthread lock
implementations than the bfin_spinlock syscall we're currently using.

Also provided is a small sys_rt_sigreturn stub which can be used by the signal
handler setup code.  The signal.c part will be committed separately.

Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-21 11:34:16 +08:00
Roy Huang 24a07a1241 Blackfin arch: initial supporting for BF548-EZKIT
The ADSP-BF54x was specifically designed to meet the needs of convergent multimedia
applications where system performance and cost are essential ingredients. The
integration of multimedia, human interface, and connectivity peripherals combined
with increased system bandwidth and on-chip memory provides customers a platform to
design the most demanding applications.

Since now, ADSP-BF54x will be supported in the Linux kernel and bunch of related drivers
such as USB OTG, ATAPI, NAND flash controller, LCD framebuffer, sound, touch screen will
be submitted later.

Please enjoy the show.

Signed-off-by: Roy Huang <roy.huang@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-07-12 22:41:45 +08:00
Robin Getz da1f95b4c4 Blackfin arch: Fix up remaining printks with proper log levels
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-25 18:05:53 +08:00
Jie Zhang de3025f4e2 Blackfin arch: Add proper -mcpu option according to the cpu and silicon revision configuration
Add silicon revision "any" and "none". Add proper -mcpu option according
to the cpu and silicon revision configuration.

Need update to use latest Blackfin cross compile toolchain.

Signed-off-by: Jie Zhang <jie.zhang@analog.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-25 18:04:12 +08:00
Robin Getz 86b73c8cfc Blackfin arch: match kernel startup messaage with new linker script
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-21 11:34:16 +08:00
Robin Getz c5d88d9e25 Blackfin arch: update printk to use KERN_EMERG and reformat crash output
to look like:

return address: [0x0357fcc4]; contents of:
0x0357fca0:  fcbc  0357  fe20  0357  0009  0000  6a8c  0345
0x0357fcb0:  000e  0000  fcc4  0357  fd44  0357  e128  00ad
0x0357fcc0:  00a0  0000 [000e] 0000  0000  0000  0080  0000
0x0357fcd0:  0000  0000  0000  0000  00a0  0000  000e  0000

instruction in [] is the offending instruction

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
2007-06-21 11:34:16 +08:00