summaryrefslogtreecommitdiffstats
path: root/arch/sparc/cpu/leon2
Commit message (Collapse)AuthorAgeFilesLines
* sparc: Remove non-generic board init files: board.c, time.cFrancois Retief2015-12-032-58/+1
| | | | | | | Remove the board.c and time.c files and all associated non-generic board initialization code. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
* sparc: Add CONFIG_DISPLAY_BOARDINFO variable to all LEON boardsFrancois Retief2015-12-031-0/+10
| | | | Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
* sparc: Update PROM initialization code for generic boardFrancois Retief2015-12-032-14/+16
| | | | | | | | | | Fixed the prom_relocate() function in start.S file by reserving memory in the board_init_f sequence and saving the offset to the __prom_start_reloc variable. This value is used as the destination when relocating the PROM. Add the prom_init() function to the end of the board_init_r sequence. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
* sparc: Update cpu_init.c to use generic timer infrastructureFrancois Retief2015-12-031-13/+24
| | | | | | | | | | | Introduce the CONFIG_SYS_TIMER_* macros in include/asm/config.h to make use of the generic timer infrastructure in lib/time.c. Created a timer_init() function to initialize the timer hardware and update the #ifdef in board_init_f to allow this function to be called during the start-up sequence. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
* sparc: leon2: Updates for generic board initializationFrancois Retief2015-12-032-75/+107
| | | | | | | | | | Reworked the LEON2 start.S code to call board_init_f function at startup. Also implemented the relocate_code function in assembly to relocate the monitor and setup the stack pointer before calling relocated board_init_r. Add the CONFIG_SYS_GENERIC_BOARD variable to all the LEON2 boards. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
* sparc: Initial ground work for generic board initializationFrancois Retief2015-12-032-12/+13
| | | | | | | Initial ground work in preperation for generic board initialization code for the SPARC architecture. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
* sparc: Fix whitespace in cpu/leon2/cpu_init.cFrancois Retief2015-12-031-5/+5
| | | | Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
* sparc: Serial baud rate register support multiple buses with different frequencyDaniel Hellstrom2015-12-031-1/+1
| | | | Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
* sparc: Remove version_string variable from start.S fileFrancois Retief2015-12-031-11/+3
| | | | | | | Remove the version_string variable from start.S file. A weak variable is also set in the cmd_version.c file. No need for architecture override. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
* sparc: Update startup code to take PIC mode into accountFrancois Retief2015-11-131-19/+41
| | | | Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
* sparc: Update LEON serial drivers to use readl/writel macrosFrancois Retief2015-11-131-66/+59
| | | | | | | | | | | | | | Update the LEON2/3 serial driver to make use of the readl and writel macros as well as the WATCHDOG_RESET() macro. Add readl/writel and friends to the asm/io.h file. Introduce the gd->arch.uart variable to store register address. Lastly, remove baudrate scaler macro variables from board config. It is now calculated in the serial driver using the global data variable. Signed-off-by: Francois Retief <fgretief@spaceteq.co.za>
* sparc: merge arch/sparc/cpu/*/config.mk to arch/sparc/config.mkMasahiro Yamada2014-11-041-8/+0
| | | | | | | | Remove arch/sparc/cpu/{leon2,leon3}/config.mk and move duplicated defines of -fPIC to arch/sparc/config.mk. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Daniel Hellstrom <daniel@gaisler.com>
* sparc: move CONFIG_{LEON, LEON2, LEON3} to KconfigMasahiro Yamada2014-11-041-2/+0
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Daniel Hellstrom <daniel@gaisler.com>
* leon: implement missing get_tbclk()Daniel Hellstrom2014-05-081-0/+5
| | | | | | | Without this patch SPARC/LEON does not build. Reported-by: Tom Rini <trini@ti.com> Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
* leon: use CONFIG_SYS_HZ to config timer prescalerDaniel Hellstrom2014-05-081-8/+9
| | | | | | Before it was hardcoded to 1000 ticks per second. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
* sparc: consolidate CONFIG_{LEON, LEON2, LEON3} definitionMasahiro Yamada2014-03-211-1/+1
| | | | | | | | | | | | | | | CONFIG_LEON is already defined in arch/sparc/cpu/{leon2,leon3}/config.mk. Remove the redundant definition in board header files. All leon3 boards define CONFIG_LEON3 in board header files. Move the definition to arch/sparc/cpu/leon3/config.mk. CONFIG_LEON2 can be move to arch/sparc/cpu/leon2/config.mk as well. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Daniel Hellstrom <daniel@gaisler.com>
* sparc: convert makefiles to Kbuild styleMasahiro Yamada2013-10-311-25/+2
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Daniel Hellstrom <daniel@gaisler.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-248-139/+8
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* sparc: Fix build warnings in serial.cSimon Glass2013-03-151-10/+0
| | | | | | | | | | | | | | | | | These macros are already defined in io.h so should not be declared in serial.c. serial.c:38:0: warning: "READ_BYTE" redefined /home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:36:0: note: this is the location of the previous definition serial.c:39:0: warning: "READ_HWORD" redefined /home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:37:0: note: this is the location of the previous definition serial.c:40:0: warning: "READ_WORD" redefined /home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:38:0: note: this is the location of the previous definition serial.c:41:0: warning: "READ_DWORD" redefined /home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:39:0: note: this is the location of the previous definition Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* sparc: Fix out-of-tree buildingSimon Glass2013-03-151-7/+0
| | | | | | | | It isn't clear why the sparc cpu Makefile has its own compile line, but it does not work correctly with an out-of-tree build. Removing it fixes this problem. Perhaps it does not introduce others. Signed-off-by: Simon Glass <sjg@chromium.org>
* serial: Use default_serial_puts() in driversMarek Vasut2012-10-171-8/+1
| | | | | | | | | | Replace the in-place ad-hoc implementation of serial_puts() within the drivers with default_serial_puts() call. This cuts down on the code duplication quite a bit. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com>
* serial: Remove CONFIG_SERIAL_MULTI from serial driversMarek Vasut2012-10-151-32/+0
| | | | | | | | | | | | Remove the support for not-CONFIG_SERIAL_MULTI part from serial port drivers and some board files. Since CONFIG_SERIAL_MULTI is now enabled by default, that part is a dead code. Remove it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de> Signed-off-by: Tom Rini <trini@ti.com>
* serial: sparc: Implement CONFIG_SERIAL_MULTI into leon2 serial driverMarek Vasut2012-10-151-14/+69
| | | | | | | | | | | | | Implement support for CONFIG_SERIAL_MULTI into leon2 serial driver. This driver was so far only usable directly, but this patch also adds support for the multi method. This allows using more than one serial driver alongside the leon2 driver. Also, add a weak implementation of default_serial_console() returning this driver. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Peter Tyser <ptyser@xes-inc.com>
* dm: sparc: Fixup the compile warnings in sparc codeMarek Vasut2012-09-181-3/+3
| | | | | | Signed-off-by: Marek Vasut <marex@denx.de> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: u-boot-dm@lists.denx.de
* unify version_stringAndreas Bießmann2011-07-281-4/+1
| | | | | | | | | | | | This patch removes the architecture specific implementation of version_string where possible. Some architectures use a special place and therefore we provide U_BOOT_VERSION_STRING definition and a common weak symbol version_string. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> CC: Mike Frysinger <vapier@gentoo.org> CC: Peter Pan <pppeterpppan@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
* Fix misc spelling errors found by lintianLoïc Minier2011-04-121-2/+2
| | | | Signed-off-by: Loïc Minier <loic.minier@linaro.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>
* Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated valueWolfgang Denk2010-10-261-0/+1
| | | | | | | | | | | | | | | | | | CONFIG_SYS_GBL_DATA_SIZE has always been just a bad workarond for not being able to use "sizeof(struct global_data)" in assembler files. Recent experience has shown that manual synchronization is not reliable enough. This patch renames CONFIG_SYS_GBL_DATA_SIZE into GENERATED_GBL_DATA_SIZE which gets automatically generated by the asm-offsets tool. In the result, all definitions of this value can be deleted from the board config files. We have to make sure that all files that reference such data include the new <asm-offsets.h> file. No other changes have been done yet, but it is obvious that similar changes / simplifications can be done for other, related macro definitions as well. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Kumar Gala <galak@kernel.crashing.org>
* Rename TEXT_BASE into CONFIG_SYS_TEXT_BASEWolfgang Denk2010-10-183-5/+6
| | | | | | | | | | | | The change is currently needed to be able to remove the board configuration scripting from the top level Makefile and replace it by a simple, table driven script. Moving this configuration setting into the "CONFIG_*" name space is also desirable because it is needed if we ever should move forward to a Kconfig driven configuration system. Signed-off-by: Wolfgang Denk <wd@denx.de>
* 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>
* sparc: Move cpu/leon[23] to arch/sparc/cpu/leon[23]Peter Tyser2010-04-138-0/+2379
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
OpenPOWER on IntegriCloud