summaryrefslogtreecommitdiffstats
path: root/arch/nios2/cpu
Commit message (Collapse)AuthorAgeFilesLines
* common: Discard the __u_boot_cmd sectionMarek Vasut2012-10-221-7/+0
| | | | | | | | | | | The command declaration now uses the new LG-array method to generate list of commands. Thus the __u_boot_cmd section is now superseded and redundant and therefore can be removed. Also, remove externed symbols associated with this section from include/command.h . Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
* common: Add .u_boot_list into all linker filesMarek Vasut2012-10-221-0/+5
| | | | | | | | | | Add section for the linker-generated lists into all possible linker files, so that everyone can easily use these lists. This is mostly a mechanical adjustment. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
* nios2: implement get_ticks and get_tbclkAlex Hornung2012-02-231-0/+21
| | | | | | | | * Copy over Blackfin's get_ticks and get_tbclk - they work just fine on Nios2. Signed-off-by: Alex Hornung <alex@alexhornung.com> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: Offer ft_board_setup() capability and call fdt_fixup_ethernet().Joachim Foerster2011-10-302-0/+54
| | | | | | | | The main motivation is, to have the local-mac-address property of the ethernet peripherals fixed/synced with U-Boot's environment settings. Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: Pseudo implement dcache_status/enable/disable()Joachim Foerster2011-10-281-0/+16
| | | | | | | | | | | AFAIK the NIOS2 architecture does not have any possibility to dynamically switch off the data cache. So _status() always reports 1 and _enable/_disable() just issue a flush of everything. For example, common/cmd_elf.c depends on these symbols. Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* 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>
* Timer: Remove set_timer completelyGraeme Russ2011-07-261-6/+0
|
* rename _end to __bss_end__Po-Yu Chuang2011-03-272-4/+4
| | | | | | | 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>
* Remove redundant config.mk filesWolfgang Denk2010-12-091-24/+0
| | | | | | | | | | | | | | | | | | | | | | | Recent cleanup actions resulted in a number of config.mk files that contained only redundant entries like PLATFORM_CPPFLAGS += -I$(TOPDIR) or settings of variables that were not used anywhere in the code, like TEXT_END = 0xfe080000 Remove these unnecessary files. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Scott McNutt <smcnutt@psyent.com> Cc: Wolfgang Wegner <w.wegner@astro-kom.de> Cc: Josef Wagner <Wagner@Microsys.de> Cc: Tolunay Orkun <torkun@nextio.com> Cc: Frank Panno <fpanno@delphintech.com> Cc: Heiko Schocher <hs@denx.de> Cc: Brad Kemp <Brad.Kemp@seranoa.com> Acked-by: Heiko Schocher<hs@denx.de>
* do_reset: unify duplicate prototypesMike Frysinger2010-11-281-1/+1
| | | | | | | The duplication of the do_reset prototype has gotten out of hand, and they're not all in sync. Unify them all in command.h. 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>
* 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 out of reach case for do_resetThomas Chou2010-08-191-6/+5
| | | | | | | | | | | | | | | | | There is a limitation (or bug?) of nios2 toolchain. The nios2 gcc didn't generate correct code when the reset vector is passed as a constant. It just generated a direct "call", which was wrong when the reset vector was not located in the same 256MB span as u-boot. The "Nios II Processor Reference Handbook" said, "call can transfer execution anywhere within the 256 MByte range determined by PC31..28. The Nios II GNU linker does not automatically handle cases in which the address is out of this range." So we have to use registered "callr" instruction to do the job. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Scott McNutt <smcnutt@psyent.com>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-043-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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 individual board linker scripts to common script in cpu tree.Scott McNutt2010-04-161-0/+135
| | | | Signed-off-by: Scott McNutt <smcnutt@psyent.com>
* nios2: Move cpu/nios2/* to arch/nios2/cpu/*Peter Tyser2010-04-139-0/+1592
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
OpenPOWER on IntegriCloud