summaryrefslogtreecommitdiff
path: root/arch/nds32
Commit message (Collapse)AuthorAgeLines
* nds32: Use sections header to obtain link symbolsKuan-Yu Kuo2013-05-08-6/+2
| | | | | | | | Include this header to get access to link symbols, which are otherwise removed. Signed-off-by: Kuan-Yu Kuo <ken.kuoky@gmail.com> Cc: Macpaul Lin <macpaul@gmail.com>
* lib: consolidate hang()Andreas Bießmann2013-05-01-7/+0
| | | | | | | | | Delete all occurrences of hang() and provide a generic function. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net> [trini: Modify check around puts() in hang.c slightly] Signed-off-by: Tom Rini <trini@ti.com>
* Consolidate bool typeYork Sun2013-04-01-1/+1
| | | | | | | | | | | | | 'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-03-18-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Albert's rework of the linker scripts conflicted with Simon's making everyone use __bss_end. We also had a minor conflict over README.scrapyard being added to in mainline and enhanced in u-boot-arm/master with proper formatting. Conflicts: arch/arm/cpu/ixp/u-boot.lds arch/arm/cpu/u-boot.lds arch/arm/lib/Makefile board/actux1/u-boot.lds board/actux2/u-boot.lds board/actux3/u-boot.lds board/dvlhost/u-boot.lds board/freescale/mx31ads/u-boot.lds doc/README.scrapyard include/configs/tegra-common.h Build tested for all of ARM and run-time tested on am335x_evm. Signed-off-by: Tom Rini <trini@ti.com>
| * Refactor linker-generated arraysAlbert ARIBAUD2013-03-12-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor linker-generated array code so that symbols which were previously linker-generated are now compiler- generated. This causes relocation records of type R_ARM_ABS32 to become R_ARM_RELATIVE, which makes code which uses LGA able to run before relocation as well as after. Note: this affects more than ARM targets, as linker- lists span possibly all target architectures, notably PowerPC. Conflicts: arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds arch/arm/cpu/armv7/omap-common/u-boot-spl.lds board/ait/cam_enc_4xx/u-boot-spl.lds board/davinci/da8xxevm/u-boot-spl-da850evm.lds board/davinci/da8xxevm/u-boot-spl-hawk.lds board/vpac270/u-boot-spl.lds Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
* | Change stub example to use asm-generic/sections.hSimon Glass2013-03-15-4/+4
| | | | | | | | | | | | | | We can use the declarations of __bss_start and _end from this header instead of declaring them locally. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Introduce generic link section.h symbol filesSimon Glass2013-03-15-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We create a separate header file for link symbols defined by the link scripts. It is helpful to have these all in one place and try to make them common across architectures. Since Linux already has a similar file, we bring this in even though many of the symbols there are not relevant to us. Each architecture has its own asm/sections.h where symbols specifc to that architecture can be added. For now everything except AVR32 just includes the generic header. One change is needed in arch/avr32/lib/board.c to make this conversion work. Reviewed-by: Tom Rini <trini@ti.com> (version 5) Signed-off-by: Simon Glass <sjg@chromium.org>
* | Replace __bss_end__ with __bss_endSimon Glass2013-03-15-4/+4
|/ | | | | | | | | | | | | 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>
* malloc: make malloc_bin_reloc staticGabor Juhos2013-02-19-1/+0
| | | | | | | | | | | | | | | | | | | On architectures where manual relocation is needed, the 'malloc_bin_reloc' function must be called after 'mem_malloc_init'. Make the 'malloc_bin_reloc' function static and call it directly from 'mem_malloc_init' instead of calling that from board_init_{r,f} functions of the affected architectures. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Wolfgang Denk <wd@denx.de> Cc: Andreas Bießmann <andreas.devel@gmail.com> Cc: Jason Jin <Jason.jin@freescale.com> Cc: Macpaul Lin <macpaul@andestech.com> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
* nds32: Add a basic errno.hSimon Glass2013-02-18-0/+1
| | | | | | | This is available on other architectures, and nds32 will start to break without it as code starts to use error numbers more. Signed-off-by: Simon Glass <sjg@chromium.org>
* nds32: Use generic global_dataSimon Glass2013-02-04-31/+1
| | | | | | Move nds32 over to use generic global_data. Signed-off-by: Simon Glass <sjg@chromium.org>
* nds32: Drop tlb_addr from global dataSimon Glass2013-02-01-14/+0
| | | | | | This field doesn't appear to be used for anything important, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add architecture-specific global dataSimon Glass2013-02-01-0/+6
| | | | | | | | | | | | | We plan to move architecture-specific data into a separate structure so that we can make the rest of it common. As a first step, create struct arch_global_data to hold these fields. Initially it is empty. This patch applies to all archs at once. I can split it if this is really a pain. Signed-off-by: Simon Glass <sjg@chromium.org>
* common: Discard the __u_boot_cmd sectionMarek Vasut2012-10-22-3/+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: Convert the U-Boot commands to LG-arraysMarek Vasut2012-10-22-2/+2
| | | | | | | | | | | | | | | | | | This patch converts the old method of creating a list of command onto the new LG-arrays code. The old u_boot_cmd section is converted to new u_boot_list_cmd subsection and LG-array macros used as needed. Minor adjustments had to be made to the common code to work with the LG-array macros, mostly the fixup_cmdtable() calls are now passed the ll_entry_start and ll_entry_count instead of linker-generated symbols. The command.c had to be adjusted as well so it would use the newly introduced LG-array API instead of directly using linker-generated symbols. 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-22-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>
* nds32: Change global data baudrate to intSimon Glass2012-10-19-2/+2
| | | | | | | | | This doesn't need to be a long, so change it. Also adjust bi_baudrate to be unsigned. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* nds32: Change macro from BOARD_LATE_INIT to CONFIG_BOARD_LATE_INITNobuhiro Iwamatsu2012-10-17-1/+1
| | | | | | | | | | | With almost all the architecture and board BOARD_LATE_INIT does not use. CONFIG_BOARD_LATE_INIT is used instead. This changed CONFIG_BOARD_LATE_INIT from BOARD_LATE_INIT. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> CC: Macpaul Lin <macpaul@andestech.com> [trini: Fixup for context changes] Signed-off-by: Tom Rini <trini@ti.com>
* serial: Remove CONFIG_SERIAL_MULTI from remaining sourcesMarek Vasut2012-10-15-2/+0
| | | | | | | | | | | | Remove the parts depending either on disabled CONFIG_SERIAL_MULTI or ifdefs around CONFIG_SERIAL_MULTI parts since CONFIG_SERIAL_MULTI is now enabled by default. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Marek Vasut <marek.vasut@gmail.com> Cc: Tom Rini <trini@ti.com> Cc: Anatolij Gustschin <agust@denx.de> Cc: Stefan Roese <sr@denx.de>
* malloc: remove extern declarations of malloc_bin_reloc() in board.c filesDaniel Schwierzeck2012-09-26-2/+0
| | | | | | | | | | | | | Declare malloc_bin_reloc() in malloc.h and remove all extern declarations in various board.c files to get rid of one checkpatch.pl warning. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Andreas Bießmann <andreas.devel@gmail.com> Cc: Jason Jin <Jason.jin@freescale.com> Cc: Macpaul Lin <macpaul@andestech.com> Cc: Daniel Hellstrom <daniel@gaisler.com> Acked-by: Andreas Bießmann <andreas.devel@gmail.com>
* nds32: fix unused pmu_init warningMike Frysinger2012-08-11-0/+2
| | | | | | | | | | | Fixes the build-time warning: board.c: At top level: board.c:106: warning: 'pmu_init' defined but not used This makes the ifdef logic at the call site match the logic at the function definition. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* nds32: delete unused local variableMike Frysinger2012-08-11-1/+0
| | | | | | | | Fixes the build-time warning: board.c: In function 'board_init_r': board.c:304: warning: unused variable 's' Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* nds32: drop bi_enetaddr from global dataMike Frysinger2012-08-11-1/+0
| | | | | | | Nothing is using this, so punt it from the gd. Seems to just be a copy & paste wart from the initial port. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* global_data: unify global flag definesMike Frysinger2012-08-09-13/+1
| | | | | | | All the global flag defines are the same across all arches. So unify them in one place, and add a simple way for arches to extend for their needs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* nds32: split common cache access from cpu into libMacpaul Lin2012-07-20-225/+158
| | | | | | | | | | | This commit does the following updates. 1. Split the common cache access from cpu.c into lib folder. 2. Rename the following cache api to adapt common.h - dcache_flush_rang -> flush_dcache_rang - icache_inval_range -> invalidate_icache_range 3. Add invalidate_dcache_range Signed-off-by: Macpaul Lin <macpaul@gmail.com>
* net: move bootfile init into eth_initializeMike Frysinger2012-05-15-6/+0
| | | | | | | | All arches init this the same way, so move the logic into the core net code to avoid duplicating it everywhere else. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* net: punt bd->bi_ip_addrMike Frysinger2012-05-15-4/+0
| | | | | | | | | This field gets read in one place (by "bdinfo"), and we can replace that with getenv("ipaddr"). After all, the bi_ip_addr field is kept up-to-date implicitly with the value of the ipaddr env var. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* nds32/ag102: add ag102 soc supportMacpaul Lin2012-04-22-0/+804
| | | | | | Add lowlevel ag102 soc support. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32/ag102: add header support of ag102 socMacpaul Lin2012-04-22-0/+165
| | | | | | | | Add device address offsets header of ag102 soc. Add ag102 into mach-types.h. Add asm-offsets.c for helping convert C headers into asm. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32/n1213: correct vector table in start.SMacpaul Lin2012-03-19-3/+19
| | | | | | Correct definition of vector table in start.S Signed-off-by: Macpaul Lin <macpaul@gmail.com>
* nds32: fix ptrace and interrupt register overflowMacpaul Lin2012-03-19-1/+3
| | | | | | | | Fix ptrace and interrupt register overflow warning. Add missing P0 and P1 (r26 and r27) into register lists. These register are usually used in OS. Signed-off-by: Macpaul Lin <macpaul@gmail.com>
* bootstage: Replace show_boot_progress/error() with bootstage_...()Simon Glass2012-03-18-1/+1
| | | | | | | These calls should not be made directly any more, since bootstage will call the show_boot_...() functions as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootstage: Make use of BOOTSTAGE_ID_RUN_OS in show_boot_progress()Simon Glass2012-03-18-1/+1
| | | | | | | | | This changes the number 15 as used in boot_stage_progress() to use the new name provided for it. This is a separate patch because it touches so many files. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
* nds32/board.c: add PCI prompt at boot upMacpaul Lin2012-02-28-0/+1
| | | | | | add PCI prompt at boot up for probing PCI device Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32/ag101/watchdog.S: add linkage supportMacpaul Lin2012-02-28-2/+3
| | | | | | Add linkage support to watchdog.S. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32: add linkage supportMacpaul Lin2012-02-28-0/+28
| | | | | | Add linkage support. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32/ag101: clean up for SoC related codeMacpaul Lin2011-11-23-10/+6
| | | | | | | | Remove unneccessary codes. 1. Clean up for cpu related code. 2. Clean up for timer related code. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32/lib: add ide generic supportMacpaul Lin2011-11-18-0/+5
| | | | | | Add ide generic support. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32: enhance io.h for compatibility with periphalsMacpaul Lin2011-11-18-0/+18
| | | | | | | Enhance io.h for periphals origin design on x86 systems. For example, pci, ide, etc. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* adp-ag101p: Add SoC and board support of ag101pMacpaul Lin2011-11-10-0/+14
| | | | | | Add softcore SoC ag101p and the board adp-ag101p support. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32: fix data section of linker scriptMacpaul Lin2011-11-09-1/+1
| | | | | | | | Make linker script handles .data.rel sections. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Tested-by: Macpaul Lin <macpaul@gmail.com> Cc: Mike Frysinger <vapier@gentoo.org>
* nds32: asm/io.h: add __iormb __iowmb and inline io supportMacpaul Lin2011-11-01-20/+52
| | | | | | | | | 1. This patch add required __iormb and __iowmb to io.h. This also fix some misbehavior to periphal drivers. This io.h has been fixed with referencing arm/include/asm/io.h. 2. This patch replaced macro writeb and readb into inline function. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32: cache: define ARCH_DMA_MINALIGN for DMA buffer alignmentMacpaul Lin2011-11-01-0/+11
| | | | | | Add ARCH_DMA_MINALIGN definition to asm/cache.h Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32: Use getenv_ulong() in place of getenv(), strtoulMacpaul Lin2011-11-01-10/+2
| | | | | | This changes the board code to use the new getenv_ulong() function. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32/lib: add generic funcs in NDS32 libMacpaul Lin2011-10-22-0/+890
| | | | | | | Add Makefile, board.c, interrupts.c and bootm.c functions to nds32 architecture. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32/ag101: cpu and init funcs of SoC ag101Macpaul Lin2011-10-22-0/+895
| | | | | | | | | | | | | SoC ag101 is the first chip using NDS32 N1213 cpu core. Add header file of device offset support for SoC ag101. Add main function of SoC ag101 based on NDS32 n1213 core. Add lowlevel_init.S and other periphal related code. This version of lowlevel_init.S also replace hardcode value by MARCO defines from the GPL version andesboot for better code quality. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
* nds32/core N1213: NDS32 N12 core family N1213Macpaul Lin2011-10-22-0/+649
| | | | | | | | | | | | | Add N1213 cpu core (N12 Core family) support for NDS32 arch. This patch includes start.S for the initialize procedure of N1213. Start procedure: start.S will start up the N1213 CPU core at first, then jump to SoC dependent "lowlevel_init.S" and "watchdog.S" to configure peripheral devices. Signed-off-by: Macpaul Lin <macpaul@andestech.com> Signed-off-by: Greentime Hu <greentime@andestech.com>
* nds32: add header files support for nds32Macpaul Lin2011-10-22-0/+1450
Add generic header files support for nds32 architecture. Cache, ptregs, data type and other definitions are included. Signed-off-by: Macpaul Lin <macpaul@andestech.com>