summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/cpu
Commit message (Collapse)AuthorAgeFilesLines
* Blackfin: uart: implement loop callback for postMike Frysinger2011-09-291-0/+40
| | | | | | This allows the Blackfin UART driver to be tested via post. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Merge branch 'master' of git://git.denx.de/u-boot-blackfinWolfgang Denk2011-08-0213-140/+367
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://git.denx.de/u-boot-blackfin: Blackfin: jtag-console: fix timer usage Blackfin: switch to common display_options() Blackfin: serial: move early debug strings into .rodata section Blackfin: adi boards: also set stderr to nc with helper Blackfin: update anomaly lists to latest public info Blackfin: serial: convert to bfin_{read,write} helpers Blackfin: split out async setup Blackfin: adi boards: enable pretty flash progress output Blackfin: drop unused dma.h header from start code Blackfin: portmux: allow header to be included in assembly files Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: enable mmc_spi support Blackfin: cm-bf537e/cm-bf537u/tcm-bf537: update network settings Blackfin: sync MMR read/write helpers with Linux Blackfin: gpio: optimize free path a little Blackfin: post: setup default CONFIG_SYS_POST_WORD_ADDR Blackfin: uart: fix printf warning Blackfin: add init.elf helper code Blackfin: dont reset SWRST on newer bf526 parts Blackfin: adi boards: enable multi serial support by default Blackfin: uart: add multiple serial support Blackfin: uart: move debug buffers into local bss
| * Blackfin: jtag-console: fix timer usageMike Frysinger2011-07-121-2/+2
| | | | | | | | | | Reported-by: Graeme Russ <graeme.russ@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: serial: move early debug strings into .rodata sectionMike Frysinger2011-07-121-5/+5
| | | | | | | | | | | | | | | | | | | | Rewrite the assembly serial_early_puts() helper to place the strings in the .rodata section rather than embedding them directly in the .text section. Using .text is a little simpler, but it doesn't let people execute out of internal L1 sram (since core reads don't work on those regions). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: serial: convert to bfin_{read,write} helpersMike Frysinger2011-07-123-17/+19
| | | | | | | | | | | | | | | | Since the serial struct declares the sizes for us, no need to hardcode them in the accessor functions. Let the bfin_{read,write} helpers do it for us. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: split out async setupMike Frysinger2011-07-123-50/+84
| | | | | | | | | | | | | | | | | | | | | | We really only need to tweak the async banks in the initcode if the processor is booting out of it, otherwise we can wait until later on in the CPU booting setup. This also makes testing in the sim and early bring up over JTAG work much smoother when the initcode gets bypassed. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: drop unused dma.h header from start codeMike Frysinger2011-07-121-1/+0
| | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: gpio: optimize free path a littleMike Frysinger2011-07-121-0/+2
| | | | | | | | | | | | | | | | | | When we aren't doing resource tracking, the gpio_free() function is a stub that simply returns, so pull this logic up a level and make it an inline stub in the header. Now we don't have to waste time at any of the call sites. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: uart: fix printf warningMike Frysinger2011-07-121-1/+1
| | | | | | | | | | | | | | The code uses %i to printf a size_t when it should use %zu, otherwise we get a warning from gcc about it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: add init.elf helper codeMike Frysinger2011-07-124-1/+43
| | | | | | | | | | | | | | | | | | This creates a standalone ELF that executes just the Blackfin initcode. This is useful for people who want to program the low level aspects of the CPU (memory/clocks/etc...) and can easily be used with JTAG for quick booting while developing. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: dont reset SWRST on newer bf526 partsMike Frysinger2011-07-121-1/+3
| | | | | | | | | | | | | | The bug in the BF526 rom when doing a software reset exists only in older silicon versions, so don't clear SWRST on newer parts. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: uart: add multiple serial supportMike Frysinger2011-07-123-55/+206
| | | | | | | | | | | | | | This brings CONFIG_SERIAL_MULTI support to the Blackfin on-chip UARTs. Ends up adding only ~512bytes per additional UART. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
| * Blackfin: uart: move debug buffers into local bssMike Frysinger2011-07-121-8/+3
| | | | | | | | | | | | | | There's no need for these saved buffers to be global symbols, or in the data section. So mark them static to move them into the bss. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | Timer: Remove reset_timer() for non-Nios2 archesGraeme Russ2011-07-261-5/+0
|/
* Blackfin: use on-chip reset func with newer partsMike Frysinger2011-06-031-36/+34
| | | | | | | | 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: use common LDSCRIPT logicMike Frysinger2011-06-031-0/+158
| | | | | | | | Now that common code is a bit smarter when it comes to default LDSCRIPT values, rename the default Blackfin file and drop the Blackfin-specific config.mk logic. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* gpio: generalize for all generic gpio providersMike Frysinger2011-04-132-119/+0
| | | | | | | | | | | | The Blackfin gpio command isn't terribly Blackfin-specific. So generalize the few pieces into two new optional helpers: name_to_gpio() - turn a string name into a GPIO # gpio_status() - display current pin bindings (think /proc/gpio) Once these pieces are pulled out, we can relocate the cmd_gpio.c into the common directory. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: replace "bfin_reset_or_hang()" with "panic()"Kyle Moffett2011-04-083-19/+2
| | | | | | | | | | | The bfin_reset_or_hang function unnecessarily duplicates the panic() logic based on CONFIG_PANIC_HANG. This patch deletes 20 lines of code and just calls panic() instead. This also makes the following generic-restart conversion patch simpler. Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: turn off caches when self initializingMike Frysinger2011-04-081-12/+33
| | | | | | | | | | | | | | When bootstrapping ourselves on the fly at runtime (via "go"), we need to turn off the caches to avoid taking software exceptions. Since caches need CPLBs and CPLBs need exception handlers, but we're about to rewrite the code in memory where those exception handlers live, we need to turn off caches first. This new code also encourages a slight code optimization by storing the MMR bases in dedicated registers so we don't have to fully load up the pointer regs multiple times. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: BF50x: new processor portMike Frysinger2011-04-083-17/+37
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: serial: clean up muxing a bitMike Frysinger2011-04-081-31/+20
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Move DECLARE_GLOBAL_DATA_PTR to file scopeJohn Rigby2010-12-211-1/+2
| | | | | | | | | | | | | | | It can be optimised out by the compiler otherwise resulting in obscure errors like a board not booting. This has been documented in README since 2006 when these were first fixed up for GCC 4.x. Signed-off-by: John Rigby <john.rigby@linaro.org> Fix some additional places. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-By: Albert ARIBAUD <albert.aribaud@free.fr>
* Blackfin: drop initcode.o from combined objectMike Frysinger2010-11-191-4/+0
| | | | | | | | | We explicitly link in the initcode.o in the Blackfin linker script, so there is no need to merge it into the main common object for the linker to pull in itself. This also fixes duplicate symbol errors with the new partial linking logic. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Switch from archive libraries to partial linkingSebastien Carlier2010-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
* Blackfin: workaround anomaly 05000440Mike Frysinger2010-10-141-1/+5
| | | | | | | We cannot rely on the syscontrol rom func to program PLL_DIV with anomaly 05000440 is in effect, so manually program the MMR when necessary. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: cmd_gpio: accept upper case pin namesMike Frysinger2010-10-021-2/+3
| | | | | | | The intention all along was to accept pin names irrelevant of their case. But I guess I forgot to test/implement support for that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: cmd_gpio: return gpio value to callerMike Frysinger2010-10-021-1/+1
| | | | | | | Make the GPIO command usable in a scripting environment by returning the GPIO value rather than always 0. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: cmd_gpio: document/extend input sub-optionMike Frysinger2010-10-021-14/+13
| | | | | | | | The input sub command was missing from the help text, and it didn't show the actual value currently read on the GPIO. This allows people to read the value of input pins. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: gpio: use common usage funcMike Frysinger2010-07-291-4/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: jtag-console: handle newline stuffingMike Frysinger2010-07-251-9/+32
| | | | | | | | | | Serial devices currently have to manually stuff \r after every \n found, but this is a bit more difficult with the jtag console since we process everything in chunks of 4 bit. So we have to scan & stuff the whole string rather than what most serial drivers do which is output on a byte per byte basis. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: jtag-console: add debug markersMike Frysinger2010-07-251-1/+27
| | | | | | | | | | While we're in here, add some useful debug points. We need custom debug statements because we need the output to only go to the serial port. If we used the standard debug helpers, the output would also go to the stdout (which would be the jtag console) and make it hard to figure out what is going where exactly. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: jtag-console: robustify against missing peerMike Frysinger2010-07-251-8/+32
| | | | | | | | | If the other side isn't listening, we should reset the state to ignore the whole message and not just the part we missed. This makes it easier to connect at any time to the jtag console without worrying about the two sides getting out of sync and thus sending garbage back and forth. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: serial: convert to portmux frameworkMike Frysinger2010-07-131-0/+19
| | | | | | | | Use the new portmux framework to handle the details when possible. Unfortunately, we cannot yet use this in the standalone initialization logic, so we need to keep around the old portmux writes for now. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: unify custom gpio commandsMike Frysinger2010-07-052-0/+121
| | | | | | | Now that we have a unified gpio layer, the misc partial gpio commands can be unified and made complete (support all possible gpios). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: import gpio/portmux layer from LinuxMike Frysinger2010-07-052-0/+855
| | | | | | | | | The current pinmux handling has spread throughout Blackfin drivers and board code and is getting hideous to maintain. So import the gpio and portmux layer from the Blackfin Linux code. This should spur a serious of cleanups across the Blackfin tree. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: set up simple NMI handlers for anomaly 05000219Mike Frysinger2010-07-054-1/+34
| | | | | | | Older on-chip Blackfin bootroms do not create a dummy NMI handler, so set up one ourselves when anomaly 05000219 applies. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: expand EVT1 usage documentation a bit moreMike Frysinger2010-07-051-1/+6
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: implement bootcount supportMike Frysinger2010-07-052-0/+35
| | | | | | | | The default storage location for bootcount is EVT0. This version uses one 32bit value and combines the magic/count value in the upper/lower 16bits. If there is demand for more, should be easy to do. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Blackfin: clean up trace buffer handling when crashingMike Frysinger2010-07-052-28/+49
| | | | | | | | | | Avoid banging on the trace MMRs when debugging is disabled, avoid calling the funcs multiple times in a row, disable the trace buffer earlier in the exception handler to avoid eating more user entries, and dump the buffer before calling the kgdb hook. This way we maximize useful debugging info up front rather than needing external tools (like gdb/serial/etc...). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* blackfin: Move cpu/blackfin/* to arch/blackfin/cpu/*Peter Tyser2010-04-1318-0/+2757
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
OpenPOWER on IntegriCloud