summaryrefslogtreecommitdiffstats
path: root/arch/nios2
Commit message (Collapse)AuthorAgeFilesLines
* arch: Make board selection choices optionalJoe Hershberger2015-05-121-0/+1
| | | | | | | | | | | | By making the board selections optional, every defconfig will include the board selection when running savedefconfig so if a new board is added to the top of the list of choices the former top's defconfig will still be correct. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Cc: Tom Rini <trini@konsulko.com>
* fdt: nios: Fix warning in ft_cpu_setup()Simon Glass2015-04-101-2/+0
| | | | | | | This function should not return a value. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Thomas Chou <thomas@wytron.com.tw>
* generic-board: select SYS_GENERIC_BOARD for some architecturesMasahiro Yamada2015-03-281-1/+0
| | | | | | | | | | | | We have done with the generic board conversion for all the boards of ARC, Blackfin, M68000, MicroBlaze, MIPS, NIOS2, Sandbox, X86. Let's select SYS_GENERIC_BOARD for those architectures, so we can tell which architecture has finished the conversion at a glance. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com>
* generic-board: move __HAVE_ARCH_GENERIC_BOARD to KconfigMasahiro Yamada2015-03-281-2/+0
| | | | | | | | Move the option to Kconfig renaming it to CONFIG_HAVE_GENERIC_BOARD. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Alexey Brodkin <abrodkin@synopsys.com>
* Kbuild: introduce Makefile in arch/$ARCH/Daniel Schwierzeck2014-12-081-0/+8
| | | | | | | | | | | | | | | Introduce a Makefile under arch/$ARCH/ and include it in the top Makefile (similar to Linux kernel). This allows further refactoringi like moving architecture-specific code out of global makefiles, deprecating config variables (CPU, CPUDIR, SOC) or deprecating arch/$ARCH/config.mk. In contrary to Linux kernel, U-Boot defines the ARCH variable by Kconfig, thus the arch Makefile can only included conditionally after the top config.mk. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* fdt: Allow ft_board_setup() to report failureSimon Glass2014-11-211-2/+6
| | | | | | | | | | | | | | | | | | This function can fail if the device tree runs out of space. Rather than silently booting with an incomplete device tree, allow the failure to be detected. Unfortunately this involves changing a lot of places in the code. I have not changed behvaiour to return an error where one is not currently returned, to avoid unexpected breakage. Eventually it would be nice to allow boards to register functions to be called to update the device tree. This would avoid all the many functions to do this. However it's not clear yet if this should be done using driver model or with a linker list. This work is left for later. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de>
* kconfig: remove redundant "string" type in arch and board KconfigsMasahiro Yamada2014-09-131-1/+0
| | | | | | | | | | | | | | | | | | Now the types of CONFIG_SYS_{ARCH, CPU, SOC, VENDOR, BOARD, CONFIG_NAME} are specified in arch/Kconfig. We can delete the ones in arch and board Kconfig files. This commit can be easily reproduced by the following command: find . -name Kconfig -a ! -path ./arch/Kconfig | xargs sed -i -e ' /config[[:space:]]SYS_\(ARCH\|CPU\|SOC\|\VENDOR\|BOARD\|CONFIG_NAME\)/ { N s/\n[[:space:]]*string// } ' Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* nios2: link to CONFIG_SYS_MONITOR_BASE and remove text_base hookThomas Chou2014-08-301-0/+2
| | | | | | | This patch changes the link script to base at CONFIG_SYS_MONITOR_BASE. Then we can remove the text_base hook in nios2-generic board. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: move nios2.h to arch asm directoryThomas Chou2014-08-303-2/+42
| | | | | | | The nios2.h is nios2 cpu specific, and should go arch asm directory. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: divide nios2-io.h into each specific drivers and remove itThomas Chou2014-08-303-4/+25
| | | | | | | | | | The nios2-io.h defines hardware registers and bits of several FPGA IP cores. It could be divided in to the specific drivers, including altera timer, altera sysid, altera uart and altera jtag uart. The altera pio and altera spi drivers use their own hardware definitions. The removal of nios2-io.h will help modularity and maintenance. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: remove EPCS driverThomas Chou2014-08-242-718/+1
| | | | | | | The Altera EPCS is SPI flash. We have been using SPI flash driver to access EPCS for years. The old EPCS driver could be removed. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: add generic board supportThomas Chou2014-08-247-162/+49
| | | | | | | | | 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>
* nios2: remove obsolete PCI5441 and PK1C20 boardsThomas Chou2014-08-241-8/+0
| | | | Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* nios2: Fix printf size_t format related warnings (again...)Vasili Galka2014-08-241-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling the current code on GCC 4.8.3, the following warnings appear: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'long unsigned int' [-Wformat=] There were many mails about such warnings on different architectures. This patch limits itself to the nios2 architecture. The problem is that for the size_t (%zu, %zd, ...) arguments of printf GCC does not verify the type match to size_t type. It verifies the type match to the compiler-defined __SIZE_TYPE__ type. Thus, if size_t is defined different from __SIZE_TYPE__ - warnings inevitably appear. There is a comment by Thomas Chou to the (rejected) patch: http://patchwork.ozlabs.org/patch/272102/ which explains that the older GCC toolchains (gcc-3.4.6 and gcc-4.1.2) expect size_t to be "unsigned long" and the newer expect it to be "unsigned int". Thus, no matter how we define size_t - either way warnings appear when using some GCC version. By rejecting that patch, a choice was made to prefer older GCC versions and leave the warnings when building with the newer toolchains. Personally, I disagree with this choice... In any case, this patch proposes a way to fix the warnings for any GCC version. Just define size_t using the __SIZE_TYPE__ compiler-defined type and the type verification will pass. I tested that this fixes the warning on GCC 4.8.3. I don't have an older toolchain to test with, but __SIZE_TYPE__ was definitely defined in GCC 3.4.6, so it should work there too. Signed-off-by: Vasili Galka <vvv444@gmail.com> Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* kconfig: delete redundant CONFIG_${ARCH} definitionMasahiro Yamada2014-07-301-1/+1
| | | | | | | CONFIG_${ARCH} is defined by Kconfig. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kconfig: add board Kconfig and defconfig filesMasahiro Yamada2014-07-301-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds: - arch/${ARCH}/Kconfig provide a menu to select target boards - board/${VENDOR}/${BOARD}/Kconfig or board/${BOARD}/Kconfig set CONFIG macros to the appropriate values for each board - configs/${TARGET_BOARD}_defconfig default setting of each board (This commit was automatically generated by a conversion script based on boards.cfg) In Linux Kernel, defconfig files are located under arch/${ARCH}/configs/ directory. It works in Linux Kernel since ARCH is always given from the command line for cross compile. But in U-Boot, ARCH is not given from the command line. Which means we cannot know ARCH until the board configuration is done. That is why all the "*_defconfig" files should be gathered into a single directory ./configs/. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* bd_info: remove bi_barudrate member from struct bd_infoMasahiro Yamada2014-05-122-2/+0
| | | | | | | | | | | | | | | | | gd->bd->bi_baudrate is a copy of gd->baudrate. Since baudrate is a common feature for all architectures, keep gd->baudrate only. It is true that bi_baudrate was passed to the kernel in that structure but it was a long time ago. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Rini <trini@ti.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de> Acked-by: Michal Simek <monstr@monstr.eu> (For microblaze)
* kbuild: fix CROSS_COMPILE settings in config.mkMasahiro Yamada2014-03-041-1/+3
| | | | | | | | | | | | | | | | The syntax CROSS_COMIPLE ?= <cross_compiler_prefix> does not work because config.mk is parsed after exporting CROSS_COMPILE. Like Linux Kernel's arch/$(ARCH)/Makefile, we must write as follows: ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := <cross_compiler_prefix> endif Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* nios2: convert makefiles to Kbuild styleMasahiro Yamada2013-11-012-51/+9
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Thomas Chou <thomas@wytron.com.tw>
* Coding Style cleanup: replace leading SPACEs by TABsWolfgang Denk2013-10-142-2/+2
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Drop changes for PEP 4 following python tools] Signed-off-by: Tom Rini <trini@ti.com>
* Coding Style cleanup: remove trailing white spaceWolfgang Denk2013-10-142-2/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* nios2: fix missing comment terminator from SPDX License commitThomas Chou2013-09-061-0/+1
| | | | | | | | | | The commit 1a4596601fd395f3afb8f82f3f840c5e00bdd57a Add GPL-2.0+ SPDX-License-Identifier to source files generated a warning due to a missing comment terminator. longlong.h:7:1: warning: "/*" within comment Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-2432-536/+32
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Build arch/$ARCH/lib/bootm.o depending on CONFIG_CMD_BOOTMDirk Eibach2013-07-161-1/+1
| | | | | | | | MAKEALL is fine for ppc4xx and mpc85xx. Run checks were done on our controlcenterd hardware. Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Andy Fleming <afleming@freescale.com>
* avr32/m68k/microblaze/nds32/nios2/openrisc/sh/sparc: fix do_bootm_linuxAndreas Bießmann2013-07-021-0/+6
| | | | | | | | | | | | Commit 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 broke bootm on avr32. It requires to call do_bootm_linux() with flag set to BOOTM_STATE_OS_PREP before calling it again with flag set to BOOTM_STATE_OS_GO. Fix this by allowing flag set to BOOTM_STATE_OS_PREP, this however will require a complete refactoring later on. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> [trini: Apply to m68k, microblaze, nds32, nios2, openrisc, sh and sparc] Signed-off-by: Tom Rini <trini@ti.com>
* Clarify bootm OS argumentsSimon Glass2013-06-261-2/+2
| | | | | | | | | | | | | | At present the arguments to bootm are processed in a somewhat confusing way. Sub-functions must know how many arguments their calling functions have processed, and the OS boot function must also have this information. Also it isn't obvious that 'bootm' and 'bootm start' provide arguments in the same way. Adjust the code so that arguments are removed from the list before calling a sub-function. This means that all functions can know that argv[0] is the first argument of which they need to take notice. Signed-off-by: Simon Glass <sjg@chromium.org>
* lib: consolidate hang()Andreas Bießmann2013-05-011-11/+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>
* nios2: fix style in board.c.Andreas Bießmann2013-05-011-22/+21
| | | | | | Make nios2's board.c checkpatch clean. Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-03-181-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-121-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>
* | Introduce generic link section.h symbol filesSimon Glass2013-03-151-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-152-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>
* Clean up libfdt.h includesGerald Van Baren2013-02-081-1/+0
| | | | | | | | | | The libfdt.h file is the definition file for libfdt. It is unnecessary to include other fdt header files (the necessary ones are pulled in by libfdt.h). Signed-off-by: Gerald Van Baren <gvb@unssw.com> Acked-by: Simon Glass <sjg@chromium.org> Acked-by: Stefan Roese <sr@denx.de>
* nios2: Use generic global_dataSimon Glass2013-02-041-23/+1
| | | | | | | Move nios2 over to use generic global_data. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Thomas Chou <thomas@wytron.com.tw>
* Add architecture-specific global dataSimon Glass2013-02-011-0/+5
| | | | | | | | | | | | | 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>
* nios2: remove asm/status_led.hThomas Chou2012-11-101-31/+0
| | | | | | | | | The file has a wrong inline keyword of __led_toggle(), which causes compilation error. And its content is defined in common status_led.h. So define CONFIG_BOARD_SPECIFIC_LED in board config files and remove this header file. Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
* 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: Change bi_baudrate and global data baudrate to intSimon Glass2012-10-192-2/+2
| | | | | | | These don't need to be longs, so change them. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* global_data: unify global flag definesMike Frysinger2012-08-091-9/+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>
* nios2: move gd and bd into BSSThomas Chou2012-07-161-7/+5
| | | | | | | | | As suggested by Graeme Russ, move gd and bd data structrures to BSS instead of calculating the locations around the stack and heap. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Acked-by: Mike Frysinger <vapier@gentoo.org>
* net: punt bd->bi_ip_addrMike Frysinger2012-05-152-3/+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>
* 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: add flush_dcache_range functionStefan Kristiansson2012-02-231-0/+10
| | | | | | | | | exposes functionality to flush dcache according to the common.h API Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Cc: Thomas Chou <thomas@wytron.com.tw> 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>
* gpio: Add driver for Altera's PIO coreJoachim Foerster2011-10-281-2/+11
| | | | | | | | | | | | This driver may handle multiple PIO cores and thus needs to be setup by calling the altera_pio_init() function within the early board setup routine. The driver comes with some extras, see below the copyleft header. Signed-off-by: Joachim Foerster <joachim.foerster@missinglinkelectronics.com> Tested-by: Thomas Chou <thomas@wytron.com.tw> 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>
* nios2: cache: define ARCH_DMA_MINALIGN for DMA buffer alignmentAnton Staaf2011-10-231-0/+11
| | | | | | | Signed-off-by: Anton Staaf <robotboy@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Scott McNutt <smcnutt@psyent.com>
* net: drop !NET_MULTI codeMike Frysinger2011-10-051-2/+0
| | | | | | | | | | | This is long over due. All but two net drivers have been converted, but those have now been dropped. The only thing left to do is actually delete all references to NET_MULTI and code that is compiled when that is not defined. So here we scrub the core code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* image: push default arch values to arch headersMike Frysinger2011-10-051-0/+2
| | | | | | | | | This pushes the ugly duplicated arch ifdef lists we maintain in various image related files out to the arch headers themselves. Acked-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Tested-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
OpenPOWER on IntegriCloud