summaryrefslogtreecommitdiffstats
path: root/arch/nios2/cpu/start.S
Commit message (Collapse)AuthorAgeFilesLines
* nios2: set up the debug UART earlyThomas Chou2016-02-061-0/+7
| | | | | | | Set up the debug UART early if enabled, so that it is ready to use. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Chin Liang See <clsee@altera.com>
* Fix board init code to respect the C runtime environmentAlbert ARIBAUD2016-01-131-5/+9
| | | | | | | | | | | | | board_init_f_mem() alters the C runtime environment's stack it is actually already using. This is not a valid behaviour within a C runtime environment. Split board_init_f_mem into C functions which do not alter their own stack and always behave properly with respect to their C runtime environment. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: fix cached mode in clearing the BSSThomas Chou2015-11-061-1/+1
| | | | | | | | As the generic board runs in cached mode, it should not use "stwio" which bypass the cache. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Chin Liang See <clsee@altera.com>
* nios2: remove CONFIG_SYS_INIT_SP macroThomas Chou2015-11-061-2/+1
| | | | | | | | | Remove CONFIG_SYS_INIT_SP macro, as the initial stack is set to below the u-boot code. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Chin Liang See <clsee@altera.com>
* nios2: convert copy_exception_trampoline to use dm cpu dataThomas Chou2015-10-231-24/+1
| | | | | | Convert copy_exception_trampoline() to use dm cpu data. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: set default cache configuration in start.SThomas Chou2015-10-231-7/+15
| | | | | | | | | | | | | | | | | | | Set default icache and dcache configuration for start.S. We want to remove the CONFIG_SYS_{I,D}CACHE_SIZE... configuration macros. As we are just barely starting from reset, there is no luxury of device tree. We will set some maximum cache configuration so that it will work for most configurations. This is used only in this start.S. The speed penalty is only once here. After start up, during board initialization, cpu information will be extracted from device tree. Then cache flush operations will have correct cache configurations. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: clean up comments style in start.SThomas Chou2015-10-231-31/+30
| | | | | | Clean up comments style in start.S. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: call board_init_f_memThomas Chou2015-10-231-0/+10
| | | | | | | | | | We will need CONFIG_SYS_MALLOC_F_LEN to use serial uclass. So we shall undefine CONFIG_SYS_GENERIC_GLOBAL_DATA, and call board_init_f_mem() to allocates early malloc() memory with size of CONFIG_SYS_MALLOC_F_LEN in board_f.c. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Reviewed-by: Marek Vasut <marex@denx.de>
* nios2: zap version_stringThomas Chou2015-10-231-6/+0
| | | | | | | | There is a weak version_string[] at common/cmd_version.c . Remove the one in start.S. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: zap dly_clksThomas Chou2015-10-231-33/+0
| | | | | | | | The dly_clks() in start.S is no use after switching to generic timer. Remove it. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: enlarge the code relocation rangeThomas Chou2015-10-231-2/+3
| | | | | | | | | As we will use u-boot-dtb.bin, the code relocation range should be adjusted to accommodate the additional dtb. It might be overkilled to look into dtb header to find the dtb size, so we will simply use CONFIG_SYS_MONITOR_LEN. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: BSS should be cleared only after board_init_fThomas Chou2015-10-231-14/+16
| | | | | | | | | As dtb in u-boot-dtb.bin overlapped the BSS section, we should delay the clearing of BSS until dtb is relocated in board_init_f(). Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Marek Vasut <marex@denx.de>
* nios2: add generic board supportThomas Chou2014-08-241-4/+30
| | | | | | | | | This patch implements the generic board init as described in doc/README.generic-board. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com> Reviewed-by: Stefan Roese <sr@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Replace __bss_end__ with __bss_endSimon Glass2013-03-151-3/+3
| | | | | | | | | | | | | Note this is a tree-wide change affecting multiple architectures. At present we use __bss_start, but mostly __bss_end__. This seems inconsistent and in a number of places __bss_end is used instead. Change to use __bss_end for the BSS end symbol throughout U-Boot. This makes it possible to use the asm-generic/sections.h file on all archs. Signed-off-by: Simon Glass <sjg@chromium.org>
* unify version_stringAndreas Bießmann2011-07-281-8/+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>
* rename _end to __bss_end__Po-Yu Chuang2011-03-271-3/+3
| | | | | | | Currently, _end is used for end of BSS section. We want _end to mean end of u-boot image, so we rename _end to __bss_end__ first. Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
* Replace CONFIG_SYS_GBL_DATA_SIZE by auto-generated valueWolfgang Denk2010-10-261-1/+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>
* nios2: fix r15 issue for gcc4Thomas Chou2010-05-281-7/+0
| | | | | | | | | | The "-ffixed-r15" option doesn't work well for gcc4. Since we don't use gp for small data with option "-G0", we can use gp as global data pointer. This allows compiler to use r15. It is necessary for gcc4 to work properly. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
* nios2: consolidate reset initializationThomas Chou2010-04-241-5/+4
| | | | | | | Global interrupt should be disabled from the beginning. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
* nios2: Move cpu/nios2/* to arch/nios2/cpu/*Peter Tyser2010-04-131-0/+217
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
OpenPOWER on IntegriCloud